/* ==========================================================================
   Jootbuddy Books — site styles
   --------------------------------------------------------------------------
   Everything brand-specific lives in the :root block below: palette, type,
   rhythm, shadow. Swap the brand there. Nothing in the HTML carries an
   inline colour or font.

   Fonts are self-hosted from ../assets/fonts/ (Hanken Grotesk, Libre Caslon
   Display, Libre Caslon Text — all Open Font License).
   ========================================================================== */


/* ---------- Fonts ---------- */

@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../assets/fonts/HankenGrotesk-latin.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: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../assets/fonts/HankenGrotesk-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Libre Caslon Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/LibreCaslonDisplay-latin.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: 'Libre Caslon Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/LibreCaslonDisplay-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Libre Caslon Text';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/LibreCaslonText-latin.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: 'Libre Caslon Text';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/LibreCaslonText-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Libre Caslon Text';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/LibreCaslonText-700-latin.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: 'Libre Caslon Text';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/LibreCaslonText-700-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Libre Caslon Text';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/LibreCaslonText-italic-latin.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: 'Libre Caslon Text';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/LibreCaslonText-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}


/* ---------- Brand: change it here ---------- */

:root {
  /* Palette — ink, paper, and a thread of brass */
  --ink: #16202E;            /* headings, dark grounds, primary buttons     */
  --ink-deep: #0E1620;       /* hover on ink; deepest ground                 */
  --paper: #F6F1E8;          /* page background                              */
  --ivory: #FBF8F1;          /* cards, raised surfaces                       */
  --desk: #E7DFCF;           /* deeper paper; the canvas behind a sheet      */
  --rule: #E2D9C7;           /* 1px section rules                            */
  --hairline: #D8CDBA;       /* hairline on ivory                            */
  --text: #4A4636;           /* body text: warm ink, never pure black        */
  --muted: #8A8270;          /* captions, secondary text                     */
  --faint: #A39A86;          /* meta, small print                            */
  --accent: #A6803C;         /* brass: eyebrows, underlines, the mark's spine*/
  --accent-hover: #B9914E;
  --accent-on-ink: #C2A063;  /* brass on dark grounds                        */
  --on-ink-muted: #6E7889;   /* small muted labels on ink                    */
  --on-ink-soft: rgba(246, 241, 232, 0.72); /* readable secondary text on ink */
  --on-ink-rule: rgba(246, 241, 232, 0.15);
  --ink-wash: rgba(22, 32, 46, 0.06);       /* callout grounds, ghost hover  */
  --rust: #9B4A38;           /* caution; used sparingly                      */

  /* Type — a printer's serif and a quiet grotesque */
  --font-display: 'Libre Caslon Display', Georgia, 'Times New Roman', serif;
  --font-serif: 'Libre Caslon Text', Georgia, 'Times New Roman', serif;
  --font-sans: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --leading-body: 1.65;
  --tracking-eyebrow: 0.34em;
  --tracking-label: 0.24em;

  /* Rhythm */
  --container: 1040px;
  --gutter: clamp(20px, 6vw, 64px);
  --section-y: clamp(56px, 9vw, 96px);
  --measure: 46ch;           /* serif prose */
  --measure-sans: 62ch;      /* sans prose  */

  /* Surface */
  --shadow-card: 0 18px 44px rgba(20, 28, 40, 0.16);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 220ms;
}


/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color var(--dur) var(--ease);
}
a:hover { color: var(--accent); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--ink);
  margin: 0;
  letter-spacing: 0.01em;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 10;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 12px;
  text-decoration: none;
}
.skip:focus { left: 8px; }

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}


/* ---------- The mark ---------- */
/* Stroke-only. Book and ring take currentColor; the spine is brass. */

.mark { display: block; width: 40px; height: 40px; flex: none; }
.mark circle, .mark path, .mark line { fill: none; stroke: currentColor; stroke-width: 1.5; }
.mark path { stroke-width: 1.8; stroke-linejoin: round; }
.mark .mark-spine { stroke: var(--accent); stroke-width: 2; }
.mark .mark-ring { stroke: var(--rule); stroke-width: 1; }

.mark--masthead { width: 72px; height: 72px; margin: 0 auto 28px; }
.mark--masthead circle { stroke-width: 1.3; }
.mark--masthead path { stroke-width: 1.4; }
.mark--masthead .mark-spine { stroke-width: 1.6; }

.mark--sm { width: 32px; height: 32px; }


/* ---------- Type helpers ---------- */

.eyebrow {
  font-size: 12px;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 16px;
}

.lede {
  font-family: var(--font-serif);
  font-size: 1.1875rem;
  line-height: 1.7;
  max-width: var(--measure);
}

.prose { max-width: var(--measure-sans); }
.prose p { margin-bottom: 1.1em; }

.tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--muted);
  margin: 0 0 24px;
}

.meta-line { font-size: 14px; color: var(--muted); margin: 0 0 10px; }

.note {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
}


/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  padding: 15px 26px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  transition: transform var(--dur) var(--ease),
              background-color var(--dur) var(--ease),
              color var(--dur) var(--ease);
}
.btn:hover {
  background: var(--ink-deep);
  color: var(--paper);
  transform: translateY(-1px);
}
.btn:active { transform: translateY(0); }

.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink-wash); color: var(--ink); }

.btn-lg { padding: 19px 34px; font-size: 13px; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }


/* ---------- Header ---------- */

.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 18px;
  padding-bottom: 18px;
}

.lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
  text-decoration: none;
}
.lockup:hover { color: var(--ink); }
.lockup-text { display: flex; flex-direction: column; }
.lockup-word { font-family: var(--font-display); font-size: 21px; line-height: 1; }
.lockup-sub {
  font-size: 9px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent);
  margin-top: 4px;
}

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a:not(.btn) {
  font-size: 12px;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.site-nav a:not(.btn):hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}
.site-nav .btn { padding: 11px 18px; font-size: 11px; }


/* ---------- Sections ---------- */

.section {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}
.section + .section { border-top: 1px solid var(--rule); }

.section h2 {
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.1;
  margin-bottom: 18px;
}

.band { background: var(--desk); border-bottom: 1px solid var(--rule); }

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 32px clamp(32px, 6vw, 72px);
  align-items: start;
}


/* ---------- Home: masthead ---------- */

.hero {
  padding-top: clamp(64px, 10vw, 112px);
  padding-bottom: clamp(56px, 8vw, 96px);
  text-align: center;
}
.hero h1 {
  font-size: clamp(44px, 7vw, 72px);
  line-height: 1.05;
  margin-bottom: 20px;
}
.hero .lede { margin: 0 auto; }


/* ---------- The book ---------- */

.release,
.book-hero {
  display: grid;
  grid-template-columns: minmax(200px, 320px) minmax(0, 1fr);
  gap: 32px clamp(32px, 6vw, 72px);
  align-items: start;
}
.book-hero {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}

.cover {
  display: block;
  background: var(--ink);
  border: 1px solid var(--ink);
  box-shadow: var(--shadow-card);
  color: var(--paper);
  font-family: var(--font-display);
  text-align: center;
  text-decoration: none;
}
.cover img {
  width: 100%;
  height: auto;          /* the frame takes the cover's own proportions */
}

h1.book-title,
.section h2.book-title {
  font-size: clamp(38px, 5.2vw, 58px);
  line-height: 1.05;
  margin-bottom: 14px;
}
.book-subtitle {
  font-family: var(--font-serif);
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.4;
  color: var(--text);
  margin: 0 0 18px;
}
.book-author {
  font-size: 12px;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 8px;
}
.release-body .lede,
.book-hero .lede { margin: 20px 0 20px; }

.price-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-top: 20px;
}
.price {
  font-family: var(--font-display);
  font-size: 2.25rem;
  line-height: 1;
  color: var(--ink);
}
.price-note {
  font-size: 12px;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
}


/* ---------- What you get ---------- */

.spec {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0 clamp(32px, 5vw, 64px);
  margin: 0;
  border-top: 1px solid var(--rule);
}
.spec > div {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
}
.spec dt {
  font-size: 11px;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
  padding-top: 5px;
}
.spec dd { margin: 0; color: var(--ink); font-size: 15px; }


/* ---------- Order ---------- */

.order {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 40px clamp(32px, 5vw, 64px);
  align-items: start;
}

.order-card {
  background: var(--ivory);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow-card);
  padding: clamp(28px, 4vw, 44px);
}
.order-card .price-row { margin-top: 0; }
.order-card .btn { width: 100%; margin: 24px 0 8px; }
.order-card .note { margin: 28px 0 0; padding-top: 20px; border-top: 1px solid var(--rule); }

.steps {
  list-style: none;
  counter-reset: step;
  margin: 24px 0 0;
  padding: 0;
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--rule);
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--accent);
  padding-top: 2px;
}
.steps h3 {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
  margin: 0 0 4px;
}
.steps p { margin: 0; font-size: 15px; }

.callout {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  background: var(--ink-wash);
  padding: 22px 26px;
}
.callout .eyebrow { font-size: 11px; letter-spacing: 0.28em; margin-bottom: 10px; }
.callout p { margin: 0; font-size: 15px; line-height: 1.7; }

.order-aside > * + * { margin-top: 28px; }
.order-aside .prose p { font-size: 15px; }


/* ---------- FAQ ---------- */

.faq {
  max-width: 760px;
  border-top: 1px solid var(--rule);
}
.faq-item {
  padding: 28px 0;
  border-bottom: 1px solid var(--rule);
}
.faq-item h3 {
  font-size: 1.375rem;
  line-height: 1.25;
  margin-bottom: 10px;
}
.faq-item p { margin: 0; max-width: var(--measure-sans); }
.faq-item p + p { margin-top: 0.8em; }


/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink);
  color: var(--paper);
}
.site-footer .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: end;
  padding-top: 56px;
  padding-bottom: 44px;
}
.site-footer .lockup { color: var(--paper); gap: 12px; }
.site-footer .lockup-word { font-size: 17px; }
.site-footer .mark .mark-spine { stroke: var(--accent-on-ink); }
.footer-tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  color: var(--on-ink-soft);
  margin: 12px 0 0;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  font-size: 12px;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  font-weight: 600;
}
.footer-links a { color: var(--paper); text-decoration: none; }
.footer-links a:hover { color: var(--accent-on-ink); }
.footer-small {
  grid-column: 1 / -1;
  margin: 8px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--on-ink-rule);
  font-size: 13px;
  color: var(--on-ink-soft);
}


/* ---------- Responsive ---------- */

@media (max-width: 720px) {
  .release,
  .book-hero,
  .order,
  .two-col,
  .site-footer .wrap { grid-template-columns: 1fr; }
  .release .cover,
  .book-hero .cover { max-width: 260px; }
  .site-footer .wrap { align-items: start; }
}

@media (max-width: 479px) {
  .lockup-text { display: none; }   /* mark alone below 480px, per the brand guide */
  .site-nav { gap: 16px; }
  .spec > div { grid-template-columns: 1fr; gap: 4px; }
  .steps li { grid-template-columns: 36px minmax(0, 1fr); gap: 12px; }
}

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