@font-face { font-family: "Schibsted Grotesk"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/schibsted-grotesk-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/schibsted-grotesk-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/schibsted-grotesk-latin-700-normal.woff2") format("woff2"); }

:root {
  --grout:   #eef0ec;  /* fondo: color de junta */
  --surface: #ffffff;
  --ink:     #16302a;  /* esmalte verde muy oscuro */
  --muted:   #4e625b;
  --glaze:   #2b6a55;  /* esmalte verde */
  --glaze-2: #1f5242;
  --ochre:   #d4a13a;  /* amarillo cerámico */
  --biscuit: #d7c1a2;  /* bizcocho / barro cocido */
  --slate:   #9aaca4;
  --line:    #cfd6d1;
  --font: "Schibsted Grotesk", "Helvetica Neue", Arial, system-ui, sans-serif;
  --wrap: 72rem;
  --gap: clamp(1.25rem, 3vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--grout); color: var(--ink); font: 400 1.0625rem/1.6 var(--font); }
img { max-width: 100%; }
a { color: var(--glaze-2); text-underline-offset: .2em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--ochre); outline-offset: 3px; }
h1, h2, h3 { line-height: 1.12; margin: 0 0 .6em; letter-spacing: -.015em; }
h1 { font-size: clamp(2.3rem, 5.2vw, 4.1rem); font-weight: 700; letter-spacing: -.03em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 500; }
p { margin: 0 0 1em; max-width: 62ch; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gap); }
.narrow { max-width: 46rem; }
.skip { position: absolute; left: -999px; top: .5rem; background: var(--ink); color: #fff; padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: .5rem; }

/* Cabecera */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 1.5rem; min-height: 4.25rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.2rem; color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.brand-mark { display: grid; grid-template-columns: repeat(2, .62rem); gap: 2px; }
.brand-mark i { width: .62rem; height: .62rem; background: var(--glaze); }
.brand-mark i:nth-child(2) { background: var(--ochre); }
.brand-mark i:nth-child(3) { background: var(--biscuit); }
.main-nav { display: flex; gap: 1.25rem; margin-left: auto; }
.main-nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.main-nav a:hover { text-decoration: underline; }
.lang-nav { display: flex; gap: 2px; background: var(--line); padding: 2px; }
.main-nav + .lang-nav { margin-left: 0; }
.brand + .lang-nav { margin-left: auto; }
.lang-nav a { display: block; padding: .3rem .55rem; background: var(--surface); color: var(--muted); text-decoration: none; font-weight: 500; font-size: .9rem; min-width: 2.2rem; text-align: center; }
.lang-nav a:hover { color: var(--ink); }
.lang-nav a[aria-current] { background: var(--glaze); color: #fff; }

/* Hero con muro de azulejos */
.hero { background: var(--surface); padding: clamp(2.5rem, 6vw, 5rem) 0; border-bottom: 1px solid var(--line); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.lead { font-size: 1.2rem; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; margin-top: 2rem; }
.btn { display: inline-block; background: var(--glaze); color: #fff; border: 0; padding: .85rem 1.4rem; font: 500 1rem/1.2 var(--font); text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--glaze-2); color: #fff; }
.link { font-weight: 500; }

.tile-wall { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; background: var(--grout); padding: 5px; margin-right: calc(-1 * var(--gap)); }
.tile { aspect-ratio: 1; background: var(--biscuit); }
.t-g { background: var(--glaze); }
.t-b { background: var(--biscuit); }
.t-o { background: var(--ochre); }
.t-s { background: var(--slate); }
.t-q { background: radial-gradient(circle at 0 100%, var(--glaze) 0 70%, var(--biscuit) 70.5%); }
.t-d { background: linear-gradient(135deg, var(--ochre) 0 50%, var(--glaze-2) 50%); }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .tile { animation: lay .45s cubic-bezier(.2,.7,.2,1) both; }
  @keyframes lay { from { opacity: 0; transform: scale(.86); } to { opacity: 1; transform: none; } }
  .tile:nth-child(1) { animation-delay: 150ms; }
  .tile:nth-child(2) { animation-delay: 185ms; }
  .tile:nth-child(3) { animation-delay: 220ms; }
  .tile:nth-child(4) { animation-delay: 255ms; }
  .tile:nth-child(5) { animation-delay: 290ms; }
  .tile:nth-child(6) { animation-delay: 325ms; }
  .tile:nth-child(7) { animation-delay: 360ms; }
  .tile:nth-child(8) { animation-delay: 395ms; }
  .tile:nth-child(9) { animation-delay: 430ms; }
  .tile:nth-child(10) { animation-delay: 465ms; }
  .tile:nth-child(11) { animation-delay: 500ms; }
  .tile:nth-child(12) { animation-delay: 535ms; }
  .tile:nth-child(13) { animation-delay: 570ms; }
  .tile:nth-child(14) { animation-delay: 605ms; }
  .tile:nth-child(15) { animation-delay: 640ms; }
  .tile:nth-child(16) { animation-delay: 675ms; }
  .tile:nth-child(17) { animation-delay: 710ms; }
  .tile:nth-child(18) { animation-delay: 745ms; }
  .tile:nth-child(19) { animation-delay: 780ms; }
  .tile:nth-child(20) { animation-delay: 815ms; }
  .tile:nth-child(21) { animation-delay: 850ms; }
  .tile:nth-child(22) { animation-delay: 885ms; }
  .tile:nth-child(23) { animation-delay: 920ms; }
  .tile:nth-child(24) { animation-delay: 955ms; }
  .tile:nth-child(25) { animation-delay: 990ms; }
  .tile:nth-child(26) { animation-delay: 1025ms; }
  .tile:nth-child(27) { animation-delay: 1060ms; }
  .tile:nth-child(28) { animation-delay: 1095ms; }
  .tile:nth-child(29) { animation-delay: 1130ms; }
  .tile:nth-child(30) { animation-delay: 1165ms; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Secciones */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }

/* Servicios: retícula con juntas, como un alicatado */
.services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; background: var(--line); border: 5px solid var(--line); margin: 2rem 0 0; }
.services > div { background: var(--surface); padding: clamp(1.4rem, 3vw, 2.2rem); }
.services dt { font-weight: 700; font-size: 1.2rem; margin-bottom: .5rem; }
.services dd { margin: 0; color: var(--muted); }

.audience { background: var(--glaze); color: #fff; }
.audience h2 { color: #fff; }
.audience-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); margin-top: 1.5rem; }
.audience-grid > div { border-top: 5px solid var(--ochre); padding-top: 1.25rem; }
.audience h3 { font-size: 1.35rem; font-weight: 700; color: #fff; }
.audience p { color: #e3ece8; }

/* Proceso: secuencia real, por eso numerada */
.steps { list-style: none; counter-reset: s; padding: 0; margin: 2rem 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.steps li { counter-increment: s; position: relative; padding-top: 3.4rem; }
.steps li::before { content: counter(s); position: absolute; top: 0; left: 0; width: 2.5rem; height: 2.5rem; display: grid; place-items: center; background: var(--biscuit); color: var(--ink); font-weight: 700; }
.steps li:not(:last-child)::after { content: ""; position: absolute; top: 1.25rem; left: 3.1rem; right: calc(-1 * var(--gap) + .6rem); height: 2px; background: var(--line); }
.steps h3 { font-weight: 700; }
.steps p { color: var(--muted); margin: 0; }

/* Contacto */
.contact { background: var(--surface); border-top: 1px solid var(--line); }
.contact-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(2rem, 5vw, 4rem); }
.contact-data { margin: 2rem 0 0; }
.contact-data dt { font-weight: 700; margin-top: 1rem; }
.contact-data dd { margin: .15rem 0 0; color: var(--muted); }

.form { display: grid; gap: 1rem; align-content: start; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form label { display: grid; gap: .35rem; font-weight: 500; font-size: .95rem; }
.form input[type=text], .form input[type=email], .form input[type=tel], .form textarea {
  font: 400 1rem/1.45 var(--font); color: var(--ink); background: var(--grout); border: 1px solid var(--line); border-bottom: 2px solid var(--slate); padding: .7rem .8rem; width: 100%;
}
.form input:focus, .form textarea:focus { outline: none; border-bottom-color: var(--glaze); background: #fff; box-shadow: 0 0 0 3px rgba(212,161,58,.45); }
.form textarea { resize: vertical; min-height: 9rem; }
.form .check { display: flex; gap: .65rem; align-items: flex-start; font-weight: 400; color: var(--muted); }
.form .check input { width: 1.15rem; height: 1.15rem; margin-top: .2rem; accent-color: var(--glaze); flex: none; }
.form .btn { justify-self: start; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: .9rem 1rem; margin: 0; max-width: none; border-left: 5px solid; }
.notice.ok { background: #e4f0ea; border-color: var(--glaze); }
.notice.err { background: #f8ecd3; border-color: var(--ochre); }

/* Legal */
.legal h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.legal h2 { font-size: 1.35rem; margin-top: 2.2rem; }

/* Pie */
.site-footer { background: var(--ink); color: #c9d6d0; padding: 1.75rem 0; font-size: .95rem; }
.site-footer a { color: #fff; }
.footer-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem 2rem; }
.footer-row p { margin: 0; }

/* Responsive */
@media (max-width: 860px) {
  .hero-grid, .contact-grid { grid-template-columns: 1fr; }
  .tile-wall { margin-right: 0; max-width: 28rem; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps li::after { display: none; }
  .main-nav { display: none; }
  .lang-nav { margin-left: auto; }
}
@media (max-width: 560px) {
  .services, .audience-grid, .row2, .steps { grid-template-columns: 1fr; }
  .tile-wall { grid-template-columns: repeat(6, 1fr); }
}
