/* ==========================================================================
   Terra Kreations — shared styles, v3 "royal"
   Red · black · white, at full volume. Ivory marble ground, sable bands,
   crimson standards, thin gold filigree. Cinzel carries the voice.
   ========================================================================== */

:root {
  --ink: #16181a;
  --ink-soft: #5a5c5e;
  --ink-deep: #0a0b0a;

  --bg: #f6f5f2;                   /* cool ivory — not beige */
  --paper: #ffffff;
  --bg-deep: #eceae6;
  --line: #d7d5d0;
  --line-strong: #232527;

  --red: #a3122c;                  /* crimson, on light */
  --red-bright: #c8102e;           /* crimson, on dark */
  --red-dark: #7c0e22;
  --red-tint: #f6e6e6;

  --green: #03755c;                /* lives only in the crest */
  --gold: #b48c2f;
  --gold-soft: #d7ba6a;
  --gold-line: rgba(180, 140, 47, 0.55);

  --font-display: "Cinzel", "Trajan Pro", Georgia, serif;
  --font-body: "EB Garamond", Georgia, "Times New Roman", serif;
  --font-ui: "Barlow Semi Condensed", "Segoe UI", sans-serif;

  --radius: 2px;
  --cut: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px),
                 calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
  --cut-sm: polygon(7px 0, calc(100% - 7px) 0, 100% 7px, 100% calc(100% - 7px),
                    calc(100% - 7px) 100%, 7px 100%, 0 calc(100% - 7px), 0 7px);

  --shadow: 0 16px 38px rgba(10, 11, 10, 0.18);
  --shadow-soft: 0 4px 16px rgba(10, 11, 10, 0.1);

  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.04 0'/%3E%3C/filter%3E%3Crect width='260' height='260' filter='url(%23n)'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17.5px;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

img, svg, canvas { max-width: 100%; }
a { color: var(--red-dark); }
::selection { background: var(--red-tint); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.14; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 11, 10, 0.97);
  color: #f3f2ee;
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}
.site-header::after {
  content: "";
  display: block;
  height: 4px;
  background:
    linear-gradient(90deg, var(--red-bright) 0 64%, #f3f2ee 64% 66.5%,
      var(--gold) 66.5% 69%, var(--ink-deep) 69% 100%);
}
.site-header .bar {
  max-width: 1220px;
  margin: 0 auto;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #f3f2ee; white-space: nowrap; flex-shrink: 0; }
.brand .brand-crest { height: 46px; width: auto; display: block; filter: drop-shadow(0 0 7px rgba(255, 255, 255, 0.22)); }
.brand .logo-mark { display: none; }
.brand .txt { font-family: var(--font-display); font-weight: 700; font-size: 1.04rem; letter-spacing: 0.1em; line-height: 1.05; }
.brand small {
  display: block;
  font-family: var(--font-body);
  font-variant: small-caps;
  font-weight: 500;
  font-size: 0.76rem;
  color: var(--gold-soft);
  letter-spacing: 0.24em;
  margin-top: 2px;
}
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.site-nav a {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #f3f2ee;
  text-decoration: none;
  padding: 10px 12px 8px;
  border-bottom: 3px double transparent;
  opacity: 0.85;
  white-space: nowrap;
}
.site-nav a:hover { opacity: 1; background: rgba(200, 16, 46, 0.2); }
.site-nav a.active { opacity: 1; color: var(--gold-soft); border-bottom-color: var(--red-bright); }
.quote-link { position: relative; }
.quote-badge {
  display: inline-grid;
  place-items: center;
  min-width: 19px; height: 19px;
  padding: 0 5px;
  margin-left: 7px;
  clip-path: polygon(4px 0, calc(100% - 4px) 0, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 0 calc(100% - 4px), 0 4px);
  background: var(--red-bright);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  vertical-align: 2px;
}
.quote-badge[data-empty="1"] { display: none; }

.lang-toggle {
  display: flex;
  margin-left: 12px;
  clip-path: var(--cut-sm);
  box-shadow: inset 0 0 0 1.5px var(--gold-line);
}
.lang-toggle button {
  appearance: none;
  border: none;
  background: transparent;
  color: #f3f2ee;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  padding: 7px 10px 5px;
  cursor: pointer;
  opacity: 0.7;
}
.lang-toggle button:hover { opacity: 1; }
.lang-toggle button.on { background: var(--red-bright); color: #fff; opacity: 1; }

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px 12px;
  border: none;
  clip-path: var(--cut-sm);
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, background 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--red); color: #fdf9f4; box-shadow: inset 0 0 0 1px rgba(215, 186, 106, 0.5); }
.btn-primary:hover { background: var(--red-dark); }
.btn-black { background: var(--ink-deep); color: #f3f2ee; box-shadow: inset 0 0 0 1px rgba(215, 186, 106, 0.45); }
.btn-black:hover { background: #1d1f1d; }
.btn-ghost { background: rgba(243, 242, 238, 0.06); color: #f3f2ee; box-shadow: inset 0 0 0 1.5px rgba(243, 242, 238, 0.65); }
.btn-ghost:hover { background: rgba(243, 242, 238, 0.16); }
.btn-outline { background: var(--bg-deep); color: var(--ink); box-shadow: inset 0 0 0 1.5px rgba(22, 24, 26, 0.4); }
.btn-outline:hover { background: var(--line); }
.btn-small { padding: 9px 15px 7px; font-size: 0.72rem; }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; }

/* ---------- Ornaments ---------- */
.flourish::after {
  content: "";
  display: block;
  width: 74px;
  border-top: 3px double var(--red);
  margin-top: 12px;
}

/* schoolhouse pass — banner ribbon heading (Bullworth-crest energy) */
.ribbon-h {
  position: relative;
  width: fit-content;
  background: linear-gradient(180deg, var(--red), var(--red-dark));
  color: #fdf6ee;
  padding: 12px 30px 9px;
  letter-spacing: 0.06em;
  box-shadow: inset 0 0 0 1.5px rgba(215, 186, 106, 0.5);
  margin-left: 16px;
  margin-bottom: 24px;
}
.ribbon-h::before, .ribbon-h::after {
  content: "";
  position: absolute;
  top: 9px;
  bottom: -9px;
  width: 28px;
  background: var(--red-dark);
  opacity: 0.92;
  z-index: -1;
}
.ribbon-h::before { left: -16px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 34% 50%); }
.ribbon-h::after  { right: -16px; clip-path: polygon(0 0, 100% 0, 66% 50%, 100% 100%, 0 100%); }

/* rubber stamp — office-slip accent */
.stamp {
  display: inline-block;
  padding: 7px 14px 5px;
  border: 3px double rgba(163, 18, 44, 0.7);
  border-radius: 3px;
  color: rgba(163, 18, 44, 0.78);
  font-family: "Graduate", var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transform: rotate(-5deg);
  pointer-events: none;
  user-select: none;
}

/* pennant bunting divider */
.pennants { display: block; width: 100%; height: 15px; margin-top: -1px; }
.eyebrow {
  font-family: var(--font-body);
  font-variant: small-caps;
  font-weight: 500;
  font-size: 1.02rem;
  letter-spacing: 0.34em;
}
.eyebrow .sep { color: var(--gold-soft); }
.teeth { display: block; width: 100%; height: 12px; }

/* corner broom sprig — every page */
.corner-sprig {
  position: fixed;
  right: 0;
  bottom: 0;
  width: 132px;
  height: 132px;
  z-index: 40;
  pointer-events: none;
  opacity: 0.6;
  filter: drop-shadow(0 0 1px rgba(10, 11, 10, 0.3));
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--ink-deep);
  background-image: var(--noise);
  color: #f6f4ef;
  overflow: hidden;
  border-bottom: 3px double var(--gold-line);
}
.hero::before {
  content: "";
  position: absolute;
  top: -30%;
  bottom: -30%;
  right: -14%;
  width: 58%;
  background: linear-gradient(105deg, var(--red-bright), var(--red-dark));
  transform: rotate(11deg);
  box-shadow:
    -8px 0 0 rgba(246, 244, 239, 0.95),
    -14px 0 0 rgba(215, 186, 106, 0.8),
    -26px 0 0 rgba(200, 16, 46, 0.35);
}
.hero-inner {
  position: relative;
  max-width: 1220px;
  margin: 0 auto;
  padding: 76px 20px 84px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}
.hero .eyebrow { color: #cfccc2; margin: 0 0 18px; }
.hero h1 {
  font-size: clamp(2.05rem, 4.6vw, 3.6rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: 0.02em;
  margin: 0 0 20px;
  text-wrap: balance;
}
.hero h1 em {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 500;
  color: var(--gold-soft);
  letter-spacing: 0;
}
.hero p.lead { font-size: 1.22rem; color: #d6d3ca; margin: 0 0 30px; max-width: 30em; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero-art { position: relative; display: grid; place-items: center; }
.hero-art img { position: relative; width: 100%; max-width: 370px; filter: drop-shadow(0 26px 36px rgba(0, 0, 0, 0.6)); }
/* crest lockup — motto ribbon under the shield, school-emblem style */
.crest-ribbon {
  position: relative;
  margin-top: -4px;
  background: linear-gradient(180deg, var(--red-bright), var(--red-dark));
  color: #fdf6ee;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  padding: 9px 28px 7px;
  box-shadow: inset 0 0 0 1px rgba(215, 186, 106, 0.6), 0 12px 26px rgba(0, 0, 0, 0.5);
  z-index: 1;
}
.crest-ribbon::before, .crest-ribbon::after {
  content: "";
  position: absolute;
  top: 8px;
  bottom: -8px;
  width: 30px;
  background: var(--red-dark);
  z-index: -1;
}
.crest-ribbon::before { left: -20px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 34% 50%); }
.crest-ribbon::after  { right: -20px; clip-path: polygon(0 0, 100% 0, 66% 50%, 100% 100%, 0 100%); }

/* ---------- Stat strip — varsity felt patches ---------- */
.stat-strip {
  background: linear-gradient(180deg, var(--red), var(--red-dark));
  color: #f8ece2;
  border-top: 1px solid var(--gold-line);
  border-bottom: 1px solid var(--gold-line);
}
.stat-strip .row {
  max-width: 1220px;
  margin: 0 auto;
  padding: 13px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  font-size: 0.99rem;
}
.stat-strip .row > span {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px 5px;
  background: rgba(10, 11, 10, 0.16);
  border: 1.6px dashed rgba(248, 236, 226, 0.5);   /* stitched patch edge */
}
.stat-strip strong {
  color: #fff;
  font-family: "Graduate", var(--font-display);
  font-weight: 400;
  font-size: 0.94em;
  letter-spacing: 0.05em;
  margin: 0 3px;
}
.stat-strip a { color: #fff; }
.star { color: var(--gold-soft); margin-right: 4px; }

/* ---------- Sections ---------- */
.section { max-width: 1220px; margin: 0 auto; padding: 66px 20px; }
.section h2 { font-size: 2rem; letter-spacing: 0.04em; margin: 0 0 12px; }
.section .sub { color: var(--ink-soft); font-size: 1.14rem; margin: 0 0 36px; max-width: 44em; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; counter-reset: subject; }
.card {
  position: relative;
  background: var(--paper);
  /* ruled index-card paper: faint rule lines + red margin line */
  background-image:
    linear-gradient(90deg, transparent 0 24px, rgba(163, 18, 44, 0.28) 24px 25.5px, transparent 25.5px),
    repeating-linear-gradient(180deg, transparent 0 25px, rgba(22, 24, 26, 0.06) 25px 26px);
  border: 1px solid var(--line-strong);
  border-top: none;
  box-shadow: inset 0 0 0 1px #fff, inset 0 0 0 2px var(--gold-line), var(--shadow-soft);
  padding: 30px 24px 26px;
  counter-increment: subject;
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: -1px; right: -1px;
  height: 6px;
  background: linear-gradient(90deg, var(--red) 0 72%, var(--gold) 72% 75%, var(--ink-deep) 75% 100%);
}
/* subject tab — course number, roman */
.card::after {
  content: counter(subject, upper-roman);
  position: absolute;
  top: 6px; right: -1px;
  background: var(--ink-deep);
  color: var(--gold-soft);
  font-family: "Graduate", var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  padding: 5px 11px 3px;
  box-shadow: inset 0 0 0 1px var(--gold-line);
}
/* service photo — full-bleed under the livery stripe and subject tab */
.card .photo {
  display: block;
  width: calc(100% + 48px);
  max-width: none;                 /* the global img max-width:100% would stop the right-edge bleed */
  margin: -30px -24px 16px;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
  filter: saturate(0.94);
}
.card h3 { margin: 0 0 8px; font-size: 1.04rem; letter-spacing: 0.06em; }
.card p { margin: 0; color: var(--ink-soft); font-size: 1rem; }

/* ---------- Black band ---------- */
.band { position: relative; }
.band-black {
  background: var(--ink-deep);
  background-image: var(--noise);
  color: #eae8e2;
  margin-top: 26px;
}
.band-black .teeth { fill: var(--bg); }
.band-black .teeth-top { margin-bottom: -1px; }
.band-black .teeth-bottom { margin-top: -1px; }
.band-black h2 { color: #f6f4ef; }
.band-black .flourish::after { border-top-color: var(--red-bright); }
.band-black .sub { color: #b3b1a8; }

/* "How it works" as a Bullworth-style class schedule card on the black band */
.schedule-card {
  max-width: 880px;
  margin: 0 auto;
  background: var(--paper);
  background-image:
    linear-gradient(90deg, transparent 0 50px, rgba(163, 18, 44, 0.3) 50px 51.5px, transparent 51.5px),
    repeating-linear-gradient(180deg, transparent 0 32px, rgba(22, 24, 26, 0.06) 32px 33px);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  box-shadow: inset 0 0 0 1px #fff, inset 0 0 0 2px var(--gold-line), var(--shadow);
  padding: 24px 30px 16px;
}
/* wordless ornament head — double rules flanking three gold stars */
.schedule-head {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--gold);
  font-size: 0.64rem;
  letter-spacing: 0.32em;
  padding-bottom: 6px;
  white-space: nowrap;
}
.schedule-head::before, .schedule-head::after {
  content: "";
  flex: 1;
  border-top: 3px double var(--gold-line);
}
.steps { counter-reset: step; }
.step {
  counter-increment: step;
  position: relative;
  padding: 17px 6px 15px 76px;
  border-top: 1px solid var(--line);
}
.step:first-of-type { border-top: none; }
.step::before {
  content: "";
  position: absolute;
  left: 12px; top: 19px;
  width: 30px; height: 30px;
  transform: rotate(45deg);
  background: var(--red);
  border: 1px solid rgba(215, 186, 106, 0.7);
}
.step::after {
  content: counter(step, upper-roman);
  position: absolute;
  left: 4px; top: 18px;
  width: 46px; height: 34px;
  display: grid;
  place-items: center;
  font-family: "Graduate", var(--font-display);
  font-size: 0.86rem;
  color: #fff;
}
.step h3 { margin: 0 0 4px; font-size: 1rem; letter-spacing: 0.06em; color: var(--ink-deep); }
.step p { margin: 0; font-size: 0.97rem; color: var(--ink-soft); }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative;
  background: linear-gradient(105deg, var(--red) 0 60%, var(--red-dark));
  color: #fdf6ee;
  overflow: hidden;
  border-top: 3px double var(--gold-line);
  border-bottom: 3px double var(--gold-line);
}
.cta-band::before {
  content: "";
  position: absolute;
  right: -40px; top: 50%;
  width: 300px; height: 300px;
  transform: translateY(-50%) rotate(-8deg);
  background: url("../assets/logo-shield.png?v=32") center / contain no-repeat;
  opacity: 0.14;
  pointer-events: none;
}
.cta-band .section {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 44px;
  padding-bottom: 44px;
}
.cta-band h2 { margin: 0; font-size: 1.7rem; letter-spacing: 0.04em; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink-deep);
  background-image: var(--noise);
  color: #c3c1b8;
  border-top: 3px double var(--red-bright);
  font-size: 0.99rem;
}
.site-footer .cols {
  max-width: 1220px;
  margin: 0 auto;
  padding: 46px 20px 30px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
}
.site-footer h4 { color: #f3f2ee; margin: 0 0 12px; font-size: 0.9rem; letter-spacing: 0.12em; }
.site-footer a { color: var(--gold-soft); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-brand { display: flex; gap: 14px; align-items: flex-start; }
.footer-brand img { width: 58px; height: auto; flex: 0 0 auto; }
.site-footer .fine {
  border-top: 1px solid rgba(243, 242, 238, 0.14);
  padding: 16px 20px;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.78;
}
.site-footer .fine .credit { white-space: nowrap; }
.site-footer .fine img { height: 14px; vertical-align: -2px; margin-right: 4px; }

/* ---------- Open/closed badge (header) ---------- */
.open-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 4px;
  padding: 6px 12px 5px;
  background: rgba(10, 11, 10, 0.35);
  border: 1.6px dashed rgba(243, 242, 238, 0.4);   /* stitched patch, like the stat strip */
  color: #f3f2ee;
  text-decoration: none;
  font-family: "Graduate", var(--font-display);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}
.open-badge:hover { border-color: rgba(215, 186, 106, 0.7); }
.open-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red-bright);
  flex: 0 0 auto;
}
.open-badge.is-open .dot { background: #2e9e6b; animation: ob-pulse 2.4s ease-out infinite; }
@keyframes ob-pulse {
  0% { box-shadow: 0 0 0 0 rgba(46, 158, 107, 0.5); }
  70% { box-shadow: 0 0 0 7px rgba(46, 158, 107, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 158, 107, 0); }
}
.open-badge[hidden] { display: none; }
/* phone variant — pinned to the hero's black field; hidden on desktop */
.open-badge-hero {
  display: none;
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 5;
  background: rgba(200, 16, 46, 0.18);
}

/* ---------- Google reviews ---------- */
.rev-wrap { display: grid; grid-template-columns: 260px 1fr; gap: 22px; align-items: stretch; }
.rev-wrap.summary-only { grid-template-columns: minmax(260px, 420px); justify-content: center; }
.rev-summary {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-top: none;
  box-shadow: inset 0 0 0 1px #fff, inset 0 0 0 2px var(--gold-line), var(--shadow-soft);
  padding: 26px 22px 22px;
  text-align: center;
}
.rev-summary::before {
  content: "";
  position: absolute;
  top: 0; left: -1px; right: -1px;
  height: 6px;
  background: linear-gradient(90deg, var(--red) 0 72%, var(--gold) 72% 75%, var(--ink-deep) 75% 100%);
}
.rev-g { margin-bottom: 4px; }
.rev-score {
  font-family: "Graduate", var(--font-display);
  font-size: 3.1rem;
  line-height: 1;
  color: var(--ink-deep);
}
.rev-stars { font-size: 1.3rem; letter-spacing: 5px; margin: 4px 0 2px; }
.rev-stars .s-on, .rc-stars .s-on { color: var(--gold); }
.rev-stars .s-off, .rc-stars .s-off { color: var(--line); }
.rev-src {
  margin: 0;
  font-variant: small-caps;
  letter-spacing: 0.22em;
  color: var(--ink-soft);
}
.rev-count { margin: 2px 0 0; font-size: 0.92rem; color: var(--ink-soft); }
.rev-cta { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.rev-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.rev-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-top: none;
  box-shadow: inset 0 0 0 1px #fff, inset 0 0 0 2px var(--gold-line), var(--shadow-soft);
  padding: 20px 20px 16px;
  cursor: pointer;
}
.rev-card::before {
  content: "";
  position: absolute;
  top: 0; left: -1px; right: -1px;
  height: 6px;
  background: linear-gradient(90deg, var(--red) 0 72%, var(--gold) 72% 75%, var(--ink-deep) 75% 100%);
}
.rc-stars { font-size: 0.98rem; letter-spacing: 3px; margin-bottom: 8px; }
.rc-text {
  margin: 0;
  color: var(--ink);
  font-size: 0.99rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
  overflow: hidden;
}
.rev-card.expanded .rc-text { display: block; -webkit-line-clamp: none; }
.rc-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;            /* pins the author row to the card's bottom edge */
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.rc-ava { width: 32px; height: 32px; border-radius: 50%; flex: 0 0 auto; }
.rc-name {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink-deep);
  text-decoration: none;
}
a.rc-name:hover { text-decoration: underline; }
.rc-when { margin-left: auto; font-size: 0.84rem; color: var(--ink-soft); white-space: nowrap; }

/* ---------- Visit — map + hours ---------- */
.visit-grid { display: grid; grid-template-columns: 1.25fr 0.9fr; gap: 26px; align-items: stretch; }
.visit-map {
  background: var(--paper);
  border: 1px solid var(--line-strong);
  box-shadow: inset 0 0 0 1px #fff, inset 0 0 0 2px var(--gold-line), var(--shadow-soft);
  padding: 10px;
  display: flex;
}
.visit-map iframe { border: 0; width: 100%; min-height: 430px; flex: 1; filter: saturate(0.95); }
.hours-card { max-width: none; margin: 0; padding-bottom: 20px; }
.hours-card h3 { margin: 8px 0 6px; font-size: 1.12rem; letter-spacing: 0.06em; }
.hours-list { list-style: none; margin: 6px 0 16px; padding: 0; }
.hours-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 7px 8px 5px;
  border-top: 1px solid var(--line);
  font-size: 0.99rem;
}
.hours-list li:first-child { border-top: none; }
.hours-list .hh { font-family: var(--font-ui); font-weight: 600; letter-spacing: 0.02em; white-space: nowrap; }
.hours-list li.today { background: rgba(163, 18, 44, 0.07); }
.hours-list li.today .hd { color: var(--red-dark); font-weight: 700; }
.hours-list li.today .hh { color: var(--red-dark); }
.hours-list .hd em {
  font-style: normal;
  font-family: "Graduate", var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  border: 1px solid rgba(163, 18, 44, 0.45);
  padding: 2px 6px 1px;
  margin-left: 7px;
  vertical-align: 2px;
}
.visit-actions { display: flex; gap: 10px; flex-wrap: wrap; padding-bottom: 6px; }

/* ---------- Notice strip ---------- */
.demo-note {
  background: var(--bg-deep);
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  text-align: center;
  font-size: 0.9rem;
  font-style: italic;
  padding: 6px 14px;
}

/* ---------- Page head ---------- */
.page-head { max-width: 1220px; margin: 0 auto; padding: 48px 20px 8px; }
.page-head h1 { font-size: 2.05rem; letter-spacing: 0.04em; margin: 0 0 10px; }
.page-head p { color: var(--ink-soft); font-size: 1.14rem; margin: 12px 0 0; max-width: 46em; }

/* ---------- Products grid ---------- */
.product-grid {
  max-width: 1220px;
  margin: 0 auto;
  padding: 32px 20px 72px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.product-card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-top: none;
  box-shadow: inset 0 0 0 1px #fff, inset 0 0 0 2px var(--gold-line), var(--shadow-soft);
  padding: 20px 20px 22px;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.product-card::before {
  content: "";
  position: absolute;
  top: 0; left: -1px; right: -1px;
  height: 6px;
  background: linear-gradient(90deg, var(--red) 0 72%, var(--gold) 72% 75%, var(--ink-deep) 75% 100%);
}
.product-card:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px #fff, inset 0 0 0 2px var(--gold-line), var(--shadow); }
.product-card .preview {
  background: radial-gradient(closest-side, #ffffff 62%, #f1efeb);
  border: 1px solid var(--line);
  border-radius: 200px 200px var(--radius) var(--radius) / 64px 64px var(--radius) var(--radius);
  /* yearbook double matte */
  box-shadow: inset 0 0 0 7px #fff, inset 0 0 0 8.5px var(--gold-line);
  padding: 14px;
  margin-bottom: 15px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.product-card .preview img { width: 100%; height: 200px; object-fit: contain; }
/* engraved nameplate under the portrait */
.product-card h3 {
  align-self: center;
  margin: 0 auto;
  width: fit-content;
  font-size: 1.02rem;
  letter-spacing: 0.06em;
  text-align: center;
  background: var(--bg-deep);
  box-shadow: inset 0 0 0 1px #fff, inset 0 0 0 2px var(--gold-line);
  clip-path: var(--cut-sm);
  padding: 8px 18px 6px;
}
.product-card .meta { text-align: center; }
.product-card .go { text-align: center; }
.product-card .meta { color: var(--ink-soft); font-size: 0.95rem; }
.product-card .go {
  margin-top: 10px;
  color: var(--red-dark);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ---------- Customizer ---------- */
.customizer {
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 20px 10px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items: start;
}
.stage-wrap { position: sticky; top: 92px; }
.product-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.product-tabs a {
  text-decoration: none;
  color: var(--ink-soft);
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  clip-path: var(--cut-sm);
  padding: 9px 16px 7px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.product-tabs a.active { background: var(--ink-deep); color: #f3f2ee; box-shadow: inset 0 0 0 1px var(--gold-line); }

.stage {
  position: relative;
  width: min(100%, calc(100vh - 250px), 640px);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  background:
    linear-gradient(45deg, rgba(20, 22, 24, 0.03) 25%, transparent 25%, transparent 75%, rgba(20, 22, 24, 0.03) 75%),
    linear-gradient(45deg, rgba(20, 22, 24, 0.03) 25%, transparent 25%, transparent 75%, rgba(20, 22, 24, 0.03) 75%),
    #fff;
  background-size: 28px 28px, 28px 28px;
  background-position: 0 0, 14px 14px;
  border: 1px solid var(--line-strong);
  box-shadow: inset 0 0 0 1px #fff, inset 0 0 0 2px var(--gold-line), var(--shadow-soft);
  overflow: hidden;
  touch-action: none;
}
.stage.zoomed { cursor: zoom-out; }
.stage-zoom {
  position: absolute;
  inset: 0;
  transform-origin: 0 0;
}
#stageProduct {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}
.art-layer { position: absolute; inset: 0; }
.art-box { position: absolute; cursor: grab; touch-action: none; }
.art-box:active { cursor: grabbing; }
.art-box::after {
  content: "";
  position: absolute;
  inset: -6px;
  border: 1.5px dashed rgba(163, 18, 44, 0.5);
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
}
.art-box:hover::after { opacity: 0.7; }
.art-box.sel::after { opacity: 1; }
.art-box img { display: block; width: 100%; height: auto; pointer-events: none; }

.stage-hint {
  position: absolute;
  left: 10px; bottom: 8px;
  right: 10px;
  font-family: var(--font-ui);
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  padding: 4px 10px;
  pointer-events: none;
  width: fit-content;
}
.stage-busy {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  background: rgba(255, 255, 255, 0.55);
  z-index: 5;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--ink-soft);
}
.stage-busy.on { display: grid; }

.panel {
  background: var(--paper);
  border: 1px solid var(--line-strong);
  box-shadow: inset 0 0 0 1px #fff, inset 0 0 0 2px var(--gold-line), var(--shadow-soft);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.panel h1 { font-size: 1.28rem; letter-spacing: 0.05em; margin: 0; }
.panel .picked { color: var(--ink-soft); font-size: 0.96rem; font-style: italic; margin-top: 2px; }
.panel h2 {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
  margin: 0 0 10px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.panel h2 .count { font-family: var(--font-body); font-style: italic; font-weight: 500; letter-spacing: 0.03em; text-transform: none; color: var(--gold); }
.panel section { border-top: 1px solid var(--line); padding-top: 14px; }
.panel section:first-of-type { border-top: none; padding-top: 0; }

.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatches-scroll { max-height: 208px; overflow-y: auto; padding: 4px 2px; scrollbar-width: thin; }
.swatch {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 2px solid rgba(20, 22, 24, 0.22);
  cursor: pointer;
  padding: 0;
  transition: transform 0.1s ease;
  flex: 0 0 auto;
}
.swatch:hover { transform: scale(1.15); }
.swatch[aria-pressed="true"] { outline: 3px solid var(--red); outline-offset: 2px; }

.control-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.control-row label { font-family: var(--font-body); font-variant: small-caps; font-size: 0.95rem; color: var(--ink-soft); width: 58px; }
.control-row input[type="range"] { flex: 1; accent-color: var(--red); }

.upload-zone {
  border: 2px dashed var(--line);
  padding: 18px 14px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.98rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.upload-zone:hover, .upload-zone.drag { border-color: var(--red); background: var(--red-tint); color: var(--red-dark); }
.upload-zone strong { color: var(--red-dark); }

.art-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.art-thumb {
  position: relative;
  width: 54px; height: 54px;
  border: 1px solid var(--line);
  background:
    linear-gradient(45deg, #eee 25%, transparent 25%, transparent 75%, #eee 75%),
    linear-gradient(45deg, #eee 25%, #fff 25%, #fff 75%, #eee 75%);
  background-size: 12px 12px;
  background-position: 0 0, 6px 6px;
  cursor: pointer;
}
.art-thumb.sel { outline: 2px solid var(--red); outline-offset: 1px; }
.art-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.art-del {
  position: absolute;
  top: -7px; right: -7px;
  width: 18px; height: 18px;
  border: none;
  border-radius: 50%;
  background: var(--ink-deep);
  color: #fff;
  font-size: 0.72rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.art-del:hover { background: var(--red); }

.decal-tools { display: none; }
.decal-tools.on { display: block; }
.decal-tools .mini-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }

/* text & shape creation */
.deco-add { margin-top: 12px; display: flex; flex-direction: column; gap: 9px; }
.deco-row { display: flex; gap: 8px; align-items: center; }
.deco-row input[type="text"] {
  flex: 1;
  min-width: 0;
  padding: 9px 11px;
  border: 1.5px solid var(--line);
  font-family: var(--font-body);
  font-size: 1rem;
  background: #fff;
}
.deco-row input[type="text"]:focus { outline: 2px solid var(--red); border-color: var(--red); }
.deco-row select {
  flex: 1;
  padding: 8px 10px;
  border: 1.5px solid var(--line);
  font-family: var(--font-body);
  font-size: 0.98rem;
  background: #fff;
}
.shape-buttons { flex-wrap: wrap; }
.shape-btn {
  width: 40px; height: 40px;
  padding: 6px;
  border: 1.5px solid var(--line);
  background: #fff;
  cursor: pointer;
  clip-path: var(--cut-sm);
}
.shape-btn:hover { border-color: var(--red); background: var(--red-tint); }
.shape-btn svg { display: block; width: 100%; height: 100%; }
.shape-btn path { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linejoin: round; }
.style-row { gap: 14px; }
.style-row label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-body);
  font-variant: small-caps;
  font-size: 0.92rem;
  color: var(--ink-soft);
  white-space: nowrap;
}
.style-row label.grow { flex: 1; min-width: 0; }
.style-row input[type="range"] { flex: 1 1 40px; width: 100%; min-width: 0; accent-color: var(--red); }
.style-row input[type="color"] {
  width: 34px; height: 28px;
  padding: 1px;
  border: 1.5px solid var(--line);
  background: #fff;
  cursor: pointer;
}

/* size dropdown + rows */
.size-select {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--line-strong);
  font-family: var(--font-body);
  font-size: 1rem;
  background: #fff;
}
.size-select:focus { outline: 2px solid var(--red); }
.size-rows { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.size-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  background: var(--bg);
  border: 1px solid var(--line);
}
.size-row .sr-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.86rem;
  letter-spacing: 0.05em;
}
.size-row .sr-label small {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-style: italic;
  font-size: 0.82rem;
  color: var(--ink-soft);
  letter-spacing: 0;
}
.size-row .qty-row { gap: 6px; }
.size-row .qty-row button { width: 30px; height: 30px; font-size: 1rem; }
.size-row .qty-row input {
  width: 58px; height: 30px;
  text-align: center;
  font-family: var(--font-ui);
  font-weight: 600;
  border: 1.5px solid var(--line);
  background: #fff;
}
.size-row .sr-del {
  border: none;
  background: none;
  color: var(--ink-soft);
  font-size: 1.05rem;
  cursor: pointer;
  padding: 2px 6px;
}
.size-row .sr-del:hover { color: var(--red); }

.art-layer.grouped .art-box { cursor: move; }
.art-layer.grouped .art-box::after {
  opacity: 1;
  border-color: rgba(180, 140, 47, 0.75);
}

.emb-btn[aria-pressed="true"] {
  background: var(--red);
  color: #fff;
  box-shadow: inset 0 0 0 1.5px rgba(215, 186, 106, 0.6);
}

/* front / back side toggle (shirt-like products) */
.side-toggle {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 7;
  display: flex;
  clip-path: var(--cut-sm);
  background: var(--ink-deep);
  box-shadow: inset 0 0 0 1px var(--gold-line);
}
.side-toggle button {
  appearance: none;
  border: none;
  background: transparent;
  color: #f3f2ee;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 13px 6px;
  cursor: pointer;
  opacity: 0.65;
}
.side-toggle button:hover { opacity: 1; }
.side-toggle button.on { background: var(--red-bright); color: #fff; opacity: 1; }

/* front + back preview stacks (quote & admin) */
.thumb-stack { display: flex; flex-direction: column; gap: 8px; }
.side-thumb { position: relative; }
.side-thumb .side-tag {
  position: absolute;
  left: 0;
  bottom: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.56rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(10, 11, 10, 0.82);
  color: #f3f2ee;
  padding: 3px 7px 2px;
  pointer-events: none;
}

/* vector art download chip (admin art files) */
.admin-arts .art-cell { position: relative; display: inline-block; }
.svg-dl {
  position: absolute;
  right: -5px;
  bottom: -5px;
  border: none;
  cursor: pointer;
  background: var(--ink-deep);
  color: var(--gold-soft);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.56rem;
  letter-spacing: 0.06em;
  padding: 2px 5px;
  box-shadow: inset 0 0 0 1px var(--gold-line);
}
.svg-dl:hover { background: var(--red); color: #fff; }

/* sizes */
.size-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(62px, 1fr));
  gap: 8px;
}
.size-cell { display: flex; flex-direction: column; gap: 4px; }
.size-cell span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  text-align: center;
}
.size-cell input {
  width: 100%;
  height: 34px;
  text-align: center;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 600;
  border: 1.5px solid var(--line);
  background: #fff;
}
.size-cell input:focus { outline: 2px solid var(--red); border-color: var(--red); }
.qty-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 3px double var(--line);
  font-family: var(--font-body);
  font-variant: small-caps;
  font-size: 1rem;
  color: var(--ink-soft);
}
.qty-total input {
  width: 76px; height: 36px;
  text-align: center;
  font-family: var(--font-ui);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--red-dark);
  border: none;
  background: var(--bg-deep);
  clip-path: var(--cut-sm);
}
.panel .note { font-size: 0.88rem; font-style: italic; color: var(--ink-soft); margin: 6px 0 0; }
.panel .btn-primary { width: 100%; }

/* product info — spec sheet + measurements */
.product-info { padding-top: 30px; }
.info-card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-top: none;
  box-shadow: inset 0 0 0 1px #fff, inset 0 0 0 2px var(--gold-line), var(--shadow-soft);
  padding: 30px 32px 32px;
}
.info-card::before {
  content: "";
  position: absolute;
  top: 0; left: -1px; right: -1px;
  height: 6px;
  background: linear-gradient(90deg, var(--red) 0 72%, var(--gold) 72% 75%, var(--ink-deep) 75% 100%);
}
.info-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 28px;
  padding-bottom: 18px;
  border-bottom: 3px double var(--gold-line);
  margin-bottom: 24px;
}
.info-title { margin: 0 0 4px; font-size: 1.34rem; letter-spacing: 0.03em; }
.info-brand {
  font-family: var(--font-body);
  font-variant: small-caps;
  font-size: 0.98rem;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin: 0;
}
.info-facts { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.info-facts .fact {
  min-width: 96px;
  padding: 9px 18px 8px;
  background: var(--bg);
  clip-path: var(--cut-sm);
  box-shadow: inset 0 0 0 1.5px var(--gold-line);
  text-align: center;
}
.info-facts dt {
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.info-facts dd {
  margin: 3px 0 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.04rem;
  letter-spacing: 0.04em;
  color: var(--red-dark);
}
.info-cols { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 34px; }
.info-h {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 12px;
}
.info-h::after { content: ""; flex: 1; border-top: 1px solid var(--gold-line); }
.info-h .m-note {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  text-transform: none;
  color: var(--gold);
}
.info-desc { margin: 0; font-size: 1.08rem; }
.info-specs { list-style: none; margin: 0; padding: 0; font-size: 0.98rem; color: var(--ink-soft); }
.info-specs li { position: relative; padding: 5px 0 5px 22px; border-top: 1px solid var(--line); }
.info-specs li:first-child { border-top: none; }
.info-specs li::before {
  content: "";
  position: absolute;
  left: 4px; top: 13px;
  width: 7px; height: 7px;
  transform: rotate(45deg);
  background: var(--red);
}
.info-measure { margin-top: 28px; }
.measure-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 8px;
}
.m-cell {
  background: var(--bg);
  border: 1px solid var(--line);
  border-top: 2px solid var(--red);
  text-align: center;
  padding: 10px 6px 9px;
}
.m-cell .m-size {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  color: var(--ink-deep);
}
.m-cell .m-val {
  display: block;
  margin-top: 2px;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

/* ---------- Gallery book (turnable pages) ---------- */
.gallery-wrap { max-width: 1180px; margin: 0 auto; padding: 14px 20px 70px; }
.book-stage { max-width: 1120px; margin: 0 auto; }
.book-stage .page {
  background: var(--bg);
  border: 1px solid var(--line-strong);
  box-shadow: inset 0 0 0 1px #fff, inset 0 0 0 2px var(--gold-line);
  overflow: hidden;
}
/* NOTE: PageFlip overwrites `display` inline on .page elements, so interior
   layout must live on absolutely-positioned children — never on the page itself */
.page-grid .cells {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  bottom: 44px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(5, 1fr);
  column-gap: 10px;
  row-gap: 16px;
  min-height: 0;
}
.cell {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  padding: 4px;
  cursor: zoom-in;
  min-width: 0;
  min-height: 0;
}
.cell img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cell:hover { outline: 2px solid var(--red); outline-offset: -2px; }
.page-grid .pg-num {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 13px;
  text-align: center;
  font-family: "Graduate", var(--font-display);
  font-size: 0.66rem;
  color: var(--ink-soft);
  letter-spacing: 0.14em;
}
.book-stage .page.cover {
  /* leather binding — gold tooling frame, embroidered patch stitched on top */
  background: #431e14 url("../assets/leather-cover.jpg?v=32") center / cover;
  border: none;
  box-shadow:
    inset 0 0 0 3px var(--gold-line),
    inset 0 0 0 14px rgba(180, 140, 47, 0.18),
    inset 0 0 60px rgba(20, 8, 4, 0.55);
}
.cover-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px;
}
.cover-inner .crest { width: 62%; max-width: 260px; filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.55)); }
.cover-inner .crest.small { width: 84%; max-width: none; opacity: 0.95; }
.cover-inner .wordmark {
  margin-top: 18px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.32em;
  color: var(--gold-soft);
}
.gal-hint {
  text-align: center;
  font-style: italic;
  color: var(--ink-soft);
  font-size: 0.94rem;
  margin: 18px 0 10px;
}
.page-controls { display: flex; align-items: center; justify-content: center; gap: 16px; }
.pg-ind {
  font-family: "Graduate", var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  min-width: 64px;
  text-align: center;
}

/* phones get a plain scrollable grid instead of the book
   (query must stay in sync with the matchMedia in gallery.html) */
.mobile-gallery {
  display: none;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 8px;
}
.mobile-gallery .cell { aspect-ratio: 1 / 1; }
@media (max-width: 767px), (orientation: landscape) and (max-height: 500px) {
  .book-stage, .gal-hint, .page-controls { display: none; }
  .mobile-gallery { display: grid; }
  .gallery-wrap { padding-top: 4px; }
}

/* ---------- Blog ---------- */
.blog-list {
  max-width: 860px;
  margin: 0 auto;
  padding: 26px 20px 80px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}
.post {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-top: none;
  box-shadow: inset 0 0 0 1px #fff, inset 0 0 0 2px var(--gold-line), var(--shadow-soft);
  padding: 36px 42px 40px;
}
.post::before {
  content: "";
  position: absolute;
  top: 0; left: -1px; right: -1px;
  height: 6px;
  background: linear-gradient(90deg, var(--red) 0 72%, var(--gold) 72% 75%, var(--ink-deep) 75% 100%);
}
.post h2 { margin: 0 0 6px; font-size: 1.5rem; letter-spacing: 0.02em; text-wrap: balance; }
.post .meta {
  font-family: var(--font-body);
  font-variant: small-caps;
  font-size: 0.98rem;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  border-bottom: 3px double var(--gold-line);
  padding-bottom: 14px;
  margin: 0 0 20px;
}
.post p { font-size: 1.07rem; margin: 0 0 15px; }
.post p:last-child { margin-bottom: 0; }
.post p strong { color: var(--red-dark); font-weight: 600; }

/* ---------- Upload background question ---------- */
.bg-ask {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: none;
  place-items: center;
  background: rgba(5, 5, 5, 0.72);
  padding: 16px;
}
.bg-ask.on { display: grid; }
.bg-ask-card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-top: 6px solid var(--red);
  box-shadow: inset 0 0 0 1px #fff, inset 0 0 0 2px var(--gold-line), var(--shadow);
  padding: 22px 24px 20px;
  max-width: 480px;
  width: 100%;
  text-align: center;
}
.bg-ask-card h3 { margin: 0 0 16px; font-size: 1.08rem; letter-spacing: 0.04em; }
.bg-ask-opts { display: flex; gap: 14px; justify-content: center; margin-bottom: 16px; }
.bg-opt {
  appearance: none;
  border: 1.5px solid var(--line);
  background: var(--bg);
  padding: 8px;
  cursor: pointer;
  flex: 1;
  max-width: 200px;
}
.bg-opt:hover { border-color: var(--red); background: var(--red-tint); }
.bg-opt-frame {
  display: block;
  aspect-ratio: 1 / 1;
  background: #fff;
  border: 1px solid var(--line);
  margin-bottom: 8px;
  overflow: hidden;
}
.bg-opt-frame.checker {
  background:
    linear-gradient(45deg, #eee 25%, transparent 25%, transparent 75%, #eee 75%),
    linear-gradient(45deg, #eee 25%, #fff 25%, #fff 75%, #eee 75%);
  background-size: 14px 14px;
  background-position: 0 0, 7px 7px;
}
.bg-opt-frame img { width: 100%; height: 100%; object-fit: contain; display: block; }
.bg-opt-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%; bottom: 26px;
  transform: translate(-50%, 20px);
  background: var(--ink-deep);
  color: #f3f2ee;
  padding: 13px 22px;
  clip-path: var(--cut-sm);
  box-shadow: inset 0 0 0 1px var(--gold-line);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 100;
  font-size: 1rem;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast a { color: var(--gold-soft); font-weight: 600; }
.toast.show a { pointer-events: auto; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  place-items: center;
  background: rgba(5, 5, 5, 0.93);
  cursor: zoom-out;
}
.lightbox.on { display: grid; }
/* checkerboard belongs ONLY to the single-image view (direct child img);
   inside .lb-composite the layered art PNGs must stay transparent or their
   bounding boxes would paint over the garment */
.lightbox .lb-body > img {
  max-width: 92vw;
  max-height: 92vh;
  display: block;
  background:
    linear-gradient(45deg, #2a2a2a 25%, transparent 25%, transparent 75%, #2a2a2a 75%),
    linear-gradient(45deg, #2a2a2a 25%, #1f1f1f 25%, #1f1f1f 75%, #2a2a2a 75%);
  background-size: 24px 24px;
  background-position: 0 0, 12px 12px;
}
.lightbox .lb-composite { width: min(92vw, 86vh); }
.lightbox .lb-composite .layered-thumb { border: 1px solid var(--gold-line); }
.lightbox .lb-close {
  position: absolute;
  top: 14px; right: 18px;
  width: 44px; height: 44px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  z-index: 2;
}
.lightbox .lb-close:hover { color: var(--gold-soft); }

/* ---------- Layered thumbs ---------- */
.layered-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
}
.layered-thumb.zoomable { cursor: zoom-in; }
.layered-thumb .lt-base { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.layered-thumb .lt-art { position: absolute; }

/* ---------- Quote page ---------- */
.quote-layout {
  max-width: 1080px;
  margin: 0 auto;
  padding: 22px 20px 72px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: start;
}
.quote-items { display: flex; flex-direction: column; gap: 14px; }
.quote-item {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 16px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  box-shadow: inset 0 0 0 1px #fff, inset 0 0 0 2px var(--gold-line), var(--shadow-soft);
  padding: 14px;
  align-items: center;
}
.quote-item .layered-thumb { width: 110px; }
.quote-item h3 { margin: 0 0 4px; font-size: 1.02rem; letter-spacing: 0.05em; }
.quote-item .meta { color: var(--ink-soft); font-size: 0.94rem; }
.quote-item .meta.sizes { margin-top: 4px; }
.remove-btn {
  align-self: start;
  background: none;
  border: none;
  color: var(--red-dark);
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 8px;
}
.remove-btn:hover { background: var(--red-tint); }

.quote-form-card {
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-top: 6px solid var(--red);
  box-shadow: inset 0 0 0 1px #fff, inset 0 0 0 2px var(--gold-line), var(--shadow-soft);
  padding: 24px;
  position: sticky;
  top: 100px;
}
.quote-form-card .stamp { position: absolute; top: 16px; right: 14px; font-size: 0.62rem; }
.quote-form-card h2 { margin: 0 0 6px; font-size: 1.22rem; letter-spacing: 0.05em; }
.quote-form-card .sub { font-size: 0.98rem; font-style: italic; color: var(--ink-soft); margin: 0 0 16px; }
.field { margin-bottom: 13px; }
.field label {
  display: block;
  font-family: var(--font-body);
  font-variant: small-caps;
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.1em;
  margin-bottom: 5px;
}
.field input, .field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  font-family: var(--font-body);
  font-size: 1rem;
  background: #fff;
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--red); outline-offset: 0; border-color: var(--red); }
.form-error { color: var(--red-dark); font-size: 0.92rem; margin: 4px 0 10px; display: none; }
.form-error.on { display: block; }

/* honeypot — visually gone, still in the DOM for bots to fill */
.hp-field {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* owner dashboard section tabs */
.owner-tabs { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  background: var(--paper);
  border: 1px dashed var(--line-strong);
  padding: 60px 24px;
  color: var(--ink-soft);
}
.empty-state h2 { color: var(--ink); margin: 0 0 8px; }

.success-card {
  position: relative;
  max-width: 640px;
  margin: 44px auto 84px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-top: 6px solid var(--red);
  box-shadow: inset 0 0 0 1px #fff, inset 0 0 0 2px var(--gold-line), var(--shadow);
  padding: 46px 38px;
  text-align: center;
}
.success-card .stamp { position: absolute; top: 28px; right: 24px; transform: rotate(8deg); font-size: 0.92rem; }
.success-card .big img { width: 84px; height: auto; }
.success-card h2 { margin: 14px 0 8px; letter-spacing: 0.04em; }
.success-card .ref { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; color: var(--red-dark); letter-spacing: 0.06em; }
.success-card p { color: var(--ink-soft); }
.success-card .actions { display: flex; gap: 12px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }

/* ---------- Admin ---------- */
.admin-quote {
  max-width: 1080px;
  margin: 0 auto 22px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  box-shadow: inset 0 0 0 1px #fff, inset 0 0 0 2px var(--gold-line), var(--shadow-soft);
  overflow: hidden;
}
.admin-quote header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  align-items: baseline;
  padding: 16px 20px;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}
.admin-quote header .ref { font-family: var(--font-display); font-weight: 700; color: var(--red-dark); font-size: 1.02rem; letter-spacing: 0.04em; }
.admin-quote header .who { font-weight: 600; }
.admin-quote header .muted { color: var(--ink-soft); }
.admin-quote header .del { margin-left: auto; }
.admin-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; padding: 16px 20px; }
.admin-item { border: 1px solid var(--line); padding: 10px; background: #fff; }
.admin-item .t { font-weight: 700; font-size: 0.93rem; margin: 8px 0 2px; }
.admin-item .d { font-size: 0.88rem; color: var(--ink-soft); }
.admin-item .arts-label { margin-top: 6px; font-style: italic; }
.admin-arts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.admin-arts img {
  width: 44px; height: 44px;
  object-fit: contain;
  border: 1px solid var(--line);
  background:
    linear-gradient(45deg, #eee 25%, transparent 25%, transparent 75%, #eee 75%),
    linear-gradient(45deg, #eee 25%, #fff 25%, #fff 75%, #eee 75%);
  background-size: 10px 10px;
  background-position: 0 0, 5px 5px;
  cursor: zoom-in;
}
.admin-notes { padding: 0 20px 18px; font-size: 0.95rem; color: var(--ink-soft); }
.admin-notes strong { color: var(--ink); }

/* ---------- Responsive: narrow / portrait ---------- */
@media (max-width: 980px) {
  .hero::before {
    top: auto;
    bottom: -46%;
    right: -30%;
    width: 130%;
    height: 78%;
    transform: rotate(-7deg);
  }
  .hero-inner { grid-template-columns: 1fr; gap: 30px; padding-top: 54px; padding-bottom: 64px; }
  .hero-art { order: 2; }
  .hero-art img { max-width: 250px; }
  .customizer { grid-template-columns: 1fr; }
  .stage-wrap { position: static; }
  .schedule-card { padding: 18px 16px 12px; }
  .step { padding-left: 62px; }
  .step::before { left: 8px; width: 26px; height: 26px; }
  .step::after { left: 0; width: 42px; height: 30px; font-size: 0.78rem; }
  .ribbon-h { font-size: 1.5rem; padding: 10px 20px 8px; }
  .info-cols { grid-template-columns: 1fr; gap: 24px; }
  .info-head { align-items: flex-start; flex-direction: column; }
  .info-card { padding: 24px 20px 26px; }
  .quote-layout { grid-template-columns: 1fr; }
  .quote-form-card { position: static; }
  .cta-band::before { opacity: 0.07; }
  .corner-sprig { width: 92px; height: 92px; opacity: 0.45; }
  .rev-wrap { grid-template-columns: 1fr; }
  .rev-summary { max-width: 420px; margin: 0 auto; width: 100%; }
  .rev-cta { flex-direction: row; justify-content: center; flex-wrap: wrap; }
  .visit-grid { grid-template-columns: 1fr; }
  .visit-map iframe { min-height: 330px; }
}
/* ---------- Responsive: phablets / small tablets ---------- */
@media (max-width: 900px) {
  .site-header .bar { padding: 6px 14px; gap: 10px; }
  .brand .txt { display: none; }          /* crest alone carries the brand; 6 nav items need the room */
  .site-nav a { padding: 9px 8px 7px; font-size: 0.72rem; letter-spacing: 0.1em; }
}
@media (max-width: 767px) {
  .info-card { padding: 24px 20px 26px; }
  .thumb-stack { gap: 6px; }
}

@media (max-width: 560px) {
  body { font-size: 16.5px; }
  .site-header .bar { padding: 6px 10px; gap: 8px; }
  .site-nav { gap: 0; }
  .site-nav a { padding: 8px 5px 6px; font-size: 0.64rem; letter-spacing: 0.06em; }
  .site-nav a[data-i18n="nav.home"] { display: none; }   /* crest links home; keeps 6 items from overflowing */
  .site-nav a[data-i18n="nav.blog"] { display: none; }   /* Spanish labels (PERSONALIZAR, MI COTIZACIÓN) can't fit 5 items on a phone; blog stays reachable via footer quick links */
  .post { padding: 24px 20px 28px; }
  .page-grid .cells { top: 10px; left: 10px; right: 10px; bottom: 34px; column-gap: 6px; row-gap: 10px; }
  .page-grid .pg-num { bottom: 9px; }
  .brand span.txt { display: none; }
  .brand .brand-crest { height: 38px; }
  .site-header .open-badge { display: none; }            /* bar is full on phones — the hero patch takes over */
  .open-badge-hero:not([hidden]) { display: inline-flex; }
  .lang-toggle { margin-left: 2px; }
  .lang-toggle button { padding: 5px 7px 4px; font-size: 0.64rem; }
  .quote-badge { margin-left: 4px; }
  :lang(es) .site-nav a { font-size: 0.6rem; letter-spacing: 0.04em; padding: 8px 4px 6px; }
  .stat-strip .row > span + span::before { margin: 0 12px; }
  .quote-item { grid-template-columns: 84px 1fr; }
  .quote-item .layered-thumb { width: 84px; }
  .quote-item .remove-btn { grid-column: 2; justify-self: start; }
  .swatches-scroll { max-height: 164px; }
}

/* ---------- Responsive: landscape phones / short viewports ---------- */
@media (orientation: landscape) and (max-height: 540px) {
  .site-header .bar { padding: 4px 14px; }
  .brand .brand-crest { height: 32px; }
  .brand small { display: none; }
  .hero-inner { padding: 30px 20px 38px; gap: 24px; grid-template-columns: 1.2fr 0.8fr; }
  .hero-art img { max-width: min(30vw, 220px); }
  .hero h1 { font-size: clamp(1.5rem, 4vw, 2.2rem); margin-bottom: 12px; }
  .hero p.lead { font-size: 1rem; margin-bottom: 18px; }
  .crest-ribbon { font-size: 0.64rem; padding: 7px 18px 5px; letter-spacing: 0.2em; }
  .section { padding: 34px 20px; }
  .page-head { padding-top: 26px; }
  .ribbon-h { font-size: 1.34rem; padding: 9px 18px 7px; margin-bottom: 18px; }
  .schedule-card { padding: 16px 18px 12px; }
  .step { padding: 13px 4px 11px 66px; }
  .stage { width: min(100%, calc(100vh - 150px)); }
  .stage-wrap { position: static; }
  .customizer { grid-template-columns: 1fr 300px; }
  .cta-band .section { padding-top: 26px; padding-bottom: 26px; }
  .post { padding: 24px 26px 28px; }
  .blog-list { padding-bottom: 50px; }
  .corner-sprig { width: 72px; height: 72px; opacity: 0.4; }
}
