/* ---------- Themes ---------- */
:root,
[data-theme="linen"] {
  --bg: #F2F1EE;
  --surface: #FFFFFF;
  --ink: #1B1A18;
  --muted: #6B6862;
  --line: #D9D6CF;
  --accent: #6E5338;
  --on-accent: #FFFFFF;
  --sheet: #E7E5E0;
  color-scheme: light;
}
[data-theme="film"] {
  --bg: #1C1A18;
  --surface: #262320;
  --ink: #EEE8DD;
  --muted: #A39C90;
  --line: #3A3632;
  --accent: #D2A867;
  --on-accent: #1C1A18;
  --sheet: #141311;
  color-scheme: dark;
}
[data-theme="tide"] {
  --bg: #E7ECEC;
  --surface: #FFFFFF;
  --ink: #1C2B2E;
  --muted: #5B6E72;
  --line: #CCD7D8;
  --accent: #2F6670;
  --on-accent: #FFFFFF;
  --sheet: #DAE2E2;
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}
h1, h2, h3, p { margin: 0; }
h2 {
  font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}
h3 { font-size: 1.1rem; font-weight: 700; }
a { color: var(--accent); text-underline-offset: 3px; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 22px; }
.wrap-wide { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 22px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; }
.skip:focus { top: calc(12px + env(safe-area-inset-top, 0px)); }

/* ---------- Hero: the photo is the page ---------- */
.hero {
  position: relative;
  min-height: 88vh;
  min-height: 88svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #FFFFFF;
  overflow: hidden;
  background: #2A2825;
}
.hero-photo { position: absolute; inset: 0; margin: 0; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(20, 18, 16, 0.72) 0%, rgba(20, 18, 16, 0.25) 42%, rgba(20, 18, 16, 0) 62%),
              linear-gradient(to bottom, rgba(20, 18, 16, 0.45) 0%, rgba(20, 18, 16, 0) 18%);
  pointer-events: none;
}
.hero-text { position: relative; z-index: 1; padding-bottom: 44px; max-width: 1180px; }
.role { font-weight: 600; opacity: 0.9; }
.name {
  font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(4rem, 17vw, 10rem);
  line-height: 0.86;
  letter-spacing: -0.03em;
  margin-top: 8px;
}
.base { margin-top: 14px; opacity: 0.85; }

.topnav {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 2;
  max-width: 1180px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 4px 20px;
  flex-wrap: wrap;
  padding-top: calc(18px + env(safe-area-inset-top, 0px));
}
.topnav a { color: #FFFFFF; text-decoration: none; font-weight: 600; padding: 6px 0; }
.topnav a:hover { text-decoration: underline; }
.topnav .nav-cta { padding: 8px 16px; border: 1.5px solid rgba(255, 255, 255, 0.8); border-radius: 999px; }
.topnav .nav-cta:hover { background: #FFFFFF; color: #1B1A18; text-decoration: none; }
@media (max-width: 520px) {
  .topnav a:not(.nav-cta) { display: none; }
}

/* ---------- Intro ---------- */
.intro { padding-top: 56px; }
.tagline {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(1.7rem, 5vw, 2.5rem);
  line-height: 1.2;
  max-width: 24ch;
}

/* ---------- Sections ---------- */
.section { padding-top: 72px; }
.note { margin-top: 18px; color: var(--muted); max-width: 56ch; }
.note:empty { display: none; }

/* ---------- Contact sheet ---------- */
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 24px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters:empty { display: none; }
.filters button {
  min-height: 40px; padding: 6px 16px; border-radius: 999px;
  border: 1.5px solid var(--line); background: transparent; color: var(--ink); font-weight: 600; cursor: pointer;
}
.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }

.sheet {
  list-style: none;
  margin: 28px 0 0;
  padding: 14px;
  background: var(--sheet);
  border-radius: 6px;
  columns: 2;
  column-gap: 14px;
}
@media (min-width: 900px) { .sheet { columns: 3; padding: 18px; column-gap: 18px; } }
.frame-item { break-inside: avoid; margin-bottom: 14px; }
.frame-item[hidden] { display: none; }
.frame-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  text-align: left;
  color: inherit;
}
.frame-btn img { width: 100%; height: auto; background: var(--line); }
.frame-meta {
  display: flex;
  gap: 10px;
  padding-top: 6px;
  font-size: 0.82rem;
  color: var(--muted);
}
.frame { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--accent); }

/* ---------- About ---------- */
.about { display: grid; gap: 28px; align-items: center; }
@media (min-width: 700px) { .about { grid-template-columns: 0.9fr 1.1fr; gap: 44px; } }
.about-photo { margin: 0; aspect-ratio: 5 / 6; overflow: hidden; border-radius: 4px; background: var(--line); }
.about-photo[hidden] { display: none; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-text p { margin-top: 14px; color: var(--muted); max-width: 52ch; }

/* ---------- Packages ---------- */
.packages { margin-top: 28px; display: grid; gap: 14px; }
@media (min-width: 760px) { .packages { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.package {
  padding: 24px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
}
.package.featured { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.package-price { font-family: "Instrument Serif", Georgia, serif; font-size: 2rem; line-height: 1.1; margin-top: 10px; }
.package-detail { color: var(--muted); }
.package ul { margin: 16px 0 0; padding: 0; list-style: none; }
.package li { padding: 8px 0; border-top: 1px solid var(--line); }
.package-tag { align-self: flex-start; margin-bottom: 10px; font-size: 0.82rem; font-weight: 700; color: var(--accent); }

/* ---------- Process (a real sequence) ---------- */
.process { list-style: none; margin: 28px 0 0; padding: 0; counter-reset: s; display: grid; gap: 20px; }
@media (min-width: 760px) { .process { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 36px; } }
.process li { counter-increment: s; padding-top: 14px; border-top: 1.5px solid var(--ink); }
.process li::before { content: counter(s); display: block; font-family: "Instrument Serif", Georgia, serif; font-size: 2.2rem; line-height: 1; margin-bottom: 8px; color: var(--accent); }
.process p { color: var(--muted); margin-top: 4px; }

/* ---------- Reviews ---------- */
.reviews { display: grid; gap: 36px; }
.reviews blockquote { margin: 0; }
.reviews blockquote p { font-family: "Instrument Serif", Georgia, serif; font-size: clamp(1.6rem, 4.6vw, 2.3rem); line-height: 1.2; }
.reviews cite { display: block; margin-top: 12px; font-style: normal; font-weight: 600; color: var(--muted); }

/* ---------- FAQ ---------- */
.faq { margin-top: 20px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 0; font-weight: 700; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding-bottom: 18px; color: var(--muted); max-width: 60ch; }

/* ---------- Contact ---------- */
.contact { padding-bottom: 24px; }
.form { margin-top: 26px; display: flex; flex-direction: column; gap: 16px; }
.row { display: grid; gap: 16px; }
@media (min-width: 600px) { .row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; }
.optional { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field [aria-invalid="true"] { border-color: #B3402F; }
[data-theme="film"] .field [aria-invalid="true"] { border-color: #FF9C8F; }
.form-error { color: #B3402F; font-weight: 600; }
[data-theme="film"] .form-error { color: #FF9C8F; }
.form-error:empty { display: none; }
.fine { color: var(--muted); font-size: 0.92rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 12px 28px;
  border-radius: 999px; border: 1.5px solid var(--ink);
  background: transparent; color: var(--ink); font-weight: 700; text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); align-self: flex-start; }
.btn-primary:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* ---------- Footer ---------- */
.footer { padding-top: 64px; padding-bottom: 56px; color: var(--muted); font-size: 0.95rem; }
.social { margin-top: 8px; display: flex; gap: 18px; }
.social:empty { display: none; }
.demo-switcher { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.demo-switcher button { min-height: 40px; padding: 6px 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; cursor: pointer; }
.demo-switcher button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }

/* ---------- Lightbox ---------- */
.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: rgba(14, 13, 12, 0.96);
  color: #EEE8DD;
}
.lightbox::backdrop { background: rgba(14, 13, 12, 0.96); }
.lightbox figure { margin: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 56px 16px 24px; }
.lightbox img { max-width: 100%; max-height: calc(100% - 40px); object-fit: contain; }
.lightbox figcaption { display: flex; gap: 12px; font-size: 0.95rem; color: #CFC8BC; }
.lightbox .frame { color: #D2A867; }
.lb-btn {
  position: absolute;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  background: rgba(14, 13, 12, 0.5);
  color: #FFFFFF;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}
.lb-btn:hover { border-color: #FFFFFF; }
.lb-close { top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); }
.lb-prev { left: 12px; }
.lb-next { right: 12px; }
@media (max-width: 600px) {
  .lb-prev, .lb-next { top: auto; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); transform: none; }
  .lightbox figure { padding-bottom: 84px; }
}

@media (min-width: 900px) {
  .hero-text { padding-bottom: 64px; }
  .section { padding-top: 104px; }
}
