@import url('https://fonts.googleapis.com/css2?family=Luckiest+Guy&display=swap');

/* ============================================================
   Fallow — design tokens and base layer
   Single source of truth. Loaded first on every page.

   THE WORLD: "Pastel Field."
   A fallow field is land deliberately left to rest so it can grow
   something better later. The page is that field, seen across a
   season: each section is its own coloured ground, and the reader
   walks through them. Ink stays deep and constant so colour never
   costs legibility — every field below holds body text at 5.5:1 or
   better and display ink at 12:1 or better.

   Structure stays editorial: 0 radius, 0 shadow, 2px ink hairlines.
   The colour is the warmth; the geometry stays severe.
   ============================================================ */

:root {
  /* --- The fields -------------------------------------------
     Pastel grounds. Every one is light enough to carry --color-text
     at 12:1+ and --color-text-muted at 5.5:1+. Verified, not assumed.
     Apply with .field-* — never hand-write these on an element. */
  --field-mist:   #E6E9F5;   /* pale periwinkle — the default ground */
  --field-sprout: #D8E8D0;   /* pale green — growth, how it works */
  --field-bloom:  #F6DCE2;   /* pale pink — the human/emotional beat */
  --field-sun:    #F8E9C8;   /* pale butter — the payoff, the ask */
  --field-sky:    #D6E4F0;   /* pale blue — calm, explanatory */
  --field-peach:  #F5DCC6;   /* pale peach — why it works, the reasoning */
  --field-lilac:  #E4DBF0;   /* pale violet — the odd one out */
  --field-ink:    #241F2E;   /* the one dark field. Kept as its own token:
                                a band cannot paint itself with a property
                                it also redefines. */

  /* --- Ground ------------------------------------------------ */
  --color-bg: var(--field-mist);
  --color-bg-alt: var(--field-sky);

  /* Bounded objects. A card is paper lifted off the field, never a
     shadow. Surface + 2px ink border is the only sanctioned way to
     say "this is a discrete thing you can act on." */
  --color-surface: #FCFAFF;
  --color-surface-dim: #DDD9EC;   /* recessed wells, tracks, empty slots */

  /* --- Ink ---------------------------------------------------
     Deep aubergine rather than black. It sits inside the pastel
     hue family instead of punching a neutral hole through it. */
  --color-text: #241F2E;
  --color-text-muted: #5A5470;    /* violet-grey. Tinted, never grey. */
  --color-text-light: #625B7A;   /* 4.6:1 on --color-surface-dim; #6E6786 was 3.9 */
  --text-muted: var(--color-text-muted);

  /* --- Accent ------------------------------------------------
     Vermilion is the action colour. --color-primary is for fills,
     borders, and large display type. Anything carrying body-size
     text uses --color-primary-deep, which clears 4.5:1 on every
     field above. This distinction is load-bearing; keep it. */
  --color-primary: #E0512B;
  --color-primary-deep: #B23A18;
  --color-primary-light: #F08A6B;
  --color-primary-hover: #C94520;
  --color-on-primary: #FFF8F4;

  --color-secondary: #2E6B52;     /* deep garden green — growth, done */
  --color-accent: #6B4FA8;        /* violet — surprise, the curveball */
  --surprise-color: #6B4FA8;

  /* --- Structure --------------------------------------------- */
  --color-border: #241F2E;        /* structural hairlines are ink */
  --color-border-soft: #B9B2CE;   /* tinted, never a text boundary */
  --border-weight: 2px;

  /* --- Type -------------------------------------------------- */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-serif: var(--font-display);
  --font-body: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-sans: var(--font-body);

  /* --- Space ------------------------------------------------- */
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 3rem;

  /* Fluid above this line: section rhythm must not be a fixed pixel
     count that reads as generous on a laptop and absurd on a phone. */
  --space-xl:  clamp(2.5rem, 5vw, 4rem);
  --space-2xl: clamp(3.5rem, 7vw, 5.5rem);
  --space-3xl: clamp(4.5rem, 9vw, 7rem);
  --space-4xl: clamp(5.5rem, 11vw, 9rem);

  /* --- Layout ------------------------------------------------ */
  --max-width: 1100px;
  --container-padding: clamp(1.25rem, 4vw, 2.5rem);
  --tap-min: 44px;

  /* --- Radii & depth — deliberately flat ---------------------- */
  --radius-sm: 0px;
  --radius-md: 0px;
  --radius-lg: 0px;
  --radius-pill: 0px;
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: none;
  --shadow-card: none;

  /* --- Motion ------------------------------------------------ */
  --transition-fast: 200ms cubic-bezier(0.2, 0.8, 0.3, 1);
  --transition-normal: 380ms cubic-bezier(0.2, 0.8, 0.3, 1);
  --transition-slow: 720ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================================
   Reset & base
   ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--color-bg);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

/* Grain. One declaration, every page. Lighter than the old paper
   world — on a saturated pastel, 0.08 noise reads as dirt. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.045'/%3E%3C/svg%3E");
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-text);
  letter-spacing: -0.04em;
  text-wrap: balance;
}

/* ============================================================
   Fields — sectional colour grounds

   A field paints an edge-to-edge band of colour. Because the site
   is one flat editorial plane, the *change* of ground is what marks
   a new section — not a shadow, not a card, not a rule.
   ============================================================ */

.field            { background-color: var(--field-mist); }
.field-mist       { background-color: var(--field-mist); }
.field-sprout     { background-color: var(--field-sprout); }
.field-bloom      { background-color: var(--field-bloom); }
.field-sun        { background-color: var(--field-sun); }
.field-sky        { background-color: var(--field-sky); }
.field-peach      { background-color: var(--field-peach); }
.field-lilac      { background-color: var(--field-lilac); }

/* Ink field: the one dark moment. Used once, for emphasis, never twice. */
.field-ink {
  background-color: var(--field-ink);
  --color-text: #F4F1FA;
  --color-text-muted: #B9B2CE;
  --color-border: #F4F1FA;
  --color-border-soft: #5A5470;
  --color-primary-deep: #F08A6B;
  color: #F4F1FA;
  position: relative;
}

/* Extra grain for the dark purple field */
.field-ink::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.12'/%3E%3C/svg%3E");
}

.field-ink > .container {
  position: relative;
  z-index: 1;
}

/* ============================================================
   Reveal on scroll

   The default is VISIBLE. A page that loads this stylesheet but
   never wires an observer degrades to readable content, never to a
   blank screen. The reveal script opts in by putting .js-reveal on
   <html>; without it these rules never hide anything.
   ============================================================ */

.js-reveal .fade-up {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity var(--transition-slow),
    transform var(--transition-slow);
}

.js-reveal .fade-up.visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   Browser surfaces — the parts we did not draw still carry the design
   ============================================================ */

::selection {
  background: var(--color-primary-deep);
  color: var(--color-on-primary);
}

:root {
  caret-color: var(--color-primary-deep);
  accent-color: var(--color-primary-deep);
  scrollbar-color: var(--color-border-soft) var(--color-bg);
  scrollbar-width: thin;
}

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg);
}
::-webkit-scrollbar-thumb {
  background: var(--color-border-soft);
  border: 3px solid var(--color-bg);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-muted);
}

*:focus-visible {
  outline: 2px solid var(--color-primary-deep);
  outline-offset: 4px;
}

a {
  color: var(--color-primary-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

/* Numbers that sit in columns should line up. */
.tabular,
[data-numeric] {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* ============================================================
   Motion preference
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  /* Entrance animations must not leave content hidden when disabled. */
  .js-reveal .fade-up {
    opacity: 1 !important;
    transform: none !important;
  }
}


/* --- Global Logo Treatment --- */
.logo {
  font-family: 'Luckiest Guy', cursive;
  font-size: 1.75rem;
  font-weight: 400;
  color: var(--color-surface);
  -webkit-text-stroke: 1.5px var(--color-text);
  letter-spacing: 0.05em;
  text-decoration: none;
  display: inline-block;
  line-height: 1;
  transition: transform var(--transition-fast);
}

a.logo:hover {
  color: var(--color-surface);
  transform: scale(1.05);
}

/* Keep the logo visually unchanged while giving the link a complete touch
   target on devices where taps, rather than a pointer, drive navigation. */
@media (max-width: 767px) {
  a.logo {
    min-width: var(--tap-min);
    min-height: var(--tap-min);
    display: inline-flex;
    align-items: center;
  }
}
