/* Maison Avinetra — The Journal
   Type follows the brief: Exmouth (or a close calligraphy) for headings,
   Times New Roman for everything else. Exmouth is used if installed;
   Pinyon Script is the free web fallback. */

:root {
  --oxblood: #8e2026;
  --oxblood-deep: #700c0c;
  --pink: #ff007f;
  --teal: #0abab5;
  --ivory: #f3eee2;
  --ivory-2: #e9e2d2;
  --paper: #fbf9f4;
  --ink: #1b1716;
  --muted: #6d6460;
  --line: #ddd5c6;
  --script: "Exmouth", "Pinyon Script", "Snell Roundhand", cursive;
  --serif: "Times New Roman", Times, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  font-family: var(--serif);
  color: var(--ink);
  background: var(--paper);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

.script { font-family: var(--script); font-weight: 400; letter-spacing: 0; }
.center { text-align: center; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px clamp(18px, 4vw, 48px);
  background: rgba(251, 249, 244, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.logo { display: block; line-height: 0; }
.logo img { height: 40px; width: auto; }
.topbar nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 32px); }
.topbar nav a {
  text-decoration: none; font-size: 15px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); transition: color .2s;
}
.topbar nav a:hover { color: var(--oxblood); }
.dropdown { position: relative; }
.drop-toggle {
  font: inherit; font-size: 15px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink);
  background: none; border: 0; padding: 8px 0; cursor: pointer;
}
.drop-toggle span { font-size: 11px; margin-left: 4px; color: var(--oxblood); }
.drop-menu {
  position: absolute; right: 0; top: 100%; min-width: 220px; padding: 10px 0;
  background: var(--paper); border: 1px solid var(--line); box-shadow: 0 18px 36px -18px rgba(60, 20, 20, .35);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .2s, transform .2s, visibility .2s;
}
.dropdown:hover .drop-menu, .dropdown:focus-within .drop-menu, .dropdown.open .drop-menu { opacity: 1; visibility: visible; transform: none; }
.topbar .drop-menu a { display: block; padding: 10px 20px; color: var(--ink); }
.topbar .drop-menu a:hover, .topbar .drop-menu a[aria-current] { color: var(--oxblood); background: var(--ivory); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; font: inherit; font-size: 15px; letter-spacing: .12em; text-transform: uppercase;
  padding: 14px 28px; border: 1px solid var(--oxblood-deep); background: var(--oxblood-deep); color: #fff;
  cursor: pointer; text-decoration: none; transition: background .2s, color .2s;
}
.btn:hover { background: #5a0909; }
.btn-light { background: transparent; border-color: #fff; color: #fff; }
.btn-light:hover { background: #fff; color: var(--oxblood); }
.btn-ghost { background: transparent; color: var(--oxblood-deep); }
.btn-ghost:hover { background: var(--oxblood-deep); color: #fff; }
.link-btn { font: inherit; font-size: 15px; background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; }

/* ---------- hero ---------- */
.hero {
  background: var(--oxblood);
  color: #fff;
  text-align: center;
  padding: clamp(40px, 7vw, 80px) 20px clamp(56px, 8vw, 96px);
}
.hero-title { margin: 0 auto clamp(22px, 3.4vw, 40px); max-width: 760px; line-height: 0; }
.hero-title img { width: 100%; height: auto; }
.hero-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.plate {
  margin: 0 auto; max-width: 640px;
  background: #fff; padding: clamp(10px, 1.6vw, 18px);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.6);
}
.hero-sub { margin: 36px 0 6px; font-size: 15px; letter-spacing: .3em; text-transform: uppercase; opacity: .85; }
.hero-line { font-size: clamp(18px, 2.2vw, 22px); margin: 0 auto 32px; max-width: 640px; }

/* ---------- sections ---------- */
.section { padding: clamp(64px, 10vw, 120px) clamp(20px, 5vw, 64px); }
.eyebrow { font-size: 14px; letter-spacing: .3em; text-transform: uppercase; color: var(--oxblood); margin: 0 0 4px; }
.section-title { font-size: clamp(48px, 7vw, 80px); margin: 0 0 20px; line-height: 1.1; color: var(--ink); }
.lede { font-size: 20px; color: #3b3330; max-width: 560px; }
.label { font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 28px 0 12px; display: block; }
.hex { font-family: ui-monospace, Menlo, monospace; letter-spacing: 0; margin-left: 8px; color: #9a908a; }

/* ---------- the journal ---------- */
.journal {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px);
  align-items: center; max-width: 1200px; margin: 0 auto;
}
.journal-stage {
  background: #ebe9e6; padding: clamp(40px, 6vw, 80px) 0 clamp(28px, 4vw, 48px);
  display: flex; flex-direction: column; align-items: center;
}
.cover {
  --cover: #ff007f;
  position: relative;
  width: min(78%, 360px); aspect-ratio: 148 / 210;
  border-radius: 14px;
  background:
    radial-gradient(120% 90% at 20% 10%, rgba(255,255,255,.18), transparent 55%),
    linear-gradient(160deg, rgba(255,255,255,.06), rgba(0,0,0,.14)),
    var(--cover);
  box-shadow:
    inset 6px 0 0 rgba(0,0,0,.08),
    inset 0 0 0 1px rgba(0,0,0,.08),
    inset 0 -2px 6px rgba(0,0,0,.15),
    0 2px 2px rgba(0,0,0,.08);
  display: grid; place-items: center;
  transition: background-color .5s ease;
  overflow: hidden;
}
/* leatherette grain */
.cover::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; opacity: .22; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .7 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* spine crease */
.cover::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 14px; width: 2px;
  background: linear-gradient(90deg, rgba(0,0,0,.12), rgba(255,255,255,.12));
}
.deboss {
  position: relative; z-index: 1;
  font-size: clamp(28px, 3.6vw, 44px);
  color: var(--cover);
  text-shadow: -1px -1px 1px rgba(0,0,0,.35), 1px 1px 1px rgba(255,255,255,.28);
  filter: brightness(.92);
  transition: color .5s ease;
}
.deboss-wrap { position: relative; z-index: 1; width: 80%; filter: drop-shadow(-1px -1px 0.6px rgba(0,0,0,.38)) drop-shadow(1px 1px 0.6px rgba(255,255,255,.3)); }
.deboss-mark {
  display: block; aspect-ratio: 1367 / 256; background: var(--cover); filter: brightness(.9);
  -webkit-mask: url("/assets/logo-wordmark-white.svg") center / contain no-repeat;
          mask: url("/assets/logo-wordmark-white.svg") center / contain no-repeat;
}
.cover-shadow { width: min(84%, 390px); height: 18px; margin-top: 10px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0,0,0,.18), transparent); }

.swatches { display: flex; gap: 14px; }
.swatch {
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--c); outline: 1px solid var(--line); outline-offset: 4px;
  transition: outline-color .2s, transform .2s;
}
.swatch:hover { transform: scale(1.06); }
.swatch[aria-checked="true"] { outline: 2px solid var(--ink); }

.facts { list-style: none; padding: 0; margin: 32px 0 0; display: flex; gap: 32px; flex-wrap: wrap; color: var(--muted); font-size: 15px; }
.facts span { display: block; font-size: 28px; color: var(--ink); line-height: 1.2; }

.waitlist { margin-top: 36px; padding-top: 4px; border-top: 1px solid var(--line); }
.waitlist-row { display: flex; gap: 0; }
.waitlist input {
  flex: 1; min-width: 0; font: inherit; font-size: 17px; padding: 13px 14px;
  border: 1px solid #c9bfb0; border-right: 0; background: #fff;
}
.waitlist input:focus { outline: 2px solid var(--oxblood); outline-offset: -2px; }
.form-note { font-size: 15px; color: var(--oxblood); min-height: 1.4em; margin: 10px 0 0; }

/* ---------- home paths ---------- */
.paths { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); max-width: 1100px; margin: 0 auto; }
.path { display: block; text-decoration: none; text-align: center; padding-bottom: 8px; }
.path-art { background: #ebe9e6; height: 340px; display: grid; place-items: center; margin-bottom: 26px; transition: background .3s; }
.path:hover .path-art { background: #e4e0da; }
.cover-sm { width: 170px; }
.mini-page {
  width: 180px; aspect-ratio: 148 / 210; padding: 26px 20px; border-radius: 6px; text-align: center;
  background: linear-gradient(180deg, #f1ece0, #e8e1d1); box-shadow: 0 16px 28px -14px rgba(60, 40, 20, .35);
}
.mini-page .script { display: block; font-size: 21px; line-height: 1.1; margin-bottom: 16px; }
.mini-page i { display: block; height: 1px; background: #cfc6b5; margin: 13px 4px; }
.path-title { font-size: clamp(40px, 5vw, 56px); margin: 0 0 8px; line-height: 1.1; color: var(--ink); }
.path p { margin: 0 auto 14px; max-width: 360px; color: #3b3330; }
.path-link { font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--oxblood); border-bottom: 1px solid currentColor; }
.also { margin: 28px 0 0; font-size: 17px; color: var(--muted); }
.also a { color: var(--oxblood); }
.q-cta { margin-top: 56px; }

/* ---------- survey ---------- */
.survey { background: var(--ivory); }
.survey-head { max-width: 640px; margin: 0 auto 36px; }
.center-block { margin-left: auto; margin-right: auto; text-align: center; }
.survey-form { max-width: 720px; margin: 0 auto; background: var(--paper); border: 1px solid var(--line); padding: clamp(24px, 4vw, 48px); }
.survey-form fieldset { border: 0; padding: 0; margin: 0 0 30px; }
.survey-form legend { font-size: 20px; margin-bottom: 12px; padding: 0; }
.survey-form legend small { font-size: 14px; color: var(--muted); margin-left: 6px; }
.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choices label { cursor: pointer; }
.choices input { position: absolute; opacity: 0; pointer-events: none; }
.choices span {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 1px solid #c9bfb0; background: #fff;
  font-size: 16px; transition: border-color .15s, background .15s, color .15s;
}
.choices label:hover span { border-color: var(--ink); }
.choices input:checked + span { background: var(--oxblood-deep); border-color: var(--oxblood-deep); color: #fff; }
.choices input:focus-visible + span { outline: 2px solid var(--oxblood); outline-offset: 2px; }
.colours i { width: 16px; height: 16px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1px rgba(0,0,0,.12); }
.survey-form textarea, .survey-form input[type="email"] {
  width: 100%; font: inherit; font-size: 17px; padding: 12px 14px; border: 1px solid #c9bfb0; background: #fff; resize: vertical;
}
.survey-form textarea:focus, .survey-form input[type="email"]:focus { outline: 2px solid var(--oxblood); outline-offset: -2px; }
.survey-submit { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.survey-submit .form-note { margin: 0; }
.privacy { font-size: 14px; color: var(--muted); margin: 18px 0 0; }
.survey-thanks { max-width: 720px; margin: 0 auto; text-align: center; background: var(--paper); border: 1px solid var(--line); padding: 48px 24px; }
.survey-thanks h3 { font-size: 64px; margin: 0 0 8px; font-weight: 400; line-height: 1.1; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.home-survey { margin: 0; padding: 0 20px clamp(56px, 8vw, 96px); font-size: 19px; }
.home-survey a { color: var(--oxblood); }

/* ---------- note ---------- */
.note { background: var(--ivory); text-align: center; }
.note-title { font-size: clamp(44px, 6vw, 72px); margin: 0 0 28px; line-height: 1.1; }
.note blockquote { margin: 0 auto; max-width: 560px; font-size: 21px; }
.note blockquote p { margin: 0 0 1.1em; }
.note footer { font-style: italic; color: var(--muted); }



/* ---------- inside / book ---------- */
.inside { max-width: 1180px; margin: 0 auto; }
.tabs { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin: 12px 0 36px; }
.tabs button {
  font: inherit; font-size: 15px; letter-spacing: .1em; text-transform: uppercase;
  padding: 10px 18px; border: 1px solid transparent; background: none; color: var(--muted); cursor: pointer;
}
.tabs button[aria-selected="true"] { border-color: var(--ink); color: var(--ink); }

.book { position: relative; max-width: 980px; margin: 0 auto; aspect-ratio: 296 / 210; }
.spread {
  position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr;
  opacity: 0; visibility: hidden; transition: opacity .45s ease, visibility .45s;
  filter: drop-shadow(0 24px 30px rgba(60, 40, 20, .18));
}
.spread.active { opacity: 1; visibility: visible; }
.book { container-type: inline-size; }
.page { position: relative; overflow: hidden; --pw: 50cqw; }
.page:first-child { border-radius: 10px 0 0 10px; }
.page:last-child { border-radius: 0 10px 10px 0; }
.page.ivory { background: linear-gradient(180deg, #f1ece0, #e8e1d1); }
.page.dots {
  background-color: #ece6d7;
  /* 5 mm grid on a 148 mm page = 1/29.6 of the page width */
  background-image: radial-gradient(circle, #c9c3b6 0.5px, transparent 0.9px), linear-gradient(180deg, #f1ece0, #e8e1d1);
  background-size: calc(var(--pw) / 29.6) calc(var(--pw) / 29.6), 100% 100%;
  background-position: center, 0 0;
}
/* gutter shading */
.page:first-child::after, .page:last-child::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 16%; pointer-events: none;
}
.page:first-child::after { right: 0; background: linear-gradient(90deg, transparent, rgba(0,0,0,.10) 85%, rgba(0,0,0,.22)); }
.page:last-child::after { left: 0; background: linear-gradient(270deg, transparent, rgba(0,0,0,.08) 80%, rgba(0,0,0,.2)); }

.page-note { display: flex; flex-direction: column; justify-content: center; text-align: center; padding: 0 calc(var(--pw) * 0.12); font-size: calc(var(--pw) * 0.033); line-height: 1.45; }
.page-note h3 { font-size: calc(var(--pw) * 0.08); margin: 0 0 calc(var(--pw) * 0.04); }
.page-note p { margin: 0 0 calc(var(--pw) * 0.03); }

.page-q { padding: calc(var(--pw) * 0.07) calc(var(--pw) * 0.06) calc(var(--pw) * 0.06) calc(var(--pw) * 0.08); font-size: calc(var(--pw) * 0.0235); line-height: 1.5; }
.page-q:last-child { padding-left: calc(var(--pw) * 0.06); }
.page-q h3 { font-size: calc(var(--pw) * 0.064); margin: 0; text-align: center; line-height: 1.2; }
.page-sub { text-align: center; margin: 0 0 calc(var(--pw) * 0.04); }
.page-q ul { list-style: none; padding: 0; margin: 0; }
.page-q ul.pushed { margin-top: calc(var(--pw) * 0.1); }
.page-q li::before { content: "☐ "; }
.page-qr { display: block; width: calc(var(--pw) * 0.11); margin: calc(var(--pw) * 0.02) auto 0; }
.page-foot { position: absolute; bottom: calc(var(--pw) * 0.05); left: 0; right: 0; text-align: center; margin: 0; }

.spread-caption { text-align: center; color: var(--muted); font-style: italic; margin-top: 28px; }

/* ---------- questions ---------- */
.questions { background: var(--ivory); }
.q-head { max-width: 1000px; margin: 0 auto 40px; }
.q-tools { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 28px; }
.progress { flex: 1; min-width: 160px; max-width: 360px; height: 3px; background: var(--line); }
.progress-bar { height: 100%; width: 0; background: var(--oxblood-deep); transition: width .4s ease; }
.q-count { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 16px; }
.random-out { font-size: clamp(30px, 4vw, 44px); color: var(--oxblood-deep); min-height: 1.3em; margin: 24px 0 0; line-height: 1.25; }

.q-list {
  max-width: 1000px; margin: 0 auto; padding: 0; list-style: none;
  columns: 2; column-gap: 56px; counter-reset: q;
}
.q-list li { break-inside: avoid; border-bottom: 1px solid var(--line); }
.q-list label {
  display: flex; gap: 14px; align-items: baseline; padding: 12px 2px; cursor: pointer; counter-increment: q;
}
.q-list label::before { content: counter(q, decimal-leading-zero); font-size: 13px; color: #a69b93; font-variant-numeric: tabular-nums; min-width: 22px; }
.q-list input { appearance: none; flex: none; width: 16px; height: 16px; border: 1px solid #8d827b; margin: 0; position: relative; top: 2px; cursor: pointer; }
.q-list input:checked { background: var(--oxblood-deep); border-color: var(--oxblood-deep); }
.q-list input:checked::after { content: ""; position: absolute; left: 4px; top: 0; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.q-list input:checked + span { color: #9a908a; text-decoration: line-through; text-decoration-color: rgba(112, 12, 12, .45); }
.q-list li.flash { animation: flash 1.6s ease; }
@keyframes flash { 0%, 40% { background: rgba(255, 0, 127, .12); } 100% { background: transparent; } }

/* ---------- details ---------- */
.details { max-width: 1180px; margin: 0 auto; }
.detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 32px; }
.detail h3 { font-size: 14px; letter-spacing: .3em; text-transform: uppercase; color: var(--oxblood); font-weight: 400; margin: 0 0 16px; padding-bottom: 12px; border-bottom: 1px solid var(--ink); }
.detail dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; font-size: 17px; }
.detail dt { color: var(--muted); }
.detail dd { margin: 0; }
.dot-swatch {
  margin-top: 24px; height: 110px; border: 1px solid var(--line); background-color: #efe9dc;
  /* real scale: 5 mm ≈ 18.9 css px */
  background-image: radial-gradient(circle, #c9c5bd 1.2px, transparent 1.6px);
  background-size: 18.9px 18.9px;
}

/* ---------- footer ---------- */
.site-foot { background: var(--oxblood-deep); color: #f3e6e6; text-align: center; padding: 56px 20px 40px; }
.foot-mono { width: 74px; margin: 0 auto 18px; }
.foot-links { display: flex; justify-content: center; gap: 28px; font-size: 18px; margin: 0 0 6px; }
.foot-links a { text-decoration: none; }
.socials { display: flex; justify-content: center; gap: 28px; letter-spacing: .14em; text-transform: uppercase; font-size: 14px; }
.socials a { text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.4); }
.fine { font-size: 13px; opacity: .6; margin: 28px 0 0; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .journal { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .q-list { columns: 1; }
  .nav-extra { display: none; }
  .paths { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 17px; }
  .logo img { height: 26px; }
  .topbar nav { gap: 14px; }
  .topbar nav a { font-size: 12px; }
  /* show one page of the spread at a time on phones */
  .book { aspect-ratio: 148 / 210; max-width: 420px; }
  .spread { grid-template-columns: 1fr; }
  .spread .page:first-child { display: none; }
  .spread[data-spread="1"] .page:first-child { display: block; }
  .spread[data-spread="1"] .page:last-child { display: none; }
  .spread .page { border-radius: 10px; --pw: 100cqw; }
  .waitlist-row { flex-direction: column; gap: 10px; }
  .waitlist input { border-right: 1px solid #c9bfb0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
