/*
  Novaris Photo Guides — site stylesheet
  Typefaces (Google Fonts): Fraunces for display headings, Inter for body text and interface.
  Palette: darkroom charcoal, warm paper white, and a single amber accent.
*/

:root {
  --bg: #f4efe6;
  --surface: #fbf8f2;
  --surface-2: #ece5d8;
  --ink: #1f1d1a;
  --muted: #5b554d;
  --line: #d9cfbe;
  --accent: #e09a2c;
  --accent-ink: #8f4a06;
  --on-accent: #1f1d1a;
  --charcoal: #1f1d1a;
  --paper: #f4efe6;
  --shadow: 0 18px 40px -18px rgba(31, 29, 26, 0.35);
  --header-bg: rgba(244, 239, 230, 0.97);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 10px;
  --radius-lg: 16px;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(64px, 10vw, 128px);
  --header-h: 72px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151311;
    --surface: #1e1b18;
    --surface-2: #27231f;
    --ink: #eee6d8;
    --muted: #b0a796;
    --line: #3a342d;
    --accent: #f2a948;
    --accent-ink: #f2a948;
    --on-accent: #151311;
    --shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.8);
    --header-bg: rgba(21, 19, 17, 0.97);
  }
}

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

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  font-variation-settings: "opsz" 96;
}

h1 { font-size: clamp(2.25rem, 5.5vw, 4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.4rem); font-variation-settings: "opsz" 36; }
h4 { font-size: 1.05rem; font-family: var(--font-body); font-weight: 600; letter-spacing: 0; }

p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
li { margin-bottom: 0.35em; }

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

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

::selection { background: var(--accent); color: var(--on-accent); }

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { top: 12px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.narrow { max-width: 760px; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 1rem;
}

.lede {
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  color: var(--muted);
  max-width: 40em;
}

.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 48px;
  padding: 0.75em 1.4em;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  transition: transform 0.35s ease;
}
.site-header::before,
.site-header::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.site-header::before {
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
  opacity: 1;
}
.site-header::after {
  box-shadow: var(--shadow);
  opacity: 0;
}
.site-header .wrap {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: transform 0.35s ease;
}
.site-header.is-compact { transform: translateY(-12px); }
.site-header.is-compact .wrap { transform: translateY(6px); }
.site-header.is-compact::after { opacity: 0.5; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transform-origin: left center;
  transition: transform 0.35s ease;
}
.site-header.is-compact .brand { transform: scale(0.94); }
.brand svg { width: 28px; height: 28px; flex: none; }
.brand-sub { font-weight: 400; color: var(--muted); }

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: clamp(12px, 2.5vw, 28px);
}
.site-nav li { margin: 0; }
.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 6px 0;
  position: relative;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after { transform: scaleX(1); }

@media (max-width: 640px) {
  :root { --header-h: 104px; }
  .site-header .wrap {
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 6px;
  }

  .site-nav ul { gap: 18px; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(48px, 8vw, 104px) 0 var(--section);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}
.hero h1 { max-width: 13em; }
.hero .lede { margin-bottom: 2rem; }
.hero-note { margin-top: 1.5rem; font-size: 0.92rem; color: var(--muted); }

.aperture {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  aspect-ratio: 1;
}
.aperture .ap-glow { animation: glow 8s ease-in-out infinite; }
.aperture .ap-blade { animation: blade 8s ease-in-out infinite; }
.aperture .ap-ring { transform-origin: 0 0; animation: ring 60s linear infinite; }
.aperture .ap-falloff { animation: falloff 8s ease-in-out infinite; }

@keyframes blade {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-22px); }
}
@keyframes glow {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}
@keyframes falloff {
  0%, 100% { opacity: 0.25; transform: scale(0.92); }
  50% { opacity: 0.6; transform: scale(1.04); }
}
@keyframes ring {
  to { transform: rotate(360deg); }
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .aperture { max-width: 300px; order: -1; }
}

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

.section { padding: var(--section) 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-dark {
  background: var(--charcoal);
  color: var(--paper);
}
.section-dark .muted, .section-dark .lede { color: #c9c0b1; }
.section-dark .eyebrow, .section-dark a { color: #f2a948; }
@media (prefers-color-scheme: dark) {
  .section-dark { background: #0d0c0b; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
}

.section-head { max-width: 680px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head p { color: var(--muted); }
.section-dark .section-head p { color: #c9c0b1; }

/* ---------- Product cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: clamp(16px, 2.5vw, 28px);
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: transform 0.3s ease;
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.card:hover,
.card:focus-within { transform: translateY(-6px); }
.card:hover::after,
.card:focus-within::after { opacity: 1; }

.card-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 20px;
  color: var(--accent-ink);
}
.card h3 { margin-bottom: 0.4em; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: 1;
}
.card p { color: var(--muted); font-size: 0.98rem; flex: 1; }
.card-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 8px;
}
.card-price { font-family: var(--font-display); font-size: 1.5rem; font-weight: 500; }
.card-link { font-weight: 600; font-size: 0.92rem; color: var(--accent-ink); }
.card-featured { background: var(--surface-2); }
.card-tag {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  margin-bottom: 14px;
  color: var(--muted);
}

/* ---------- Feature list ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: clamp(24px, 4vw, 44px) clamp(24px, 4vw, 40px);
}
.feature { border-top: 2px solid var(--accent); padding-top: 18px; }
.feature h3 { font-size: 1.2rem; }
.feature p { color: var(--muted); font-size: 0.98rem; margin: 0; }
.section-dark .feature p { color: #c9c0b1; }

/* ---------- Table ---------- */

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  margin-top: clamp(40px, 6vw, 64px);
}
.matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  min-width: 640px;
}
.matrix caption {
  text-align: left;
  padding: 20px 20px 4px;
  font-family: var(--font-display);
  font-size: 1.2rem;
}
.matrix th, .matrix td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.matrix tr:last-child th, .matrix tr:last-child td { border-bottom: 0; }
.matrix thead th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; }
.matrix tbody th { text-align: left; font-weight: 600; }
.matrix tbody th a { color: var(--ink); }
.yes { color: var(--accent-ink); font-weight: 700; }
.no { color: var(--muted); }

/* ---------- Steps ---------- */

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: clamp(20px, 3vw, 32px);
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  margin: 0;
  padding: 24px;
  border: 1px solid rgba(244, 239, 230, 0.16);
  border-radius: var(--radius-lg);
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  color: #f2a948;
  margin-bottom: 8px;
}
.steps h3 { font-size: 1.15rem; }
.steps p { margin: 0; color: #c9c0b1; font-size: 0.97rem; }

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

.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 22px 0;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  font-weight: 500;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  flex: none;
  font-family: var(--font-body);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--accent-ink);
  transition: transform 0.25s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-answer { padding: 0 0 24px; color: var(--muted); max-width: 46em; }
.faq-answer p:last-child { margin-bottom: 0; }

/* ---------- Page header ---------- */

.page-head { padding: clamp(48px, 8vw, 96px) 0 clamp(32px, 5vw, 56px); }
.page-head .lede { margin-bottom: 0; }

.breadcrumb { font-size: 0.9rem; color: var(--muted); margin-bottom: 1.25rem; }
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li { margin: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--line); }
.breadcrumb a { color: var(--muted); }

/* ---------- Product page ---------- */

.product-top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
  padding-bottom: clamp(48px, 7vw, 88px);
}
@media (max-width: 860px) {
  .product-top { grid-template-columns: 1fr; }
}

.buy-box {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
}
@media (max-width: 860px) { .buy-box { position: static; } }
.buy-box h2 { font-size: 1.1rem; font-family: var(--font-body); font-weight: 600; margin-bottom: 4px; }
.price {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 500;
  line-height: 1;
  margin: 8px 0 4px;
}
.price-currency { font-family: var(--font-body); font-size: 0.9rem; color: var(--muted); font-weight: 500; margin-left: 4px; }
.price-meta { font-size: 0.92rem; color: var(--muted); margin: 12px 0 20px; }
.buy-slot:empty { display: none; }
.buy-slot .btn { width: 100%; }
.buy-facts { list-style: none; padding: 0; margin: 20px 0 0; border-top: 1px solid var(--line); font-size: 0.93rem; }
.buy-facts li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); margin: 0; }
.buy-facts li:last-child { border-bottom: 0; padding-bottom: 0; }
.buy-facts span:first-child { color: var(--muted); }
.buy-facts span:last-child { text-align: right; font-weight: 500; }

.contents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: clamp(16px, 2.5vw, 24px);
}
.contents-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.contents-item h3 { font-size: 1.15rem; }
.contents-item p { color: var(--muted); font-size: 0.97rem; margin: 0; }
.contents-item ul { color: var(--muted); font-size: 0.97rem; margin: 0.5em 0 0; }

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: clamp(20px, 3vw, 32px);
}
.preview { margin: 0; }
.preview-page {
  background: #fbf8f2;
  color: #1f1d1a;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.preview-page svg { width: 100%; height: auto; }
.preview figcaption { margin-top: 14px; font-size: 0.93rem; color: var(--muted); }
.preview figcaption strong { color: var(--ink); display: block; font-weight: 600; }

.fit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(20px, 3vw, 32px);
}
.fit-col { border-top: 2px solid var(--accent); padding-top: 20px; }
.fit-col.not { border-top-color: var(--line); }
.fit-col ul { padding-left: 1.1em; color: var(--muted); }

.spec-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.spec-list li { display: grid; grid-template-columns: minmax(120px, 0.4fr) 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); margin: 0; }
.spec-list li > span:first-child { color: var(--muted); font-size: 0.95rem; }
@media (max-width: 480px) { .spec-list li { grid-template-columns: 1fr; gap: 2px; } }

.closing-buy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.closing-buy .price { font-size: 2.4rem; color: var(--paper); }
.closing-buy .buy-slot .btn { width: auto; }

.related { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; }
.related li { margin: 0; }
.related a {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.93rem;
  transition: transform 0.2s ease;
}
.related a:hover { transform: translateY(-2px); border-color: var(--accent); }

/* ---------- Prose (policies, about) ---------- */

.prose { max-width: 720px; }
.prose h2 { font-size: clamp(1.4rem, 2.6vw, 1.75rem); margin-top: 2.2em; }
.prose h3 { margin-top: 1.6em; }
.prose p, .prose li { color: var(--ink); }
.prose .updated { color: var(--muted); font-size: 0.95rem; }
.prose ul li::marker { color: var(--accent-ink); }

.callout {
  border-left: 3px solid var(--accent);
  background: var(--surface);
  padding: 20px 24px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5em 0;
}
.callout p:last-child { margin-bottom: 0; }

.contact-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 40px);
  margin-bottom: 2.5em;
}
.contact-email {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 4.2vw, 2rem);
  overflow-wrap: anywhere;
}

/* ---------- 404 ---------- */

.notfound { text-align: center; padding: clamp(64px, 12vw, 140px) 0; }
.notfound svg { width: 160px; height: 160px; margin: 0 auto 32px; }
.notfound .btn-row { justify-content: center; }
.notfound .lede { margin-left: auto; margin-right: auto; }

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

.site-footer {
  background: var(--charcoal);
  color: #c9c0b1;
  padding: clamp(48px, 7vw, 80px) 0 32px;
  font-size: 0.95rem;
}
@media (prefers-color-scheme: dark) {
  .site-footer { background: #0d0c0b; border-top: 1px solid var(--line); }
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(244, 239, 230, 0.14);
}
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand { font-family: var(--font-display); font-size: 1.4rem; color: var(--paper); margin-bottom: 8px; }
.site-footer a { color: #f2a948; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; }
.footer-links li { margin: 0; }
.footer-links a { color: var(--paper); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; color: #f2a948; }
.footer-heading { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; color: #f2a948; margin: 0 0 12px; font-family: var(--font-body); }
.footer-bottom { padding-top: 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 0.88rem; }
.footer-bottom p { margin: 0; }

/* ---------- Reveal motion ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: calc(var(--stagger, 0) * 90ms);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .btn:hover,
  .card:hover,
  .card:focus-within,
  .related a:hover { transform: none; }
  .site-header.is-compact,
  .site-header.is-compact .wrap,
  .site-header.is-compact .brand { transform: none; }
}

/* ---------- Dark section overrides ---------- */

.section-dark .btn-ghost { color: var(--paper); border-color: rgba(244, 239, 230, 0.3); }
.section-dark .btn-ghost:hover { border-color: var(--paper); }
.section-dark .price-meta { color: #c9c0b1; }

/* =========================================================
   Polish layer: progress bar, hero texture, film strip,
   showcase viewer, card spotlight, lightbox, page sizes,
   policy contents, back-to-top, footer wordmark
   ========================================================= */

/* ---------- Reading progress ---------- */

.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 80;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(0);
  pointer-events: none;
}

/* ---------- Hero texture and intro ---------- */

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.07;
  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='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  .hero::before { opacity: 0.12; filter: invert(1); }
}
.hero::after {
  content: "";
  position: absolute;
  width: 70vmax;
  height: 70vmax;
  right: -28vmax;
  top: -24vmax;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(224, 154, 44, 0.16), rgba(224, 154, 44, 0));
}
.hero-grid { position: relative; z-index: 1; }

.hero h1 .line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hero h1 .line > span { display: inline-block; }
.js .hero h1 .line > span { animation: line-rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.js .hero h1 .line:nth-child(2) > span { animation-delay: 0.08s; }
.js .hero h1 .line:nth-child(3) > span { animation-delay: 0.16s; }
.js .hero-intro > :not(h1) { animation: fade-rise 0.8s ease both; animation-delay: 0.35s; }
.js .hero-intro > .eyebrow { animation-delay: 0s; }
.js .hero-visual { animation: fade-in 1.4s ease both; animation-delay: 0.2s; }

@keyframes line-rise {
  from { transform: translateY(105%); opacity: 0; }
  to { transform: none; opacity: 1; }
}
@keyframes fade-rise {
  from { transform: translateY(14px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
@keyframes fade-in {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: none; }
}

.hero-specs {
  list-style: none;
  padding: 1.25rem 0 0;
  margin: 2rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  border-top: 1px solid var(--line);
}
.hero-specs li { margin: 0; display: flex; align-items: baseline; gap: 6px; }
.hero-specs strong { font-family: var(--font-display); font-size: 1.5rem; font-weight: 500; }
.hero-specs span { font-size: 0.88rem; color: var(--muted); }

.eyebrow-num {
  display: inline-block;
  margin-right: 10px;
  padding-right: 10px;
  border-right: 1px solid currentColor;
  font-variant-numeric: tabular-nums;
}

/* ---------- Film strip ---------- */

.filmstrip {
  position: relative;
  overflow: hidden;
  background: #121110;
  color: #efe6d8;
  padding: 26px 0;
  border-top: 1px solid #2a2622;
  border-bottom: 1px solid #2a2622;
}
.filmstrip::before,
.filmstrip::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 8px;
  background-image: linear-gradient(90deg, rgba(244, 239, 230, 0.78) 0 12px, transparent 12px);
  background-size: 26px 8px;
  opacity: 0.55;
}
.filmstrip::before { top: 8px; }
.filmstrip::after { bottom: 8px; }
.film-track {
  display: flex;
  width: max-content;
  animation: film 60s linear infinite;
}
.filmstrip:hover .film-track { animation-play-state: paused; }
.film-list { display: flex; list-style: none; margin: 0; padding: 0; }
.film-frame {
  flex: none;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 34px;
  border-right: 1px solid rgba(244, 239, 230, 0.14);
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  white-space: nowrap;
}
.film-code {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: #f2a948;
}
@keyframes film { to { transform: translateX(-50%); } }

/* ---------- Showcase viewer ---------- */

.showcase {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
@media (max-width: 900px) { .showcase { grid-template-columns: 1fr; } }

.tabs { display: grid; gap: 6px; margin-top: 2rem; }
.tabs[hidden] { display: none; }
.tab {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  text-align: left;
  width: 100%;
  padding: 16px 18px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  position: relative;
}
.tab::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.tab:hover::before { opacity: 0.6; }
.tab[aria-selected="true"]::before { opacity: 1; }
.tab > * { position: relative; }
.tab-num {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--muted);
  min-width: 1.6em;
}
.tab[aria-selected="true"] .tab-num { color: var(--accent-ink); }
.tab-text strong { display: block; font-weight: 600; }
.tab-text span { display: block; font-size: 0.93rem; color: var(--muted); margin-top: 2px; }

.stage {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 24px;
}
.panel { margin: 0; }
.panel figcaption { margin-top: 14px; font-size: 0.93rem; color: var(--muted); }

.js .stage {
  grid-template-columns: 1fr;
  position: relative;
  max-width: 420px;
  width: 100%;
  justify-self: center;
}
.js .stage::before,
.js .stage::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  aspect-ratio: 300 / 388;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
}
.js .stage::before { transform: rotate(-5deg) translate(-14px, 8px); opacity: 0.8; }
.js .stage::after { transform: rotate(3.5deg) translate(12px, 4px); opacity: 0.9; }
.js .stage .panel {
  grid-area: 1 / 1;
  position: relative;
  z-index: 1;
  transition: opacity 0.45s ease, transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.js .stage .panel[data-state="out"] {
  opacity: 0;
  transform: translateY(18px) rotate(2deg) scale(0.97);
  pointer-events: none;
}

/* ---------- Card spotlight ---------- */

.card-glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
}
.card-glow span {
  position: absolute;
  left: 0; top: 0;
  width: 320px;
  height: 320px;
  margin: -160px 0 0 -160px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(224, 154, 44, 0.2), rgba(224, 154, 44, 0));
  transform: translate(var(--mx, 50%), var(--my, 50%));
  opacity: 0;
  transition: opacity 0.35s ease;
}
.card:hover .card-glow span { opacity: 1; }
.card { isolation: isolate; }

/* ---------- Preview pages and lightbox ---------- */

.preview-page { position: relative; transition: transform 0.35s ease; }
.preview:hover .preview-page,
.panel:hover .preview-page { transform: translateY(-4px) rotate(-0.6deg); }
.preview-open {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  border-radius: inherit;
  padding: 0;
}
.preview-open span {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #1f1d1a;
  color: #f4efe6;
  font: 600 0.8rem/1 var(--font-body);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.preview-open:hover span,
.preview-open:focus-visible span { opacity: 1; transform: none; }
@media (hover: none) { .preview-open span { opacity: 1; transform: none; } }

.lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  width: min(600px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100vh - 32px);
  overflow: visible;
}
.lightbox::backdrop { background: rgba(14, 13, 12, 0.84); }
.lightbox[open] { animation: pop 0.35s cubic-bezier(0.2, 0.7, 0.2, 1); }
.lightbox[open]::backdrop { animation: fade-in-plain 0.3s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes fade-in-plain { from { opacity: 0; } to { opacity: 1; } }
.lightbox-inner { position: relative; }
.lightbox-page {
  background: #fbf8f2;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
}
.lightbox-page svg { width: min(100%, calc((100vh - 120px) * 0.773)); height: auto; }
.lightbox-cap { color: #efe6d8; text-align: center; margin: 14px 0 0; font-size: 0.95rem; }
.lightbox-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: #e09a2c;
  color: #1f1d1a;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
}
@media (max-width: 480px) { .lightbox-close { top: -10px; right: -4px; } }

/* ---------- Page sizes ---------- */

.format-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}
@media (max-width: 820px) { .format-grid { grid-template-columns: 1fr; } }
.size-figure {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  color: var(--ink);
}
.size-figure svg { width: 100%; max-width: 280px; margin: 0 auto; }
.size-figure figcaption { font-size: 0.92rem; color: var(--muted); text-align: center; margin-top: 8px; }

/* ---------- Policy contents ---------- */

.prose-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 720px);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.prose-layout.no-toc { grid-template-columns: minmax(0, 720px); }
.toc {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  font-size: 0.92rem;
}
.toc summary { display: none; }
.toc-title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line); }
.toc li { margin: 0; }
.toc a {
  display: block;
  position: relative;
  padding: 6px 0 6px 16px;
  color: var(--muted);
  text-decoration: none;
  line-height: 1.35;
}
.toc a::before {
  content: "";
  position: absolute;
  left: -1px; top: 0; bottom: 0;
  width: 2px;
  background: var(--accent);
  transform: scaleY(0);
  transition: transform 0.25s ease;
}
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--ink); font-weight: 500; }
.toc a.is-active::before { transform: scaleY(1); }

@media (max-width: 1000px) {
  .prose-layout { grid-template-columns: minmax(0, 1fr); }
  .toc {
    position: static;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 4px 18px;
  }
  .toc summary { display: list-item; cursor: pointer; padding: 12px 0; font-weight: 600; }
  .toc-title { display: none; }
  .toc ol { margin-bottom: 14px; }
}

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

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1.75rem; }
.chips a {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.92rem;
  transition: transform 0.2s ease;
}
.chips a:hover { transform: translateY(-2px); border-color: var(--accent); }

/* ---------- Contents numbering ---------- */

.contents-grid { counter-reset: part; }
.contents-item { counter-increment: part; }
.contents-item h3::before {
  content: counter(part, decimal-leading-zero);
  display: block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--accent-ink);
  margin-bottom: 10px;
}

/* ---------- Back to top ---------- */

.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  border: 1px solid rgba(244, 239, 230, 0.35);
  box-shadow: var(--shadow);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.to-top svg { width: 20px; height: 20px; }
.js .to-top { opacity: 0; transform: translateY(12px); pointer-events: none; }
.js .to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }

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

.footer-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-links-single { grid-template-columns: 1fr; }
.footer-mark {
  font-family: var(--font-display);
  font-size: clamp(4rem, 16vw, 12rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  margin: 32px 0 0;
  color: transparent;
  -webkit-text-stroke: 1px rgba(244, 239, 230, 0.18);
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
}

/* ---------- Reduced motion for the polish layer ---------- */

@media (prefers-reduced-motion: reduce) {
  .film-track { flex-wrap: wrap; width: auto; }
  .film-list[aria-hidden="true"] { display: none; }
  .film-list { flex-wrap: wrap; justify-content: center; }
  .js .stage .panel[data-state="out"] { transform: none; }
  .preview:hover .preview-page,
  .panel:hover .preview-page,
  .chips a:hover { transform: none; }
  .js .to-top,
  .js .to-top.is-visible { transform: none; }
  .card-glow { display: none; }
}

/* Keep the fanned sheets from widening the page, and compact the tabs on small screens. */
.showcase-section { overflow: hidden; }
@media (max-width: 900px) {
  .tabs { grid-template-columns: 1fr 1fr; margin-top: 1.25rem; }
  .tab { padding: 12px 14px; gap: 10px; }
  .tab-text span { display: none; }
}
