/* ==========================================================================
   Daiquiri Girls — shared foundations (entrada, Avestruz, EPK)

   Two layers of identity:
   1. BAND (permanent): ink, type system, spacing, motion grammar, components.
   2. ERA (per release): paper tone, accents, texture, display treatment.
   To start a new era, add a [data-era="…"] block below and set it on <html>.
   ========================================================================== */

:root {
  /* ---- band: permanent ---- */
  --ink: #1b1410;
  --ink-soft: rgba(27, 20, 16, 0.7);      /* 4.5:1+ on every era paper */
  --line: rgba(27, 20, 16, 0.2);
  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif; /* condensed grotesque, like the band's posters */
  --font-text: "Newsreader", Georgia, "Times New Roman", serif;   /* reading serif, like the EP recipe cards */
  /* headline face: change these three lines to swap the headline typeface site-wide
     (candidates and rationale: muestras/tipografia.html) */
  --font-headline: var(--font-display); /* Archivo, condensed and black (the owner's choice after testing slabs) */
  --headline-weight: 900;
  --headline-width: 62;      /* variable-font width axis; ignored by fonts without it */
  --headline-scale: 1;       /* a wide face such as a slab needs about 0.62 */
  --headline-leading: 0.9;
  --font-title: var(--font-display);    /* secondary titles: cards, recipe */
  --title-weight: 900;
  --title-width: 62;
  --title-scale: 1;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1440px;

  /* ---- motion grammar ----
     fast  = feedback to an action (hover, press)
     base  = UI entering or leaving (dialogs, nav, reveals)
     slow  = one signature moment per page (things that are printed or stamped land with a thud)
     UI chrome never bounces; only printed/stamped objects use --ease-thud. */
  --t-fast: 150ms;
  --t-base: 300ms;
  --t-slow: 700ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);
  --ease-thud: cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

/* ---- era: Avestruz (western) ---- */
:root,
[data-era="avestruz"] {
  --paper: #ffdb97;
  --paper-light: #fbe8be;
  --accent: #fca63a;        /* orange face of the lettering */
  --accent-2: #e2321b;      /* red extrusion; large type and shapes only */
  --accent-deep: #a8220f;   /* deep red; safe for small text on paper (5.4:1) */
  --paper-texture: url("../assets/avestruz/paper.webp");
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-display);
  font-variation-settings: "wdth" 80;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
ul[class], ol[class] { list-style: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip {
  position: fixed; top: 8px; left: 8px; z-index: 100;
  padding: 12px 16px; border-radius: 6px;
  background: var(--ink); color: var(--paper);
  font-weight: 800; text-decoration: none;
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
.on-dark :focus-visible, .on-dark:focus-visible { outline-color: var(--paper); }

/* ---- fixed paper ---- */
.paper {
  position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background: var(--paper-texture) center / cover no-repeat, var(--paper);
}
.paper::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(130% 100% at 50% 35%, transparent 60%, rgba(140, 70, 10, 0.2));
}

/* ---- type ---- */
.label {
  font-size: 12px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent-deep);
}
.display, .headline {
  font-family: var(--font-headline);
  font-weight: var(--headline-weight); line-height: var(--headline-leading); letter-spacing: -0.01em; text-transform: uppercase;
  font-variation-settings: "wdth" var(--headline-width);
  text-wrap: balance; overflow-wrap: break-word;
}
.display { font-size: calc(clamp(40px, 7vw, 100px) * var(--headline-scale)); }
.display--sm { font-size: calc(clamp(32px, 5vw, 68px) * var(--headline-scale)); }
.prose {
  font-family: var(--font-text); font-size: clamp(18px, 1.5vw, 21px); line-height: 1.5;
  max-width: 34em;
}
.prose + .prose { margin-top: 0.9em; }

/* era display treatment: orange face, red block shadow (matches the lettering) */
.era-type {
  color: var(--accent);
  -webkit-text-stroke: 0.02em var(--accent-2);
  text-shadow:
    0.02em 0.02em 0 var(--accent-2), 0.04em 0.04em 0 var(--accent-2),
    0.06em 0.06em 0 var(--accent-2), 0.08em 0.08em 0 var(--accent-deep),
    0.1em 0.1em 0 var(--accent-deep);
}

/* ---- buttons / links ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px; border-radius: 999px;
  border: 2px solid var(--ink); background: transparent; color: var(--ink);
  font-size: 13px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out);
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; flex: none; }

.text-link {
  display: inline-flex; align-items: center; min-height: 44px; font-weight: 800; color: var(--accent-deep);
  text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px;
}
.text-link:hover { color: var(--ink); }

/* ---- site nav ---- */
.site-nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 8px 16px;
  padding: max(10px, env(safe-area-inset-top)) var(--gutter) 10px;
  background: rgba(255, 219, 151, 0.9); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  transition: background var(--t-base) var(--ease-out), border-color var(--t-base) var(--ease-out);
}
.site-nav--over { position: fixed; inset: 0 0 auto; }
.site-nav--over:not(.is-solid) { background: transparent; backdrop-filter: none; border-color: transparent; }
.site-nav__logo { display: flex; align-items: center; flex: none; min-height: 44px; }
.site-nav__logo img { height: clamp(32px, 4.4vw, 50px); width: auto; }
.site-nav__links { display: flex; align-items: center; gap: clamp(2px, 1.4vw, 18px); }
.site-nav__links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px;
  font-size: 12px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none;
  white-space: nowrap;
}
.site-nav__links a:hover { color: var(--accent-deep); }
.site-nav__links a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.site-nav__links .is-cta { padding: 0 16px; border: 2px solid var(--ink); border-radius: 999px; }
.site-nav__links .is-cta:hover { background: var(--ink); color: var(--paper); }

@media (max-width: 640px) {
  /* many links: second row that scrolls sideways, no hidden menu */
  .site-nav--wrap { flex-wrap: wrap; }
  .site-nav--wrap .site-nav__links {
    width: calc(100% + var(--gutter) * 2); margin: 0 calc(var(--gutter) * -1); padding: 0 calc(var(--gutter) - 8px);
    overflow-x: auto; scrollbar-width: none;
  }
  .site-nav--wrap .site-nav__links::-webkit-scrollbar { display: none; }
}
@media (max-width: 480px) {
  .site-nav__links .hide-narrow { display: none; }
}
@media (max-width: 380px) {
  /* narrowest phones: everything still fits on one row, nothing is cut */
  .site-nav { gap: 8px; }
  .site-nav__logo img { height: 28px; }
  .site-nav__links { gap: 0; }
  .site-nav__links a { padding: 0 6px; font-size: 11px; letter-spacing: 0.08em; }
  .site-nav__links .is-cta { padding: 0 11px; }
}

/* ---- site footer ---- */
.site-foot {
  display: grid; gap: 20px;
  padding: 36px var(--gutter) max(28px, env(safe-area-inset-bottom));
  border-top: 2px solid var(--ink);
}
.site-foot__links { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.site-foot__links a {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: 13px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none;
}
.site-foot__links a:hover { color: var(--accent-deep); }
.site-foot__meta {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px;
  padding-top: 16px; border-top: 1px solid var(--line);
  font-family: var(--font-text); font-size: 15px; color: var(--ink-soft);
}
.site-foot__meta button {
  min-height: 44px; padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; color: var(--ink); text-decoration: underline; text-underline-offset: 3px;
}

/* ---- reduced motion: calm by default, opacity-only at most ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
