/* Film grain over the whole page. One fixed layer of SVG fractal noise,
   multiplied over the warm ground so it reads as paper tooth rather than
   a grey wash. It never intercepts clicks. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.082;
  /* No mix-blend-mode: a blended full-viewport layer forces the browser to
     re-composite the entire page underneath it on every single frame, which
     is what made scrolling feel heavy. Instead the turbulence is reduced to
     pure black at a sparse alpha (feColorMatrix zeroes RGB and keeps the
     shaped alpha), so painting it normally darkens exactly the way multiply
     did - measured to within a pixel level on cream, card and honey, and
     still invisible over the dark footer. */
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/><feComponentTransfer><funcA type='linear' slope='6' intercept='-3.4'/></feComponentTransfer><feColorMatrix type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0'/></filter><rect width='180' height='180' filter='url(%23n)'/></svg>");
  /* One tile, rasterised once and repeated, instead of one rect stretched
     over four viewports' worth of area. Own layer, so it never repaints. */
  background-size: 180px 180px;
  transform: translateZ(0);
}

/* ---- Page container ---------------------------------------------------
   One gutter and one content rail for the whole page. Section bands stay
   full-bleed so their colour still runs edge to edge; everything *inside*
   a band sits on `.shell`, and that is what makes the copy and card edges
   line up from the nav all the way down to the footer. Change --rail here
   and the whole page follows. */
:root { --rail: 1280px; }
.shell { width: 100%; max-width: var(--rail); margin-inline: auto; }

/* Lucide icons are stroke-drawn: without these they render as black fills. */
.icon { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.icon-brand { fill: currentColor; stroke: none; }


/* The marked word. The honey block sits behind the glyphs on its own span,
   so the motion layer can wipe it in while the letters flick up on top.
   Sized in em off the headline, so it tracks the type at every width. */
.hl-pill {
  position: relative;
  isolation: isolate;
  display: inline-block;
  padding-inline: 0.16em 0.2em;
}
.hl-pill-bg {
  position: absolute;
  inset: 0.06em 0 -0.1em;
  z-index: -1;
  border-radius: 0.2em;
  background-image: linear-gradient(135deg, #FFC24D 0%, #F5A521 62%, #E8931A 100%);
  box-shadow: 0 0.16em 0.4em -0.2em rgba(138, 101, 8, 0.55);
}




/* Sticker eyebrows - the rotated, offset-shadowed label CRAV uses to tag a
   section. Kept to honey on ink so it reads as a label, not a callout. */
.sticker {
  display: inline-block;
  transform: rotate(-2.5deg);
  border-radius: 999px;
  background: #FFFFFF;
  padding: 0.3rem 0.85rem;
  box-shadow: 2px 2px 0 rgba(20, 20, 15, 0.82);
}


/* Footer. Links sit at cream on the ink sheet and warm to honey on hover;
   keyboard focus gets its own honey ring, since the hover shift alone is
   too quiet to find on a dark ground. */
.footer-link {
  color: rgba(253, 252, 247, 0.78);
  text-decoration: none;
  width: fit-content;
  border-radius: 6px;
  transition: color 0.2s ease;
}
.footer-link:hover { color: #FFC24D; }
.footer-link:focus-visible { outline: 2px solid #FFC24D; outline-offset: 3px; }
/* The comb only shows at the top-right corner and thins out across the
   sheet, so it reads as texture behind the columns, never under the copy. */
.footer-comb {
  -webkit-mask-image: radial-gradient(75% 110% at 100% 0%, #000 0%, rgba(0, 0, 0, 0.35) 45%, transparent 75%);
  mask-image: radial-gradient(75% 110% at 100% 0%, #000 0%, rgba(0, 0, 0, 0.35) 45%, transparent 75%);
}

/* ---- Nav dropdowns ----------------------------------------------------
   Courses and Resources each gather their links behind one button.
   From `menu` up the list drops as a card under the button; below that,
   inside the Menu sheet, it opens in place as an indented group. The
   button's aria-expanded is the only state - the script flips it and
   everything here reads it. */
.nav-dd { position: relative; }
.nav-dd-link {
  display: block;
  white-space: nowrap;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 14.5px;
  font-weight: 500;
  color: #55554B;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}
.nav-dd-link:hover,
.nav-dd-link[aria-current="page"] { background: #F2EEE3; color: #14140F; }
/* Current page in the main nav: ink text over a honey bar the width of the label, rather
   than the grey chip that hover already uses. The mobile menu stacks the
   links, so there the bar moves to the left edge over a honey wash. */
#navLinks > li > a[aria-current="page"],
#navLinks > li > button[data-current] { position: relative; color: #14140F; }
#navLinks > li > a[aria-current="page"]::after,
#navLinks > li > button[data-current]::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 3px;
  border-radius: 999px;
  background: #F5A521;
}
@media (max-width: 1023.98px) {
  #navLinks > li > a[aria-current="page"],
  #navLinks > li > button[data-current] {
    background: linear-gradient(135deg, rgba(255,194,77,0.26) 0%, rgba(245,165,33,0.17) 62%, rgba(232,147,26,0.14) 100%);
  }
  #navLinks > li > a[aria-current="page"]::after,
  #navLinks > li > button[data-current]::after {
    left: 0; right: auto; top: 50%; bottom: auto;
    width: 3px; height: 60%;
    transform: translateY(-50%);
  }
}
@media (min-width: 1024px) {
  .nav-dd-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    min-width: 180px;
    padding: 6px;
    border-radius: 16px;
    background: #FFFFFF;
    box-shadow: 0 2px 6px rgba(20, 20, 15, 0.05), 0 18px 44px rgba(138, 101, 8, 0.14);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -6px);
    transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
  }
  /* bridges the gap under the button, so the pointer can cross to the card
     without the group closing on the way */
  .nav-dd-panel::before { content: ''; position: absolute; inset: -10px 0 auto; height: 10px; }
  [aria-expanded="true"] + .nav-dd-panel {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
    transition: opacity .18s ease, transform .18s ease, visibility 0s;
  }
}
@media (max-width: 1023.98px) {
  .nav-dd-panel { margin: 2px 0 4px 14px; padding-left: 10px; border-left: 2px solid #E9E3D3; }
  [aria-expanded="false"] + .nav-dd-panel { display: none; }
  .nav-dd-link { padding: 10px 14px; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .nav-dd-panel { transition: none !important; }
}

/* ---- Menu sheet (below `menu`) ----------------------------------------
   Stays laid out while closed so it can animate: it unrolls downward from
   the bar and the rows follow one after another. On close it rolls back
   up quicker than it came down. The script only toggles .is-open. */
@media (max-width: 1023.98px) {
  #navLinks {
    display: flex;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    clip-path: inset(0 0 100% 0);
    transition: clip-path .32s cubic-bezier(.4,0,.2,1), transform .32s cubic-bezier(.4,0,.2,1), opacity .24s ease .06s, visibility 0s linear .32s;
  }
  #navLinks.is-open {
    visibility: visible;
    opacity: 1;
    transform: none;
    clip-path: inset(0 -60px -60px -60px);
    transition: clip-path .5s cubic-bezier(.22,1,.36,1), transform .5s cubic-bezier(.22,1,.36,1), opacity .2s ease, visibility 0s;
  }
  #navLinks > li { opacity: 0; transform: translateY(-8px); transition: opacity .15s ease, transform .15s ease; }
  #navLinks.is-open > li {
    opacity: 1;
    transform: none;
    transition: opacity .35s ease var(--d, 0s), transform .5s cubic-bezier(.22,1,.36,1) var(--d, 0s);
  }
  #navLinks.is-open > li:nth-child(1) { --d: .06s; }
  #navLinks.is-open > li:nth-child(2) { --d: .1s; }
  #navLinks.is-open > li:nth-child(3) { --d: .14s; }
  #navLinks.is-open > li:nth-child(4) { --d: .18s; }
  #navLinks.is-open > li:nth-child(5) { --d: .22s; }
  #navLinks.is-open > li:nth-child(6) { --d: .26s; }
  #navLinks.is-open > li:nth-child(7) { --d: .3s; }
  #navLinks.is-open > li:nth-child(8) { --d: .34s; }
}
@media (max-width: 1023.98px) and (prefers-reduced-motion: reduce) {
  #navLinks, #navLinks > li { transform: none !important; transition: none !important; }
}


/* Back to top. Held out of sight until the reader is most of a screen down,
   then it rises into the corner. The honey ring fills with how far through
   the page they are - pathLength="1" on the circle makes its dash offset a
   plain 0-1 fraction. Visibility flips at the end of the fade, so a hidden
   button can be neither clicked nor tabbed to. */
.to-top {
  margin-bottom: env(safe-area-inset-bottom);
  opacity: 0;
  visibility: hidden;
  translate: 0 14px;
  scale: 0.9;
  transition: opacity 0.25s ease, translate 0.35s cubic-bezier(0.22, 1, 0.36, 1), scale 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s ease, visibility 0s linear 0.35s;
}
.to-top.is-shown { opacity: 1; visibility: visible; translate: 0 0; scale: 1; transition-delay: 0s; }
.to-top.is-shown:hover { translate: 0 -2px; box-shadow: 0 16px 34px -10px rgba(20,20,15,0.6); }
.to-top-ring { stroke-dasharray: 1; stroke-dashoffset: 1; }
@media (prefers-reduced-motion: reduce) {
  .to-top, .to-top.is-shown, .to-top.is-shown:hover { translate: none; scale: none; }
}

/* ---- Post: the article -------------------------------------------------
   One column, held to a measure that can be read without the eye losing
   its place, and ruled rather than boxed. Type is a step larger than the
   policy pages because this is read for pleasure rather than duty. */
.post { max-width: 40rem; margin-inline: auto; }
.post > * + * { margin-top: 1.35rem; }
.post p { font-size: 1.05rem; font-weight: 300; line-height: 1.82; color: #3A3A32; }
.post h2 {
  margin-top: 2.75rem;
  font-family: 'Sora', system-ui, sans-serif;
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: #14140F;
}
.post h2 + p { margin-top: 1rem; }
.post a { color: #14140F; text-decoration: underline; text-decoration-color: #F5A521; text-decoration-thickness: 1.5px; text-underline-offset: 4px; transition: text-decoration-color 0.2s ease; }
.post a:hover { text-decoration-color: #14140F; }
.post strong { font-weight: 600; color: #14140F; }
.post ul { display: grid; gap: 0.9rem; }
.post li { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr); gap: 0.7rem; font-size: 1.02rem; font-weight: 300; line-height: 1.75; color: #3A3A32; }
.post li > b { font-family: 'Sora', system-ui, sans-serif; font-weight: 600; font-size: 0.9rem; color: #8A6508; font-variant-numeric: tabular-nums; padding-top: 0.2rem; }
/* The pull quote is the one place the column widens, so it reads as a
   break in the argument rather than an indented paragraph. */
.post blockquote {
  margin-block: 2.5rem;
  border-left: 3px solid #F5A521;
  padding-left: 1.5rem;
  font-family: 'Sora', system-ui, sans-serif;
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-weight: 300;
  line-height: 1.45;
  letter-spacing: -0.02em;
  color: #14140F;
}
@media (min-width: 900px) { .post blockquote { margin-inline: -3rem; padding-left: 3rem; } }

/* ---- Read next: bento -------------------------------------------------
   Three posts as a bento, laid out the way the reference sheet does it:
   one lead tile two columns wide and two rows tall, and two shorter tiles
   stacked flush beside it, so the block reads as one rectangle at three
   sizes. The photo wells are gone - each tile is a flat, lightened wash
   of one of the site's own colours with a faint line texture drawn over
   it, so the set stays warm and the titles sit on paper, not on a scrim.
   Below `lg` the tiles simply stack, one per row on a phone and two up on
   a small tablet, each keeping a comfortable height of its own. */
.bento { display: grid; gap: 1rem; }
@media (min-width: 640px) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) {
  .bento { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 13.5rem; gap: 1.25rem; }
  .next-card { grid-column: span 1; grid-row: span 1; }
  .next-card--lead { grid-column: span 2; grid-row: span 2; }
}

/* The tints. Each is a lightened stop of a colour the site already uses -
   honey and rust from the brand ramp, the rest their cool counterweights -
   kept pale enough that the ink copy sits on them at full contrast.
   `--line` is the same hue at a low alpha, used only for the texture. */
.next-card[data-tint="honey"]             { --fill: #FDE8C4; --edge: #EFCF9C; --line: rgba(120, 78, 6, 0.13); }
.next-card[data-tint="honeyhi"]           { --fill: #FEF3DD; --edge: #EDDCB6; --line: rgba(120, 78, 6, 0.12); }
.next-card[data-tint="gold"]              { --fill: #F0EBD4; --edge: #DBD3B2; --line: rgba(90, 70, 14, 0.12); }
.next-card[data-tint="sand"]              { --fill: #F5F1E7; --edge: #DFD8C6; --line: rgba(70, 60, 30, 0.11); }
.next-card[data-tint="rust"]              { --fill: #FADFD0; --edge: #EABFA8; --line: rgba(124, 44, 10, 0.12); }
.next-card[data-tint="clay"]              { --fill: #F7D0BA; --edge: #E3AF92; --line: rgba(110, 38, 8, 0.13); }

.next-card {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 13rem;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  overflow: hidden;
  border-radius: 21px;
  background: var(--fill, #EDE8DC);
  padding: 1.15rem 1.25rem;
  color: #14140F;
  text-decoration: none;
  transition: transform 0.2s cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 0.2s ease;
  box-shadow: inset 0 0 0 1px var(--edge, rgba(20, 20, 15, 0.08)), 0 1px 2px rgba(20, 20, 15, 0.04), 0 6px 20px rgba(20, 20, 15, 0.05);
}
@media (min-width: 1024px) { .next-card { min-height: 0; border-radius: 21px; padding: 1.4rem 1.5rem; } }
.next-card--lead { min-height: 17rem; }
.next-card:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px var(--edge, rgba(20, 20, 15, 0.08)), 0 2px 6px rgba(20, 20, 15, 0.05), 0 18px 44px rgba(138, 101, 8, 0.14); }
.next-card:focus-visible { outline: 3px solid #14140F; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .next-card { transition: none !important; } .next-card:hover { transform: none; } }

/* The texture: two sets of soft arcs in the tile's own hue, drawn behind
   the copy and cropped by the tile. Decoration only - it never carries
   meaning, so it needs no contrast of its own. */
.next-card::before {
  content: '';
  position: absolute;
  z-index: -1;
  right: -22%;
  bottom: -55%;
  aspect-ratio: 1;
  width: 128%;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at 50% 50%, var(--line) 0 2px, transparent 2px 22px);
  opacity: 0.85;
}
.next-card--lead::before { right: -12%; bottom: -46%; width: 104%; }

.next-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.next-kicker { font-size: 0.72rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(20, 20, 15, 0.62); }
.next-card--lead .next-kicker { font-size: 0.78rem; }

/* The badge repeats the icon language used elsewhere on the site: a white
   disc with the section's own icon inside it. */
.next-badge {
  display: grid;
  height: 2.1rem;
  width: 2.1rem;
  flex: none;
  place-items: center;
  border-radius: 999px;
  background: #FDFCF7;
  color: #14140F;
  box-shadow: 0 1px 2px rgba(20, 20, 15, 0.08);
}
.next-badge .icon { height: 1rem; width: 1rem; stroke-width: 1.75; }
.next-card--lead .next-badge { height: 2.6rem; width: 2.6rem; }
.next-card--lead .next-badge .icon { height: 1.2rem; width: 1.2rem; }

.next-card h3 { font-family: 'Sora', system-ui, sans-serif; font-size: 1.02rem; font-weight: 600; letter-spacing: -0.025em; line-height: 1.28; }
.next-card--lead h3 { font-size: clamp(1.35rem, 2.6vw, 2rem); line-height: 1.12; letter-spacing: -0.03em; }
.next-card:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.next-dek {
  display: -webkit-box;
  margin-top: 0.4rem;
  overflow: hidden;
  font-size: 0.86rem;
  font-weight: 300;
  line-height: 1.55;
  color: rgba(20, 20, 15, 0.72);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.next-card--lead .next-dek { max-width: 42ch; margin-top: 0.7rem; font-size: 1rem; line-height: 1.6; -webkit-line-clamp: 3; }
.next-meta { margin-top: 0.75rem; display: block; font-size: 0.74rem; letter-spacing: 0.04em; color: rgba(20, 20, 15, 0.55); }
.next-card--lead .next-meta { margin-top: 1rem; font-size: 0.8rem; }
