@font-face {
  font-family: "DM Sans";
  src: url("/assets/dm-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/instrument-serif.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/instrument-serif-italic.woff2") format("woff2");
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #f6efe5;
  --cream: #eee2d2;
  --ink: #271b23;
  --muted: #615257;
  --plum: #4d3065;
  --dark: #291a33;
  --line: #d6c7bc;
  --serif: "Instrument Serif", Georgia, serif;
  --header-height: 4.625rem;
  color: var(--ink);
  background: var(--paper);
  font-family: "DM Sans", sans-serif;
  scroll-padding-top: calc(var(--header-height) + 1rem);
}

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

body { margin: 0; }
[hidden] { display: none !important; }
button { font: inherit; }
img { display: block; max-width: 100%; height: auto; }
figure, p, h1, h2, h3, ol, ul, dl, dd { margin: 0; }
a { color: inherit; }
a:focus-visible, button:focus-visible, video:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }

.shell {
  width: min(100% - 6rem, 79rem);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 5;
  inset: 1rem auto auto 1rem;
  padding: .75rem 1rem;
  color: white;
  background: var(--dark);
  transform: translateY(-200%);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  z-index: 3;
  top: 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.header-inner, .footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
  gap: 1rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -.055em;
  white-space: nowrap;
  text-decoration: none;
}

.wordmark span { color: var(--plum); font-size: 1rem; line-height: 1; }

nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2.4rem);
  align-items: center;
}

nav a { font-size: .925rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
nav a:hover { text-decoration: underline; text-underline-offset: .25em; }

.nav-action {
  display: inline-flex;
  min-height: 2.65rem;
  align-items: center;
  padding: .5rem .95rem;
  border: 1px solid var(--plum);
  color: var(--plum);
}

.nav-action:hover { color: var(--paper); background: var(--plum); text-decoration: none; }

.hero {
  display: grid;
  grid-template-columns: .92fr 1.08fr;
  gap: clamp(2rem, 5vw, 6rem);
  align-items: center;
  padding-block: clamp(2rem, 4.8vw, 4.6rem) clamp(3.5rem, 6.8vw, 7rem);
}

.eyebrow {
  display: flex;
  gap: .6rem;
  align-items: center;
  color: var(--plum);
  font-size: .82rem;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.diamond { inline-size: .43rem; block-size: .43rem; flex: 0 0 auto; background: currentColor; transform: rotate(45deg); }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; word-spacing: .045em; }
h1 { font-size: clamp(4.5rem, 9.35vw, 9.25rem); line-height: .83; letter-spacing: -.044em; }
h2 { font-size: clamp(3.5rem, 7vw, 7rem); line-height: .9; letter-spacing: -.036em; }
h3 { font-size: clamp(2.45rem, 4.4vw, 4.7rem); line-height: .91; letter-spacing: -.025em; }
em { color: var(--plum); font-weight: inherit; }

.hero h1 { margin-top: .72rem; }
.hero h1 em { display: block; margin-top: .14em; }
.hero-intro { max-width: 24rem; margin-top: 1.85rem; color: var(--muted); font-size: clamp(1.05rem, 1.6vw, 1.22rem); line-height: 1.58; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem 1.5rem; align-items: center; margin-top: 1.8rem; }

.button {
  display: inline-flex;
  min-height: 3.42rem;
  align-items: center;
  justify-content: center;
  padding: .8rem 1.35rem;
  color: var(--paper);
  background: var(--dark);
  border: 1px solid var(--dark);
  text-decoration: none;
  font-weight: 700;
  line-height: 1.2;
}

.button:hover { background: var(--plum); border-color: var(--plum); }
.text-link { width: fit-content; font-size: .95rem; font-weight: 700; text-underline-offset: .32em; text-decoration-thickness: 1px; }

.hero-art {
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1.07;
  background: radial-gradient(ellipse at 68% 25%, #f3e8d9 2%, #e7d4bf 57%, #d2b89e 100%);
}

.hero-art::before {
  content: "";
  position: absolute;
  inset: .75rem;
  border: 1px solid rgb(80 56 62 / 24%);
  pointer-events: none;
}

.hero-art img { width: 55%; max-width: 25rem; filter: drop-shadow(1.2rem 1.65rem 1.3rem rgb(60 27 54 / 26%)); }
.art-mark { position: absolute; inset: 1.4rem auto auto 1.55rem; color: var(--plum); font-size: 1.15rem; }
.hero-art figcaption { position: absolute; inset: auto 1.55rem 1.35rem auto; color: #47313c; font-size: .78rem; font-weight: 600; }

.rules {
  padding-block: clamp(3.2rem, 7vw, 6.8rem);
  border-top: 1px solid var(--line);
  background: #eee3d5;
}

.section-heading h2, .demo h2, .shop h2 { margin-top: .65rem; }
.section-heading { margin-bottom: clamp(2rem, 5vw, 4.3rem); }

.story {
  display: grid;
  grid-template-columns: 1fr .79fr;
  align-items: start;
  gap: clamp(3rem, 8vw, 9rem);
}

.story-stage { position: sticky; top: calc(var(--header-height) + 1.25rem); }
.story-art { position: relative; overflow: hidden; height: clamp(19rem, 59svh, 40rem); aspect-ratio: 1.07; max-width: 100%; background: #141719; }
.story-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity 360ms ease; }
.story-art img.visible { opacity: 1; }
.story-art img.story-lifestyle { object-fit: cover; object-position: center 20%; }

.film-button {
  position: absolute;
  bottom: .75rem;
  right: .75rem;
  display: inline-flex;
  gap: .55rem;
  align-items: center;
  min-height: 2.65rem;
  border: 1px solid #b6a4c0;
  padding: .55rem .7rem;
  background: #241c2a;
  color: var(--paper);
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
}

.film-button:hover { background: var(--plum); }
.play-mark { width: 0; height: 0; border-left: .49rem solid currentColor; border-block: .3rem solid transparent; }

.story-indicator { display: flex; gap: .35rem; margin-top: .65rem; }
.story-indicator span { width: 1.8rem; height: .19rem; background: #cdbdaf; }
.story-stage:not([data-chapter]) .story-indicator span:first-child,
.story-stage[data-chapter="1"] .story-indicator span:nth-child(1),
.story-stage[data-chapter="2"] .story-indicator span:nth-child(2),
.story-stage[data-chapter="3"] .story-indicator span:nth-child(3) { background: var(--plum); }

.steps { padding: 0; list-style: none; }
.steps li {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: .9rem;
  min-height: clamp(16rem, 51svh, 34rem);
  padding-block: 1.6rem;
  border-top: 1px solid #cdbdaf;
}

.steps li:last-child { border-bottom: 1px solid #cdbdaf; }
.step-number { color: var(--plum); font-size: .84rem; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.steps p, .demo-intro, .demo-result p, .shop-copy > p:not(.eyebrow), .checkout-copy > p:not(.eyebrow), .confirmation > p:not(.eyebrow) { max-width: 28rem; color: var(--muted); font-size: 1.08rem; line-height: 1.58; }

.demo { background: var(--dark); color: var(--paper); padding-block: clamp(3.5rem, 8vw, 7.8rem); }
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 6vw, 6rem); align-items: center; }
.demo .eyebrow { color: #d8bcf3; }
.demo .demo-intro { margin-top: 1rem; color: #f0e5ef; }
.demo-result { min-height: 9rem; margin-top: 1.6rem; padding-top: 1.15rem; border-top: 1px solid #7a608a; }
.demo-result h3 { font-size: 2.5rem; }
.demo .demo-result p { margin-top: .6rem; color: #e6d5e7; }

.demo-cards { display: flex; justify-content: center; gap: clamp(.65rem, 2.6vw, 2.25rem); padding: .75rem .25rem; }
.playing-card {
  position: relative;
  flex: 0 1 11rem;
  aspect-ratio: .665;
  border: 1px solid var(--paper);
  border-radius: .75rem;
  padding: .55rem;
  cursor: pointer;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.playing-card::before { content: ""; position: absolute; inset: .4rem; border: 1px solid currentColor; border-radius: .52rem; opacity: .55; pointer-events: none; }
.playing-card:hover, .playing-card[aria-pressed="true"] { transform: translateY(-.6rem); }
.playing-card[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--dark), 0 0 0 5px #d8bcf3; }
.playing-card:focus-visible { outline-color: #fff; }
.playing-card.seven { background: #f3e5d3; color: #4b224b; }
.playing-card.king { background: #694680; color: #fff5ee; }

.card-corner {
  position: absolute;
  display: grid;
  justify-items: center;
  inset: .86rem auto auto .91rem;
  font-family: var(--serif);
  font-size: 2rem;
  line-height: .8;
}

.card-corner span { font-size: .86rem; margin-top: .26rem; }
.card-corner.bottom { inset: auto .91rem .86rem auto; transform: rotate(180deg); }
.card-face { display: grid; gap: .4rem; justify-items: center; }
.card-face > :first-child { font-family: Georgia, serif; font-size: clamp(2.2rem, 6vw, 5rem); line-height: 1; }
.card-face > :last-child { font-weight: 700; font-size: .78rem; letter-spacing: .13em; text-transform: uppercase; }

.shop { padding-block: clamp(3.5rem, 8vw, 8rem); }
.shop-grid { display: grid; grid-template-columns: 1fr .72fr; gap: clamp(3rem, 9vw, 10rem); align-items: center; }
.gallery-images { aspect-ratio: .95; overflow: hidden; display: grid; place-items: center; background: #e4d1bc; }
.gallery-images img:first-child { width: 100%; height: 100%; object-fit: cover; object-position: center 47%; }
.gallery-images .gallery-box { width: 56%; filter: drop-shadow(1rem 1rem 1rem #6b4b6344); }
.gallery-controls { display: flex; gap: .6rem; margin-top: .85rem; }
.gallery-controls button { min-height: 2.75rem; border: 1px solid var(--line); background: transparent; padding: .35rem .75rem; color: var(--ink); cursor: pointer; }
.gallery-controls button[aria-pressed="true"], .gallery-controls button:hover { border-color: var(--plum); color: var(--plum); }
.shop-copy > p:not(.eyebrow) { margin-top: 1.3rem; }
.product-details { display: grid; gap: .45rem; padding-left: 1.18rem; margin-top: 1rem; }
.product-details li::marker { color: var(--plum); }
.purchase { margin-top: 1.85rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem .7rem; margin-bottom: .85rem; font-size: 1.35rem; }
.price span, .purchase-note { color: var(--muted); font-size: .9rem; }
.purchase-note { margin-top: .7rem; }

.film-dialog {
  width: min(94vw, 32rem);
  max-height: 92dvh;
  padding: .8rem;
  border: 1px solid #a68aaf;
  background: #21192a;
  color: var(--paper);
}

.film-dialog::backdrop { background: rgb(20 13 24 / 82%); }
.film-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .55rem; }
.film-heading h2 { font-family: inherit; font-size: 1rem; font-weight: 600; letter-spacing: 0; line-height: 1.3; }
.film-close { min-height: 2.75rem; border: 1px solid #b6a4c0; padding: .35rem .8rem; color: var(--paper); background: transparent; cursor: pointer; }
.film-dialog video { display: block; width: 100%; max-height: 71dvh; margin-inline: auto; background: #141719; }
.site-footer { border-top: 1px solid var(--line); }
.footer-inner > :not(.wordmark) { color: var(--muted); font-size: .9rem; }
.footer-inner > a:not(.wordmark) { text-underline-offset: .25em; }

.checkout { display: grid; grid-template-columns: .9fr 1fr; align-items: start; gap: clamp(2.5rem, 7vw, 8rem); padding-block: clamp(3rem, 10vw, 9rem); }
.checkout h1, .confirmation h1, .error-page h1 { font-size: clamp(4rem, 7vw, 7.6rem); margin-top: .75rem; }
.checkout-copy > p:not(.eyebrow), .confirmation > p:not(.eyebrow) { margin-top: 1.3rem; }
.checkout-button { margin-top: 1.15rem; width: 100%; }

.order-summary { border: 1px solid var(--line); background: #efe3d5; padding: clamp(1.2rem, 3vw, 2.4rem); }
.order-summary h2 { font-size: 2.6rem; margin-bottom: 1.2rem; }
.order-item { display: grid; grid-template-columns: 3.75rem 1fr auto; gap: .65rem; align-items: center; }
.order-item p { margin-top: .21rem; color: var(--muted); font-size: .85rem; }
.order-art { display: grid; place-items: center; aspect-ratio: 1; background: #e1cbb5; }
.order-art img { width: 61%; }
.order-cost { display: grid; gap: .5rem; padding-top: 1rem; margin-top: 1.1rem; border-top: 1px solid var(--line); }
.order-cost div { display: flex; justify-content: space-between; gap: .55rem; }
.order-cost .total { padding-top: .75rem; margin-top: .35rem; border-top: 1px solid var(--line); font-weight: 700; }
.confirmation, .error-page { padding-block: clamp(4.5rem, 13vw, 12rem); }
.confirmation .button, .error-page .button { margin-top: 1.6rem; }

@keyframes show-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

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

  @supports (animation-timeline: scroll()) {
    body:has(.hero) .site-header::after {
      position: absolute;
      content: "";
      inset: auto 0 -1px;
      height: 2px;
      background: var(--plum);
      transform: scaleX(0);
      transform-origin: left;
      animation: show-progress linear both;
      animation-timeline: scroll(root block);
      pointer-events: none;
    }
  }
}

@media (max-width: 960px) {
  .shell { width: min(100% - 3.5rem, 79rem); }
  .story { gap: 2.75rem; }
  .shop-grid { gap: 2.75rem; }
}

@media (max-width: 760px) {
  :root { --header-height: 3.9rem; }
  .shell { width: calc(100% - 2.5rem); }
  .hero, .demo-grid, .shop-grid, .checkout { grid-template-columns: 1fr; }
  .hero { gap: 2rem; }
  .hero h1 em { display: inline; margin: 0 0 0 .035em; }
  .hero-intro, .hero-actions { margin-top: 1.2rem; }
  .hero-art { aspect-ratio: 1.18; }
  .hero-art img { width: min(53%, 15.5rem); }
  .story { display: block; }
  .story-stage { top: var(--header-height); z-index: 1; padding-block: .5rem .45rem; background: #eee3d5; }
  .story-art { height: 31svh; min-height: 10rem; aspect-ratio: auto; }
  .story-indicator { margin-top: .45rem; }
  .steps li { min-height: 34svh; }
  .demo-cards { gap: 1.25rem; }
  .demo-result { min-height: 0; }
  .shop-grid { gap: 2rem; }
  .gallery-images { aspect-ratio: 1.05; }
  .checkout { gap: 1.8rem; }
}

@media (max-width: 445px) {
  .wordmark { font-size: 1.1rem; gap: .25rem; }
  .wordmark span { font-size: .85rem; }
  .header-inner { gap: .5rem; }
  nav { gap: .65rem; }
  nav a { font-size: .85rem; }
  .nav-action { padding-inline: .5rem; }
}

@media (max-width: 380px) {
  .header-inner nav > a:first-child, .footer-inner > a:not(.wordmark) { display: none; }
  .hero h1 { font-size: clamp(3.75rem, 16.7vw, 4.5rem); }
  .hero-art figcaption { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .story-art img, .playing-card { transition: none; }
  .playing-card:hover, .playing-card[aria-pressed="true"] { transform: none; }
}
