/* The Anatolian Kitchen & Home Book: store page. Colours are the channel's card theme and the book's cover. */

@font-face { font-family: "Fraunces"; src: url(/fonts/Fraunces-Regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url(/fonts/Fraunces-SemiBold.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url(/fonts/Fraunces-Italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Literata"; src: url(/fonts/Literata-Regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Literata"; src: url(/fonts/Literata-Italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Literata"; src: url(/fonts/Literata-SemiBold.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url(/fonts/Inter-Medium.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url(/fonts/Inter-SemiBold.woff2) format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --ink: #261A15;
  --ink-soft: #46362D;
  --cream: #F7EFE2;
  --cream-2: #E9DDCB;
  --paper: #FBF8F2;
  --paper-2: #F3EADB;
  --white: #FFFFFF;
  --copper: #E0703C;
  --copper-hover: #EA8350;
  --copper-deep: #A8441C;
  --kilim-red: #7A2A1E;
  --sage: #7FB3A6;
  --sage-deep: #2F6457;
  --sage-tint: #E8F1EE;
  --muted-dark: #BFAD9E;
  --muted: #66564B;
  --line: #E4D9C8;
  --line-dark: rgba(247, 239, 226, 0.14);
  --serif-display: "Fraunces", Georgia, "Times New Roman", serif;
  --serif: "Literata", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: clamp(16px, 4.5vw, 36px);
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 12px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.1875rem/1.65 var(--serif);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--copper-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--copper); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--serif-display); font-weight: 600; line-height: 1.12; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.35rem, 4.6vw + 1rem, 4.25rem); }
h2 { font-size: clamp(1.85rem, 2.6vw + 1rem, 2.85rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding-inline: var(--gutter); }
.narrow { max-width: 880px; }
.skip { position: absolute; left: -9999px; top: 12px; z-index: 50; background: var(--cream); color: var(--ink); padding: 10px 14px; border-radius: 8px; }
.skip:focus { left: 12px; }

.eyebrow { font: 600 0.8rem/1.4 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--copper-deep); margin: 0 0 14px; }
.small { font: 500 0.92rem/1.5 var(--sans); }
.section-lede { color: var(--muted); font-size: 1.15rem; max-width: 40em; }

/* ---------- the woven border, cut from the book's cover */
.kilim { height: 30px; background: url(/img/kilim.png) repeat-x left center / auto 100%; }

/* ---------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 54px; padding: 0 26px; border: 0; border-radius: 12px;
  background: var(--copper); color: #1C120D;
  font: 600 1.05rem/1.2 var(--sans); text-decoration: none; text-align: center;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 10px 24px -12px rgba(224, 112, 60, 0.75);
  transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { background: var(--copper-hover); transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: 0.7; cursor: progress; transform: none; }
.btn-big { min-height: 62px; padding: 0 34px; font-size: 1.15rem; }
.btn-small { min-height: 42px; padding: 0 16px; font-size: 0.95rem; border-radius: 10px; box-shadow: none; }

/* ---------- header */
.top { background: var(--ink); color: var(--cream); border-bottom: 1px solid var(--line-dark); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 70px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--cream); text-decoration: none; font: 600 0.85rem/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; }
.brand svg { width: 26px; height: 26px; flex: none; }
.top .btn-small { white-space: nowrap; }
@media (max-width: 420px) {
  .brand { font-size: 0.74rem; letter-spacing: 0.12em; gap: 9px; }
  .brand svg { width: 22px; height: 22px; }
  .top .btn-small { padding: 0 12px; font-size: 0.88rem; }
}
.nav { display: none; gap: 28px; }
.nav a { color: var(--muted-dark); text-decoration: none; font: 500 0.95rem/1 var(--sans); }
.nav a:hover { color: var(--cream); }
@media (min-width: 900px) { .nav { display: flex; } }

/* ---------- hero */
.hero {
  background:
    radial-gradient(55% 60% at 22% 45%, rgba(224, 112, 60, 0.17), transparent 70%),
    radial-gradient(40% 50% at 90% 10%, rgba(127, 179, 166, 0.08), transparent 70%),
    var(--ink);
  color: var(--cream);
}
.hero-grid { display: grid; gap: 36px; padding-block: 36px 64px; align-items: center; }
.hero-book { display: flex; justify-content: center; order: -1; }
.book-stack { position: relative; width: min(46%, 230px); margin-right: 8%; }
.book-stack .cover {
  position: relative; z-index: 2; width: 100%;
  border-radius: 2px 7px 7px 2px;
  box-shadow: 0 34px 60px -22px rgba(0, 0, 0, 0.8), 0 14px 24px -14px rgba(0, 0, 0, 0.6);
}
.book-stack::after {
  content: ""; position: absolute; z-index: 3; top: 0; bottom: 0; left: 0; width: 5%;
  border-radius: 2px 0 0 2px; pointer-events: none;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.32), rgba(255, 255, 255, 0.10) 45%, transparent);
}
.book-stack .opener {
  position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; object-fit: cover;
  border-radius: 3px; transform: translate(16%, 4%) rotate(5deg);
  box-shadow: 0 30px 50px -24px rgba(0, 0, 0, 0.75); filter: brightness(0.9);
}
.hero-text h1 { color: var(--cream); font-size: clamp(2.3rem, 2.6vw + 1.25rem, 3.7rem); }
.hero .eyebrow { color: var(--copper); }
.lede { font-size: 1.2rem; line-height: 1.6; color: var(--cream-2); max-width: 32em; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 20px 0 0; }
.facts li { font: 500 0.9rem/1 var(--sans); color: var(--muted-dark); padding: 9px 13px; border: 1px solid var(--line-dark); border-radius: 999px; }

@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.2fr 0.8fr; gap: 64px; padding-block: 56px 88px; }
  .hero-book { order: 2; }
  .book-stack { width: min(82%, 380px); margin-right: 14%; }
}

/* ---------- the free chapter and the buy box */
.action {
  margin-top: 30px; padding: clamp(20px, 3vw, 28px);
  background: rgba(247, 239, 226, 0.05); border: 1px solid var(--line-dark); border-radius: 18px;
  max-width: 600px;
}
.action-title { font-size: 1.55rem; margin: 0 0 6px; color: inherit; }
.action-text { color: var(--muted-dark); font-size: 1.05rem; }
.disclosure { font: 500 0.92rem/1.5 var(--sans); color: var(--muted-dark); border-left: 3px solid var(--sage); padding: 2px 0 2px 12px; margin: 16px 0 18px; }
.field-label { display: block; font: 600 0.92rem/1.4 var(--sans); margin-bottom: 8px; }
.field-row { display: flex; flex-wrap: wrap; gap: 10px; }
.field-row input {
  flex: 1 1 240px; min-width: 0; min-height: 56px; padding: 0 16px;
  font: 400 1.1rem/1 var(--sans); color: var(--ink); background: var(--cream);
  border: 2px solid transparent; border-radius: 12px;
}
.field-row input:focus { outline: none; border-color: var(--copper); }
.field-row .btn { flex: 0 0 auto; }
@media (max-width: 520px) { .field-row .btn { flex: 1 1 100%; } }
.consent { font: 400 0.86rem/1.55 var(--sans); color: var(--muted-dark); margin: 14px 0 0; }
.hero .consent a, .hero .action a, .how a, .foot a { color: var(--cream); }
.form-msg { font: 500 0.95rem/1.4 var(--sans); color: #FFB79C; margin: 10px 0 0; }
.form-msg:empty { display: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.done { outline: none; }
.done-title { font: 600 1.45rem/1.2 var(--serif-display); margin: 0 0 14px; }
.done .small { margin-top: 12px; color: var(--muted-dark); }

.action-light { background: var(--white); border-color: var(--line); color: var(--ink); margin: 0 auto; box-shadow: 0 30px 60px -40px rgba(38, 26, 21, 0.35); }
.action-light .action-text, .action-light .consent, .action-light .disclosure, .action-light .done .small { color: var(--muted); }
.action-light .field-row input { background: var(--paper); border-color: var(--line); }
.action-light .field-row input:focus { border-color: var(--copper); }
.action-light .form-msg { color: #A3341B; }

/* ---------- not on sale yet */
.status { background: var(--paper-2); border-bottom: 1px solid var(--line); }
.status-row { display: flex; align-items: center; gap: 16px; padding-block: 18px; }
.status-row p { margin: 0; font: 500 1rem/1.5 var(--sans); color: var(--ink-soft); }
.meter { display: inline-flex; gap: 6px; flex: none; }
.dot { width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--copper-deep); }
.dot.on { background: var(--sage-deep); border-color: var(--sage-deep); }

/* ---------- sections */
.promises, .inside, .contents, .how, .offer, .faq { padding-block: clamp(64px, 9vw, 116px); }
.inside { background: var(--paper-2); }
.offer { background: var(--paper-2); }

.promise-grid { display: grid; gap: 24px; margin-top: 36px; }
@media (min-width: 760px) { .promise-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
.promise {
  background: var(--white); border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(38, 26, 21, 0.04), 0 24px 44px -34px rgba(38, 26, 21, 0.35);
}
.promise .crop { margin: 0; aspect-ratio: 16 / 7; overflow: hidden; background: var(--paper); border-bottom: 1px solid var(--line); }
.promise .crop img { width: 100%; height: 100%; object-fit: cover; object-position: left top; }
.promise h3 { margin: 24px 26px 8px; }
.promise p { margin: 0 26px 26px; color: var(--ink-soft); font-size: 1.08rem; }

.gallery { list-style: none; margin: 36px calc(var(--gutter) * -1) 0; padding: 4px var(--gutter) 20px; display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: thin; }
.gallery li { flex: 0 0 58%; scroll-snap-align: start; }
@media (min-width: 640px) { .gallery li { flex-basis: 34%; } }
@media (min-width: 980px) {
  .gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px 28px; overflow: visible; margin-inline: 0; padding-inline: 0; }
}
.page-shot { display: block; color: var(--ink); text-decoration: none; }
.page-shot img {
  width: 100%; border-radius: 3px; background: var(--white);
  box-shadow: 0 1px 2px rgba(38, 26, 21, 0.1), 0 18px 30px -18px rgba(38, 26, 21, 0.55);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.page-shot:hover img { transform: translateY(-4px); box-shadow: 0 1px 2px rgba(38, 26, 21, 0.1), 0 26px 38px -20px rgba(38, 26, 21, 0.6); }
.page-shot span { display: block; margin-top: 12px; font: 500 0.92rem/1.45 var(--sans); color: var(--muted); }

/* ---------- chapters */
.part { font: 600 0.8rem/1.4 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--copper-deep); margin: 44px 0 4px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.chapters { list-style: none; margin: 0; padding: 0; }
.chapter { display: grid; grid-template-columns: 58px 1fr; gap: 12px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 640px) { .chapter { grid-template-columns: 140px 1fr; gap: 28px; } }
.chapter-art { width: 100%; height: auto; max-height: 92px; object-fit: contain; }
.chapter-art.blank { display: block; height: 1px; }
.chapter-text { display: grid; grid-template-columns: 1.7rem 1fr; column-gap: 0.25rem; align-items: baseline; }
@media (min-width: 640px) { .chapter-text { grid-template-columns: 2.1rem 1fr; column-gap: 0.3rem; } }
.chapter-text > * { grid-column: 2; }
.chapter-text .num { grid-column: 1; grid-row: 1; font: 600 1.5rem/1.2 var(--serif-display); color: var(--copper-deep); }
.chapter-title { margin: 0; line-height: 1.35; }
.chapter-title .name { font: 600 1.3rem/1.3 var(--serif-display); }
.chapter-title .gloss { font-style: italic; color: var(--muted); }
.chapter-facts { margin: 6px 0 0; font: 500 0.88rem/1.5 var(--sans); color: var(--muted); }
.tag { justify-self: start; display: inline-block; margin-top: 10px; padding: 5px 10px; border-radius: 999px; font: 600 0.74rem/1 var(--sans); letter-spacing: 0.05em; text-transform: uppercase; background: #F7E2D5; color: #873716; }
.tag.tested { background: #DDEEE8; color: #24564A; }

.coming { margin-top: 56px; }
.coming-note { color: var(--muted); font-size: 1.05rem; }
.coming-grid { display: grid; gap: 22px; margin-top: 18px; }
@media (min-width: 760px) { .coming-grid { grid-template-columns: 1fr 1fr; } }
.coming-group h3 { font-size: 1.1rem; margin-bottom: 10px; }
.coming-group ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.coming-group li { font: 500 0.9rem/1.3 var(--sans); padding: 7px 12px; border: 1px solid var(--line); background: var(--white); border-radius: 999px; color: var(--ink-soft); }
.grows { margin: 40px 0 0; padding: 20px 24px; background: var(--sage-tint); border-left: 4px solid var(--sage-deep); border-radius: 4px 14px 14px 4px; font-size: 1.1rem; }

/* ---------- how it is made */
.how { background: var(--ink); color: var(--cream); }
.how .eyebrow { color: var(--copper); }
.how h2 { color: var(--cream); max-width: 18em; }
.how-grid { display: grid; margin-top: 30px; }
@media (min-width: 760px) { .how-grid { grid-template-columns: 1fr 1fr; column-gap: 48px; } }
@media (min-width: 1040px) { .how-grid { grid-template-columns: repeat(3, 1fr); } }
.how-item { padding: 28px 0 8px; border-top: 1px solid var(--line-dark); }
.how-item h3 { color: var(--cream); font-size: 1.3rem; }
.how-item p { color: var(--muted-dark); font-size: 1.08rem; }

/* ---------- the offer */
.offer-card {
  display: grid; gap: 32px; align-items: center; margin-bottom: 48px;
  background: var(--white); border: 1px solid var(--line); border-radius: 24px; padding: clamp(24px, 4vw, 44px);
  box-shadow: 0 40px 80px -50px rgba(38, 26, 21, 0.45);
}
@media (min-width: 760px) { .offer-card { grid-template-columns: 240px 1fr; gap: 48px; } }
.offer-book img { width: min(70%, 240px); margin: 0 auto; border-radius: 2px 6px 6px 2px; box-shadow: 0 24px 40px -22px rgba(0, 0, 0, 0.6); }
@media (min-width: 760px) { .offer-book img { width: 100%; } }
.offer-text h2 { font-size: clamp(1.6rem, 2vw + 1rem, 2.2rem); }
.price { font: 600 3rem/1 var(--serif-display); margin: 4px 0 18px; }
.ticks { list-style: none; padding: 0; margin: 0 0 8px; font: 500 1rem/1.5 var(--sans); }
.ticks li { position: relative; padding: 5px 0 5px 32px; }
.ticks li::before { content: ""; position: absolute; left: 5px; top: 0.72em; width: 14px; height: 8px; border-left: 2.5px solid var(--sage-deep); border-bottom: 2.5px solid var(--sage-deep); transform: rotate(-45deg); }
.offer .disclosure { color: var(--muted); }
.offer-text .small { color: var(--muted); margin-top: 14px; }

/* ---------- questions */
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); margin-top: 28px; }
.faq summary { list-style: none; cursor: pointer; position: relative; padding: 22px 44px 22px 0; font: 600 1.22rem/1.35 var(--serif-display); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font: 500 1.7rem/1 var(--sans); color: var(--copper-deep); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 24px; color: var(--ink-soft); max-width: 40em; }

/* ---------- footer */
.foot { background: var(--ink); color: var(--muted-dark); font: 500 0.95rem/1.6 var(--sans); }
.foot-grid { display: grid; gap: 12px; padding-block: 44px 8px; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 1.2fr 1fr; gap: 48px; } }
.foot-brand { color: var(--cream); font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; font-size: 0.85rem; }
.copy { font-size: 0.85rem; padding-block: 12px 36px; margin: 0; opacity: 0.8; }

/* ---------- a page, enlarged */
.viewer { border: 0; padding: 0; margin: 0; width: 100%; max-width: 100%; height: 100%; max-height: 100%; background: transparent; }
.viewer[open] { display: grid; place-items: center; }
.viewer::backdrop { background: rgba(18, 12, 9, 0.9); }
.viewer figure { margin: 0; padding: 64px 12px 24px; }
.viewer img { max-height: calc(100vh - 140px); max-width: min(94vw, 900px); width: auto; height: auto; background: var(--white); border-radius: 3px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); }
.viewer figcaption { margin-top: 14px; text-align: center; font: 500 0.95rem/1.4 var(--sans); color: var(--cream); }
.viewer-close, .viewer-nav {
  position: fixed; z-index: 2; width: 52px; height: 52px; border: 0; border-radius: 50%;
  background: rgba(247, 239, 226, 0.14); color: var(--cream); font: 400 2rem/1 var(--sans); cursor: pointer;
}
.viewer-close { top: 14px; right: 14px; }
.viewer-nav { top: 50%; transform: translateY(-50%); }
.viewer-nav.prev { left: 10px; }
.viewer-nav.next { right: 10px; }
.viewer-close:hover, .viewer-nav:hover { background: rgba(247, 239, 226, 0.26); }

/* ---------- plain pages */
.plain-page main.prose { padding-block: 56px 88px; }
.prose h1 { font-size: clamp(2.2rem, 3vw + 1rem, 3rem); }
.prose h2 { font-size: 1.5rem; margin-top: 1.8em; }
.prose ul { padding-left: 1.2em; }
.prose .lede { color: var(--muted); }
.not-found { text-align: center; padding-block: 18vh !important; }

/* ---------- what still has to be filled in (never visible once store.yaml is complete) */
.todo { background: #FFE9A8; color: #5A3B00; outline: 2px dashed #C08A00; border-radius: 4px; padding: 0 5px; font: 600 0.85em var(--sans); }

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