/* ================================================================
   GIFTWRAP home.css: the wrapping table, the parcel route, the bill,
   the board. Values come from theme.css only.
   Design read: product landing for international gift senders, in a
   warm tactile paper-and-ribbon language. Dial ENERGY 3 / RHYTHM 3 /
   MOTION 3 (scroll-scrubbed 3D parcel), all motion off on
   prefers-reduced-motion.
   ================================================================ */

/* paper fiber, drawn from code: tissue paper has visible fibers, so the
   page surface gets a faint noise instead of a flat fill */
body.home {
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .42 0 0 0 0 .32 0 0 0 0 .2 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: var(--radius-small);
}
.skip:focus { top: 12px; }

.home .wrap { padding: 0 var(--gutter); }
.home .eyebrow { font-family: var(--mono); font-size: var(--t-stamp); letter-spacing: .04em; color: var(--ink-soft); margin-bottom: 14px; }
.home h2 { font-size: var(--t-h2); line-height: .98; letter-spacing: -.012em; }
.home .tilt { color: var(--ribbon); }
.mono { font-family: var(--mono); }

/* ---------- nav additions ---------- */
.menu-btn { display: none; }
.menu-only { display: none; }
.nav .btn { padding: 9px 18px; font-size: 14px; }
@media (max-width: 1080px) {
  .nav-track, .nav-wallet { display: none; }
}
@media (max-width: 860px) {
  .nav-inner { padding: 10px var(--gutter); gap: 12px; }
  .menu-btn {
    display: inline-grid; place-content: center; gap: 6px;
    width: 44px; height: 44px; border: 1px solid var(--hairline); border-radius: var(--radius-small);
    background: var(--card);
  }
  .menu-btn span { display: block; width: 18px; height: 2px; background: var(--ink); transition: transform var(--t-fast) var(--ease-out); }
  .menu-btn[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0; margin: 0; padding: 8px var(--gutter) 16px;
    background: var(--paper); border-bottom: 1px solid var(--hairline);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 13px 0; font-size: 17px; border-bottom: 1px solid var(--hairline); }
  .menu-only { display: block; }
  .x-link { display: none; }
}

/* ================================================================
   HERO: the wrapping table
   ================================================================ */
.hero2 {
  position: relative;
  min-height: calc(100svh - 61px);
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: hidden;
  isolation: isolate;
}
.hero2-stage { position: absolute; inset: 0; z-index: -1; }
.hero2-canvas { width: 100%; height: 100%; display: block; }
.hero2-copy {
  align-self: center;
  max-width: var(--wrap); width: 100%; margin: 0 auto;
  padding: clamp(40px, 8vh, 96px) var(--gutter) 24px;
}
.hero2-copy > * { max-width: 600px; }
.hero2-kicker { font-family: var(--mono); font-size: var(--t-stamp); color: var(--ink-soft); margin-bottom: 18px; letter-spacing: .03em; }
.hero2 h1 { font-size: clamp(48px, 6.8vw, 108px); line-height: .92; letter-spacing: -.02em; max-width: 6.3em; }
.hero2-sub { max-width: 27em; }
.hero2-sub { font-size: var(--t-lead); color: var(--ink-soft); margin-top: 26px; max-width: 30em; line-height: 1.55; }
.hero2-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero2-ctas .btn-ghost { background: color-mix(in srgb, var(--card) 80%, transparent); }
.home .hero-ca {
  margin-top: 30px; padding-top: 16px; border-top: 1px dashed var(--hairline);
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; font-size: var(--t-small); color: var(--ink-soft);
  max-width: 560px;
}
.home .hero-ca .ca-mono { word-break: break-all; }

.hero2-tags {
  list-style: none; margin: 0 auto; padding: 0 var(--gutter) 28px;
  width: 100%; max-width: var(--wrap);
  display: flex; flex-wrap: wrap; gap: 12px;
}
/* a gift tag: punched hole + twine, the motif repeated on the board */
.tag-stamp {
  position: relative;
  display: grid; gap: 2px;
  padding: 10px 16px 10px 34px;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-tag);
  clip-path: polygon(14px 0, 100% 0, 100% 100%, 14px 100%, 0 50%);
}
.tag-stamp::before {
  content: ""; position: absolute; left: 14px; top: 50%; width: 8px; height: 8px; margin-top: -4px;
  border-radius: 50%; background: var(--paper-2); box-shadow: inset 0 0 0 1.5px var(--kraft-deep);
}
.tag-k { font-family: var(--mono); font-size: 11.5px; color: var(--ink-faint); }
.tag-v { font-size: 15px; font-weight: 600; }

@media (max-width: 860px) {
  .hero2 { min-height: auto; grid-template-rows: auto auto auto; }
  .hero2-stage { position: relative; inset: auto; height: 46svh; min-height: 300px; order: 2; }
  .hero2-copy { order: 1; padding-top: 36px; padding-bottom: 0; }
  .hero2-tags { order: 3; padding-top: 8px; }
}

/* ================================================================
   JOURNEY: one parcel, four stops (scroll-scrubbed)
   ================================================================ */
.journey { position: relative; padding-top: clamp(72px, 10vw, 140px); }
.journey-head { position: relative; z-index: 2; }
.journey-hint { margin-top: 18px; color: var(--ink-soft); font-size: var(--t-lead); }
.journey-track { position: relative; height: 520vh; margin-top: clamp(24px, 4vw, 48px); }
.journey-stage {
  --nm: 0;            /* night mix, 0 = table light, 1 = reveal room */
  position: sticky; top: 0;
  height: 100svh; overflow: hidden;
}
.journey-backdrop {
  position: absolute; inset: 0;
  background:
    radial-gradient(70% 60% at 68% 55%, color-mix(in srgb, var(--foil) calc(var(--nm) * 22%), transparent), transparent 70%),
    color-mix(in srgb, var(--night) calc(var(--nm) * 100%), var(--paper-2));
}
.journey-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* a wash of the room color behind the copy so the ribbon never runs under the text */
.journey-scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--night) calc(var(--nm) * 100%), var(--paper-2)) 0%,
    color-mix(in srgb, color-mix(in srgb, var(--night) calc(var(--nm) * 100%), var(--paper-2)) 82%, transparent) 30%,
    transparent 50%);
}
.acts { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.act { pointer-events: auto; }
.stops { z-index: 3; }

.acts { list-style: none; margin: 0; padding: 0; }
.act {
  position: absolute; left: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
  top: 50%; width: min(430px, 38vw);
  transform: translateY(calc(-50% + 18px));
  opacity: 0; visibility: hidden;
  transition: opacity var(--t-med) var(--ease-out), transform var(--t-med) var(--ease-out), visibility 0s linear var(--t-med);
}
.act.is-active { opacity: 1; visibility: visible; transform: translateY(-50%); transition-delay: 0s; }
.act-no { font-family: var(--mono); font-size: var(--t-stamp); color: var(--ink-soft); display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.act-no span {
  display: inline-grid; place-items: center; min-width: 34px; height: 24px; padding: 0 6px;
  border-radius: var(--radius-tag); background: var(--ribbon); color: var(--on-ribbon);
}
.act h3 { font-size: var(--t-h3); line-height: 1.05; letter-spacing: -.005em; }
.act-body { margin-top: 12px; color: var(--ink-soft); font-size: 16.5px; line-height: 1.55; }

/* stop 01: the wrap ticket (a working mini quote) */
.wrap-ticket {
  margin-top: 22px; padding: 18px 18px 16px; background: var(--card);
  border: 1px solid var(--hairline); border-radius: var(--radius);
  box-shadow: 0 1px 0 var(--hairline), 0 14px 30px -18px color-mix(in srgb, var(--twine) 45%, transparent);
  position: relative;
}
.wrap-ticket::before { /* perforation: it is a ticket you tear off */
  content: ""; position: absolute; left: 14px; right: 14px; top: -1px; height: 2px;
  background: repeating-linear-gradient(90deg, var(--paper-2) 0 6px, transparent 6px 12px);
}
.wt-row + .wt-row { margin-top: 14px; }
.wt-label { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--mono); font-size: 12px; color: var(--ink-soft); margin-bottom: 8px; }
.wt-label output { font-family: var(--sans); font-size: 17px; font-weight: 700; color: var(--ink); }
.wt-stocks { display: flex; gap: 8px; flex-wrap: wrap; }
.wt-stock {
  min-height: 44px; padding: 0 16px; border-radius: var(--radius-small);
  border: 1px solid var(--hairline); background: var(--paper);
  font: 600 15px var(--sans); color: var(--ink);
  transition: border-color var(--t-fast), background var(--t-fast), color var(--t-fast);
}
.wt-stock:hover { border-color: var(--ink); }
.wt-stock[aria-pressed="true"] { background: var(--ribbon); border-color: var(--ribbon); color: var(--on-ribbon); }
.home input[type="range"] { width: 100%; height: 44px; background: transparent; accent-color: var(--ribbon); }
.wt-quote { display: grid; gap: 4px; margin-top: 10px; padding-top: 12px; border-top: 1px dashed var(--hairline); }
.wt-shares { font-family: var(--serif); font-size: 30px; line-height: 1.1; }
.wt-src { font-family: var(--mono); font-size: 11.5px; color: var(--ink-faint); line-height: 1.5; }

/* stop 02: the chat preview */
.chat { margin-top: 22px; display: grid; gap: 10px; justify-items: end; }
.chat-bubble {
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 18px 18px 4px 18px;
  font-size: 15.5px; max-width: 80%;
}
.link-card {
  width: min(330px, 100%); background: var(--card); border: 1px solid var(--hairline);
  border-radius: 14px 14px 4px 14px; overflow: hidden;
  box-shadow: 0 16px 34px -22px color-mix(in srgb, var(--ink) 60%, transparent);
}
.lc-img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; background: var(--paper-2); }
.lc-text { display: grid; gap: 3px; padding: 10px 14px 12px; }
.lc-title { font-weight: 700; font-size: 15px; }
.lc-desc { font-size: 13.5px; color: var(--ink-soft); line-height: 1.4; }
.lc-url { font-family: var(--mono); font-size: 11.5px; color: var(--ink-faint); overflow-wrap: anywhere; }

/* stop 03: the struck-out steps, the strike is a ribbon drawn by scroll */
.strikes { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 8px; }
.strikes li { font-size: 17px; color: var(--ink-soft); }
.strikes s {
  --k: 0;
  text-decoration: none;
  background: linear-gradient(var(--ribbon), var(--ribbon)) no-repeat 0 58% / calc(var(--k) * 100%) 2.5px;
  color: color-mix(in srgb, var(--ink-soft) calc(100% - var(--k) * 45%), transparent);
}
.strikes .strike-keep {
  margin-top: 8px; font-family: var(--serif); font-size: 34px; color: var(--ink);
  opacity: calc(.25 + var(--keep, 0) * .75);
}
.strikes .strike-keep strong { font-weight: 400; color: var(--ribbon); font-style: italic; }

/* stop 04: the reveal, the biggest stage on the page */
.act-reveal { width: min(560px, 44vw); color: var(--on-night); }
.act-reveal .act-no { color: var(--on-night-soft); }
.act-reveal .act-no span { background: var(--foil); color: var(--night); }
.act-reveal .act-body { color: var(--on-night-soft); }
.reveal-figure { margin: 0 0 14px; line-height: .86; }
.rf-num { display: block; font-family: var(--serif); font-size: clamp(76px, 11vw, 176px); color: var(--foil-light); letter-spacing: -.03em; }
.rf-tick { display: inline-block; margin-top: 10px; font-family: var(--mono); font-size: 18px; letter-spacing: .1em; padding: 6px 12px; border: 1px solid var(--foil); border-radius: var(--radius-tag); color: var(--foil-light); }

/* stop navigation */
.stops {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  display: flex; gap: 4px; padding: 5px;
  background: color-mix(in srgb, var(--card) 88%, transparent);
  border: 1px solid var(--hairline); border-radius: 999px;
  transition: background var(--t-med), border-color var(--t-med);
}
.stop {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px;
  border: 0; border-radius: 999px; background: transparent; font: 600 14px var(--sans); color: var(--ink-soft);
}
.stop:hover { color: var(--ink); }
.stop-dot { width: 8px; height: 8px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px currentColor; }
.stop.is-on { color: var(--ink); }
.stop.is-on .stop-dot { background: var(--ribbon); box-shadow: none; }
.journey-stage.is-night .stops { background: color-mix(in srgb, var(--night-2) 90%, transparent); border-color: var(--night-line); }
.journey-stage.is-night .stop { color: var(--on-night-soft); }
.journey-stage.is-night .stop.is-on { color: var(--on-night); }
.journey-stage.is-night .stop.is-on .stop-dot { background: var(--foil); }

@media (max-width: 860px) {
  .journey-track { height: 560vh; }
  .journey-canvas { height: 54%; }
  .act {
    left: 0; right: 0; top: auto; bottom: 0; width: auto;
    padding: 18px var(--gutter) 76px;
    transform: translateY(18px);
    background: linear-gradient(transparent, var(--paper-2) 22px);
  }
  .act.is-active { transform: none; }
  .act-reveal { width: auto; background: linear-gradient(transparent, var(--night) 22px); }
  .act h3 { font-size: 25px; }
  .act-body { font-size: 15px; margin-top: 8px; }
  .wrap-ticket { margin-top: 12px; padding: 12px 14px; }
  .wt-shares { font-size: 24px; }
  .chat { margin-top: 12px; }
  .link-card { width: min(300px, 100%); }
  .lc-img { aspect-ratio: 1200 / 400; }
  .strikes { margin-top: 12px; gap: 4px; }
  .strikes li { font-size: 15px; }
  .strikes .strike-keep { font-size: 26px; margin-top: 2px; }
  .rf-num { font-size: clamp(64px, 20vw, 96px); }
  .stops { bottom: 14px; }
  .stop { padding: 0 10px; font-size: 13px; }
}

/* static journey: reduced motion or no WebGL. Each stop is a plain block. */
.journey.is-static .journey-track { height: auto; }
.journey.is-static .journey-stage { position: relative; height: auto; overflow: visible; }
.journey.is-static .journey-scrim, .journey.is-static .journey-backdrop, .journey.is-static .stops, .journey.is-static .journey-canvas, .journey.is-static .journey-hint { display: none; }
.journey.is-static .acts {
  position: static; pointer-events: auto;
  max-width: var(--wrap); margin: 0 auto; padding: 8px var(--gutter) 40px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px;
}
.journey.is-static .act {
  position: static; width: auto; transform: none; opacity: 1; visibility: visible;
  background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 20px;
}
.journey.is-static .act-reveal { background: var(--night); color: var(--on-night); grid-column: 1 / -1; }
.journey.is-static .rf-num { font-size: clamp(64px, 9vw, 120px); }
.journey.is-static .strikes s { --k: 1; }
.journey.is-static .strike-keep { --keep: 1; }
.act-shot { display: block; width: 100%; height: auto; border-radius: var(--radius-small); margin-bottom: 14px; background: var(--paper-2); }

/* ================================================================
   WHAT IT COSTS: a printed receipt
   ================================================================ */
.costs { padding: clamp(80px, 10vw, 140px) 0; }
.costs-grid { display: grid; grid-template-columns: 1fr minmax(0, 480px); gap: 48px; align-items: start; }
.receipt {
  position: relative; background: var(--card); padding: 26px 26px 34px;
  border: 1px solid var(--hairline); border-bottom: 0;
  font-size: 15.5px;
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - 10px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 18px 10px repeat-x;
          mask: linear-gradient(#000 0 0) top / 100% calc(100% - 10px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 18px 10px repeat-x;
}
.r-line { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px dashed var(--hairline); }
.r-line > span:last-child { text-align: right; }
.r-total { font-weight: 700; font-size: 17px; border-bottom: 1.5px solid var(--ink); }
.r-note { margin-top: 16px; font-size: 13.5px; color: var(--ink-soft); line-height: 1.55; }
@media (max-width: 860px) { .costs-grid { grid-template-columns: 1fr; gap: 28px; } }

/* ================================================================
   THE WRAPPING TABLE BOARD: gift tags from the real records
   ================================================================ */
.board { padding: clamp(80px, 10vw, 140px) 0; background: var(--paper-2); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.board-head { display: grid; grid-template-columns: 1fr minmax(0, 400px); gap: 32px; align-items: end; }
.board-note { color: var(--ink-soft); font-size: 15px; }
.board-counts { margin-top: 10px; font-family: var(--mono); font-size: 13px; color: var(--ink); }
.board-sim {
  margin-top: 28px; display: inline-block; font-family: var(--mono); font-size: 12.5px;
  padding: 8px 12px; border: 1px dashed var(--ribbon); color: var(--ribbon-deep); border-radius: var(--radius-small); background: var(--card);
}
.board-grid {
  margin-top: 32px; display: grid; gap: 18px 16px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
}
.board-empty, .board-error { grid-column: 1 / -1; padding: 40px 0; color: var(--ink-soft); font-size: 17px; }
.gift-tag {
  --tilt: 0deg;
  position: relative; padding: 18px 16px 16px 40px; min-height: 140px;
  background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius-tag);
  clip-path: polygon(20px 0, 100% 0, 100% 100%, 20px 100%, 0 calc(100% - 22px), 0 22px);
  transform: rotate(var(--tilt));
  display: grid; align-content: start; gap: 6px;
  transition: transform var(--t-med) var(--ease-out);
}
.gift-tag:nth-child(3n+1) { --tilt: -1.2deg; }
.gift-tag:nth-child(3n+2) { --tilt: .8deg; }
.gift-tag:nth-child(5n) { --tilt: -.4deg; }
.gift-tag:hover { transform: rotate(0deg) translateY(-2px); }
.gift-tag::before {
  content: ""; position: absolute; left: 15px; top: 18px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--paper-2); box-shadow: inset 0 0 0 1.5px var(--kraft-deep);
}
.gt-tick { font-family: var(--serif); font-size: 34px; line-height: 1; }
.gt-amt { font-family: var(--mono); font-size: 13px; color: var(--ink-soft); }
.gt-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.gt-time { font-size: 12.5px; color: var(--ink-faint); }
.gift-tag.is-unwrapped { background: color-mix(in srgb, var(--st-unwrapped) 6%, var(--card)); }
.gift-tag.is-returned { opacity: .72; }
.gift-tag.is-returned .gt-tick { text-decoration: line-through; text-decoration-color: var(--st-returned); text-decoration-thickness: 1.5px; }
@media (max-width: 860px) { .board-head { grid-template-columns: 1fr; gap: 14px; } }

/* ================================================================
   Contracts / FAQ / closing on the home page
   ================================================================ */
.home .section { padding: clamp(80px, 10vw, 130px) 0; }
.table-scroll { overflow-x: auto; }
.home .contracts-table td.mono { overflow-wrap: anywhere; }
.faq-section .faq { margin-top: 40px; }
.closing { padding: clamp(80px, 10vw, 140px) 0; text-align: center; border-top: 1px solid var(--hairline); }
.closing .hero2-ctas { justify-content: center; }

/* ---------- reveal on enter ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .act, .gift-tag, .menu-btn span { transition: none; }
  .gift-tag { transform: none; }
}
