/* Product page — layered on style.css tokens */

.home { overflow-x: clip; }

.h-eyebrow { font-size: 21px; font-weight: 600; color: var(--accent-text); margin: 0 0 8px; }
.h-display {
  font-size: clamp(44px, 8.4vw, 96px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -.01em;
  margin: 0;
}
.h-headline {
  font-size: clamp(34px, 5.6vw, 64px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -.005em;
  margin: 0;
}
.h-intro { font-size: clamp(19px, 2vw, 24px); line-height: 1.5; color: var(--text-2); font-weight: 500; }
.center { text-align: center; }
.more { font-size: 19px; color: var(--accent-text); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.more:hover { text-decoration: underline; }
.more svg { width: 8px; height: 13px; }

/* ── Hero ─────────────────────────────── */

.hero-x { padding: 72px 0 0; text-align: center; }
.hero-x .h-intro { max-width: 30em; margin: 22px auto 0; }
.hero-actions { display: flex; justify-content: center; align-items: center; gap: 28px; margin-top: 30px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 22px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 17px; font-weight: 600; text-decoration: none;
}
.btn.soft { background: var(--ink); color: var(--on-ink); }

.hero-stage { position: relative; height: 760px; margin-top: 56px; display: flex; justify-content: center; }
.hero-stage .sky {
  position: absolute; inset: 120px 0 0;
  background: linear-gradient(180deg, var(--canvas) 0%, var(--sky) 45%, var(--canvas) 100%);
  z-index: -1;
}
.device {
  --w: 340px;
  width: var(--w);
  aspect-ratio: 1206 / 2622;
  border-radius: calc(var(--w) * .16);
  padding: calc(var(--w) * .032);
  background: #1d1d1f;
  box-shadow: 0 0 0 1.5px #3a3a3e inset, 0 40px 80px -40px rgba(0, 0, 0, .5);
  position: relative;
  flex: none;
}
.device .screen {
  position: relative; width: 100%; height: 100%;
  border-radius: calc(var(--w) * .13);
  overflow: hidden; background: var(--canvas);
}
.device .screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.hero-device { transform-origin: 50% 0; will-change: transform; }
.hero-mascot {
  position: absolute; width: 150px; z-index: 2;
  left: calc(50% + 120px); top: 210px;
  will-change: transform;
}

/* ── Scroll-lit statement ─────────────── */

.statement { height: 220vh; position: relative; }
.statement .pin {
  position: sticky; top: 0; height: 100vh;
  display: grid; place-items: center;
}
.statement p {
  max-width: 15em; margin: 0 auto; padding: 0 24px;
  font-size: clamp(32px, 5.2vw, 60px); line-height: 1.3; font-weight: 700; text-align: center;
}
.statement .ch { color: var(--text); opacity: .18; transition: opacity .25s linear; }
.statement .ch.on { opacity: 1; }

/* ── Bento ────────────────────────────── */

.bento-sec { padding: 40px 0 120px; }
.bento-sec .h-headline { margin-bottom: 44px; }
.bento {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px;
}
.tile-x {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 32px;
  overflow: hidden;
  position: relative;
  min-height: 300px;
  display: flex; flex-direction: column;
}
.tile-x h3 { font-size: 24px; line-height: 1.3; font-weight: 700; margin: 0 0 8px; }
.tile-x p { color: var(--text-2); font-size: 17px; }
.tile-x .kicker { font-size: 15px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-6 { grid-column: span 6; }
.row-2 { grid-row: span 2; }

.tile-x.dark { background: #1d1d1f; color: #f5f5f7; }
.tile-x.dark p, .tile-x.dark .kicker { color: #a1a1a6; }

/* invoice tile: phone peeking from bottom */
.t-invoice { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; padding-bottom: 0; }
.t-invoice .copy { padding-bottom: 32px; align-self: center; }
.t-invoice .device { --w: 250px; justify-self: center; align-self: end; margin-bottom: -150px; }
.tile-x .big-num { font-family: var(--rounded); font-size: clamp(64px, 8vw, 96px); font-weight: 700; line-height: 1; letter-spacing: -.02em; color: var(--accent); margin: auto 0 12px; }

/* barcode widget */
.widget {
  margin-top: auto;
  background: #f8f3ea; color: #1f2024;
  border-radius: 22px; padding: 14px 16px 12px;
}
.widget .w-head { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.widget svg.bars { width: 100%; height: 58px; display: block; }
.widget .w-code { text-align: center; font-family: var(--mono); font-size: 15px; margin-top: 4px; letter-spacing: .08em; }

/* NFC rings */
.nfc { position: relative; height: 170px; margin-top: auto; display: grid; place-items: center; }
.nfc .core {
  width: 76px; height: 76px; border-radius: 50%;
  background: var(--accent); color: #fff; display: grid; place-items: center; z-index: 1;
}
.nfc .core svg { width: 34px; height: 34px; }
.nfc .ring {
  position: absolute; width: 76px; height: 76px; border-radius: 50%;
  border: 2px solid var(--accent); opacity: 0;
  animation: ping 2.4s cubic-bezier(.2, .6, .3, 1) infinite;
}
.nfc .ring:nth-child(2) { animation-delay: .8s; }
.nfc .ring:nth-child(3) { animation-delay: 1.6s; }
@keyframes ping { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(2.6); opacity: 0; } }

/* split tile */
.people { margin-top: auto; display: grid; gap: 10px; }
.person {
  display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 12px;
  background: var(--canvas); border-radius: 16px; padding: 10px 14px;
}
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; }
.person b { font-family: var(--rounded); font-weight: 600; }
.person .owe { color: var(--positive); }
.person .due { color: var(--accent-text); }
.person small { display: block; color: var(--text-2); font-size: 13px; }

/* glyph tiles */
.glyph-xl { width: 64px; height: 64px; margin-top: auto; color: var(--accent); }
.tile-x.dark .glyph-xl { color: #f5f5f7; }

/* notification bubble */
.notif {
  margin-top: auto;
  background: color-mix(in srgb, var(--canvas) 80%, transparent);
  border-radius: 20px; padding: 12px 14px;
  display: grid; grid-template-columns: 36px 1fr; gap: 10px; align-items: center;
}
.notif img { width: 36px; height: 36px; border-radius: 9px; }
.notif b { font-size: 14px; display: block; }
.notif span { font-size: 14px; color: var(--text-2); line-height: 1.4; display: block; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .9s cubic-bezier(.2, .7, .2, 1), transform .9s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ── Sticky stepper ───────────────────── */

.stepper-sec { padding: 40px 0 80px; }
.stepper { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; margin-top: 24px; }
.stepper .phone-col { position: relative; }
.stepper .phone-pin { position: sticky; top: calc(50vh - 300px); display: flex; justify-content: center; }
.stepper .device { --w: 276px; }
.phone-pin .screen img { opacity: 0; transition: opacity .6s ease; }
.phone-pin .screen img.on { opacity: 1; }
.steps { display: grid; }
.step { min-height: 80vh; display: flex; flex-direction: column; justify-content: center; }
.step h3 { font-size: clamp(28px, 3.2vw, 40px); line-height: 1.2; font-weight: 700; margin: 0 0 14px; transition: color .4s; color: var(--text-3); }
.step p { font-size: 19px; color: var(--text-3); max-width: 22em; transition: color .4s; }
.step.on h3 { color: var(--text); }
.step.on p { color: var(--text-2); }
.step .step-shot { display: none; }

/* ── Privacy (always dark) ────────────── */

.privacy-x { background: #000; color: #f5f5f7; padding: 140px 0 120px; }
.privacy-x .h-intro { color: #a1a1a6; max-width: 28em; margin: 22px auto 0; }
.lock {
  width: 96px; height: 96px; margin: 0 auto 28px; display: block; color: #f5f5f7;
}
.lock path, .lock rect { stroke-dasharray: 120; stroke-dashoffset: 120; transition: stroke-dashoffset 1.4s cubic-bezier(.6, 0, .2, 1); }
.lock.in path, .lock.in rect { stroke-dashoffset: 0; }
.lock .shackle { transition-delay: .3s; }
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 72px; }
.pillar { background: #1d1d1f; border-radius: var(--r-xl); padding: 32px; }
.pillar svg { width: 36px; height: 36px; color: var(--accent); margin-bottom: 18px; }
.pillar h3 { font-size: 21px; margin: 0 0 8px; }
.pillar p { color: #a1a1a6; font-size: 16px; }
.flows { margin-top: 20px; background: #1d1d1f; border-radius: var(--r-xl); padding: 8px 0; }
.flow { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 16px 32px; align-items: baseline; }
.flow + .flow { border-top: .5px solid rgba(255, 255, 255, .1); }
.flow b { font-weight: 600; }
.flow span { color: #a1a1a6; font-size: 15px; display: block; }
.flow em { font-style: normal; color: #a1a1a6; font-size: 15px; white-space: nowrap; }
.privacy-x .more { color: #ff8a7e; }

/* ── Closing ──────────────────────────── */

.closing { padding: 140px 0 100px; text-align: center; }
.closing img { width: 180px; margin: 0 auto 24px; }
.closing .h-intro { margin: 16px auto 28px; }

/* ── Footer (Apple-style small print) ─── */

.foot-x { border-top: .5px solid var(--hairline); padding: 22px 0 40px; font-size: 12px; color: var(--text-2); }
.foot-x .wrap { display: grid; gap: 14px; }
.foot-x .line { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.foot-x nav { display: flex; flex-wrap: wrap; gap: 0; }
.foot-x nav a { color: var(--text-2); text-decoration: none; padding: 0 10px; border-left: 1px solid var(--hairline); }
.foot-x nav a:first-child { padding-left: 0; border-left: 0; }
.foot-x nav a:hover { text-decoration: underline; }
.foot-x .pills button { font-size: 12px; min-height: 26px; padding: 0 12px; }

@media (max-width: 900px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .span-2, .span-3 { grid-column: span 1; }
  .span-4, .span-6 { grid-column: span 2; }
  .row-2 { grid-row: auto; }
  .pillars { grid-template-columns: minmax(0, 1fr); }
  .stepper { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .stepper .phone-col { display: none; }
  .step { min-height: 0; padding: 28px 0; }
  .step h3 { color: var(--text); }
  .step p { color: var(--text-2); }
  .step .step-shot { display: block; margin: 24px auto 0; }
  .step .step-shot.device { --w: 240px; }
}

@media (max-width: 640px) {
  .hero-x { padding-top: 40px; }
  .hero-stage { height: 560px; margin-top: 40px; }
  .hero-stage .device { --w: 250px; }
  .hero-mascot { width: 96px; left: calc(50% + 70px); top: 150px; }
  .bento { grid-template-columns: minmax(0, 1fr); }
  .span-2, .span-3, .span-4, .span-6 { grid-column: auto; }
  .tile-x { padding: 26px; min-height: 0; }
  .t-invoice { grid-template-columns: minmax(0, 1fr); }
  .t-invoice .copy { padding-bottom: 0; }
  .t-invoice .device { margin-bottom: -180px; }
  .flow { grid-template-columns: minmax(0, 1fr); padding: 14px 22px; gap: 2px; }
  .pillar { padding: 26px; }
  .privacy-x { padding: 96px 0 80px; }
  .closing { padding: 96px 0 72px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .statement { height: auto; }
  .statement .pin { position: static; height: auto; padding: 120px 0; }
  .statement .ch { opacity: 1; }
  .nfc .ring { animation: none; }
  .lock path, .lock rect { stroke-dashoffset: 0; transition: none; }
  .hero-device, .hero-mascot { transform: none !important; }
}

/* mini chart in 統計 tile */
.minibars { margin-top: auto; display: flex; align-items: flex-end; gap: 8px; height: 110px; padding-top: 16px; }
.minibars span {
  flex: 1; border-radius: 6px 6px 3px 3px; background: var(--fill);
  height: var(--h); transform-origin: bottom; transform: scaleY(.08);
  transition: transform 1s cubic-bezier(.2, .8, .2, 1);
}
.minibars span.hi { background: var(--accent); }
.reveal.in .minibars span { transform: none; }
.minibars span:nth-child(2) { transition-delay: .06s; } .minibars span:nth-child(3) { transition-delay: .12s; }
.minibars span:nth-child(4) { transition-delay: .18s; } .minibars span:nth-child(5) { transition-delay: .24s; }
.minibars span:nth-child(6) { transition-delay: .3s; } .minibars span:nth-child(7) { transition-delay: .36s; }
@media (prefers-reduced-motion: reduce) { .minibars span { transform: none; transition: none; } }
.h-display, .h-headline, .step h3, .tile-x h3 { text-wrap: balance; }
