/* ==========================================================================
   POMODORO — BRAND SYSTEM (red-dominant)
   Colours and type taken from "Pomodoro_Brand Book Draft" by your designer.
   Green is deliberately held back to the logo mark only — the UI runs on
   Tropical Heat, Tawny Daylily and Oyster Catch.
   ========================================================================== */

/* --------------------------------------------------------------------------
   AGELIA — your designer's headline face.
   Agelia is not a free web font. Drop the licensed files into assets/fonts/
   and this rule picks them up automatically. Until then every headline falls
   back to Fraunces (soft + wonk axes on), the closest free match.
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'Agelia';
  src: url('fonts/Agelia.woff2') format('woff2'),
       url('fonts/Agelia.woff')  format('woff');
  font-weight: 400 900;
  font-display: swap;
}

:root {
  /* --- PRIMARY BRAND COLOURS (brand book p.20) -------------------------- */
  --oyster:     #3D3C3C;   /* 0585 Oyster Catch   — body copy             */
  --vanilla:    #FFFFFF;   /* 0003 Nilla Vanilla  — form fields           */
  --aqua:       #145014;   /* 0718 Aquadazzle     — logo mark only        */
  --tropical:   #CE0001;   /* 1082 Tropical Heat  — THE brand colour      */

  /* --- SECONDARY BRAND COLOURS (brand book p.20) ------------------------ */
  --orange:     #FF8201;   /* 0970 Orange you happy?  (held in reserve)   */
  --daylily:    #FEF4E2;   /* 0327 Tawny Daylily  — the paper             */
  --pixie:      #004938;   /* 0711 Cute Pixie     (held in reserve)       */
  --endless:    #EB3600;   /* 1081 Endless Possibilities — button hover   */

  /* --- Field reds -------------------------------------------------------
     Large flat fields need a deeper red than the accent red, or they glare.
     --red-field is Tropical Heat at 80% brightness — same hue, same family,
     no new colour introduced. To go back to pure brand red for the big
     fields, set --red-field: var(--tropical).
     ---------------------------------------------------------------------- */
  --red-field:  #A50102;
  --red-shade:  #8E0102;   /* darker still — footer, pressed states        */

  /* --- Derived working tokens ------------------------------------------ */
  --paper:      var(--daylily);
  --greige:     #F0E4CE;              /* warm second paper, no green cast   */
  --ink:        var(--oyster);
  --ink-soft:   #6A6259;   /* AA-compliant on both papers */
  --hairline:   rgba(61, 60, 60, 0.20);
  --hairline-r: rgba(206, 0, 1, 0.22);       /* red hairline on cream      */
  --hairline-c: rgba(254, 244, 226, 0.30);   /* cream hairline on red      */

  /* --- Typography (brand book p.18) ------------------------------------ */
  --font-display: 'Agelia', 'Fraunces', Georgia, serif;   /* Headline      */
  --font-sub:     'DM Serif Display', Georgia, serif;     /* Sub-headline  */
  --font-body:    'Epilogue', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-script:  'Sacramento', cursive;   /* the Italian accent hand      */

  /* Fraunces fallback tuning — closest available match to Agelia */
  --display-var: 'SOFT' 100, 'WONK' 1, 'opsz' 144;

  /* --- Rhythm ----------------------------------------------------------- */
  --gutter:     clamp(20px, 5vw, 60px);
  --section-y:  clamp(66px, 11vw, 138px);
  --maxw:       1200px;
  --maxw-text:  600px;
  --ease:       cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ==========================================================================
   RESET
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

/* --- Printed-stock grain. This is what keeps the flat red fields from
       reading as flat digital colour. Turn the opacity down to soften. ---- */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  opacity: 0.28;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.42'/%3E%3C/svg%3E");
}

/* ==========================================================================
   TYPE
   ========================================================================== */
.display, .h2, .h3 {
  font-family: var(--font-display);
  font-variation-settings: var(--display-var);
  font-weight: 700;
  letter-spacing: -0.018em;
}

.display { font-size: clamp(3rem, 11.5vw, 8rem); line-height: 0.88; }
.h2      { font-size: clamp(2.1rem, 6vw, 4rem);   line-height: 0.95; }
.h3      { font-size: clamp(1.25rem, 2.6vw, 1.6rem); line-height: 1.15; letter-spacing: -0.01em; }

/* Headings default to the brand red on light fields */
.field--paper .display, .field--paper .h2, .field--paper .h3,
.field--greige .display, .field--greige .h2, .field--greige .h3 { color: var(--tropical); }

/* The Italian hand — used as the brand book uses it: a small script echo
   sitting under or beside an English headline. */
.script {
  font-family: var(--font-script);
  color: var(--tropical);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  line-height: 0.9;
  display: inline-block;
  transform: rotate(-3deg);
}
.script--sm { font-size: clamp(1.25rem, 2.6vw, 1.7rem); }
.on-dark .script, .script--cream { color: var(--daylily); }

.sub { font-family: var(--font-sub); font-size: clamp(1.15rem, 2.3vw, 1.5rem); line-height: 1.35; }
.sub--i { font-style: italic; }

/* Small black caps — the PIANO move. Sits over big display type. */
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--oyster);
}
.on-dark .eyebrow { color: rgba(254, 244, 226, 0.75); }

.lede  { font-size: clamp(1rem, 1.8vw, 1.14rem); line-height: 1.68; max-width: var(--maxw-text); }
.small { font-size: 0.875rem; line-height: 1.6; }
.muted { color: var(--ink-soft); }
.on-dark .muted { color: rgba(254, 244, 226, 0.72); }

/* ==========================================================================
   LAYOUT + COLOUR FIELDS
   ========================================================================== */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); position: relative; }

.field--paper  { background: var(--paper); }
.field--greige { background: var(--greige); }
.field--red    { background: var(--red-field); color: var(--daylily); }
.field--red-br { background: var(--tropical); color: var(--daylily); }
.field--shade  { background: var(--red-shade); color: var(--daylily); }

.on-dark { color: var(--daylily); }

.rule { height: 1px; background: var(--hairline-r); border: 0; }
.on-dark .rule { background: var(--hairline-c); }

.pattern-band {
  height: clamp(56px, 9vw, 104px);
  background-image: url('pattern.svg');
  background-repeat: repeat-x;
  background-size: auto 100%;
  background-position: center;
}

/* ==========================================================================
   LOGO
   ========================================================================== */
.wordmark { display: inline-flex; align-items: center; }
.wordmark img, .wordmark svg { height: 26px; width: auto; }
.wordmark--lg img { height: clamp(38px, 7vw, 64px); }

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 1em 2.1em;
  border: 1.5px solid var(--tropical);
  border-radius: 999px;
  background: var(--tropical);
  color: var(--daylily);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease),
              border-color .25s var(--ease), transform .2s var(--ease);
}
.btn:hover { background: var(--endless); border-color: var(--endless); }
.btn:active { transform: translateY(1px); }

/* Outline on cream */
.btn--outline { background: transparent; color: var(--tropical); border-color: var(--tropical); }
.btn--outline:hover { background: var(--tropical); color: var(--daylily); }

/* Cream fill — for use on red fields */
.btn--cream { background: var(--daylily); border-color: var(--daylily); color: var(--tropical); }
.btn--cream:hover { background: var(--oyster); border-color: var(--oyster); color: var(--daylily); }

/* Outline cream — for use on red fields */
.btn--outline-cream { background: transparent; color: var(--daylily); border-color: rgba(254,244,226,.55); }
.btn--outline-cream:hover { background: var(--daylily); color: var(--tropical); border-color: var(--daylily); }

/* Charcoal — the small black-caps accent from the reference */
.btn--ink { background: var(--oyster); border-color: var(--oyster); color: var(--daylily); }
.btn--ink:hover { background: var(--tropical); border-color: var(--tropical); }

.btn--wide { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }

.link-u {
  border-bottom: 1.5px solid var(--tropical);
  padding-bottom: 2px;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.link-u:hover { color: var(--tropical); }
.on-dark .link-u { border-bottom-color: rgba(254,244,226,.55); }
.on-dark .link-u:hover { color: var(--daylily); border-bottom-color: var(--daylily); }

/* ==========================================================================
   HEADER — red bar, cream lockup
   ========================================================================== */
.site-head { position: sticky; top: 0; z-index: 200; background: var(--red-field); color: var(--daylily); }
.site-head__inner {
  max-width: var(--maxw); margin-inline: auto;
  padding: 14px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}

.nav { display: flex; align-items: center; gap: 30px; }
.nav a {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(254, 244, 226, 0.8); transition: color .2s var(--ease);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--daylily); }
.nav .btn { color: var(--tropical); }

.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: var(--daylily);
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.nav-toggle span + span { margin-top: 6px; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; inset: 55px 0 auto 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--red-field);
    padding: 6px var(--gutter) 30px;
    transform: translateY(-102%);
    transition: transform .38s var(--ease);
    max-height: calc(100dvh - 55px); overflow-y: auto;
  }
  .nav.is-open { transform: translateY(0); }
  .nav a { width: 100%; padding: 17px 0; font-size: 0.95rem; letter-spacing: 0.1em; border-bottom: 1px solid var(--hairline-c); }
  .nav .btn { margin-top: 22px; width: 100%; border-bottom: 0; }
}

/* ==========================================================================
   FOOTER — deepest red
   ========================================================================== */
.site-foot { background: var(--red-shade); color: var(--daylily); padding-block: 62px 34px; }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 44px; }
.foot-grid h4 {
  font-family: var(--font-body); font-size: 0.66rem; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(254,244,226,.6); margin-bottom: 16px;
}
.foot-grid ul { list-style: none; display: grid; gap: 10px; font-size: 0.9rem; }
.foot-grid a { color: rgba(254,244,226,.85); transition: color .2s var(--ease); }
.foot-grid a:hover { color: var(--daylily); }
.foot-bottom {
  margin-top: 52px; padding-top: 22px; border-top: 1px solid var(--hairline-c);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 0.76rem; color: rgba(254,244,226,.6);
}
@media (max-width: 720px) { .foot-grid { grid-template-columns: 1fr; gap: 36px; } }

/* ==========================================================================
   MOTION
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .85s var(--ease), transform .85s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

:focus-visible { outline: 2.5px solid var(--tropical); outline-offset: 3px; border-radius: 2px; }
.on-dark :focus-visible, .site-head :focus-visible, .site-foot :focus-visible { outline-color: var(--daylily); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
