/* ============================================================
   Carson Weber - Editorial & Warm design system
   Single source of truth: tokens + components
   ============================================================ */

/* ---- Fonts (self-hosted, latin subset; woff2 in /assets/fonts) --- */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/cormorant-garamond-500-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/cormorant-garamond-600-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/cormorant-garamond-500.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/cormorant-garamond-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/source-serif-4-400-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/source-serif-4-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/source-serif-4-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---- Design tokens --------------------------------------- */
:root {
  /* Palette (warm, timeless) */
  --paper:        #FAF6EF;   /* page background */
  --paper-deep:   #F3ECDF;   /* alt bands */
  --surface:      #FFFDF9;   /* cards */
  --ink:          #211C16;   /* primary text */
  --ink-soft:     #4A4238;   /* secondary text (AA on paper) */
  --muted:        #6B6153;   /* meta / captions (AA on paper) */
  --ember:        #B4531F;   /* accent: decorative + large text */
  --ember-text:   #9A3412;   /* accent for small text (>=4.5:1 on paper) */
  --ember-deep:   #7C2D12;   /* hover */
  --gold:         #9A7B18;   /* hairline / eyebrow accent */
  --border:       #E6DDCE;   /* hairlines */
  --border-strong:#D8CCB6;
  --focus:        #9A3412;

  /* Typography */
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body:    "Source Serif 4", Georgia, "Times New Roman", serif;
  --tracking-eyebrow: 0.18em;

  /* Fluid type scale */
  --step--1: clamp(0.83rem, 0.79rem + 0.18vw, 0.94rem);
  --step-0:  clamp(1.05rem, 1.00rem + 0.25vw, 1.20rem);   /* body */
  --step-1:  clamp(1.30rem, 1.18rem + 0.55vw, 1.65rem);
  --step-2:  clamp(1.65rem, 1.40rem + 1.10vw, 2.35rem);
  --step-3:  clamp(2.10rem, 1.65rem + 2.00vw, 3.40rem);
  --step-4:  clamp(2.70rem, 1.95rem + 3.30vw, 5.00rem);   /* hero name */

  /* Spacing rhythm (4/8) */
  --space-2xs: 0.5rem;
  --space-xs:  0.75rem;
  --space-sm:  1rem;
  --space-md:  1.5rem;
  --space-lg:  2.5rem;
  --space-xl:  4rem;
  --space-2xl: 6rem;

  /* Layout */
  --measure:      66ch;   /* readable text width */
  --container:    72rem;  /* wide sections */
  --radius:       10px;
  --radius-lg:    16px;
  --shadow-sm:    0 1px 2px rgba(33,28,22,.05);
  --shadow-md:    0 12px 32px -18px rgba(33,28,22,.28);
  --ring:         0 0 0 3px rgba(154,52,18,.35);

  --ease:         cubic-bezier(.22,.61,.36,1);
}

/* ---- Reset / base ---------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ember-text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ember-deep); }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  color: var(--ink);
  letter-spacing: 0.005em;
  margin: 0 0 var(--space-sm);
}
p { margin: 0 0 var(--space-sm); }

/* Focus visibility (accessibility) */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 3px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* Skip link */
.skip-link {
  position: absolute; left: 8px; top: -60px;
  background: var(--ink); color: var(--paper);
  padding: .6rem 1rem; border-radius: 6px; z-index: 200;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 8px; color: var(--paper); }

/* ---- Layout helpers -------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--space-md); }
.prose { max-width: var(--measure); margin-inline: auto; }
.section { padding-block: var(--space-2xl); }
.section--tight { padding-block: var(--space-xl); }
.band { background: var(--paper-deep); }
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: var(--tracking-eyebrow);
  font-weight: 600;
  color: var(--ember-text);
  margin: 0 0 var(--space-xs);
}
.lede { font-size: var(--step-1); line-height: 1.55; color: var(--ink-soft); font-weight: 400; }
.center { text-align: center; }
.rule { border: 0; height: 1px; background: var(--border-strong); margin: var(--space-lg) 0; }
.rule--short { width: 64px; height: 2px; background: var(--ember); border: 0; margin: var(--space-md) 0; }
.center .rule--short { margin-inline: auto; }

/* ---- Header / nav ---------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-md);
  min-height: 64px;
}
.wordmark {
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 600; letter-spacing: .01em;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.wordmark:hover { color: var(--ink); }
.wordmark .dot { color: var(--ember); }
.nav-links { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.25rem); list-style: none; margin: 0; padding: 0; }
.nav-links a {
  font-family: var(--font-body);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  padding: .4rem 0;
  position: relative;
}
.nav-links a:hover { color: var(--ember-text); }
.nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--ember);
}
.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--border-strong);
  border-radius: 8px; padding: .5rem; cursor: pointer;
  color: var(--ink); line-height: 0;
}
.nav-toggle svg { width: 24px; height: 24px; }

@media (max-width: 720px) {
  .nav { gap: 0; }
  .nav-toggle { display: inline-flex; margin-left: auto; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: var(--space-xs) var(--space-md) var(--space-md);
    box-shadow: var(--shadow-md);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; width: 100%; padding: .85rem 0; font-size: .8rem; border-bottom: 1px solid var(--border); }
  .nav-links a[aria-current="page"]::after { display: none; }
  .nav-links a[aria-current="page"] { color: var(--ember-text); }
}

/* ---- Buttons / links ------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-body); font-weight: 600;
  font-size: var(--step--1); letter-spacing: .06em; text-transform: uppercase;
  padding: .8rem 1.4rem; border-radius: 999px;
  text-decoration: none; cursor: pointer;
  transition: transform .2s var(--ease), background-color .2s var(--ease), color .2s var(--ease);
}
.btn svg { width: 1.05em; height: 1.05em; }
.btn--primary { background: var(--ember); color: #fff; border: 1px solid var(--ember); }
.btn--primary:hover { background: var(--ember-deep); border-color: var(--ember-deep); color: #fff; transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--border-strong); }
.btn--ghost:hover { border-color: var(--ember); color: var(--ember-text); transform: translateY(-1px); }
.link-arrow {
  font-family: var(--font-body); font-weight: 600;
  font-size: var(--step--1); letter-spacing: .04em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: .4rem; text-decoration: none;
  color: var(--ember-text);
}
.link-arrow::after { content: "\2192"; transition: transform .2s var(--ease); }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---- Hero (home) ----------------------------------------- */
.hero { padding-block: clamp(3rem, 6vw, 6rem); }
.hero-grid {
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}
.hero-name { font-size: var(--step-4); line-height: .98; margin-bottom: var(--space-sm); }
.hero-role {
  font-family: var(--font-body); text-transform: uppercase;
  letter-spacing: var(--tracking-eyebrow); font-weight: 600;
  font-size: var(--step--1); color: var(--ember-text); margin-bottom: var(--space-md);
}
.hero-intro { font-size: var(--step-1); line-height: 1.5; color: var(--ink-soft); max-width: 32ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-lg); }
.portrait-frame { justify-self: center; position: relative; max-width: 360px; width: 100%; }
.portrait-frame img { border-radius: 50%; border: 1px solid var(--border-strong); box-shadow: var(--shadow-md); }
.portrait-frame::before {
  content: ""; position: absolute; inset: -14px;
  border: 1px solid var(--ember); border-radius: 50%; opacity: .5;
}
@media (max-width: 780px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-intro { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .portrait-frame { grid-row: 1; max-width: 240px; }
}

/* ---- Cards (creations / featured) ------------------------ */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-md); }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.card h3 { font-size: var(--step-2); margin-bottom: var(--space-xs); }
.card p { color: var(--ink-soft); }
.card .link-arrow { margin-top: auto; padding-top: var(--space-sm); }
.card-media { border-radius: var(--radius); overflow: hidden; margin-bottom: var(--space-md); border: 1px solid var(--border); }
.card-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

/* ---- Pull-quote (Pascal) --------------------------------- */
.pullquote { position: relative; }
.pullquote blockquote {
  margin: 0 auto; max-width: 40ch;
  font-family: var(--font-display);
  font-size: var(--step-2); line-height: 1.28; color: var(--ink);
  font-style: italic; text-align: center;
}
.pullquote .mark {
  font-family: var(--font-display); font-size: 5rem; line-height: 0;
  color: var(--ember); opacity: .35; display: block; margin-bottom: 1.25rem;
}
.pullquote cite {
  display: block; margin-top: var(--space-md);
  font-family: var(--font-body); font-style: normal; font-size: var(--step--1);
  text-transform: uppercase; letter-spacing: var(--tracking-eyebrow);
  color: var(--muted); text-align: center;
}
.pullquote cite a { color: var(--muted); }
.pullquote cite a:hover { color: var(--ember-text); }

/* ---- Long-form article (origin story) -------------------- */
.article-head { text-align: center; padding-block: clamp(2.5rem, 5vw, 4.5rem) var(--space-lg); }
.story-logo { display: block; width: 100%; max-width: 300px; height: auto; margin: 0 auto var(--space-md); }
.article-title { font-size: var(--step-3); margin-bottom: var(--space-md); }
.article-dek { font-size: var(--step-1); color: var(--ink-soft); font-style: italic; max-width: 46ch; margin-inline: auto; }
.article-body { font-size: var(--step-0); }
.article-body p { margin-bottom: var(--space-md); }
.article-body > p:first-of-type::first-letter {
  font-family: var(--font-display); font-weight: 600;
  float: left; font-size: 3.6em; line-height: .72;
  padding: .05em .12em 0 0; color: var(--ember);
}
.article-body blockquote {
  margin: var(--space-lg) 0; padding-left: var(--space-md);
  border-left: 3px solid var(--ember);
  font-family: var(--font-display); font-style: italic;
  font-size: var(--step-1); line-height: 1.4; color: var(--ink);
}
.article-meta {
  text-align: center; margin-top: var(--space-xl); padding-top: var(--space-lg);
  border-top: 1px solid var(--border-strong);
  font-size: var(--step--1); color: var(--muted);
  text-transform: uppercase; letter-spacing: var(--tracking-eyebrow);
}

/* ---- Contact --------------------------------------------- */
.contact-card { text-align: center; max-width: 40rem; margin-inline: auto; }
.contact-email {
  font-family: var(--font-display); font-size: var(--step-2);
  color: var(--ember-text); text-decoration: none; word-break: break-word;
  display: inline-block; margin-block: var(--space-sm) var(--space-lg);
}
.contact-email:hover { color: var(--ember-deep); text-decoration: underline; }
.contact-actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); justify-content: center; }

/* ---- Videos ---------------------------------------------- */
.video-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-lg); }
.video-item {
  display: grid; grid-template-columns: 300px 1fr; gap: var(--space-lg);
  align-items: start;
  padding-bottom: var(--space-lg); border-bottom: 1px solid var(--border);
}
.video-item:last-child { border-bottom: 0; }
.video-thumb {
  display: block; position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); background: var(--paper-deep);
  aspect-ratio: 16 / 9;
}
.video-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s var(--ease); }
.video-thumb:hover img { transform: scale(1.04); }
.video-thumb .play {
  position: absolute; inset: 0; margin: auto; width: 56px; height: 56px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--ember) 92%, transparent); color: #fff;
  border-radius: 50%; box-shadow: var(--shadow-md);
  transition: transform .2s var(--ease), background-color .2s var(--ease);
}
.video-thumb:hover .play { transform: scale(1.08); background: var(--ember-deep); }
.video-thumb .play svg { width: 22px; height: 22px; margin-left: 3px; }
.video-index {
  font-family: var(--font-display); font-size: var(--step-1);
  color: var(--ember); font-weight: 600; line-height: 1;
}
.video-title { font-size: var(--step-1); margin: .15rem 0 var(--space-2xs); line-height: 1.2; }
.video-title a { color: var(--ink); text-decoration: none; }
.video-title a:hover { color: var(--ember-text); }
.video-desc { color: var(--ink-soft); font-size: var(--step-0); margin: 0; }
@media (max-width: 640px) {
  .video-item { grid-template-columns: 1fr; gap: var(--space-md); }
}

/* Featured (Exorcist Files) */
.feature {
  display: grid; grid-template-columns: 0.9fr 1.1fr; gap: var(--space-lg);
  align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
}
.feature img { border-radius: var(--radius); border: 1px solid var(--border); }
.feature h2 { font-size: var(--step-2); }
@media (max-width: 720px) { .feature { grid-template-columns: 1fr; } }

/* ---- Footer ---------------------------------------------- */
.site-footer {
  background: var(--ink); color: #E9E1D4;
  padding-block: var(--space-xl);
}
.site-footer--gap { margin-top: var(--space-2xl); }
.footer-grid { display: flex; flex-wrap: wrap; gap: var(--space-lg); justify-content: space-between; align-items: flex-start; }
.site-footer .wordmark { color: #F6EFE2; }
.site-footer .wordmark .dot { color: var(--ember); }
.footer-tag { color: #B9AE9C; max-width: 34ch; margin-top: var(--space-xs); font-size: var(--step--1); }
.footer-nav { display: flex; flex-wrap: wrap; gap: var(--space-md); list-style: none; margin: 0; padding: 0; }
.footer-nav a {
  color: #E9E1D4; text-decoration: none;
  font-size: var(--step--1); text-transform: uppercase; letter-spacing: .12em; font-weight: 600;
}
.footer-nav a:hover { color: var(--ember); }
.footer-bottom {
  margin-top: var(--space-lg); padding-top: var(--space-md);
  border-top: 1px solid rgba(255,255,255,.12);
  display: flex; flex-wrap: wrap; gap: var(--space-sm); justify-content: space-between;
  color: #9E9484; font-size: var(--step--1);
}
.footer-bottom a { color: #B9AE9C; }
.footer-bottom a:hover { color: var(--ember); }

/* ---- Scroll reveal (progressive enhancement) ------------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal, .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
