/* ————————————————————————————————————————————
   Maker's Lore — design system
   Warm, editorial, tactile. Like afternoon light
   on a wooden table.
   ———————————————————————————————————————————— */

:root {
  --paper: #F7F1E6;
  --ivory: #FBF7EF;
  --ink: #33302B;
  --ink-soft: #5C554A;
  --terracotta: #C06B4C;
  --terracotta-deep: #A85A3E;
  --honey: #D9A441;
  --walnut: #6B4A2E;
  --walnut-deep: #4A3420;
  --sage: #8A9A6B;
  --rust: #A44A34;
  --line: rgba(107, 74, 46, 0.18);

  --serif: "Fraunces", Georgia, serif;
  --body-serif: "Newsreader", Georgia, serif;
  --sans: "Inter", -apple-system, sans-serif;
  --script: "Caveat", cursive;

  --ease-page: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  background-color: var(--paper);
  /* faint linen/paper grain */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.42 0 0 0 0 0.29 0 0 0 0 0.18 0 0 0 0.035 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  color: var(--ink);
  font-family: var(--body-serif);
  font-size: 19px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: var(--rust); text-decoration: none; transition: color 0.3s ease; }
a:hover { color: var(--rust); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--honey); outline-offset: 3px; border-radius: 2px;
}

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.wrap--read { max-width: 720px; }

/* ——— type helpers ——— */
.eyebrow {
  font-family: var(--sans); font-size: 12.5px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--rust);
}
.eyebrow--sage { color: #5F6E45; }
.script-note { font-family: var(--script); font-size: 1.55em; color: var(--walnut); line-height: 1.2; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; letter-spacing: -0.01em; color: var(--ink); }

/* hand-drawn divider flourish */
.flourish { display: flex; justify-content: center; margin: 3.5rem auto; }
.flourish svg { width: 120px; height: 22px; stroke: var(--terracotta); opacity: 0.7; }

/* ——— header ——— */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 241, 230, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: flex; align-items: baseline; gap: 2px; color: var(--ink); }
.logo:hover { color: var(--ink); }
.logo .logo-makers { font-family: var(--serif); font-weight: 700; font-size: 26px; letter-spacing: -0.01em; }
.logo .logo-lore { font-family: var(--script); font-weight: 600; font-size: 32px; color: var(--terracotta); margin-left: 5px; transform: rotate(-3deg); display: inline-block; }
.main-nav { display: flex; gap: 30px; align-items: center; }
.main-nav a {
  font-family: var(--sans); font-size: 13px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft);
  padding: 6px 2px; border-bottom: 2px solid transparent; transition: all 0.3s ease;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--terracotta); border-bottom-color: var(--honey); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 10px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--walnut); margin: 5px 0; border-radius: 2px; transition: 0.3s; }

@media (max-width: 800px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none; position: absolute; top: 72px; left: 0; right: 0;
    background: var(--ivory); flex-direction: column; gap: 0;
    padding: 12px 0 20px; border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px -18px rgba(74, 52, 32, 0.35);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 14px 24px; width: 100%; border-bottom: none; }
}

/* ——— hero (homepage + story) ——— */
.hero {
  position: relative; min-height: 82vh; display: flex; align-items: flex-end;
  isolation: isolate; overflow: hidden;
}
.hero picture, .hero > img { position: absolute; inset: 0; z-index: -1; }
.hero img { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(to top, rgba(42, 28, 15, 0.82) 0%, rgba(42, 28, 15, 0.35) 45%, rgba(42, 28, 15, 0.08) 75%);
}
.hero-content { position: relative; z-index: 1; padding: 64px 0 72px; width: 100%; text-shadow: 0 1px 3px rgba(30, 19, 9, 0.55), 0 2px 22px rgba(30, 19, 9, 0.45); }
.hero-content .eyebrow { color: var(--honey); }
.hero-title {
  font-size: clamp(2.3rem, 5.4vw, 4.2rem); color: #FBF7EF; margin: 14px 0 18px; max-width: 17ch;
  text-wrap: balance;
}
.hero-dek { font-size: clamp(1.05rem, 1.7vw, 1.3rem); color: rgba(251, 247, 239, 0.9); max-width: 56ch; font-style: italic; }
.hero-meta { margin-top: 20px; font-family: var(--sans); font-size: 13.5px; letter-spacing: 0.08em; color: rgba(251, 247, 239, 0.75); text-transform: uppercase; }

.btn {
  display: inline-block; margin-top: 28px;
  font-family: var(--sans); font-size: 14px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  background: var(--rust); color: #FBF7EF; padding: 15px 30px; border-radius: 3px;
  border: none; cursor: pointer;
  transition: background 0.3s ease, transform 0.3s var(--ease-page), box-shadow 0.3s ease;
}
.btn:hover { background: #8F3E2A; color: #FBF7EF; transform: translateY(-2px); box-shadow: 0 12px 24px -10px rgba(160, 84, 56, 0.55); }
.btn--honey { background: var(--honey); color: var(--walnut-deep); }
.btn--honey:hover { background: #C9942F; color: var(--walnut-deep); }
.btn--ghost { background: transparent; border: 1.5px solid var(--rust); color: var(--rust); }
.btn--ghost:hover { background: var(--terracotta); color: var(--ivory); box-shadow: none; }

/* ——— section headings ——— */
.section { padding: 84px 0 40px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 40px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.section-head .see-all { font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap; }

/* ——— story cards ——— */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; }
.card-grid--wide { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .card-grid, .card-grid--wide { grid-template-columns: 1fr; } }

.story-card {
  background: var(--ivory); border-radius: 14px; overflow: hidden;
  border: 1px solid rgba(107, 74, 46, 0.1);
  box-shadow: 0 2px 10px -4px rgba(74, 52, 32, 0.12);
  transition: transform 0.45s var(--ease-page), box-shadow 0.45s ease;
  display: flex; flex-direction: column;
}
.story-card:hover { transform: translateY(-6px); box-shadow: 0 24px 40px -18px rgba(120, 78, 48, 0.35); }
.story-card a.card-link { color: inherit; display: flex; flex-direction: column; height: 100%; }
.story-card .card-img { aspect-ratio: 4 / 3; overflow: hidden; }
.card-grid--wide .story-card .card-img { aspect-ratio: 16 / 10; }
.story-card .card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-page), filter 0.6s ease; filter: saturate(0.96) sepia(0.06); }
.story-card:hover .card-img img { transform: scale(1.035); filter: saturate(1.02) sepia(0.02); }
.card-body { padding: 24px 26px 28px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-body h3 { font-size: 1.4rem; line-height: 1.2; }
.card-body .card-hook { color: var(--ink-soft); font-size: 1rem; font-style: italic; flex: 1; }
.card-maker {
  display: flex; align-items: center; gap: 8px; margin-top: 6px;
  font-family: var(--sans); font-size: 12.5px; letter-spacing: 0.06em; color: var(--walnut);
}
.card-maker .dot { color: var(--honey); }

/* ——— mission band ——— */
.mission {
  text-align: center; padding: 100px 24px;
}
.mission .script-note { font-size: 2rem; display: block; margin-bottom: 18px; }
.mission h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); max-width: 22ch; margin: 0 auto 22px; text-wrap: balance; }
.mission p { max-width: 58ch; margin: 0 auto; color: var(--ink-soft); font-size: 1.12rem; }

/* ——— categories ——— */
.cat-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 18px; margin-top: 8px; }
@media (max-width: 1000px) { .cat-row { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 620px) { .cat-row { grid-template-columns: repeat(2, 1fr); } }
.cat-tile {
  background: var(--ivory); border: 1px solid rgba(107, 74, 46, 0.12); border-radius: 12px;
  padding: 26px 12px 22px; text-align: center; color: var(--ink);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  transition: transform 0.4s var(--ease-page), box-shadow 0.4s ease, border-color 0.4s ease;
}
.cat-tile:hover { transform: translateY(-4px); border-color: var(--honey); box-shadow: 0 16px 28px -16px rgba(120, 78, 48, 0.3); color: var(--ink); }
.cat-tile svg { width: 34px; height: 34px; stroke: var(--walnut); }
.cat-tile:hover svg { stroke: var(--terracotta); }
.cat-tile span { font-family: var(--sans); font-size: 12.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }

/* ——— story page ——— */
.story-hero { min-height: 76vh; }
.story-body { padding: 64px 0 30px; }
.story-body .wrap--read > p { margin-bottom: 1.75em; max-width: 68ch; }
.story-body .wrap--read > p:first-of-type::first-letter {
  font-family: var(--serif); font-weight: 600; font-size: 4.4em; float: left;
  line-height: 0.78; padding: 8px 12px 0 0; color: var(--terracotta);
}
.pullquote {
  margin: 3.2rem auto; padding: 0 12px; max-width: 24ch; text-align: center;
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(1.5rem, 3vw, 1.9rem); line-height: 1.35; color: var(--walnut);
  position: relative;
}
.pullquote::before {
  content: "“"; display: block; font-size: 3.2rem; line-height: 0.6;
  color: var(--honey); font-style: normal; margin-bottom: 14px;
}
.pullquote::after {
  content: ""; display: block; width: 70px; height: 3px; margin: 22px auto 0;
  background: var(--honey); border-radius: 3px; transform: rotate(-1deg);
}
figure.story-img { margin: 3.4rem 0; }
figure.story-img.breakout { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
figure.story-img.breakout img { width: 100%; max-height: 78vh; object-fit: cover; }
figure.story-img:not(.breakout) img { border-radius: 12px; }
figure.story-img figcaption {
  font-family: var(--sans); font-size: 13px; color: var(--ink-soft);
  margin-top: 12px; letter-spacing: 0.03em; text-align: center; font-style: italic; padding: 0 24px;
}
.gallery-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin: 3.4rem 0; }
@media (max-width: 620px) { .gallery-pair { grid-template-columns: 1fr; } }
.gallery-pair figure { margin: 0; }
.gallery-pair img { border-radius: 12px; aspect-ratio: 4/3; object-fit: cover; width: 100%; }

/* about the maker block */
.about-maker {
  background: var(--ivory); border: 1px solid rgba(138, 154, 107, 0.4); border-radius: 14px;
  padding: 34px 36px; margin: 3.6rem 0;
  box-shadow: 0 2px 12px -6px rgba(74, 52, 32, 0.15);
}
.about-maker .eyebrow { color: var(--sage); display: block; margin-bottom: 12px; }
.about-maker h3 { font-size: 1.5rem; margin-bottom: 6px; }
.about-maker .maker-facts {
  display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 12px 0 16px;
  font-family: var(--sans); font-size: 13.5px; color: var(--walnut); letter-spacing: 0.03em;
}
.about-maker p { color: var(--ink-soft); font-size: 1.02rem; }

/* share row */
.share-row {
  display: flex; align-items: center; gap: 16px; margin: 3rem 0 1rem;
  padding-top: 2rem; border-top: 1px solid var(--line);
}
.share-row .share-label { font-family: var(--script); font-size: 1.5rem; color: var(--walnut); }
.share-row a, .share-row button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1.5px solid var(--line); background: var(--ivory); cursor: pointer;
  transition: all 0.3s ease; color: var(--walnut);
}
.share-row a:hover, .share-row button:hover { border-color: var(--terracotta); color: var(--terracotta); transform: translateY(-2px); }
.share-row svg { width: 18px; height: 18px; fill: currentColor; }

/* ——— newsletter band ——— */
.newsletter {
  background: var(--walnut-deep);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 0.85 0 0 0 0 0.6 0 0 0 0.04 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  color: var(--ivory); text-align: center; padding: 90px 24px; margin-top: 60px;
}
.newsletter .script-note { color: var(--honey); font-size: 2rem; display: block; margin-bottom: 16px; }
.newsletter h2 { color: var(--ivory); font-size: clamp(1.7rem, 3vw, 2.4rem); margin-bottom: 14px; }
.newsletter p { color: rgba(251, 247, 239, 0.78); max-width: 46ch; margin: 0 auto 30px; }
.newsletter-form { display: flex; gap: 12px; justify-content: center; max-width: 460px; margin: 0 auto; flex-wrap: wrap; }
.newsletter-form input[type="email"] {
  flex: 1; min-width: 240px; padding: 15px 18px; border-radius: 3px;
  border: 1.5px solid rgba(251, 247, 239, 0.3); background: rgba(251, 247, 239, 0.08);
  color: var(--ivory); font-family: var(--body-serif); font-size: 16px;
}
.newsletter-form input::placeholder { color: rgba(251, 247, 239, 0.5); }
.newsletter-form .btn { margin-top: 0; }
.form-note { font-family: var(--sans); font-size: 13px; color: rgba(251, 247, 239, 0.55); margin-top: 16px; }
.form-success { font-family: var(--script); font-size: 1.7rem; color: var(--honey); }

/* ——— browse page ——— */
.filter-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 36px 0 44px; }
.filter-pill {
  font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: 0.06em;
  padding: 10px 20px; border-radius: 999px; cursor: pointer;
  background: var(--ivory); color: var(--walnut); border: 1.5px solid var(--line);
  transition: all 0.3s ease;
}
.filter-pill:hover { border-color: var(--terracotta); color: var(--terracotta); }
.filter-pill.active { background: var(--rust); border-color: var(--rust); color: var(--ivory); }
.filter-select {
  font-family: var(--sans); font-size: 13.5px; font-weight: 600; color: var(--walnut);
  padding: 10px 16px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--ivory); cursor: pointer; margin-left: auto;
}
.no-results { text-align: center; padding: 60px 0; color: var(--ink-soft); font-style: italic; font-size: 1.1rem; }

/* ——— page hero (about / nominate) ——— */
.page-head { text-align: center; padding: 84px 24px 20px; }
.page-head h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); max-width: 20ch; margin: 14px auto 20px; text-wrap: balance; }
.page-head .lede { font-size: 1.2rem; font-style: italic; color: var(--ink-soft); max-width: 54ch; margin: 0 auto; }

/* ——— forms (nominate) ——— */
.form-card {
  background: var(--ivory); border: 1px solid rgba(107, 74, 46, 0.12); border-radius: 16px;
  padding: 44px; max-width: 640px; margin: 40px auto 90px;
  box-shadow: 0 4px 20px -10px rgba(74, 52, 32, 0.2);
}
.form-field { margin-bottom: 22px; }
.form-field label {
  display: block; font-family: var(--sans); font-size: 12.5px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--walnut); margin-bottom: 8px;
}
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 14px 16px; border-radius: 6px;
  border: 1.5px solid var(--line); background: var(--paper);
  font-family: var(--body-serif); font-size: 16.5px; color: var(--ink);
  transition: border-color 0.3s ease;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--honey); }
.form-field textarea { min-height: 140px; resize: vertical; }

/* ——— footer ——— */
.site-footer {
  background: var(--ink); color: rgba(251, 247, 239, 0.75);
  padding: 70px 0 36px; margin-top: 0;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 44px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer .logo .logo-makers { color: var(--ivory); font-size: 22px; }
.site-footer .footer-mission { margin-top: 14px; font-size: 0.98rem; font-style: italic; color: rgba(251, 247, 239, 0.6); max-width: 34ch; }
.site-footer h4 { font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--honey); margin-bottom: 18px; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: rgba(251, 247, 239, 0.75); font-size: 0.95rem; }
.site-footer a:hover { color: var(--honey); }
.footer-legal {
  margin-top: 56px; padding-top: 26px; border-top: 1px solid rgba(251, 247, 239, 0.12);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-family: var(--sans); font-size: 12.5px; color: #ABA69B;
}

/* ——— related stories ——— */
.related { padding: 70px 0 90px; background: rgba(138, 154, 107, 0.08); border-top: 1px solid var(--line); margin-top: 70px; }

/* ——— motion: gentle reveals ——— */
html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 1s var(--ease-page), transform 1s var(--ease-page); }
html.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .story-card, .story-card .card-img img, .cat-tile, .btn { transition: none; }
}

/* legal pages */
.legal-body { max-width: 720px; margin: 30px auto 90px; padding: 0 24px; }
.legal-body h2 { font-size: 1.35rem; margin: 2.2em 0 0.7em; }
.legal-body p, .legal-body li { color: var(--ink-soft); font-size: 1.02rem; margin-bottom: 1em; }
.legal-body ul { padding-left: 1.4em; }

/* accessible inline links + skip link */
.story-body a:not(.btn), .legal-body a, .mission a, .page-head a, .no-results a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--honey); color: var(--walnut-deep); padding: 12px 20px; font-family: var(--sans); font-weight: 600; border-radius: 0 0 6px 0; }
.skip-link:focus { left: 0; }
