/* jaspermeurs.com: brand tokens, base typography, embeds, article text, footer.
   The page layout (panels, cards, menu) lives in v2.css.
   Brand: Tuscan Pine, Lake Verde, Terra Cotta, Linen White.
   Titles: Artifex Hand CF (uppercase, tight tracking). Body: Neue Haas Grotesk.
   Light and dark follow the device setting automatically. */

:root {
  color-scheme: light dark;

  --pine: #0B332D;
  --pine-deep: #092924;
  --pine-deeper: #071F1B;
  --verde: #304B3C;
  --terra: #EE5623;
  --linen: #F7ECDA;

  --bg: var(--linen);
  --bg-tint: #FAF4E9;
  --fg: var(--pine);
  --fg-muted: #3C5C57;
  --line: rgb(11 51 45 / 0.28);
  --card: #FDFBF8;

  /* Bands are the always-dark sections: hero, LargoX, footer. */
  --band: var(--pine);
  --band-alt: var(--pine-deep);
  --band-accent: var(--verde);
  --band-fg: var(--linen);
  --band-muted: #CED6D5;
  --band-line: rgb(247 236 218 / 0.3);

  --font-title: "artifex-hand-cf", "Artifex Hand CF", Optima, Candara, "Gill Sans", "Trebuchet MS", sans-serif;
  --font-body: "neue-haas-grotesk-text", "Neue Haas Grotesk Text Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --gutter: clamp(1.125rem, 4vw, 2.5rem);
  --section: clamp(3rem, 8vw, 6.5rem);
  --radius: 6px;
  --max: 76rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--pine);
    --bg-tint: #0F3B34;
    --fg: var(--linen);
    --fg-muted: #CED6D5;
    --line: rgb(247 236 218 / 0.28);
    --card: var(--verde);

    --band: var(--pine-deeper);
    --band-alt: var(--pine-deep);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

img, svg, iframe { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  line-height: 1;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 1.4rem + 6vw, 5.75rem); }
h2 { font-size: clamp(1.75rem, 1.2rem + 2.6vw, 3rem); }
h3 { font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem); line-height: 1.08; }

p { margin: 0 0 1em; text-wrap: pretty; }
a { color: inherit; text-decoration-color: var(--terra); text-decoration-thickness: 0.1em; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 0.2em; }
:focus-visible { outline: 3px solid var(--terra); outline-offset: 3px; border-radius: 2px; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}
.wrap--narrow { max-width: 46rem; }

.skip { position: absolute; left: -999rem; }
.skip:focus { left: 1rem; top: 1rem; z-index: 20; background: var(--terra); color: var(--linen); padding: 0.6rem 1rem; }

/* Eyebrows and CTAs: Neue Haas, uppercase, wide tracking. */
.eyebrow {
  margin: 0 0 0.9rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.eyebrow a { text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }

/* Brand highlight: a terra cotta line under the key word. */
.hl {
  background: linear-gradient(rgb(238 86 35 / 0.78), rgb(238 86 35 / 0.78)) no-repeat 0 88% / 100% 0.14em;
  padding-bottom: 0.04em;
}


/* ------------------------------------------------------------------ embeds */

.embed {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--pine-deep);
  color: var(--linen);
  overflow: hidden;
  cursor: pointer;
}
.embed--video { aspect-ratio: 16 / 9; }
.embed--reel { aspect-ratio: 9 / 16; }
div.embed { cursor: auto; }
.embed img, .embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed img { object-fit: cover; transition: transform 0.4s ease; }
.embed:hover img { transform: scale(1.03); }
.embed__play {
  position: absolute;
  inset: auto auto 0.9rem 0.9rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--terra);
  transition: transform 0.15s ease;
}
.embed__play::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0.5rem 0 0.5rem 0.85rem;
  border-color: transparent transparent transparent var(--linen);
  transform: translateX(0.1rem);
}
.embed:hover .embed__play { transform: scale(1.08); }

.video__text { padding-top: 0.9rem; }
.video__text .eyebrow { margin-bottom: 0.4rem; color: var(--fg-muted); }
.video h3 a { text-decoration: none; }
.video h3 a:hover { text-decoration: underline; }

/* Horizontal, swipeable row of 9:16 cards. */
.reel-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(9.5rem, 42vw, 15rem);
  gap: clamp(0.75rem, 2vw, 1.25rem);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  margin-inline: calc(-1 * var(--gutter));
  padding: 0.25rem var(--gutter) 1rem;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.reel { scroll-snap-align: start; }
/* Instagram's own embed (used for reels without a local thumbnail) needs at
   least ~326px of width. It shows the video at 4:5 with a ~49px header; the
   card is cut off just below the "View more on Instagram" row so the likes
   and empty comment box stay out of view. */
.reel-row--embeds { --reel-w: min(84vw, 21rem); grid-auto-columns: var(--reel-w); align-items: start; }
.embed--ig { height: calc(var(--reel-w, 21rem) * 1.25 + 5.6rem); background: #fff; }
.embed--ig iframe { height: calc(100% + 12rem); }
.reel__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  margin: 0.6rem 0 0;
  font-size: 0.875rem;
  color: var(--fg-muted);
}

/* -------------------------------------------------------------------- blog */

.prose { padding-bottom: var(--section); font-size: 1.06em; line-height: 1.6; }
.prose > * { margin-block: 0 1.15em; }
.prose h2 { margin-top: 2em; margin-bottom: 0.6em; padding-bottom: 0.4rem; border-bottom: 1px solid var(--line); font-size: clamp(1.45rem, 1.2rem + 1.2vw, 2rem); }
.prose h3, .prose h4 { margin-top: 1.8em; margin-bottom: 0.5em; }
.prose img { width: 100%; border-radius: var(--radius); }
.prose figure { margin-inline: 0; }
.prose figcaption { margin-top: 0.5rem; font-size: 0.85rem; color: var(--fg-muted); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 0.4em; }
.prose li::marker { color: var(--terra); }
.prose blockquote { margin-inline: 0; padding: 0.2rem 0 0.2rem 1.25rem; border-left: 3px solid var(--terra); font-size: 1.1em; }
.prose iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: var(--radius); }
.prose pre { overflow-x: auto; padding: 1rem; border-radius: var(--radius); background: var(--bg-tint); font-size: 0.9em; }
.prose table { display: block; overflow-x: auto; border-collapse: collapse; }
.prose th, .prose td { padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--line); text-align: left; }
.prose .photo-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }

.post-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 1.5rem; padding-block: 1.75rem var(--section); border-top: 1px solid var(--line); }
.post-nav a { font-family: var(--font-title); font-size: 1.15rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; text-decoration: none; text-transform: uppercase; }
.post-nav a:hover { text-decoration: underline; }
.post-nav .eyebrow { display: block; margin-bottom: 0.4rem; font-family: var(--font-body); color: var(--fg-muted); }
@media (min-width: 34rem) { .post-nav__next { text-align: right; } }

/* ------------------------------------------------------------------ footer */

.site-footer { background: var(--band); color: var(--band-fg); padding-block: clamp(2.5rem, 6vw, 4rem) max(2rem, env(safe-area-inset-bottom)); }
.rule-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 2rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--band-line);
  font-family: var(--font-title);
  font-size: clamp(1rem, 0.9rem + 0.6vw, 1.35rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.site-footer__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(0, 1fr)); gap: 2rem; padding-block: clamp(2rem, 5vw, 3.5rem); }
.site-footer__mark svg { width: min(100%, 15rem); height: auto; }
.site-footer nav { display: flex; flex-direction: column; align-items: flex-start; gap: 0.15rem; }
.site-footer nav a { padding: 0.3rem 0; text-decoration: none; color: var(--band-muted); }
.site-footer nav a:hover { color: var(--band-fg); text-decoration: underline; }
.site-footer__legal { margin: 0; font-size: 0.8rem; color: var(--band-muted); }
@media (max-width: 52rem) {
  .site-footer__grid { grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); }
  .site-footer__mark { grid-column: 1 / -1; }
  .site-footer__mark svg { width: 11rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

@media print {
  .site-header, .site-footer, .nav-toggle { display: none; }
}
