:root {
  --bg: #FBF4E4;           /* crema claro, no blanco */
  --bg-alt: #F4E9CF;
  --surface: #FFFCF5;
  --ink: #1E2B25;
  --muted: #58665E;
  --line: rgba(30, 43, 37, .10);
  --green: #0F3D2E;        /* verde de Ábaco */
  --green-2: #17573F;
  --yellow: #F2B705;       /* amarillo del logo */
  --radius: 20px;
  --shadow: 0 1px 2px rgba(30,43,37,.06), 0 10px 30px rgba(30,43,37,.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -.02em; }
p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; }

.wrap { width: min(1080px, 100% - 2rem); margin-inline: auto; }

.eyebrow {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #8A6700;
  margin-bottom: .8rem;
}
.eyebrow--light { color: var(--yellow); }

/* Barra superior */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(251, 244, 228, .88);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; font-size: 1.02rem; }
.brand img { border-radius: 50%; }
.topbar nav { display: flex; gap: .3rem; }
.topbar nav a {
  text-decoration: none; font-weight: 600; font-size: .95rem;
  padding: .5rem .9rem; border-radius: 999px; color: var(--muted);
  transition: background .15s, color .15s;
}
.topbar nav a:hover { background: rgba(15, 61, 46, .08); color: var(--green); }

/* Botones */
.btn {
  display: inline-block; text-decoration: none; font-weight: 700;
  padding: .85rem 1.5rem; border-radius: 999px; font-size: 1rem;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--green); color: #fff; box-shadow: 0 6px 16px rgba(15,61,46,.25); }
.btn--primary:hover { background: var(--green-2); }
.btn--ghost { border: 2px solid var(--green); color: var(--green); padding: calc(.85rem - 2px) calc(1.5rem - 2px); }
.btn--ghost:hover { background: rgba(15,61,46,.07); }
.btn--yellow { background: var(--yellow); color: #2a2000; box-shadow: 0 6px 16px rgba(0,0,0,.2); }

/* Portada */
.hero {
  background:
    radial-gradient(900px 400px at 85% 10%, rgba(242,183,5,.22), transparent 60%),
    var(--bg);
  padding: 4.5rem 0 4rem;
}
.hero__inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 5.5vw, 3.8rem); }
.hero h1 span { color: var(--green); display: block; }
.lead { margin-top: 1.2rem; font-size: 1.15rem; color: var(--muted); max-width: 34rem; }
.actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 2rem; }
.hero__art { position: relative; display: grid; place-items: center; }
.hero__blob {
  position: absolute; width: 88%; aspect-ratio: 1; border-radius: 50%;
  background: linear-gradient(145deg, #FBD24D, var(--yellow));
  opacity: .35; filter: blur(2px);
}
.hero__art img { position: relative; width: min(340px, 90%); filter: drop-shadow(0 18px 30px rgba(30,43,37,.18)); }

/* Secciones */
.section { padding: 4.5rem 0; }
.section__head { text-align: center; margin-bottom: 2.5rem; }
.section h2, .abaco h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.4rem; }
.tile {
  display: flex; flex-direction: column; gap: .6rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.8rem; text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.tile:hover { transform: translateY(-4px); border-color: rgba(15,61,46,.25); box-shadow: 0 2px 4px rgba(30,43,37,.06), 0 18px 40px rgba(30,43,37,.13); }
.tile h3 { font-size: 1.25rem; margin-top: .6rem; }
.tile p { color: var(--muted); }
.tile__cta { margin-top: auto; padding-top: .8rem; font-weight: 700; color: var(--green); }
.tile__cta b { display: inline-block; transition: transform .15s; }
.tile:hover .tile__cta b { transform: translateX(4px); }

.icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; }
.icon svg { width: 28px; height: 28px; }
.icon--tg { background: rgba(34,158,217,.14); color: #1A8BC2; }
.icon--ab { background: rgba(15,61,46,.12); color: var(--green); }
.icon--ig { background: rgba(193,53,132,.12); color: #B02D78; }

/* Ábaco */
.abaco { background: var(--green); color: #F3EEDD; padding: 4.5rem 0; }
.abaco__inner { display: grid; grid-template-columns: 1.2fr .8fr; gap: 3rem; align-items: center; }
.abaco h2 { color: #fff; }
.abaco__text p { margin: 1rem 0 1.8rem; color: rgba(243,238,221,.85); font-size: 1.08rem; max-width: 32rem; }
.abaco__card {
  background: #fff; border-radius: 24px; padding: 1.8rem;
  display: flex; flex-direction: column; align-items: center; gap: 1.2rem;
  box-shadow: 0 20px 50px rgba(0,0,0,.28); justify-self: center; width: min(300px, 100%);
}
.abaco__logo { height: 42px; width: auto; }
.abaco__qr { width: 100%; max-width: 200px; height: auto; }

/* Instagram */
.ig {
  display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: 28px;
  padding: 2.5rem; box-shadow: var(--shadow);
  border-left: 8px solid var(--yellow);
}
.ig p:not(.eyebrow) { margin-top: .6rem; color: var(--muted); max-width: 32rem; }

/* Pie */
.footer { background: #14231C; color: #D9D4C2; padding: 2.2rem 0; }
.footer__inner { display: flex; align-items: center; gap: 1.2rem; }
.footer img { border-radius: 50%; background: #fff; }
.footer strong { color: #fff; }
.small { font-size: .85rem; opacity: .75; margin-top: .2rem; }

:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 6px; }

@media (max-width: 820px) {
  .hero { padding: 2.5rem 0 3rem; }
  .hero__inner, .abaco__inner { grid-template-columns: 1fr; gap: 2rem; }
  .hero__art { order: -1; }
  .hero__art img { width: min(230px, 70%); }
  .topbar nav a { padding: .45rem .6rem; font-size: .9rem; }
  .brand span { display: none; }
  .section, .abaco { padding: 3rem 0; }
  .ig { padding: 1.8rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* Contacto y localización */
.section--alt { background: var(--bg-alt); }
.contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.4rem; }
.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow);
}
.panel h3 { font-size: 1.3rem; margin-bottom: 1.2rem; }
.clist { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.clist li { display: flex; align-items: center; gap: 1rem; }
.clist strong { display: block; font-size: .85rem; color: var(--muted); font-weight: 600; }
.clist a, .place a { color: var(--green); font-weight: 700; text-decoration: none; }
.clist a:hover, .place a:hover { text-decoration: underline; }
.place { margin-bottom: 1rem; line-height: 1.6; }
.actions--tight { margin-top: 1.4rem; }

/* Selector de idioma */
.topbar__inner { gap: 1rem; }
.topbar nav { margin-left: auto; }
.lang {
  flex: none; display: grid; place-items: center;
  width: 46px; height: 34px; padding: 0; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 1px 2px rgba(30,43,37,.08);
  transition: transform .15s, box-shadow .15s;
}
.lang:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(30,43,37,.14); }
.flag { grid-area: 1 / 1; width: 30px; height: 20px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,.18); }
/* En gallego se muestra la bandera de España (para pasar a castellano) y viceversa */
html[lang="gl"] .flag--gl, html[lang="es"] .flag--es { display: none; }

@media (max-width: 820px) {
  .topbar__inner { gap: .4rem; }
  .topbar nav a { padding: .45rem .5rem; font-size: .88rem; }
}

/* Ajuste móvil de la barra superior */
.brand { flex: none; }
.brand img { flex: none; }
@media (max-width: 820px) {
  .brand img { width: 36px; height: 36px; }
  .topbar nav { gap: 0; }
  .topbar nav a { padding: .4rem .38rem; font-size: .84rem; }
  .lang { width: 40px; height: 30px; }
  .flag { width: 26px; height: 17px; }
}
@media (max-width: 400px) {
  .topbar__inner { gap: .25rem; }
  .brand img { width: 32px; height: 32px; }
  .topbar nav a { padding: .35rem .26rem; font-size: .78rem; }
  .lang { width: 38px; }
}

/* Rejilla de canales (2 tarjetas) y contacto */
.grid { max-width: 800px; margin-inline: auto; }
.panel__intro { color: var(--muted); margin: -.4rem 0 1.2rem; }
.mail__row { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.mail strong { display: block; font-size: .85rem; color: var(--muted); font-weight: 600; }
.mail a { color: var(--green); font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.mail a:hover { text-decoration: underline; }
.copy {
  display: inline-flex; align-items: center; gap: .4rem; cursor: pointer;
  font: inherit; font-size: .85rem; font-weight: 700; color: var(--green);
  background: transparent; border: 1.5px solid rgba(15,61,46,.35);
  padding: .3rem .7rem; border-radius: 999px; transition: background .15s, border-color .15s;
}
.copy svg { width: 16px; height: 16px; }
.copy:hover { background: rgba(15,61,46,.07); border-color: var(--green); }
.copy.is-ok { background: var(--green); color: #fff; border-color: var(--green); }
.copy__ok { display: block; min-height: 1.2em; font-size: .85rem; color: var(--green); font-weight: 600; margin-top: .3rem; }

/* Ábaco oculto temporalmente (la clase la pone el script de la cabecera según la fecha) */
.js-soon { display: none; }
.abaco-soon .js-soon { display: block; }
.abaco-soon .js-abaco { display: none !important; }
.soon { background: var(--green); color: #F3EEDD; padding: 4.5rem 0; text-align: center; }
.soon__inner { max-width: 640px; }
.soon__icon {
  display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 20px;
  background: rgba(242,183,5,.16); color: var(--yellow); margin-bottom: 1.2rem;
}
.soon__icon svg { width: 34px; height: 34px; }
.soon h2 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.soon__p { margin-top: 1rem; color: rgba(243,238,221,.88); font-size: 1.1rem; }
@media (max-width: 820px) { .soon { padding: 3rem 0; } }
