/* Alhambra Labs. Brand base from the 24-09 direction; hero «El hilo» since the 2026-10-14 remodel.
   This file: base, header and hero on estuco, the strand, the thin Alhambra line that closes the
   first screen, the fixed bar. Sections are in secciones.css. */
@font-face { font-family: "Sora"; src: url("/fonts/Sora.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/fonts/InstrumentSans.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/fonts/InstrumentSans-Italic.woff2") format("woff2"); font-weight: 400 700; font-style: italic; font-display: swap; }

:root {
  --rojo: #A8192A;
  --almagra: #6E1220;
  --tinta: #1E1819;
  --estuco: #F4EFE8;
  --blanco: #FFFFFF;
  --sillar: #D6CCC1;
  --display: "Sora", "Segoe UI", system-ui, sans-serif;
  --body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --measure: 66ch;
  --gutter: clamp(16px, 4vw, 48px);
  --section: clamp(36px, 4.5vw, 64px);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);   /* entering, exiting, the disclosures */
  /* The display size of the section marks */
  --d2: clamp(2.5rem, 4.4vw, 4rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  background: var(--estuco);
  color: var(--tinta);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* short pages (404, contacto): the footer sits at the bottom of the window */
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
@media (min-width: 720px) { body { font-size: 1.0625rem; } }
:focus-visible { outline: 3px solid var(--rojo); outline-offset: 3px; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--tinta); text-underline-position: from-font; text-decoration-thickness: from-font; }
a:hover { color: var(--rojo); }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.015em; line-height: 1.1; margin: 0 0 0.5em; text-wrap: balance; }
h1 { font-size: var(--d2); letter-spacing: -0.025em; line-height: 1; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.25rem); }
h3 { font-size: 1.25rem; font-weight: 600; margin-top: 2rem; }
p, li { text-wrap: pretty; }
p { margin: 0 0 1em; }
.wrap { width: min(100% - 2 * var(--gutter), 1240px); margin-inline: auto; }
.measure { max-width: var(--measure); }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Actions: square corners, like the tiles of a sebka. Rojo on estuco, white on rojo/almagra. */
.btn {
  display: inline-block; padding: 0.9em 1.4em;
  font-family: var(--display); font-weight: 600; font-size: 1rem; line-height: 1.2;
  text-decoration: none; color: var(--blanco); background: var(--rojo);
  transition: background-color 160ms ease-out, transform 160ms ease-out;
}
.btn:hover { color: var(--blanco); background: var(--almagra); }
.btn:active { transform: translateY(1px); }
/* .btn.btn-claro outranks the «every link is white» rule of the almagra band */
.btn.btn-claro, .btn.btn-claro:hover { color: var(--rojo); }
.btn.btn-claro { background: var(--blanco); }
.btn.btn-claro:hover { background: var(--estuco); }
.btn-quiet { font-family: var(--display); font-weight: 600; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; }

/* Header on estuco: rojo is spent on the strand and the actions. */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; }
.top .logo img { display: block; height: 44px; width: auto; }
.top .phone { font-family: var(--display); font-weight: 600; text-decoration: none; }

/* Hero «El hilo» (2026-10-14): the h1, then the strand that goes from a tangle (how the work is
   held today) to one rojo line with five eight-point-star nodes (the method), then lead and CTA.
   Phones: the strand right under the h1, so the gesture is on the first screen. */
.hero { display: grid; gap: 28px clamp(40px, 5vw, 72px); align-items: center; padding: clamp(24px, 4vw, 56px) 0 clamp(8px, 1.5vw, 16px); }
.hero-ceja { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-family: var(--display); font-weight: 700; font-size: 0.8125rem; line-height: 1.3; letter-spacing: 0.08em; text-transform: uppercase; color: var(--rojo); }
.hero-ceja .lazo { flex: none; width: 20px; height: 20px; }
.hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.5rem); line-height: 1.08; max-width: none; margin: 0; }
.hero h1 .sub { color: var(--rojo); }
.hero-text { margin-top: 20px; }
.hero-text .lead { font-size: clamp(1.0625rem, 1.5vw, 1.1875rem); max-width: 50ch; margin: 0 0 22px; }
.hero .btn { display: inline-flex; align-items: center; gap: 0.6em; border-radius: 6px; }
.btn .flecha { flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform 160ms var(--ease-out); }
.cta-hint { margin: 14px 0 0; font-size: 0.9375rem; }
@media (min-width: 440px) { .cta-hint { white-space: nowrap; } }
@media (min-width: 900px) { .hero { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); } }
/* The card: your daily work, in order. Inputs left, one rojo node, outputs right. */
.hilo { margin: 0; padding: clamp(16px, 2vw, 26px); background: color-mix(in srgb, var(--blanco) 55%, var(--estuco)); border: 1px solid color-mix(in srgb, var(--tinta) 14%, transparent); border-radius: 20px; box-shadow: 0 14px 34px -16px rgba(30, 24, 25, 0.25); }
.hilo-tit { margin: 0 0 14px; font-family: var(--display); font-weight: 700; font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: color-mix(in srgb, var(--tinta) 72%, transparent); }
.hilo-cierre { text-wrap: balance; margin: 16px 0 0; font-weight: 600; font-size: 1.0625rem; color: var(--rojo); }
.hilo svg { display: block; width: 100%; height: auto; overflow: visible; }
.hilo-v { display: none !important; }
@media (max-width: 599px) { .hilo-h { display: none !important; } .hilo-v { display: block !important; } }
.hilo path, .hilo circle, .hilo rect { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.hilo .pil rect { fill: var(--blanco); stroke: color-mix(in srgb, var(--tinta) 22%, transparent); stroke-width: 1.5; }
.hilo .ic { fill: none; stroke: var(--tinta); stroke-width: 1.7; }
.hilo .ic path, .hilo .ic rect, .hilo .ic ellipse, .hilo .ic circle { fill: none; stroke: var(--tinta); }
/* the ordered side: the three outputs carry the brand's rojo, the inputs stay tinta */
.hilo .out .ic, .hilo .out .ic path, .hilo .out .ic rect, .hilo .out .ic ellipse, .hilo .out .ic circle { stroke: var(--rojo); }
.hilo .out rect:first-child { stroke: color-mix(in srgb, var(--rojo) 38%, transparent); }
.hilo .pil text { font-family: var(--body); fill: var(--tinta); }
.hilo .pt { font-size: 18px; font-weight: 600; }
.hilo-v .pt { font-size: 15px; }
.hilo .ps { font-size: 14px; font-weight: 500; fill: color-mix(in srgb, var(--tinta) 70%, transparent); }
.hilo .hl { stroke-width: 2.2; }
.hilo .ent { stroke: color-mix(in srgb, var(--tinta) 42%, transparent); }
.hilo .sal { stroke: var(--rojo); }
.hilo .dot { fill: var(--rojo); stroke: none; }
.hilo-nodos rect, .hilo .nodo rect { fill: var(--estuco); stroke: var(--rojo); stroke-width: 2.4; }
.hilo .nodo, .hilo .dot { transform-box: fill-box; transform-origin: center; }
/* Drawing state, set by script.js only: the markup is the finished card (no JS: still and whole). */
.hilo.antes [data-t] { opacity: 0; }
@media (hover: hover) and (pointer: fine) { .btn:hover { transform: translateY(-1px); } .btn:hover .flecha { transform: translateX(4px); } }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }

/* The Alhambra as one thin rojo line, once, as the separator between the first screen and Día 0.
   A hairline at every width (non-scaling stroke). Phones crop it to the Alcazaba (x 1000–1870 of
   the drawing), the stretch with the most towers. */
.horizonte { margin-top: clamp(28px, 4vw, 56px); padding-bottom: clamp(24px, 3vw, 44px); }
.silueta { display: block; width: 100%; height: auto; }
@media (max-width: 719px) { .silueta { height: 88px; object-fit: cover; object-position: 88.6% 100%; } }

/* Fixed call and WhatsApp bar on phones */
.barra { position: fixed; inset: auto 0 0 0; display: grid; grid-template-columns: minmax(96px, 30%) 1fr; border-top: 1px solid var(--sillar); background: var(--estuco); padding-bottom: env(safe-area-inset-bottom); z-index: 10; }
/* Keep the end of the page and focused elements clear of the fixed bar. */
@media (max-width: 719px) {
  body.con-barra { padding-bottom: calc(var(--barra-h, 56px) + env(safe-area-inset-bottom)); }
  html:has(body.con-barra) { scroll-padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
}
.barra a { display: block; text-align: center; padding: 14px 8px; background: var(--estuco); color: var(--tinta); font-family: var(--display); font-weight: 600; text-decoration: none; }
.barra a.wa { background: var(--rojo); color: var(--blanco); }
/* script.js hides the bar while the hero's WhatsApp button is on screen; no JS or reduced motion: always visible. */
.barra { transition: transform 200ms ease-out, opacity 200ms ease-out; }
.barra.oculta { transform: translateY(100%); opacity: 0; }
@media (prefers-reduced-motion: reduce) { .barra { transition: none; } }
@media (min-width: 720px) { .barra { display: none; } }
