/* The Wonderland Studio — design tokens
   Consolidated from the Claude Design design system
   (fonts + colours + typography + spacing). Reused by every page. */

/* ---- Fonts: Yeseva One (display), Lora (serif), Lato (sans) ---- */
@import url('https://fonts.googleapis.com/css2?family=Yeseva+One&family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600&family=Lato:ital,wght@0,300;0,400;0,700;0,900;1,400&display=swap');

:root {
  /* ---- Primary palette ---- */
  --wl-forest-green: #3d5a3f;
  --wl-ink:          #212a1e;
  --wl-pine:         #00382b;
  --wl-terracotta:   #e6603b;
  --wl-paper:        #f7f5f0;
  --wl-cream:        #f4ebd5;
  --wl-white:        #ffffff;

  /* ---- Secondary palette ---- */
  --wl-gold:   #b8862c;
  --wl-butter: #dcc158;
  --wl-sage:   #c8e1c4;

  /* ---- Tints & lines ---- */
  --wl-ink-60:   rgba(33, 42, 30, 0.70); /* was 0.60: 4.1:1 on white at light weights; 0.70 clears 4.5:1 */
  --wl-ink-40:   rgba(33, 42, 30, 0.40);
  --wl-line:     rgba(33, 42, 30, 0.12);
  --wl-line-strong: rgba(33, 42, 30, 0.20);
  --wl-line-dark: rgba(244, 235, 213, 0.18);
  --wl-terracotta-12: rgba(230, 96, 59, 0.12);
  /* Text-only tints. Brand terracotta (#e6603b) reads at 3.2:1 on Paper, and
     Butter at 3.5:1 on the olive band: fine for fills, rules and display
     sizes, short of 4.5:1 for 11-12px eyebrows. These are the smallest shifts
     that clear it; fills and buttons keep the brand colours. */
  --wl-terracotta-text: #b93f21;
  --wl-butter-text: #f3de8a;
  --wl-sage-40: rgba(200, 225, 196, 0.40);

  /* ---- Semantic roles ---- */
  --wl-bg: var(--wl-paper);
  --wl-bg-warm: var(--wl-cream);
  --wl-bg-dark: var(--wl-forest-green);
  --wl-bg-deepest: var(--wl-pine);
  --wl-surface-card: var(--wl-white);
  --wl-text: var(--wl-ink);
  --wl-heading: var(--wl-forest-green);
  --wl-accent: var(--wl-terracotta);

  /* ---- Type ---- */
  --wl-font-display: 'Yeseva One', Georgia, 'Times New Roman', serif;
  --wl-font-serif:   'Lora', Georgia, serif;
  --wl-font-sans:    'Lato', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --wl-weight-light: 300;
  --wl-weight-regular: 400;
  --wl-weight-medium: 500;
  --wl-weight-bold: 700;
  --wl-weight-black: 900;
  --wl-tracking-ui: 0.05em;
  --wl-tracking-eyebrow: 0.18em;

  /* ---- Spacing / shape / motion ---- */
  --wl-radius-md: 8px;
  --wl-radius-lg: 12px;
  --wl-radius-pill: 999px;
  --wl-shadow-sm: 0 2px 10px rgba(33, 42, 30, 0.08);
  --wl-shadow-lg: 0 18px 48px rgba(33, 42, 30, 0.16);
  --wl-container: 1080px;
  --wl-container-wide: 1240px;
  --wl-gutter: 32px;
  --wl-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --wl-dur-fast: 120ms;
  --wl-dur: 220ms;
}

/* ---- Base reset ---- */
* { box-sizing: border-box; }
html, body { margin: 0; scroll-behavior: smooth; }
body { font-family: var(--wl-font-sans); background: var(--wl-paper); color: var(--wl-ink); }
main { overflow: hidden; }   /* watermarks and floats bleed past section edges */
a { color: inherit; }

/* ---- Keyboard access ---- */
:focus-visible { outline: 3px solid var(--wl-terracotta); outline-offset: 3px; }
.wl-btn:focus-visible { outline-offset: 4px; }
.wl-skip {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--wl-pine); color: var(--wl-cream); font-family: var(--wl-font-sans);
  font-weight: 700; font-size: 14px; padding: 12px 18px; border-radius: 0 0 8px 8px; text-decoration: none;
}
.wl-skip:focus { top: 0; }

/* ---- Brand harlequin rule (reused for section tops/footers) ---- */
.wl-rule {
  height: 6px;
  background-image: linear-gradient(90deg,
    var(--wl-forest-green) 0 12.5%, var(--wl-paper) 0 25%,
    var(--wl-forest-green) 0 37.5%, var(--wl-paper) 0 50%,
    var(--wl-forest-green) 0 62.5%, var(--wl-paper) 0 75%,
    var(--wl-forest-green) 0 87.5%, var(--wl-paper) 0 100%);
  background-size: 64px 6px;
}
.wl-rule--cream {
  background-image: linear-gradient(90deg,
    var(--wl-forest-green) 0 12.5%, var(--wl-cream) 0 25%,
    var(--wl-forest-green) 0 37.5%, var(--wl-cream) 0 50%,
    var(--wl-forest-green) 0 62.5%, var(--wl-cream) 0 75%,
    var(--wl-forest-green) 0 87.5%, var(--wl-cream) 0 100%);
}

/* ---- Buttons (from the design-system Button component) ---- */
.wl-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  font-family: var(--wl-font-sans); font-weight: var(--wl-weight-black);
  text-transform: uppercase; letter-spacing: var(--wl-tracking-ui); line-height: 1;
  border-radius: var(--wl-radius-pill); border: 1.5px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background var(--wl-dur) var(--wl-ease), color var(--wl-dur) var(--wl-ease),
              transform var(--wl-dur-fast) var(--wl-ease);
}
.wl-btn--sm { padding: 0.55em 1.2em; font-size: 12px; }
.wl-btn--md { padding: 0.85em 1.6em; font-size: 14px; }
.wl-btn--lg { padding: 1.05em 2.1em; font-size: 15px; }
.wl-btn--primary { background: var(--wl-terracotta); color: var(--wl-white); }
.wl-btn--primary:hover { background: #d6512f; }
.wl-btn:active { transform: translateY(1px); }

/* Hero "butter" CTA variant */
.wl-btn--butter { background: var(--wl-butter); color: var(--wl-forest-green); }
.wl-btn--butter:hover { background: #f0d367; }

/* Ghost (outlined) button — fills forest-green on hover */
.wl-btn--ghost { background: transparent; color: var(--wl-forest-green); border-color: var(--wl-forest-green); }
.wl-btn--ghost:hover { background: var(--wl-forest-green); color: var(--wl-cream); }

/* Ghost for dark sections (pine/forest CTA bands) — the forest-green ghost
   above disappears against them. Fills cream on hover. */
.wl-btn--ghost-light { background: transparent; color: var(--wl-cream); border-color: rgba(244, 235, 213, 0.55); }
.wl-btn--ghost-light:hover { background: var(--wl-cream); color: var(--wl-pine); border-color: var(--wl-cream); }

/* Secondary CTA carrying a full sentence — let it wrap instead of forcing
   one very wide pill on narrow screens. */
.wl-btn--sentence { text-transform: none; letter-spacing: 0.01em; font-weight: 700;
  text-align: left; max-width: 42ch; line-height: 1.4; border-radius: var(--wl-radius-lg); }

/* Animated "Learn more →" text link */
.wl-link {
  color: var(--wl-forest-green); font-family: var(--wl-font-sans); font-weight: 900;
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
  transition: gap 180ms var(--wl-ease), color 180ms;
}
.wl-link:hover { color: var(--wl-terracotta); gap: 13px; }

/* Lift-on-hover cards */
.wl-door, .wl-card { transition: transform 280ms var(--wl-ease), box-shadow 280ms var(--wl-ease); }
.wl-door:hover, .wl-card:hover { transform: translateY(-6px); box-shadow: 0 18px 44px rgba(33,42,30,0.16); }

/* Gentle float (hero/decorative imagery) */
@keyframes wlFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-11px); } }
.wl-float { animation: wlFloat 7s ease-in-out infinite; }

/* ---- Nav (sticky translucent header + "Work with me" dropdown) ---- */
.wl-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247,245,240,0.86);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--wl-line);
  font-family: var(--wl-font-sans);
}
.wl-nav__inner {
  max-width: var(--wl-container-wide); margin: 0 auto; padding: 14px 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.wl-nav__links { display: flex; align-items: center; gap: 30px; }
.wl-nav__link {
  font-weight: 700; font-size: 14px; letter-spacing: 0.01em; white-space: nowrap;
  text-decoration: none; color: var(--wl-ink);
  transition: color var(--wl-dur) var(--wl-ease);
}
.wl-nav__link:hover { color: var(--wl-terracotta); }
.wl-nav__link--active { color: var(--wl-terracotta); }

/* Narrow desktop / small laptop: tighten before the burger takes over */
@media (max-width: 1080px) {
  .wl-nav__links { gap: 22px; }
  .wl-nav__link { font-size: 13px; }
}

/* ---- Motion (driven by js/motion.js; see the notes there) ----
   html.wl-js is set inline in <head>; without it nothing below applies, so
   the no-JS page is static and fully visible. */

/* Scroll reveal: fade + rise, staggered across siblings via --wl-i. */
.wl-js [data-wl-reveal] {
  opacity: 0; transform: translateY(18px);
  transition: opacity .75s var(--wl-ease), transform .75s var(--wl-ease);
  transition-delay: calc(var(--wl-i, 0) * 90ms);
}
.wl-js [data-wl-reveal].is-in { opacity: 1; transform: none; }
/* Hero art floats on its own keyframes; don't let the reveal fight the float. */
.wl-js .wl-float[data-wl-reveal] { transform: none; }

/* Nav: hairline becomes a soft shadow once the page has scrolled; links get a
   terracotta underline that draws in from the left. */
.wl-nav { transition: box-shadow .3s var(--wl-ease); }
.wl-nav--scrolled { box-shadow: 0 6px 24px rgba(33,42,30,0.08); }
.wl-nav__link { position: relative; }
.wl-nav__link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 2px;
  background: var(--wl-terracotta); transform: scaleX(0); transform-origin: left;
  transition: transform .28s var(--wl-ease);
}
.wl-nav__link:hover::after, .wl-nav__link--active::after { transform: scaleX(1); }

/* Buttons lift a touch on hover. */
.wl-btn { transition: background var(--wl-dur) var(--wl-ease), color var(--wl-dur) var(--wl-ease),
          border-color var(--wl-dur) var(--wl-ease), transform .22s var(--wl-ease), box-shadow .22s var(--wl-ease); }
.wl-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(33,42,30,0.14); }
.wl-btn:active { transform: translateY(1px); box-shadow: none; }

/* Card artwork eases up in scale when the card is hovered. */
.wl-door img, .wl-card img { transition: transform .5s var(--wl-ease); }
.wl-door:hover img, .wl-card:hover img { transform: scale(1.05); }
.wl-door > div:first-child, .wl-card > div:first-child { overflow: hidden; }

/* Article entries: motif disc turns slightly, title warms. */
.wl-art__img { transition: transform .5s var(--wl-ease); }
.wl-art:hover .wl-art__img { transform: rotate(-4deg) scale(1.04); }

/* Decorative art the script drifts on scroll shouldn't fight layout. */
.hero__watermark, .hero__glow { will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .wl-js [data-wl-reveal] { opacity: 1; transform: none; }
}

/* ============================================================
   RESPONSIVE — mobile & tablet
   The page layouts use inline grid/flex from the design export,
   so these media-query rules override them with !important.
   ============================================================ */

/* Mobile menu control — hidden on desktop */
.wl-nav__burger { display: none; }

/* Tablet (incl. iPad portrait): drop the 4-up help grid to 2 per row.
   !important so it beats the per-page <style> base rule. */
@media (max-width: 1000px) {
  .wl-help-grid > div { flex: 0 0 calc((100% - 20px) / 2) !important; }
}

/* Nav → tap-to-open menu.
   Breaks earlier than the layout rules below: four flat links plus the
   "Ask Alice" button stop fitting well before 760px, and the design would
   rather hide a section than crowd them. We show all four in the burger,
   which is a real <button> driven by js/nav.js (see there for keyboard
   behaviour). Without JS the links simply stay visible on small screens. */
@media (max-width: 900px) {
  .wl-nav__inner { flex-wrap: wrap; }
  .wl-nav__burger {
    display: inline-flex; align-items: center; justify-content: center;
    margin-left: auto; padding: 4px 6px; cursor: pointer;
    background: none; border: 0; font-size: 26px; line-height: 1;
    color: var(--wl-forest-green);
  }
  .wl-nav__links {
    display: none; flex-basis: 100%; width: 100%;
    flex-direction: column; align-items: flex-start; gap: 18px;
    padding: 6px 0 10px;
  }
  .wl-nav__link { font-size: 15px; }
  .wl-nav--open .wl-nav__links { display: flex; }
}

/* Phone & small tablet */
@media (max-width: 760px) {
  /* Stack every inline multi-column grid to a single column */
  main [style*="display:grid"] { grid-template-columns: 1fr !important; }
  /* Stack multi-column body copy (About story) */
  main [style*="columns:2;"] { columns: 1 !important; }
  /* Help cards: one per row */
  .wl-help-grid > div { flex: 0 0 100% !important; }
  /* Workshops topic rows are class-based, so the inline-grid rule above
     doesn't reach them. Number and title stay on one line; the body drops
     underneath and spans the full width. */
  .wl-topic { grid-template-columns: auto 1fr !important; gap: 10px 16px !important; }
  .wl-topic__body { grid-column: 1 / -1 !important; }
}
