/* =============================================================================
   Tail & Veil — stylesheet
   Mobile-first. Two themes via tokens: default = warm hand-drawn "Sage & Clay";
   body.bw = stark black & white. A customer toggle (theme.js) switches them.
   ========================================================================== */

:root {
  /* ---- Color mode: warm "Sage & Clay" (default) ---- */
  --ink: #4a3526;          /* warm brown ink — text/fills */
  --ink-soft: #6f5b49;     /* secondary warm brown */
  --line: #ddd0ba;         /* warm taupe hairlines */
  --paper: #f4ecdf;        /* warm ivory background */
  --cream: #ece3d4;        /* panel */
  --cream-deep: #e6dac6;   /* deeper panel */
  --clay: #c06b4d;         /* terracotta accent */
  --clay-dark: #a4583e;    /* hover */
  --sage: #7f8d5e;         /* secondary accent */
  --accent: var(--clay);   /* primary accent (buttons, eyebrows) */
  --accent-dark: var(--clay-dark);
  --on-accent: #fbf4ea;    /* text on accent fills */
  --on-ink: #f4ecdf;       /* text on dark ink surfaces */
  --shadow: 0 10px 40px rgba(74, 53, 38, 0.08);

  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --sans: 'Jost', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container: 1120px;
  --gutter: 1.25rem;       /* generous on mobile */
}

/* ---- B&W mode: stark monochrome (the original luxury look) ---- */
/* html.bw-init is set pre-paint from localStorage to avoid a color flash; the
   tokens apply to <body> in both cases. */
html.bw-init body,
body.bw {
  --ink: #0e0e0e;
  --ink-soft: #3a3a3a;
  --line: #d9d6cf;
  --paper: #ffffff;
  --cream: #f7f5f0;
  --cream-deep: #efece5;
  --clay: #0e0e0e;
  --clay-dark: #000;
  --sage: #9a968b;
  --accent: #0e0e0e;
  --accent-dark: #000;
  --on-accent: #ffffff;
  --on-ink: #ffffff;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

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

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

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

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

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.1;
  margin: 0 0 0.5em;
  letter-spacing: 0.01em;
}

h1 { font-size: clamp(2.4rem, 9vw, 4.5rem); }
h2 { font-size: clamp(1.9rem, 6vw, 3rem); }
h3 { font-size: clamp(1.3rem, 4.5vw, 1.7rem); }

p { margin: 0 0 1.1em; color: var(--ink-soft); }

.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1rem;
  display: block;
}

/* ------------------------------- layout ---------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

section { padding-block: clamp(3.5rem, 10vw, 7rem); }

.section--cream { background: var(--cream); }
.section--ink {
  background: var(--ink);
  color: var(--paper);
}
.section--ink p { color: #cfcfcf; }
.section--ink .eyebrow { color: var(--paper); }

.center { text-align: center; }
.measure { max-width: 60ch; margin-inline: auto; }

/* ------------------------------- buttons --------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 52px;             /* comfortable touch target */
  padding: 0.85rem 1.9rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 2px solid var(--accent);
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 999px;         /* soft pill (illustrated style) */
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.1s ease;
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: var(--on-accent); }
.btn:active { transform: translateY(1px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--light { border-color: var(--paper); background: var(--paper); color: var(--ink); }
.btn--light:hover { background: transparent; color: var(--paper); }
.btn--block { display: flex; width: 100%; }

/* Theme toggle button (B&W ↔ color) */
.theme-toggle {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--sans); font-weight: 600; font-size: 0.7rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 0.5rem 0.95rem; border-radius: 999px;
  border: 1.5px solid var(--ink); background: transparent; color: var(--ink);
  cursor: pointer; transition: background 0.2s ease, color 0.2s ease;
}
.theme-toggle:hover { background: var(--ink); color: var(--paper); }
.theme-toggle .dot { width: 11px; height: 11px; border-radius: 999px; background: var(--clay); border: 1.5px solid var(--ink); }
body.bw .theme-toggle .dot { background: #fff; }

/* ------------------------------- header ---------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
}
.brand { display: flex; align-items: center; gap: 0.6rem; }
.brand svg { width: 38px; height: 38px; }
.brand__name {
  font-family: var(--serif);
  font-size: 1.45rem;
  letter-spacing: 0.04em;
}

.nav__links {
  position: fixed;
  inset: 68px 0 auto 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  flex-direction: column;
  gap: 0;
  padding: 0.5rem var(--gutter) 1.5rem;
  display: none;
}
.nav__links.open { display: flex; }
.nav__links a {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.82rem;
  font-weight: 500;
}
.nav__links .btn { margin-top: 1rem; border-bottom: 1px solid var(--ink); }

.nav__toggle {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer;
}
.nav__toggle span,
.nav__toggle span::before,
.nav__toggle span::after {
  content: '';
  display: block;
  width: 24px; height: 1.5px;
  background: var(--ink);
  position: relative;
  transition: transform 0.25s ease;
}
.nav__toggle span::before { position: absolute; top: -7px; }
.nav__toggle span::after { position: absolute; top: 7px; }
.nav__toggle.open span { background: transparent; }
.nav__toggle.open span::before { transform: translateY(7px) rotate(45deg); }
.nav__toggle.open span::after { transform: translateY(-7px) rotate(-45deg); }

/* -------------------------------- hero ----------------------------------- */
.hero {
  position: relative;
  text-align: center;
  padding-block: clamp(3rem, 14vw, 7rem);
  background:
    radial-gradient(120% 90% at 50% 0%, var(--cream) 0%, var(--paper) 70%);
  overflow: hidden;
}
.hero__art { width: min(280px, 60vw); margin: 0 auto 1.5rem; }
.hero h1 { margin-bottom: 0.3em; }
.hero__sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.1rem, 4.5vw, 1.6rem);
  color: var(--ink);
  margin-bottom: 1.5rem;
}
.hero__cta { display: flex; flex-direction: column; gap: 0.75rem; max-width: 320px; margin: 0 auto; }
.hero__trust {
  margin-top: 2rem;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ------------------------------- grids ----------------------------------- */
.grid { display: grid; gap: 1.25rem; }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: 1fr; }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 1.75rem;
}
.card--cream { background: var(--cream); border-color: var(--cream-deep); }
.card svg.icon { width: 40px; height: 40px; margin-bottom: 1rem; }
.card h3 { margin-bottom: 0.4em; }
.card p:last-child { margin-bottom: 0; }

/* steps / process */
.steps { counter-reset: step; }
.step { display: flex; gap: 1rem; padding-block: 1.25rem; border-bottom: 1px solid var(--line); }
.step:last-child { border-bottom: none; }
.step__num {
  counter-increment: step;
  font-family: var(--serif);
  font-size: 1.8rem;
  line-height: 1;
  min-width: 2.2rem;
}
.step__num::before { content: counter(step, decimal-leading-zero); }

/* ------------------------------ pricing ---------------------------------- */
.price-card {
  border: 1px solid var(--ink);
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  background: var(--paper);
}
.price-card--featured { background: var(--ink); color: var(--paper); }
.price-card--featured p { color: #cfcfcf; }
.price-card__icon { width: 48px; height: 48px; margin-bottom: 1rem; }
.price-card--featured .price-card__icon { filter: invert(1); }
.price-card__tag {
  font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.price-card__price { font-family: var(--serif); font-size: 2.6rem; margin: 0.25rem 0 0.25rem; }
.price-card__price small { font-size: 0.9rem; color: inherit; opacity: 0.6; }
.price-card ul { list-style: none; padding: 0; margin: 1.25rem 0 1.75rem; }
.price-card li { padding: 0.5rem 0; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.price-card--featured li { border-color: #333; }
.price-card .btn { margin-top: auto; }

/* ------------------------------- venues ---------------------------------- */
.venue-region { margin-bottom: 2.5rem; }
.venue-region h3 {
  padding-bottom: 0.5rem; border-bottom: 1px solid var(--ink); margin-bottom: 1rem;
}
.venue-list { columns: 1; list-style: none; padding: 0; margin: 0; }
.venue-list li { padding: 0.45rem 0; font-size: 0.95rem; break-inside: avoid; }
.venue-list li span { color: var(--ink-soft); font-size: 0.85rem; }

/* --------------------------------- FAQ ----------------------------------- */
details.faq {
  border-bottom: 1px solid var(--line);
  padding: 1.1rem 0;
}
details.faq summary {
  font-family: var(--serif);
  font-size: 1.25rem;
  cursor: pointer;
  list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: '+'; font-size: 1.6rem; line-height: 1; }
details.faq[open] summary::after { content: '–'; }
details.faq p { margin: 0.9rem 0 0; }

/* -------------------------------- forms ---------------------------------- */
.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: 0.4rem; }
.field label {
  font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600;
}
.field input,
.field select,
.field textarea {
  font-family: var(--sans);
  font-size: 1rem;                 /* >=16px prevents iOS zoom-on-focus */
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 0;
  min-height: 52px;
  width: 100%;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.checks { display: grid; gap: 0.6rem; }
.check { display: flex; align-items: center; gap: 0.6rem; }
.check input { width: 22px; height: 22px; min-height: 0; }
.form__note { font-size: 0.82rem; color: var(--ink-soft); }

/* ------------------------------- footer ---------------------------------- */
.site-footer {
  background: var(--ink);
  color: #cfcfcf;
  padding-block: 3rem 2rem;
  font-size: 0.9rem;
}
.site-footer a:hover { color: #fff; }
.footer__grid { display: grid; gap: 2rem; }
.footer__brand svg { width: 44px; height: 44px; margin-bottom: 0.75rem; }
.footer__brand .brand__name { color: #fff; }
.footer__col h4 { color: #fff; font-family: var(--sans); font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; }
.footer__col a { display: block; padding: 0.3rem 0; }
.footer__legal {
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid #333;
  display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.8rem; color: #8d8d8d;
}

/* ------------------------------ utilities -------------------------------- */
.stack > * + * { margin-top: 1rem; }
.divider { width: 60px; height: 1px; background: var(--ink); margin: 1.5rem auto; }
.section-head { max-width: 56ch; margin: 0 auto 2.5rem; }
.hidden { display: none !important; }

/* reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* =============================================================================
   Breakpoints — progressive enhancement
   ========================================================================== */

/* ≥ 600px — large phones / small tablets */
@media (min-width: 600px) {
  :root { --gutter: 2rem; }
  .hero__cta { flex-direction: row; justify-content: center; max-width: none; }
  .grid--2 { grid-template-columns: 1fr 1fr; }
  .venue-list { columns: 2; column-gap: 2rem; }
  .footer__grid { grid-template-columns: 1.5fr 1fr 1fr; }
}

/* ≥ 900px — tablets / desktop */
@media (min-width: 900px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
  .venue-list { columns: 3; }

  /* desktop navigation — replace mobile drawer */
  .nav__toggle { display: none; }
  .nav__links {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.75rem;
    padding: 0;
    border: none;
    background: none;
  }
  .nav__links a {
    padding: 0;
    border: none;
    font-size: 0.78rem;
  }
  .nav__links a:not(.btn):hover { opacity: 0.6; }
  .nav__links .btn { margin-top: 0; padding: 0.7rem 1.4rem; min-height: 44px; }
}

/* ≥ 1100px — roomy desktop */
@media (min-width: 1100px) {
  .about-split { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
}

/* =============================================================================
   Polaroid gallery
   ========================================================================== */
.polaroid {
  background: #fff;
  padding: 14px 14px 46px;
  border: 1px solid #ececec;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.2);
  width: 100%;
}
.polaroid img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: var(--cream); }
.polaroid figcaption {
  font-family: var(--serif); font-style: italic; font-size: 1.2rem;
  text-align: center; color: var(--ink); margin-top: 12px; line-height: 1.2;
}

.gallery-stage { position: relative; }
.gallery-pin {
  position: sticky; top: 0; height: 100vh;
  display: flex; align-items: center; justify-content: center;
}
.gallery-pile { position: relative; width: min(80vw, 330px); aspect-ratio: 4 / 5; }
.gallery-pile .polaroid {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, 62vh) rotate(var(--rot, 0deg)) scale(0.96);
  opacity: 0;
  transition: transform 0.75s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.5s ease;
  will-change: transform, opacity;
}
.gallery-pile .polaroid.landed {
  transform: translate(calc(-50% + var(--tx, 0px)), -50%) rotate(var(--rot, 0deg));
  opacity: 1;
}
.gallery-hint {
  position: absolute; bottom: 7vh; left: 50%; transform: translateX(-50%);
  font-size: 0.72rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--ink-soft); transition: opacity 0.4s ease;
}
.gallery-hint::after { content: ''; display: block; width: 1px; height: 26px; background: var(--ink-soft); margin: 0.5rem auto 0; }

.gallery-grid { display: grid; gap: 2.5rem; grid-template-columns: 1fr; max-width: 760px; margin: 0 auto; padding: 2rem 0 4rem; }
.gallery-grid .polaroid { position: static; transform: rotate(var(--rot, 0deg)); opacity: 1; }
@media (min-width: 600px) { .gallery-grid { grid-template-columns: 1fr 1fr; gap: 3rem; } }
.gallery-empty { text-align: center; color: var(--ink-soft); padding: 6rem 1rem; }

/* Meet Peeps — trait chips + framed photo */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.1rem 0 1.5rem; padding: 0; list-style: none; }
.chip {
  font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase;
  border: 1px solid var(--ink); border-radius: 999px; padding: 0.35rem 0.85rem; color: var(--ink);
}
.dog-photo { max-width: 340px; margin: 0 auto; transform: rotate(-2.5deg); }
.dog-photo figcaption { font-size: 1.05rem; }

/* Certifications */
.certs {
  list-style: none; padding: 0;
  display: grid; gap: 2.5rem; grid-template-columns: 1fr;
  max-width: 720px; margin: 0 auto;
}
@media (min-width: 600px) { .certs { grid-template-columns: 1fr 1fr; } }
.certs--single { grid-template-columns: 1fr; max-width: 420px; }
@media (min-width: 600px) { .certs--single { grid-template-columns: 1fr; } }
.cert { text-align: center; }
.cert__badge {
  height: 130px; width: auto; margin: 0 auto 1rem;
  filter: grayscale(1);            /* belt-and-suspenders: stays B/W even if art changes */
}
.cert h3 { margin-bottom: 0.4em; }
.cert p { margin: 0 auto; max-width: 38ch; font-size: 0.95rem; }
