/* Kitefern Press — site styles
   Fonts are self-hosted (no third-party requests). */

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-var.woff2") format("woff2-variations"), url("../fonts/fraunces-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-var-italic.woff2") format("woff2-variations"), url("../fonts/fraunces-var-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #faf6ee;
  --paper-2: #f2ebdd;
  --paper-3: #ebe2d0;
  --card: #fffdf9;
  --ink: #1e2a3a;
  --ink-2: #4a5566;
  --ink-3: #6b7482;
  --fern: #2e5e4e;
  --fern-600: #244c3f;
  --fern-tint: #e3ece5;
  --kite: #d9573f;
  --kite-tint: #f8e3dc;
  --line: #e2d8c6;
  --radius: 16px;
  --shadow-sm: 0 1px 2px rgba(30, 42, 58, .06), 0 2px 8px rgba(30, 42, 58, .05);
  --shadow-book: 0 2px 4px rgba(30, 42, 58, .12), 0 12px 24px -6px rgba(30, 42, 58, .28);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--fern); text-underline-offset: 3px; }
a:hover { color: var(--fern-600); }
:focus-visible { outline: 3px solid var(--kite); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; letter-spacing: -0.01em; margin: 0; font-variation-settings: "opsz" 72; }
h3 { font-variation-settings: "opsz" 24; }
p { margin: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 100; text-decoration: none; }
.skip-link:focus { top: 12px; color: #fff; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .8125rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--fern);
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--kite); border-radius: 2px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 246, 238, .88);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 72px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand img { width: 40px; height: 40px; }
.brand-name { font-family: var(--serif); font-weight: 650; font-size: 1.375rem; letter-spacing: -0.01em; font-variation-settings: "opsz" 36; }
.brand-name em { font-style: italic; font-weight: 400; color: var(--fern); }

.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a { text-decoration: none; color: var(--ink-2); font-weight: 700; font-size: .9375rem; padding: 8px 12px; border-radius: 999px; }
.site-nav a:hover { color: var(--ink); background: var(--paper-2); }
.site-nav .nav-cta { background: var(--ink); color: #fff; padding: 9px 16px; }
.site-nav .nav-cta:hover { background: var(--fern); color: #fff; }

@media (max-width: 560px) {
  .site-nav a:not(.nav-cta) { display: none; }
  .brand-name { font-size: 1.2rem; }
  .brand img { width: 34px; height: 34px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 1rem/1 var(--sans);
  padding: 15px 22px; border-radius: 999px; text-decoration: none;
  border: 2px solid transparent; cursor: pointer;
  transition: background-color .15s ease, color .15s ease, transform .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--fern); color: #fff; }
.btn-primary:hover { background: var(--fern-600); color: #fff; }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: #fff; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(40px, 7vw, 88px) 0 clamp(48px, 7vw, 96px); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 4.6vw, 3.7rem); margin: 18px 0 20px; font-weight: 600; }
.hero h1 em { font-style: italic; font-weight: 400; color: var(--fern); }
.hero-lede { font-size: clamp(1.0625rem, 1.5vw, 1.25rem); color: var(--ink-2); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-note { margin-top: 20px; font-size: .9375rem; color: var(--ink-3); }

.hero-art { position: relative; aspect-ratio: 1 / .92; }
.hero-art::before {
  content: ""; position: absolute; inset: 6% 4% 0 8%;
  background: radial-gradient(closest-side, var(--fern-tint), rgba(227, 236, 229, 0));
  border-radius: 50%;
}
.hero-book { position: absolute; width: 44%; border-radius: 3px 6px 6px 3px; box-shadow: var(--shadow-book); transition: transform .4s ease; }
.hero-book img { border-radius: inherit; }
.hero-book::after { /* spine highlight */
  content: ""; position: absolute; inset: 0 auto 0 0; width: 7%;
  background: linear-gradient(90deg, rgba(0,0,0,.14), rgba(255,255,255,.12) 45%, rgba(0,0,0,0));
  border-radius: 3px 0 0 3px;
}
.hero-book.b1 { left: 2%;  top: 14%; transform: rotate(-8deg); z-index: 1; }
.hero-book.b2 { left: 28%; top: 4%;  z-index: 3; width: 47%; }
.hero-book.b3 { right: 0;  top: 16%; transform: rotate(7deg); z-index: 2; }
@media (hover: hover) {
  .hero-art:hover .b1 { transform: rotate(-10deg) translate(-8px, 4px); }
  .hero-art:hover .b3 { transform: rotate(9deg) translate(8px, 4px); }
}

@media (max-width: 880px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { max-width: 520px; width: 100%; margin: 8px auto 0; }
}

/* ---------- Promise strip ---------- */
.promises { background: var(--ink); color: #f4efe6; }
.promises ul { list-style: none; margin: 0; padding: 36px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.promises li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; }
.promises svg { width: 40px; height: 40px; color: #f2a38f; }
.promises strong { display: block; font-family: var(--serif); font-weight: 600; font-size: 1.125rem; color: #fff; margin-bottom: 2px; font-variation-settings: "opsz" 24; }
.promises span { color: #c9cfd8; font-size: .9375rem; line-height: 1.5; }
@media (max-width: 920px) { .promises ul { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .promises ul { grid-template-columns: 1fr; gap: 20px; padding: 28px 0; } }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-head { max-width: 720px; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(2rem, 3.8vw, 3rem); margin: 14px 0 14px; }
.section-head p { color: var(--ink-2); font-size: 1.125rem; }

/* ---------- Filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 36px; padding: 0; list-style: none; }
.chip {
  font: 700 .9375rem/1 var(--sans); color: var(--ink);
  background: var(--card); border: 1.5px solid var(--line);
  padding: 11px 16px; border-radius: 999px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.chip:hover { border-color: var(--ink-3); }
.chip .count { font-weight: 400; color: var(--ink-3); font-size: .8125rem; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip[aria-pressed="true"] .count { color: #c9cfd8; }

/* ---------- Book grid ---------- */
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 28px; }
.book {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden;
  display: flex; flex-direction: column;
}
.book[hidden] { display: none; }
.book-cover {
  position: relative; background: var(--paper-2);
  padding: 32px 44px 28px; display: flex; align-items: flex-end; justify-content: center;
  aspect-ratio: 1 / 1.08;
}
.book-cover img {
  width: auto; max-height: 100%; max-width: 100%;
  border-radius: 2px 5px 5px 2px; box-shadow: var(--shadow-book);
  transition: transform .3s ease;
}
.book:hover .book-cover img { transform: translateY(-4px) rotate(-1deg); }
.book-cover .badge {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  background: var(--card); color: var(--ink); border: 1px solid var(--line);
  font-size: .75rem; font-weight: 700; letter-spacing: .04em; padding: 5px 10px; border-radius: 999px;
}
.book-cover .badge.new { background: var(--kite); border-color: var(--kite); color: #fff; }

.book-body { padding: 24px 24px 26px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.book-kicker { font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--kite); }
.book h3 { font-size: 1.5rem; }
.book h3 small { display: block; font-family: var(--sans); font-size: .9375rem; font-weight: 700; color: var(--ink-2); margin-top: 6px; letter-spacing: 0; line-height: 1.4; }
.book-desc { color: var(--ink-2); font-size: 1rem; }
.book-points { list-style: none; margin: 2px 0 0; padding: 0; display: grid; gap: 7px; font-size: .9375rem; }
.book-points li { position: relative; padding-left: 24px; }
.book-points li::before {
  content: ""; position: absolute; left: 2px; top: .5em; width: 12px; height: 8px;
  border-left: 2.5px solid var(--fern); border-bottom: 2.5px solid var(--fern);
  transform: rotate(-45deg) translateY(-3px);
}
.book-meta { font-size: .875rem; color: var(--ink-3); border-top: 1px dashed var(--line); padding-top: 12px; margin-top: auto; }
.book-note { font-size: .8125rem; color: var(--ink-3); font-style: italic; }

/* Buy button: paste an Amazon link into href and it switches from "Coming soon" to "Buy on Amazon" automatically. */
.buy {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 1rem/1 var(--sans); text-decoration: none;
  padding: 15px 18px; border-radius: 12px; margin-top: 6px;
  background: var(--fern); color: #fff; border: 2px solid var(--fern);
  transition: background-color .15s ease;
}
.buy:hover { background: var(--fern-600); color: #fff; }
.buy svg { width: 18px; height: 18px; }
.buy .when-soon { display: none; }
.buy:not([href^="http"]) {
  background: transparent; color: var(--ink-3); border: 2px dashed var(--line);
  pointer-events: none; cursor: default;
}
.buy:not([href^="http"]) .when-live, .buy:not([href^="http"]) svg { display: none; }
.buy:not([href^="http"]) .when-soon { display: inline; }


/* ---------- Gift guide ---------- */
.gift-guide { background: var(--paper-2); }
.gift-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; list-style: none; margin: 0; padding: 0; }
.gift-list a {
  display: flex; flex-direction: column; gap: 8px; height: 100%;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; text-decoration: none; color: var(--ink);
  transition: transform .2s ease, box-shadow .2s ease;
}
.gift-list a:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); color: var(--ink); }
.gift-list .who { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; font-variation-settings: "opsz" 24; }
.gift-list .pick { color: var(--ink-2); font-size: .9375rem; }
.gift-list .go { margin-top: auto; padding-top: 8px; font-weight: 700; color: var(--fern); font-size: .9375rem; }
@media (max-width: 920px) { .gift-list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .gift-list { grid-template-columns: 1fr; } }

/* ---------- About ---------- */
.about .wrap { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.about-lead { margin-top: 16px; font-family: var(--serif); font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.3; font-weight: 400; font-variation-settings: "opsz" 48; }
.about-lead em { color: var(--fern); }
.about-copy { display: grid; gap: 18px; color: var(--ink-2); }
.about-copy strong { color: var(--ink); }
.values { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 16px; }
.values li { display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: start; }
.values .num { font-family: var(--serif); font-style: italic; font-size: 1.5rem; color: var(--kite); line-height: 1.2; }
.about-intro { position: sticky; top: 110px; }
@media (max-width: 880px) { .about .wrap { grid-template-columns: 1fr; } .about-intro { position: static; } }

/* ---------- Contact ---------- */
.contact-card {
  background: var(--fern); color: #eef4ef; border-radius: calc(var(--radius) + 8px);
  padding: clamp(32px, 6vw, 64px); display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center;
  position: relative; overflow: hidden;
}
.contact-card::after {
  content: ""; position: absolute; right: 4%; bottom: -36px; width: 230px; height: 230px;
  background: #fff; opacity: .07; transform: rotate(-14deg);
  -webkit-mask: url("../img/favicon.svg") no-repeat center / contain;
          mask: url("../img/favicon.svg") no-repeat center / contain;
  pointer-events: none;
}
.contact-card h2 { color: #fff; font-size: clamp(2rem, 3.6vw, 2.75rem); margin: 12px 0 14px; }
.contact-card .eyebrow { color: #cfe3d6; }
.contact-card p { color: #dbe8df; }
.contact-card ul { margin: 16px 0 0; padding-left: 20px; color: #dbe8df; display: grid; gap: 6px; }
.contact-action { display: grid; gap: 12px; justify-items: start; position: relative; z-index: 1; }
.contact-action .btn { background: #fff; color: var(--fern-600); font-size: 1.0625rem; padding: 17px 24px; }
.contact-action .btn:hover { background: var(--paper-2); color: var(--ink); }
.contact-action small { color: #cfe3d6; font-size: .875rem; }
@media (max-width: 820px) { .contact-card { grid-template-columns: 1fr; } }
@media (max-width: 400px) { .contact-action .btn { font-size: .9375rem; padding: 15px 18px; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--paper-3); padding: 56px 0 40px; margin-top: clamp(64px, 9vw, 112px); font-size: .9375rem; color: var(--ink-2); }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; align-items: flex-start; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.footer-top .tagline { margin-top: 10px; max-width: 30em; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; margin: 0; padding: 0; }
.footer-nav a { color: var(--ink); font-weight: 700; text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; }
.legal { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 48px; padding-top: 28px; }
.legal h2 { font-family: var(--sans); font-size: .8125rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); margin-bottom: 8px; font-weight: 700; }
.legal p + p { margin-top: 8px; }
.copyright { margin-top: 32px; font-size: .875rem; color: var(--ink-3); }
@media (max-width: 720px) { .legal { grid-template-columns: 1fr; } }

/* ---------- Small screens ---------- */
@media (max-width: 560px) {
  .hero-art { width: 94%; }
  .hero-book { width: 40%; }
  .hero-book.b1 { left: 4%; }
  .hero-book.b2 { left: 29%; width: 43%; }
  .hero-book.b3 { right: 4%; }
  .book-cover { aspect-ratio: auto; height: 320px; padding: 26px 24px 24px; }
  .book-body { padding: 22px 20px 24px; }
}

/* ---------- 404 ---------- */
.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 48px 0; }
.notfound img { width: 96px; margin: 0 auto 20px; }
.notfound h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin-bottom: 12px; }
.notfound p { color: var(--ink-2); margin-bottom: 28px; }
