:root {
  --black: #050505;
  --dark: #0b0b0b;
  --white: #f5f3ef;
  --muted: #aaa59d;
  --gold: #c7a875;
  --gold-soft: rgba(199, 168, 117, 0.35);
  --line: rgba(255, 255, 255, 0.16);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}


/* ========================================
   RESET
======================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--black);
  overscroll-behavior-x: none;
}

body {
  background: var(--black);
  color: var(--white);

  font-family: Arial, Helvetica, sans-serif;

  overflow-x: hidden;

  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

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


/* ========================================
   HEADER
======================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 100%;
  height: calc(84px + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 5vw 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.site-header > * {
  pointer-events: auto;
}

.brand {
  color: var(--white);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.3em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 38px;
}

.main-nav a {
  color: rgba(245, 243, 239, 0.72);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

.main-nav a:hover {
  color: var(--white);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 15px;
  height: 1px;
  margin: 4px auto;
  background: var(--white);
}


/* ========================================
   TYPOGRAPHY
======================================== */

.eyebrow {
  color: var(--gold);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.25em;
  line-height: 1.6;
  text-transform: uppercase;
}

h1,
h2 {
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.98;
}


/* ========================================
   HOME STAGE
   One screen tall (small-viewport units, so
   the bottom controls are never under the
   iOS toolbar). The film and the book share
   it; js/main.js sets data-phase:
   intro → reveal → book.
======================================== */

.home-stage {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100svh;
  min-height: 460px;
  overflow: hidden;
  background: var(--black);
  isolation: isolate;
}

.video-scene {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  background: var(--black);
  transform-origin: 50% 50%;
}

.home-stage[data-phase="book"] .video-scene {
  visibility: hidden;
}


/* VIDEO */

.hero-video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: var(--black);
}


/* DARK OVERLAY */

.video-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(0, 0, 0, 0.04) 40%,
    rgba(0, 0, 0, 0.7) 100%
  );
}


/* VIDEO CONTENT */

.video-content {
  position: absolute;
  z-index: 6;
  left: 8vw;
  right: 8vw;
  bottom: calc(110px + env(safe-area-inset-bottom, 0px));
  max-width: 760px;
  pointer-events: none;
}

.video-content h1 {
  margin-top: 22px;
  max-width: 760px;
  font-size: clamp(40px, 6.5vw, 100px);
}


/* PLAY FALLBACK (autoplay refused) */

.video-play {
  position: absolute;
  z-index: 8;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 16px 26px 16px 18px;
  border: 1px solid rgba(245, 243, 239, 0.45);
  border-radius: 999px;
  background: rgba(5, 5, 5, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--white);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
}

.video-play[hidden] {
  display: none;
}

.video-play-icon {
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 11px solid var(--white);
}


/* VIDEO PROGRESS + SKIP */

.video-progress-container {
  position: absolute;
  z-index: 7;
  left: 8vw;
  right: 8vw;
  bottom: calc(34px + env(safe-area-inset-bottom, 0px));
}

.video-progress {
  width: 100%;
  height: 1px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.25);
}

.video-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--white);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

.video-progress-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  color: rgba(245, 243, 239, 0.65);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.video-skip {
  padding: 8px 0 8px 16px;
  border: 0;
  background: none;
  color: var(--white);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0.8;
}

.video-skip:hover {
  opacity: 1;
}

.home-stage:not([data-phase="intro"]) .video-progress-container,
.home-stage:not([data-phase="intro"]) .video-content,
.home-stage:not([data-phase="intro"]) .video-play {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}


/* ========================================
   COLLECTION LAYER (the book + its chrome)
======================================== */

.collection-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  visibility: hidden;
  pointer-events: none;
}

.home-stage[data-phase="reveal"] .collection-layer,
.home-stage[data-phase="book"] .collection-layer {
  visibility: visible;
}

.home-stage[data-phase="book"] .collection-layer {
  pointer-events: auto;
}

/* chrome fades in once the book is open */
.collection-header,
.book-controls,
.collection-counter {
  opacity: 0;
  transition: opacity 0.6s ease 0.1s;
}

.home-stage[data-phase="book"] .collection-header,
.home-stage[data-phase="book"] .book-controls,
.home-stage[data-phase="book"] .collection-counter {
  opacity: 1;
}

.collection-header {
  position: absolute;
  top: calc(84px + env(safe-area-inset-top, 0px));
  left: 8vw;
  right: 8vw;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.collection-header p:last-child {
  color: rgba(245, 243, 239, 0.7);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}


/* ========================================
   BOOK SCENE — receives every gesture.
   pan-y: the browser keeps vertical pans
   (normal page scroll); horizontal ones
   come to js/main.js as pointer events.
======================================== */

.book-scene {
  position: absolute;
  inset: 0;
  z-index: 10;
  overflow: hidden;
  touch-action: pan-y;
  overscroll-behavior-x: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  cursor: grab;
}

.home-stage.is-dragging .book-scene {
  cursor: grabbing;
}


/* ========================================
   THE BOOK
   Pages are stacked by z-index. A turning
   page is clipped along its crease, and the
   folded part is drawn by .turn-flap on top
   (see the PAGE TURN engine in js/main.js).
======================================== */

.alvoxis-book {
  position: absolute;
  inset: 0;
  overflow: hidden;
  transform-origin: 50% 50%;
  background: var(--black);
}

/* while it arrives as a closed object: page-block edges + a drop shadow */
.home-stage[data-phase="reveal"] .alvoxis-book {
  overflow: visible;
  box-shadow:
    3px 0 0 #e9e1d3,
    6px 1px 0 #cfc5b4,
    9px 2px 0 #b4a993,
    0 50px 120px rgba(0, 0, 0, 0.85),
    0 0 90px rgba(199, 168, 117, 0.18);
}

.home-stage[data-phase="reveal"] .book-page-cover {
  border-radius: inherit;
}


/* ========================================
   PAGES — full-bleed sheets bound at the
   left edge (the spine)
======================================== */

.book-page {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--black);
  pointer-events: none;
}

.book-page-face {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* the back of a sheet is painted by the flap while it is folded */
.book-page-back {
  display: none;
}

/* a turned-over page is off-stage; don't paint it */
.book-page.is-turned {
  visibility: hidden;
}

/* a turning sheet gets its own compositing layer, only while it turns */
.book-page.is-turning,
.turn-flap.is-visible {
  will-change: transform, clip-path;
}

.book-page[data-active="true"] .book-product-action {
  pointer-events: auto;
}


/* ========================================
   PAGE TURN LAYERS
======================================== */

/* the folded part of the sheet: its back, mirrored across the crease */
.turn-flap {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 301;
  width: 100%;
  height: 100%;
  transform-origin: 0 0;
  pointer-events: none;
  visibility: hidden;
}

.turn-flap.is-visible {
  visibility: visible;
}

.turn-flap-paper {
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg, #15130f 0%, #221e17 48%, #12100d 100%);
  transform: scaleX(-1); /* pre-mirrored, so the back reads correctly once folded */
}

.book-page-back::before,
.turn-flap-paper::before {
  content: "ALVOXIS";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(199, 168, 117, 0.14);
  font-size: clamp(28px, 6vw, 60px);
  font-weight: 700;
  letter-spacing: 0.35em;
}

/* gradient bands laid along the crease by js/main.js */
.turn-strip {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 60;
  transform-origin: 0 0;
  pointer-events: none;
}

/* curl shading on the flap: a dark crease, a soft highlight where the
   paper bows, then darker again toward the free edge */
.turn-flap-shade {
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.6) 0%,
    rgba(0, 0, 0, 0.1) 4%,
    rgba(255, 238, 210, 0.2) 13%,
    rgba(255, 238, 210, 0.07) 30%,
    rgba(0, 0, 0, 0) 52%,
    rgba(0, 0, 0, 0.22) 82%,
    rgba(0, 0, 0, 0.45) 100%
  );
}

/* the flap's shadow on the part of the page still lying flat */
.turn-flap-shadow {
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(0, 0, 0, 0.3) 72%,
    rgba(0, 0, 0, 0) 100%
  );
}

/* the lifted sheet's shadow on the next page */
.turn-cast-shadow {
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(0, 0, 0, 0.32) 30%,
    rgba(0, 0, 0, 0) 100%
  );
}


/* ========================================
   PAGE CONTENT
======================================== */

.book-page-media {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}

.book-page-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  -webkit-user-drag: none;
}

.book-page-scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    180deg,
    rgba(5, 5, 5, 0.6) 0%,
    rgba(5, 5, 5, 0.05) 30%,
    rgba(5, 5, 5, 0.18) 52%,
    rgba(5, 5, 5, 0.94) 100%
  );
}

.book-page-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 8vw calc(130px + env(safe-area-inset-bottom, 0px));
}

.page-copy {
  max-width: 560px;
}

.page-copy .eyebrow {
  margin-bottom: 20px;
}

.page-copy h2 {
  max-width: 560px;
  color: var(--white);
  font-size: clamp(38px, 5.5vw, 84px);
  line-height: 0.95;
}

.page-copy > p:not(.eyebrow) {
  max-width: 420px;
  margin-top: 22px;
  color: rgba(245, 243, 239, 0.75);
  font-size: 14px;
  line-height: 1.8;
}

.book-price {
  display: block;
  margin-top: 22px;
  color: var(--white);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.book-product-action {
  display: inline-block;
  margin-top: 22px;
  padding: 14px 28px;
  border: 1px solid rgba(245, 243, 239, 0.5);
  border-radius: 999px;
  background: transparent;
  color: var(--white);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.book-product-action:hover {
  background: var(--white);
  border-color: var(--white);
  color: var(--black);
}


/* NEXT CHAPTER — a story page, not a product */

.book-page-signature .book-page-front {
  background: radial-gradient(
    ellipse at center,
    rgba(148, 118, 68, 0.16),
    rgba(5, 5, 5, 0.98) 68%
  ), var(--black);
}

.next-chapter-page {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8vh 10vw;
}

.next-chapter-page h2 {
  margin-top: 20px;
  max-width: 560px;
  color: var(--white);
  font-size: clamp(38px, 5.5vw, 78px);
}

.next-chapter-copy {
  margin-top: 22px;
  max-width: 400px;
  color: rgba(245, 243, 239, 0.65);
  font-size: 14px;
  line-height: 1.8;
}


/* ========================================
   CONTROLS
======================================== */

.book-controls {
  position: absolute;
  z-index: 400;
  left: 8vw;
  right: 8vw;
  bottom: calc(40px + env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.book-controls > * {
  pointer-events: auto;
}

.collection-arrow {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(5, 5, 5, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--white);
  font-size: 20px;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
}

.collection-arrow:hover {
  background: var(--white);
  color: var(--black);
}

.collection-arrow:active {
  transform: scale(0.94);
}

.collection-arrow:disabled {
  opacity: 0.3;
  cursor: default;
}

.collection-arrow:disabled:hover {
  background: rgba(5, 5, 5, 0.25);
  color: var(--white);
}

.collection-dots {
  display: flex;
  align-items: center;
  gap: 4px;
}

.collection-dots button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.collection-dots button::before {
  content: "";
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 5px;
  background: rgba(245, 243, 239, 0.32);
  transition: width 0.4s var(--ease), background 0.4s ease;
}

.collection-dots button.active {
  width: 40px;
}

.collection-dots button.active::before {
  width: 28px;
  background: var(--white);
}

.collection-counter {
  position: absolute;
  z-index: 400;
  right: 8vw;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  color: rgba(245, 243, 239, 0.55);
  font-size: 10px;
  letter-spacing: 0.2em;
  pointer-events: none;
}


/* ========================================
   ABOUT
======================================== */

.about-section {
  min-height: 75vh;
  padding: 15vh 8vw;
  background: radial-gradient(
    ellipse at center top,
    rgba(72, 59, 40, 0.2),
    transparent 65%
  );
}

.about-section h2 {
  max-width: 850px;
  margin-top: 28px;
  font-size: clamp(40px, 6vw, 92px);
}

.about-section > p:last-child {
  max-width: 420px;
  margin-top: 45px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
}


/* ========================================
   FOOTER
======================================== */

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 45px 8vw;
  border-top: 1px solid var(--line);
  background: var(--black);
}

.site-footer p {
  color: var(--muted);
  font-size: 11px;
}


/* ========================================
   TABLET
======================================== */

@media (max-width: 1000px) {

  .main-nav {
    gap: 22px;
  }

  .page-copy h2 {
    font-size: clamp(34px, 5.5vw, 60px);
  }

}


/* ========================================
   MOBILE
======================================== */

@media (max-width: 700px) {

  .site-header {
    height: calc(70px + env(safe-area-inset-top, 0px));
    padding: env(safe-area-inset-top, 0px) 22px 0;
  }

  .brand {
    font-size: 14px;
    letter-spacing: 0.24em;
  }

  .main-nav {
    display: none;
  }

  .menu-button {
    display: block;
  }


  /* VIDEO */

  .video-content {
    left: 22px;
    right: 22px;
    bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  }

  .video-content h1 {
    margin-top: 16px;
    font-size: clamp(36px, 10.5vw, 60px);
  }

  .video-progress-container {
    left: 22px;
    right: 22px;
    bottom: calc(26px + env(safe-area-inset-bottom, 0px));
  }

  .video-progress-label {
    font-size: 8px;
  }


  /* COLLECTION */

  .collection-header {
    top: calc(70px + env(safe-area-inset-top, 0px));
    left: 22px;
    right: 22px;
    display: block;
  }

  .collection-header p:last-child {
    margin-top: 8px;
    font-size: 9px;
  }


  /* PAGES */

  .book-page-overlay {
    padding: 0 22px calc(104px + env(safe-area-inset-bottom, 0px));
  }

  .page-copy {
    max-width: 100%;
  }

  .page-copy .eyebrow {
    margin-bottom: 12px;
    font-size: 9px;
  }

  .page-copy h2 {
    font-size: clamp(30px, 8.5vw, 44px);
  }

  .page-copy > p:not(.eyebrow) {
    margin-top: 12px;
    font-size: 13px;
    line-height: 1.6;
  }

  .book-price {
    margin-top: 14px;
    font-size: 21px;
  }

  .book-product-action {
    margin-top: 16px;
    padding: 12px 22px;
    font-size: 9px;
  }

  .next-chapter-page h2 {
    font-size: clamp(30px, 8.5vw, 44px);
  }

  .next-chapter-copy {
    margin-top: 16px;
    font-size: 13px;
  }


  /* CONTROLS */

  .book-controls {
    left: 22px;
    right: 22px;
    bottom: calc(30px + env(safe-area-inset-bottom, 0px));
  }

  .collection-arrow {
    width: 42px;
    height: 42px;
    font-size: 17px;
  }

  .collection-counter {
    right: 22px;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    font-size: 8px;
  }


  /* ABOUT */

  .about-section {
    min-height: 70vh;
    padding: 12vh 22px;
  }

  .about-section h2 {
    font-size: clamp(39px, 11vw, 60px);
  }

  .about-section > p:last-child {
    margin-top: 30px;
    font-size: 13px;
  }


  /* FOOTER */

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    padding: 35px 22px;
  }

}

/* ========================================
   SHORT SCREENS — phones held in landscape
======================================== */

@media (max-height: 560px) {

  .site-header {
    height: calc(56px + env(safe-area-inset-top, 0px));
  }

  .home-stage {
    min-height: 0;
  }

  .video-content {
    bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }

  .video-content h1 {
    margin-top: 10px;
    font-size: clamp(26px, 8vh, 44px);
  }

  .video-progress-container {
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  }

  .collection-header {
    top: calc(56px + env(safe-area-inset-top, 0px));
  }

  .collection-header p:last-child {
    display: none;
  }

  .book-page-overlay {
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }

  .page-copy .eyebrow {
    margin-bottom: 6px;
    font-size: 9px;
  }

  .page-copy h2,
  .next-chapter-page h2 {
    font-size: clamp(24px, 7.5vh, 40px);
  }

  .page-copy > p:not(.eyebrow),
  .next-chapter-copy {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.5;
  }

  .book-price {
    margin-top: 6px;
    font-size: 18px;
  }

  .book-product-action {
    margin-top: 8px;
    padding: 9px 20px;
    font-size: 9px;
  }

  .next-chapter-page {
    padding: 70px 10vw 60px;
  }

  .book-controls {
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .collection-arrow {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }

  .collection-counter {
    display: none;
  }

}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}


/* ========================================================
   ALVOXIS — SHOP UI
   Header nav/language/cart, and the six SPA views:
   product, personalize, cart, checkout, account,
   confirmation.
======================================================== */


/* ========================================
   HEADER ADDITIONS
======================================== */

.main-nav a[data-nav-route].is-active {
  color: var(--white);
}

.main-nav a[data-nav-route].is-active::after {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  margin-top: 4px;
  background: var(--gold);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}

.lang-select {
  position: relative;
}

.lang-current {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--white);
  font-size: 10px;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

.lang-current:hover {
  border-color: var(--gold);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 50;
  display: none;
  flex-direction: column;
  min-width: 90px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(5, 5, 5, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.lang-select.is-open .lang-menu {
  display: flex;
}

.lang-menu button {
  padding: 8px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: rgba(245, 243, 239, 0.75);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.lang-menu button:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
}

.cart-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
}

.cart-icon {
  font-size: 18px;
  color: var(--white);
}

.cart-count {
  position: absolute;
  top: -2px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--gold);
  color: var(--black);
  font-size: 9px;
  font-weight: 700;
}

.cart-count.is-empty {
  opacity: 0.35;
}

.mobile-nav {
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  z-index: 900;
  display: flex;
  flex-direction: column;
  padding: 18px 22px;
  gap: 4px;
  background: rgba(5, 5, 5, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav a {
  padding: 12px 4px;
  color: rgba(245, 243, 239, 0.8);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

@media (min-width: 701px) {
  .mobile-nav {
    display: none !important;
  }
}


/* ========================================
   SHARED VIEW / FORM ELEMENTS
======================================== */

.page-shell {
  min-height: 100svh;
  padding: 16vh 8vw 12vh;
  max-width: 1100px;
  margin: 0 auto;
}

.empty-note {
  margin-top: 20px;
  color: var(--muted);
  font-size: 14px;
}

.back-link {
  display: inline-block;
  margin-bottom: 40px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

.back-link:hover {
  color: var(--white);
}

.primary-action {
  display: inline-block;
  margin-top: 10px;
  padding: 15px 30px;
  border: 1px solid var(--white);
  border-radius: 999px;
  background: var(--white);
  color: var(--black);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.primary-action:hover {
  opacity: 0.85;
}

.primary-action:active {
  transform: scale(0.98);
}

.ghost-action {
  display: inline-block;
  padding: 15px 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--white);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

.ghost-action:hover {
  border-color: var(--gold);
}

.text-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.unavailable-badge {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.step-actions {
  display: flex;
  gap: 14px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.page-shell h1 {
  font-size: clamp(34px, 4.5vw, 56px);
  margin-bottom: 30px;
}

.page-shell h2 {
  font-size: clamp(20px, 2.4vw, 28px);
  margin-bottom: 16px;
  color: var(--white);
}

.page-shell label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-shell input[type="text"],
.page-shell input[type="email"],
.page-shell input[type="password"],
.page-shell textarea {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--white);
  font-size: 14px;
  font-family: inherit;
}

.page-shell input:focus,
.page-shell textarea:focus,
.page-shell select:focus {
  outline: none;
  border-color: var(--gold);
}


/* ========================================
   PRODUCT VIEW
======================================== */

.product-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 6vw;
  align-items: center;
}

.product-media {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 4px;
  background: #0c0b0a;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-media-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.product-info h1 {
  margin-top: 14px;
}

.product-tagline {
  margin-top: 6px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.product-price {
  display: block;
  margin-top: 24px;
  font-size: 26px;
  color: var(--white);
}

.product-contents {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.product-contents-title {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.product-contents ul {
  list-style: none;
}

.product-contents li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 8px;
  color: rgba(245, 243, 239, 0.75);
  font-size: 13px;
}

.product-contents li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
}

@media (max-width: 800px) {
  .product-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .product-media {
    aspect-ratio: 4 / 3;
  }
}


/* ========================================
   PERSONALIZE VIEW
======================================== */

.personalize-shell {
  max-width: 620px;
  margin: 0 auto;
}

.personalize-title {
  text-align: center;
}

.personalize-steps {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 50px;
  flex-wrap: wrap;
}

.personalize-steps .step {
  color: rgba(245, 243, 239, 0.35);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.personalize-steps .step.is-active {
  color: var(--gold);
}

.puzzle-info {
  padding: 18px 20px;
  margin-bottom: 22px;
  border: 1px solid var(--gold-soft);
  border-radius: 10px;
  background: rgba(199, 168, 117, 0.05);
}

.puzzle-info strong {
  display: block;
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.puzzle-info p {
  color: rgba(245, 243, 239, 0.7);
  font-size: 13px;
  line-height: 1.7;
}

.upload-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  padding: 30px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  text-align: center;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.upload-zone:hover,
.upload-zone.is-dragover {
  border-color: var(--gold);
  background: rgba(199, 168, 117, 0.04);
}

.upload-zone.is-loading {
  opacity: 0.5;
  pointer-events: none;
}

.upload-zone p {
  color: var(--white);
  font-size: 14px;
  margin-bottom: 8px;
}

.upload-zone span {
  color: var(--muted);
  font-size: 11px;
}

.upload-preview {
  max-width: 100%;
  max-height: 260px;
  object-fit: contain;
  border-radius: 8px;
}

.upload-error {
  margin-top: 14px;
  color: #e08a7c;
  font-size: 12px;
}

.message-block textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
}

.char-count {
  display: block;
  margin-top: 8px;
  text-align: right;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.06em;
}

.card-preview {
  margin-top: 26px;
  padding: 26px 24px;
  border-radius: 4px;
  background: linear-gradient(110deg, #f3f0e9 0%, #faf8f2 45%, #e4ded3 100%);
  color: #171614;
  min-height: 120px;
}

.card-preview-format {
  display: block;
  margin-bottom: 14px;
  color: #947644;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.card-preview p {
  font-size: 15px;
  line-height: 1.7;
  font-style: italic;
}

.preview-block h2 {
  text-align: center;
  margin-bottom: 30px;
}

.preview-row {
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.preview-row:last-of-type {
  border-bottom: 1px solid var(--line);
}

.preview-label {
  display: block;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.preview-product {
  display: flex;
  align-items: center;
  gap: 16px;
}

.preview-product img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
}

.preview-product strong {
  display: block;
  color: var(--white);
  font-size: 15px;
}

.preview-product span {
  color: var(--muted);
  font-size: 13px;
}

.preview-photo img {
  max-width: 100%;
  max-height: 220px;
  border-radius: 8px;
  object-fit: contain;
}

.preview-message {
  color: rgba(245, 243, 239, 0.8);
  font-size: 14px;
  line-height: 1.7;
  font-style: italic;
  margin-bottom: 10px;
}

.preview-block .primary-action {
  width: 100%;
  margin-top: 30px;
  text-align: center;
}


/* ========================================
   CART VIEW
======================================== */

.cart-lines {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 20px;
}

.cart-line {
  display: grid;
  grid-template-columns: 90px 1fr 60px;
  gap: 18px;
  align-items: center;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.cart-line-image {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
}

.cart-line-info strong {
  display: block;
  color: var(--white);
  font-size: 15px;
}

.cart-line-info > span {
  color: var(--muted);
  font-size: 13px;
}

.cart-line-personalization {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 10px 0;
  color: rgba(245, 243, 239, 0.55);
  font-size: 11px;
}

.cart-line-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}

.cart-line-controls label {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
}

.cart-line-controls select {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--white);
  font-size: 12px;
}

.cart-line-photo {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
}

.cart-summary {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  font-size: 16px;
}

.cart-summary .primary-action {
  width: 100%;
  text-align: center;
}

@media (max-width: 600px) {
  .cart-line {
    grid-template-columns: 64px 1fr;
  }
  .cart-line-photo {
    grid-column: 2;
    justify-self: start;
  }
}


/* ========================================
   CHECKOUT VIEW
======================================== */

.checkout-form {
  max-width: 560px;
  margin: 0 auto;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.stripe-notice {
  padding: 16px 18px;
  margin: 20px 0;
  border: 1px solid var(--gold-soft);
  border-radius: 10px;
  background: rgba(199, 168, 117, 0.05);
  color: rgba(245, 243, 239, 0.75);
  font-size: 12px;
  line-height: 1.7;
}

.checkout-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 16px;
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}


/* ========================================
   ACCOUNT VIEW
======================================== */

.account-notice {
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.6;
}

.auth-providers {
  display: flex;
  gap: 14px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.provider-btn {
  flex: 1;
  min-width: 200px;
  padding: 15px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--white);
  font-size: 12px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

.provider-btn:hover {
  border-color: var(--gold);
}

.auth-forms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}

.auth-form {
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.form-error {
  margin-bottom: 14px;
  color: #e08a7c;
  font-size: 12px;
}

.account-section {
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

.account-section p {
  color: rgba(245, 243, 239, 0.75);
  font-size: 14px;
  margin-bottom: 4px;
}

.order-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(245, 243, 239, 0.75);
  font-size: 12px;
  align-items: center;
}

.order-status {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(199, 168, 117, 0.12);
  color: var(--gold);
  font-size: 10px;
  text-transform: uppercase;
  text-align: center;
}

@media (max-width: 700px) {
  .auth-forms {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .order-row {
    grid-template-columns: 1fr 1fr;
  }
}


/* ========================================
   CONFIRMATION VIEW
======================================== */

.confirmation-block {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.confirmation-block h1 {
  margin-top: 14px;
}

.order-number {
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.06em;
}

.confirmation-block .step-actions {
  justify-content: center;
}


/* ========================================
   FOOTER ADDITIONS
======================================== */

.footer-main {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.footer-brand p {
  margin-top: 10px;
  max-width: 260px;
}

.footer-links {
  display: flex;
  gap: 60px;
  flex-wrap: wrap;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col-title {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.footer-col a {
  color: rgba(245, 243, 239, 0.65);
  font-size: 12px;
  transition: color 0.3s ease;
}

.footer-col a:hover {
  color: var(--white);
}

@media (max-width: 700px) {
  .page-shell {
    padding: 12vh 22px 10vh;
  }
  .footer-links {
    gap: 30px;
  }
}


/* ========================================
   REDUCED MOTION
======================================== */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

}
