/* ==========================================================================
   Pretty Hurts Tattoo
   Plain CSS, no build step. Sections map 1:1 to WordPress template parts.
   ========================================================================== */

@font-face {
  font-family: "Perandory";
  src: url("../fonts/Perandory-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #e7e4dd;
  --bg-deep: #dcd8cf;
  --paper: #fbfaf7;
  --ink: #111111;
  --ink-2: #3b3835;
  --ink-3: #6b665f;
  --card: #0e0e0e;
  --on-card: #ece8e1;
  --on-card-2: #b9b3aa;
  --pink: #f2aae8;
  --mist: #7d979b;
  --line: rgba(17, 17, 17, 0.14);

  --font-display: "Perandory", "Didot", "Bodoni 72", "Times New Roman", serif;
  --font-body: "Averia Serif Libre", Georgia, "Times New Roman", serif;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 22px;
  --header-h: 72px;
  --shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.55);

  color-scheme: light;
}

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

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

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: clip;
}

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

[hidden] { display: none !important; }

a { color: inherit; }

p { margin: 0 0 1em; }

h1, h2, h3 { margin: 0; font-weight: 400; }

::selection { background: var(--pink); color: var(--ink); }

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

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

.skip-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 8px;
  transform: translateY(-160%);
  transition: transform 200ms var(--ease-out);
}
.skip-link:focus { transform: none; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Type ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin: 0 0 1rem;
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.eyebrow::before {
  content: "";
  width: 0.85em; height: 0.85em;
  background: currentColor;
  clip-path: var(--spark);
}

:root {
  --spark: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
}

.h2 {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 7vw, 5rem);
  line-height: 0.92;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-wrap: balance;
}

.lede {
  max-width: 34rem;
  font-size: 1.125rem;
  color: var(--ink-2);
}

.section { padding-block: clamp(72px, 11vw, 140px); }

.section-head { margin-bottom: clamp(36px, 5vw, 56px); }
.section-head--center { text-align: center; }
.section-head--center .lede { margin-inline: auto; }

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

.btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--bg);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-height: 52px;
  padding: 0.7em 1.7em 0.6em;
  border: 0;
  border-radius: 8px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 12px 26px -14px rgba(0, 0, 0, 0.7);
  transition:
    transform 160ms var(--ease-out),
    box-shadow 300ms ease,
    background-color 200ms ease,
    color 200ms ease;
  user-select: none;
}
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.22) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 700ms var(--ease-out);
  pointer-events: none;
}
.btn:active { transform: scale(0.97); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--ink);
}
.btn--pink { --btn-bg: var(--pink); --btn-fg: var(--ink); }
.btn--light { --btn-bg: var(--on-card); --btn-fg: var(--ink); }
.btn--outline-light {
  --btn-bg: transparent;
  --btn-fg: var(--on-card);
  box-shadow: inset 0 0 0 1.5px rgba(236, 232, 225, 0.5);
}
.btn--sm { min-height: 42px; padding: 0.55em 1.15em 0.45em; font-size: 1.1rem; }

.btn svg { width: 1em; height: 1em; flex: none; }

@media (max-width: 420px) {
  .btn { padding-inline: 1.15em; font-size: 1.25rem; }
  .btn-row { gap: 10px; }
}

@media (hover: hover) and (pointer: fine) {
  .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 32px -14px rgba(0, 0, 0, 0.7);
  }
  .btn:hover::after { transform: translateX(120%); }
  .btn:active { transform: translateY(0) scale(0.97); }
  .btn--ghost:hover { --btn-bg: var(--ink); --btn-fg: var(--bg); }
  .btn--outline-light:hover { --btn-bg: var(--on-card); --btn-fg: var(--ink); }
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.btn-row--center { justify-content: center; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}
.back-link span { transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .back-link:hover span { transform: translateX(-4px); }
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  view-transition-name: site-header;
  transition: background-color 300ms ease, box-shadow 300ms ease;
}
.site-header.is-scrolled {
  background: rgba(231, 228, 221, 0.88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 100%;
}

.brand {
  position: relative;
  z-index: 0;
  display: block;
  width: 92px;
  margin-right: auto;
  transition: opacity 400ms var(--ease-out), transform 400ms var(--ease-out);
}
.site-header[data-brand-reveal]:not(.show-brand) .brand {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav__link {
  position: relative;
  display: block;
  padding: 10px 14px;
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 6px;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 300ms var(--ease-out);
}
.nav__link[aria-current="page"]::after { transform: scaleX(1); }
@media (hover: hover) and (pointer: fine) {
  .nav__link:hover::after { transform: scaleX(1); transform-origin: left; }
}

.menu-toggle {
  position: relative;
  z-index: 2;
  display: none;
  width: 46px; height: 46px;
  margin-right: -8px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
}
.menu-toggle span {
  position: absolute;
  left: 11px; right: 11px;
  height: 1.5px;
  background: currentColor;
  transition: transform 300ms var(--ease-out), color 300ms ease;
}
.menu-toggle span:first-child { top: 19px; }
.menu-toggle span:last-child { top: 26px; }
.menu-open .menu-toggle { color: var(--bg); }
.menu-open .menu-toggle span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-open .menu-toggle span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

@media (max-width: 859px) {
  .menu-toggle { display: block; }

  .nav {
    position: fixed;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ink);
    color: var(--bg);
    visibility: hidden;
    clip-path: circle(0 at calc(100% - 38px) 36px);
    transition:
      clip-path 320ms var(--ease-in-out),
      visibility 0s linear 320ms;
  }
  .menu-open .nav {
    visibility: visible;
    clip-path: circle(150% at calc(100% - 38px) 36px);
    transition:
      clip-path 560ms var(--ease-drawer),
      visibility 0s;
  }
  .nav__list { flex-direction: column; gap: 6px; }
  .nav__link {
    font-size: clamp(2.6rem, 12vw, 3.6rem);
    padding: 6px 12px;
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 300ms ease, transform 300ms var(--ease-out);
  }
  .nav__link::after { left: 12px; right: 12px; bottom: 4px; }
  .menu-open .nav__link {
    opacity: 1;
    transform: none;
    transition:
      opacity 500ms var(--ease-out) calc(120ms + var(--i, 0) * 60ms),
      transform 500ms var(--ease-out) calc(120ms + var(--i, 0) * 60ms);
  }
}

html.menu-open { overflow: hidden; }

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

.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--header-h) + 24px) var(--gutter) 96px;
  overflow: hidden;
}

.hero__stage {
  position: absolute;
  top: 4%;
  left: 50%;
  width: max(100%, 980px);
  aspect-ratio: 2 / 1;
  transform: translateX(-50%);
  pointer-events: none;
}

/* On phones, widen the painting so peaks show either side of the title instead of just mist */
@media (max-width: 640px) {
  .page-hero .hero__stage { width: 200vw; top: 6%; }
}

/* Floating sparkles (home hero, and behind the studio cards) */
.hero__stars,
.studio__stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.star {
  --size: calc(var(--s) * var(--k, 1));
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  height: var(--size);
  margin: calc(var(--size) / -2) 0 0 calc(var(--size) / -2);
  will-change: transform;
}
.star i {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--c, var(--ink));
  -webkit-mask: url("../img/icon-stars.png") center / contain no-repeat;
  mask: url("../img/icon-stars.png") center / contain no-repeat;
  opacity: var(--o, 1);
  filter: blur(var(--b, 0px));
  transform: rotate(var(--r, 0deg));
}
@media (max-width: 640px) {
  .star { --k: 0.62; }
}

/* Two halves of one painting, positioned as they sat in the original 2560px canvas */
.mtn {
  position: absolute;
  top: 9.4%;
  will-change: transform;
}
.mtn--left { left: 2.3%; width: 40.4%; }
.mtn--right { left: 42.8%; width: 54.9%; }
/* The crops' edges are exactly --bg, so they sit on the page without a seam */
.mtn img { width: 100%; }

/* Mist over the mountain bases; every edge resolves to transparent or --bg so nothing shows a line */
.hero__fog {
  position: absolute;
  inset: auto -10% 0 -10%;
  height: 50%;
  background:
    radial-gradient(55% 50% at 30% 45%, rgba(244, 242, 238, 0.75), transparent 70%),
    radial-gradient(45% 45% at 75% 50%, rgba(244, 242, 238, 0.6), transparent 70%),
    linear-gradient(to bottom, rgba(231, 228, 221, 0), var(--bg) 92%);
  pointer-events: none;
}

.hero::after,
.page-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 30%;
  background: linear-gradient(to bottom, rgba(231, 228, 221, 0), var(--bg));
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  will-change: transform, opacity;
}

.hero__title { width: min(80vw, 560px); }

.hero__tagline {
  margin: clamp(18px, 3vw, 28px) 0 clamp(24px, 3.5vw, 34px);
  font-size: clamp(0.95rem, 2.2vw, 1.15rem);
  letter-spacing: 0.04em;
  color: var(--ink-2);
}

.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transform: translateX(-50%);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-3);
}
.scroll-cue::after {
  content: "";
  width: 1px;
  height: 44px;
  background: linear-gradient(var(--ink-3) 0 0) no-repeat top / 100% 40%, rgba(17, 17, 17, 0.14);
}

/* ---------- Inked artwork (logo + page titles): text layer + sparkle layer ---------- */

.inked {
  position: relative;
  display: block;
}
.inked__text { width: 100%; }
.inked__stars {
  position: absolute;
  inset: 0;
  width: 100%;
  transform-origin: var(--stars-origin, 89% 64%);
}
.inked--book { --stars-origin: 91% 84%; }
.inked--flash { --stars-origin: 66% 32%; }

.glint {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s, 18px);
  height: var(--s, 18px);
  margin: calc(var(--s, 18px) / -2) 0 0 calc(var(--s, 18px) / -2);
  background: var(--pink);
  clip-path: var(--spark);
  opacity: 0;
  pointer-events: none;
}

/* ---------- Marquee ---------- */

.marquee {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--on-card);
  padding-block: 18px 14px;
}
.marquee::before,
.marquee::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 1;
  width: 8%;
  background: linear-gradient(to right, var(--ink), transparent);
  pointer-events: none;
}
.marquee::after { inset: 0 0 0 auto; transform: scaleX(-1); }
.marquee__track {
  display: flex;
  width: max-content;
}
.marquee__group {
  display: flex;
  align-items: center;
  flex: none;
}
.marquee__item {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.6vw, 2.4rem);
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.marquee__spark {
  width: 0.9rem; height: 0.9rem;
  margin-inline: clamp(18px, 3vw, 34px);
  background: var(--pink);
  clip-path: var(--spark);
}

/* ---------- Studio cards ---------- */

.studio { position: relative; overflow: hidden; }
.studio > .wrap { position: relative; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: clamp(18px, 2.4vw, 30px);
}

.card {
  --mx: 50%;
  --my: 0%;
  position: relative;
  overflow: hidden;
  padding: clamp(30px, 4vw, 44px) clamp(24px, 3vw, 36px) clamp(34px, 4vw, 46px);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: rgba(251, 250, 247, 0.42);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
  color: var(--ink);
  text-align: center;
  box-shadow: 0 24px 44px -30px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transition: transform 500ms var(--ease-out), box-shadow 500ms var(--ease-out);
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(320px circle at var(--mx) var(--my), rgba(242, 170, 232, 0.16), transparent 60%);
  opacity: 0;
  transition: opacity 400ms ease;
  pointer-events: none;
}
.card > * { position: relative; }

.card__icon {
  display: block;
  width: 46px; height: 46px;
  margin: 0 auto 22px;
  background: var(--ink);
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
  transition: transform 450ms var(--ease-back), background-color 300ms ease;
}
.card__icon--needle { --icon: url("../img/icon-needle.png"); }
.card__icon--heart { --icon: url("../img/icon-heart.png"); }
.card__icon--stars { --icon: url("../img/icon-stars.png"); }

.card__title {
  margin-bottom: 14px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(1.35rem, 2.2vw, 1.6rem);
  line-height: 1.2;
}
.card p { margin: 0; color: var(--ink-2); }

@media (hover: hover) and (pointer: fine) {
  .card:hover { transform: translateY(-6px); box-shadow: 0 34px 50px -28px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.7); }
  .card:hover::before { opacity: 1; }
  .card:hover .card__icon { background: #c768b8; }
  .card:hover .card__icon--needle { transform: rotate(-16deg) translate(-2px, 4px); }
  .card:hover .card__icon--heart { transform: scale(1.14); }
  .card:hover .card__icon--stars { transform: rotate(14deg) scale(1.1); }
}

.badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: clamp(32px, 4vw, 48px) 0 0;
  padding: 0;
  list-style: none;
}
.badges li {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  padding: 8px 16px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.92rem;
  color: var(--ink-2);
}
.badges li::before {
  content: "";
  width: 0.7em; height: 0.7em;
  background: var(--ink);
  clip-path: var(--spark);
}

/* ---------- Barbed wire divider (SVG built by main.js) ---------- */

.wire {
  position: relative;
  height: clamp(110px, 14vw, 170px);
  margin-bottom: clamp(8px, 2vw, 24px);
  color: var(--ink);
}
.wire svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.wire__strand {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.wire__barb {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
  transform: scale(0.5) rotate(-30deg);
}
.wire.is-drawn .wire__strand {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset var(--wire-dur, 1800ms) var(--ease-in-out);
}
.wire.is-drawn .wire__barb {
  opacity: 1;
  transform: none;
  transition:
    opacity 200ms ease var(--d),
    transform 500ms var(--ease-back) var(--d);
}
.wire.is-instant .wire__strand,
.wire.is-instant .wire__barb { transition: none; }

/* ---------- Work gallery ---------- */

.studio { padding-bottom: clamp(32px, 5vw, 64px); }
.work { padding-top: clamp(16px, 3vw, 40px); }

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(8px, 1.4vw, 16px);
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 640px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .gallery { grid-template-columns: repeat(4, 1fr); } }

.gallery__item.is-extra { display: none; }
.gallery.is-expanded .gallery__item.is-extra { display: block; }

.tile {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: 14px;
  background: var(--bg-deep);
  cursor: zoom-in;
}
.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms var(--ease-out);
}
.tile__caption {
  position: absolute;
  inset: auto 0 0;
  padding: 40px 14px 12px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
  color: #fff;
  font-size: 0.88rem;
  line-height: 1.35;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 300ms ease, transform 400ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .tile:hover img { transform: scale(1.05); }
  .tile:hover .tile__caption,
  .tile:focus-visible .tile__caption { opacity: 1; transform: none; }
}

.work__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: clamp(32px, 4vw, 48px);
}

/* ---------- Flash teaser ---------- */

.flash-teaser__inner {
  display: grid;
  gap: clamp(48px, 6vw, 80px);
  align-items: center;
}
@media (min-width: 900px) {
  .flash-teaser__inner { grid-template-columns: 0.9fr 1.1fr; }
}
.flash-teaser__copy .lede { margin-bottom: 28px; }

.sheets {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(12px, 3vw, 28px);
  padding-inline: 4%;
}

.sheet-wrap:nth-child(1) { --r: -5deg; margin-top: 6%; }
.sheet-wrap:nth-child(2) { --r: 4deg; }

.sheet {
  display: block;
  padding: 10px 10px 0;
  background: var(--paper);
  border-radius: 6px;
  box-shadow: 0 24px 40px -24px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.06);
  text-decoration: none;
  transform: rotate(var(--r));
  transition: transform 600ms var(--ease-out), box-shadow 600ms var(--ease-out);
}
.sheet img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: top;
  border-radius: 2px;
}
.sheet__label {
  display: block;
  padding: 12px 4px 10px;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  line-height: 1;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}
@media (hover: hover) and (pointer: fine) {
  .sheet:hover {
    transform: rotate(0deg) translateY(-8px) scale(1.02);
    box-shadow: 0 34px 50px -24px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.06);
  }
}

/* ---------- Contact panel ---------- */

.contact__panel {
  position: relative;
  overflow: hidden;
  padding: clamp(56px, 8vw, 110px) clamp(24px, 5vw, 72px);
  border-radius: calc(var(--radius) + 8px);
  background: var(--card);
  color: var(--on-card);
  text-align: center;
}
.contact__panel .eyebrow { color: var(--on-card-2); }
.contact__title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8.5vw, 6.5rem);
  line-height: 0.88;
  text-transform: uppercase;
  text-wrap: balance;
}
.contact__panel .lede {
  margin: 22px auto 34px;
  color: var(--on-card-2);
}
.contact__deco {
  position: absolute;
  width: clamp(70px, 10vw, 130px);
  aspect-ratio: 1;
  background: var(--on-card);
  -webkit-mask: url("../img/icon-stars.png") center / contain no-repeat;
  mask: url("../img/icon-stars.png") center / contain no-repeat;
  opacity: 0.12;
  pointer-events: none;
}
.contact__deco--a { top: 8%; left: 5%; transform: rotate(-12deg); }
.contact__deco--b { bottom: 6%; right: 6%; transform: rotate(18deg) scale(0.8); }

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

.site-footer {
  padding-block: 48px 40px;
  font-size: 0.9rem;
  color: var(--ink-3);
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
}
.site-footer__brand { width: 84px; }
.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-footer a { text-decoration-color: rgba(17, 17, 17, 0.3); text-underline-offset: 3px; }
.site-footer__links a {
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.site-footer__legal { width: 100%; margin: 8px 0 0; padding-top: 22px; border-top: 1px solid var(--line); }

/* ---------- Floating book button ---------- */

.fab {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px 11px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translateY(calc(100% + 24px));
  pointer-events: none;
  transition: opacity 300ms ease, transform 450ms var(--ease-out);
}
.fab.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.fab__spark {
  width: 12px; height: 12px;
  background: var(--pink);
  clip-path: var(--spark);
}
.fab:active { transform: scale(0.97); }

/* ---------- Inner page hero (Book / Flash) ---------- */

.page-hero {
  position: relative;
  overflow: hidden;
  padding: calc(var(--header-h) + 28px) 0 clamp(36px, 5vw, 64px);
  text-align: center;
}
.page-hero .hero__stage { top: 10%; opacity: 0.75; }
.page-hero__back { text-align: left; margin-bottom: clamp(12px, 3vw, 28px); }
.page-hero__body { position: relative; z-index: 1; }
.page-title { width: min(78vw, 420px); margin: 0 auto; }
.page-hero .lede { margin: clamp(22px, 3vw, 32px) auto 0; }

/* ---------- Booking ---------- */

[data-handoff] { scroll-margin: calc(var(--header-h) + 16px) 0 24px; outline: none; }

/* ---------- Info page ---------- */

.info { max-width: calc(820px + var(--gutter) * 2); padding-bottom: clamp(72px, 10vw, 120px); }
.info__block { padding-block: clamp(28px, 5vw, 56px); border-top: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 16px); }
.info__block .h2 { margin-bottom: 22px; font-size: clamp(2.4rem, 6vw, 3.6rem); }
.info__block p, .info__block li { color: var(--ink-2); }
.info__small { font-size: 0.92rem; }
.info__cta { padding-top: 24px; }

/* ---------- Booking flow ---------- */

.booker {
  display: grid;
  gap: clamp(20px, 3vw, 32px);
  max-width: calc(980px + var(--gutter) * 2);
  padding-bottom: clamp(48px, 7vw, 80px);
}

.booker__step {
  display: grid;
  gap: 18px;
  min-width: 0;
  margin: 0;
  padding: clamp(24px, 4vw, 40px);
  border: 0;
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 18px 40px -30px rgba(0, 0, 0, 0.45);
}
/* The visible step heading is a plain element inside the card. The real <legend> is
   screen-reader only, because iOS Safari draws legends on the fieldset's top edge
   whatever float/display tricks are used. */
.booker__legend {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  line-height: 1;
  text-transform: uppercase;
}
.booker__num { flex: none; font-size: 0.55em; color: var(--ink-3); }

.choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 12px;
}
.choice,
.chip {
  position: relative;
  cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease, box-shadow 200ms ease, transform 160ms var(--ease-out);
}
.choice input,
.chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.choice {
  display: grid;
  gap: 4px;
  padding: 18px 20px;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1.5px var(--line);
}
.choice__title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  line-height: 1;
  text-transform: uppercase;
}
.choice__text { font-size: 0.95rem; color: var(--ink-3); }
.choice:has(input:checked) { background: var(--ink); color: var(--bg); box-shadow: none; }
.choice:has(input:checked) .choice__text { color: var(--on-card-2); }
.choice:active, .chip:active { transform: scale(0.98); }
.choice:has(input:focus-visible),
.chip:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
  .choice:hover, .chip:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
}

.field { display: grid; gap: 8px; }
.field__label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  margin: 0;
  font-weight: 700;
  font-size: 0.95rem;
}
.field__label a { font-weight: 400; }
.field__hint { font-weight: 400; color: var(--ink-3); }
.field input[type="text"],
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1rem; /* 16px+ stops iOS zooming into the field */
  transition: border-color 200ms ease;
}
.field input[type="text"]:focus,
.field textarea:focus { outline: none; border-color: var(--ink); }
.field textarea { resize: vertical; }

.sizer {
  display: grid;
  gap: clamp(20px, 3vw, 36px);
  align-items: start;
}
@media (min-width: 760px) {
  .sizer { grid-template-columns: minmax(240px, 0.8fr) 1.2fr; }
}
.sizer__view {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: var(--bg);
}
.sizer__view-label {
  position: absolute;
  top: 12px;
  left: 14px;
  z-index: 1;
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.sizer__body svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 520px;
  aspect-ratio: 100 / 180;
  margin-inline: auto;
}
.figure { transition: transform 700ms var(--ease-in-out); }
.figure__outline { fill: var(--paper); stroke: var(--ink); stroke-width: 0.6; stroke-linejoin: round; }
.figure__fill { fill: var(--paper); }
.figure__detail { fill: none; stroke: var(--ink-3); stroke-width: 0.25; stroke-linecap: round; opacity: 0.6; }
.figure__detail--back,
.is-back .figure__detail--front { display: none; }
.is-back .figure__detail--back { display: inline; }
.figure__ink { transition: transform 700ms var(--ease-in-out); }
.figure__ink rect {
  fill: rgba(242, 170, 232, 0.18);
  stroke: #c768b8;
  stroke-width: 1.2;
  stroke-dasharray: 4 3;
  vector-effect: non-scaling-stroke;
}
.figure__ink image { opacity: 0.85; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.chip span {
  display: block;
  padding: 7px 14px 6px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 0.92rem;
  transition: background-color 200ms ease, color 200ms ease, box-shadow 200ms ease;
}
.chip:has(input:checked) span { background: var(--ink); color: var(--bg); box-shadow: none; }

.sizer__controls input[type="range"] { width: 100%; accent-color: var(--ink); }
.sizer__size { font-family: var(--font-display); font-size: 1.6rem; font-weight: 400; line-height: 1; }
.sizer__compare { margin: 0; font-size: 1.05rem; }
.sizer__note { margin: 0; font-size: 0.85rem; color: var(--ink-3); }

.estimate {
  padding: 24px 24px 22px;
  border-radius: 16px;
  background: var(--card);
  color: var(--on-card);
}
.estimate__name {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.8rem);
  line-height: 1;
  text-transform: uppercase;
}
.estimate__facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px 24px;
  margin: 0 0 14px;
}
.estimate__facts dt { font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--on-card-2); }
.estimate__facts dd { margin: 2px 0 0; font-size: 1.15rem; }
.estimate__note { margin: 0; font-size: 0.92rem; color: var(--on-card-2); }

.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 3px 0 0; flex: none; accent-color: var(--ink); }
.booker__step > .btn { justify-self: start; }

.contact-first {
  display: grid;
  gap: 16px;
  padding: 22px;
  border-radius: 16px;
  box-shadow: inset 0 0 0 1.5px var(--ink);
}
.contact-first p { margin: 0; }

.checklist {
  display: grid;
  gap: 12px;
  margin: 0 0 1.2em;
  padding: 0;
  list-style: none;
}
.checklist li { display: flex; gap: 12px; }
.checklist li::before {
  content: "";
  flex: none;
  width: 0.8em; height: 0.8em;
  margin-top: 0.42em;
  background: var(--ink);
  clip-path: var(--spark);
}

/* ---------- Flash page ---------- */

.flash-sheets {
  display: grid;
  gap: clamp(28px, 4vw, 48px);
  align-items: start;
}
@media (min-width: 820px) { .flash-sheets { grid-template-columns: 1fr 1fr; } }

.flash-sheet__frame {
  display: block;
  padding: 12px;
  background: var(--paper);
  border-radius: 10px;
  box-shadow: 0 30px 50px -30px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.05);
  cursor: zoom-in;
  transition: transform 600ms var(--ease-out), box-shadow 600ms var(--ease-out);
}
.flash-sheet__frame img { width: 100%; border-radius: 3px; }
@media (hover: hover) and (pointer: fine) {
  .flash-sheet__frame:hover {
    transform: translateY(-6px);
    box-shadow: 0 40px 60px -30px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.05);
  }
}
.flash-sheet__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 4px 0;
}
.flash-sheet__meta h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.6rem);
  line-height: 1;
  text-transform: uppercase;
}
.flash-sheet__meta p { margin: 0; font-size: 0.92rem; color: var(--ink-3); }

.steps {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li {
  counter-increment: step;
  padding: 28px 26px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.steps li::before {
  content: "0" counter(step);
  display: block;
  margin-bottom: 14px;
  font-family: var(--font-display);
  font-size: 2.6rem;
  line-height: 1;
}
.steps h3 { margin-bottom: 8px; font-weight: 700; font-size: 1.2rem; }
.steps p { margin: 0; color: var(--ink-2); }

/* ---------- Lightbox (built by main.js) ---------- */

.lightbox {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--on-card);
  overflow: hidden;
}
.lightbox::backdrop { background: transparent; }
.lightbox__bg {
  position: absolute;
  inset: 0;
  background: rgba(12, 12, 12, 0.94);
  opacity: 0;
  transition: opacity 250ms var(--ease-out);
}
.lightbox__stage {
  position: absolute;
  inset: 64px 16px 92px;
  display: grid;
  place-items: center;
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
}
.lightbox__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: 8px;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 250ms var(--ease-out), transform 250ms var(--ease-out);
  user-select: none;
  -webkit-user-drag: none;
}
.lightbox.is-open .lightbox__bg { opacity: 1; }
.lightbox.is-open .lightbox__img.is-loaded { opacity: 1; transform: none; }
.lightbox__img.is-zoomable { cursor: zoom-in; }
.lightbox.is-open .lightbox__img.is-zoomed {
  cursor: zoom-out;
  transform: scale(2.2);
  transition: transform 400ms var(--ease-out);
}
.lightbox__bar {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 92px;
  padding: 12px 76px 18px;
  text-align: center;
  font-size: 0.95rem;
  opacity: 0;
  transition: opacity 250ms ease;
}
.lightbox.is-open .lightbox__bar { opacity: 1; }
.lightbox__caption { margin: 0; max-width: 40rem; color: var(--on-card); }
.lightbox__caption a { color: var(--pink); white-space: nowrap; }
.lightbox__count {
  position: absolute;
  top: 22px;
  left: 24px;
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  color: var(--on-card-2);
}
.lightbox__btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(236, 232, 225, 0.1);
  color: var(--on-card);
  cursor: pointer;
  opacity: 0;
  transition: opacity 250ms ease, background-color 200ms ease, transform 160ms var(--ease-out);
}
.lightbox.is-open .lightbox__btn { opacity: 1; }
.lightbox__btn:active { transform: scale(0.94); }
.lightbox__btn svg { width: 20px; height: 20px; }
.lightbox__close { top: 12px; right: 12px; }
.lightbox__prev { left: 14px; bottom: 22px; }
.lightbox__next { right: 14px; bottom: 22px; }
.lightbox__btn[hidden] { display: none; }
@media (hover: hover) and (pointer: fine) {
  .lightbox__btn:hover { background: rgba(236, 232, 225, 0.2); }
}
@media (min-width: 900px) {
  .lightbox__stage { inset: 72px 96px 100px; }
  .lightbox__prev,
  .lightbox__next { top: 50%; bottom: auto; margin-top: -24px; }
  .lightbox__prev { left: 24px; }
  .lightbox__next { right: 24px; }
  .lightbox__bar { padding-inline: 24px; }
}
html.lb-open { overflow: hidden; }

/* ==========================================================================
   Motion
   Everything below only runs with JS on (html.js); without it the page is
   simply static and fully visible.
   ========================================================================== */

/* Hero intro: mountains rise out of the mist, the logo is inked left to right,
   then the sparkles pop and keep twinkling. Runs once per page load. */

@keyframes mist-rise {
  from { opacity: 0; transform: translateY(40px) scale(1.04); }
  to { opacity: 1; transform: none; }
}
@keyframes ink-wipe {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 -2% 0 0); }
}
@keyframes star-pop {
  from { opacity: 0; transform: scale(0.4) rotate(-30deg); }
  to { opacity: 1; transform: none; }
}
@keyframes star-twinkle {
  0%, 86%, 100% { transform: none; }
  91% { transform: scale(0.88) rotate(-5deg); }
  95% { transform: scale(1.06) rotate(2deg); }
}
@keyframes glint {
  0%, 62%, 100% { opacity: 0; transform: scale(0.3) rotate(0deg); }
  74% { opacity: 1; transform: scale(1) rotate(45deg); }
  86% { opacity: 0; transform: scale(0.5) rotate(90deg); }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
@keyframes fog-drift {
  from { transform: translateX(-3%); }
  to { transform: translateX(3%); }
}
@keyframes cue {
  0% { background-position: top; background-size: 100% 0%; }
  50% { background-position: top; background-size: 100% 100%; }
  51% { background-position: bottom; background-size: 100% 100%; }
  100% { background-position: bottom; background-size: 100% 0%; }
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}
@keyframes spin-spark {
  0% { transform: rotate(0deg) scale(0.8); }
  50% { transform: rotate(90deg) scale(1.1); }
  100% { transform: rotate(180deg) scale(0.8); }
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
  50% { transform: translateY(var(--f, -16px)) rotate(calc(var(--r, 0deg) + 6deg)); }
}
.js .hero__stars .star { animation: fade-in 1400ms var(--ease-out) calc(200ms + var(--i, 0) * 70ms) both; }
.js .hero__stars .star i { animation: float var(--d, 12s) ease-in-out var(--delay, 0s) infinite; }

.js .mtn img { animation: mist-rise 1800ms var(--ease-out) both; }
.js .mtn--right img { animation-delay: 120ms; }
.js .inked__text { animation: ink-wipe 1300ms var(--ease-in-out) 250ms both; }
.js .inked__stars {
  animation:
    star-pop 700ms var(--ease-back) 1150ms both,
    star-twinkle 5s ease-in-out 2600ms infinite;
}
.js .glint { animation: glint 4.6s ease-in-out var(--d, 2s) infinite; }
.js .intro-up { animation: fade-up 800ms var(--ease-out) calc(1000ms + var(--i, 0) * 110ms) both; }
.js .hero__fog { animation: fog-drift 14s ease-in-out infinite alternate; }
.js .scroll-cue { animation: fade-up 800ms var(--ease-out) 1700ms both; }
.js .scroll-cue::after { animation: cue 2.4s var(--ease-in-out) 2500ms infinite; }

.marquee__track { animation: marquee 38s linear infinite; }
.fab__spark { animation: spin-spark 3.2s var(--ease-in-out) infinite; }

/* Scroll reveals (IntersectionObserver adds .is-visible once) */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 700ms var(--ease-out),
    transform 900ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 80ms);
}
.js [data-reveal="sheet"] { transform: translateY(48px) rotate(calc(var(--r, 0deg) * 2)); }
.js [data-reveal="split"] { opacity: 1; transform: none; }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* Word-by-word heading reveal: words rise out of their own line box */
.split .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.06em;
  margin-bottom: -0.06em;
}
.split .w__i { display: inline-block; }
.js .split .w__i {
  transform: translateY(105%);
  transition: transform 900ms var(--ease-out) calc(var(--i, 0) * 55ms);
}
.js .split.is-visible .w__i { transform: none; }

/* View transitions between pages (Chrome/Edge/Safari 18+; others just navigate) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 220ms var(--ease-out) both vt-out; }
::view-transition-new(root) { animation: 420ms var(--ease-out) both vt-in; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(12px); } }

/* ---------- Reduced motion: keep fades that aid comprehension, drop movement ---------- */

@media (prefers-reduced-motion: reduce) {
  .js .mtn img,
  .js .inked__text,
  .js .inked__stars,
  .js .intro-up,
  .js .scroll-cue { animation: fade-in 400ms ease both; }

  .js .glint,
  .js .hero__stars .star i,
  .js .hero__fog,
  .js .scroll-cue::after,
  .marquee__track,
  .fab__spark { animation: none; }

  .js [data-reveal],
  .js [data-reveal="sheet"] { transform: none; transition: opacity 400ms ease; }
  .js .split .w__i { transform: none; transition: none; }

  .card, .sheet, .tile img, .flash-sheet__frame, .btn { transition-property: opacity, background-color, color, box-shadow; }
  .card:hover, .sheet:hover, .flash-sheet__frame:hover, .btn:hover { transform: none !important; }
  .card:hover .card__icon { transform: none !important; }
  .sheet { transform: rotate(var(--r)); }
  .nav, .menu-open .nav { transition: visibility 0s, opacity 200ms ease; clip-path: none; }
  .nav { opacity: 0; }
  .menu-open .nav { opacity: 1; }
  .nav__link, .menu-open .nav__link { transform: none; transition: opacity 200ms ease; }
  .lightbox__img, .lightbox.is-open .lightbox__img.is-zoomed { transition: opacity 200ms ease; }
  .lightbox__img { transform: none; }
  .figure, .figure__ink { transition: none; }

  ::view-transition-old(root),
  ::view-transition-new(root) { animation-duration: 1ms; }
}

@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-pulse { 50% { opacity: 0.35; } }
