:root {
  --white: #ffffff;
  --ivory: #fbf8f4;
  --ink: #1d1a1b;
  --muted: #6b6366;
  --rose: #96455c;
  --gold: #b39b72;
  --gold-soft: #d8c7a3;
  --line: #e9e2e3;
  --serif: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --latin: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Noto Sans JP", "Hiragino Sans", system-ui, sans-serif;
  --gutter: clamp(16px, 5vw, 64px);
  --measure: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 2;
  letter-spacing: 0.04em;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: 0.08em; }
p { margin: 0; }
button { font: inherit; }
/* Each authored line of a heading stays whole; sizes below keep them in width. */
.line { white-space: nowrap; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .4s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); line-height: 1.3; }
.brand-words { display: flex; flex-direction: column; }
/* The app icon keeps the iOS rounded-square silhouette. */
.brand-icon, .cta-icon, .closing-icon { border-radius: 22.5%; box-shadow: 0 6px 18px -8px rgba(29, 26, 27, 0.4); }
.brand-icon { width: 36px; height: 36px; }
.cta-icon { width: 56px; height: 56px; }
.closing-icon { width: 96px; height: 96px; margin: 0 auto 32px; box-shadow: 0 16px 40px -16px rgba(29, 26, 27, 0.5); }
.brand-en { font-family: var(--latin); font-size: 17px; letter-spacing: 0.32em; font-weight: 500; }
.brand-ja { font-family: var(--serif); font-size: 11px; letter-spacing: 0.4em; color: var(--muted); }
.header-right { display: flex; align-items: center; gap: clamp(16px, 3vw, 40px); }
.nav { display: flex; gap: clamp(16px, 3vw, 40px); }
.lang-switch {
  border: 1px solid var(--gold); background: var(--white); color: var(--ink); border-radius: 999px;
  padding: 4px 14px; font-family: var(--sans); font-size: 13px; letter-spacing: 0.08em; cursor: pointer; white-space: nowrap;
}
.lang-switch:hover { background: var(--ivory); }
.lang-switch:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.nav a {
  font-family: var(--latin); font-size: 16px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink); text-decoration: none; position: relative; white-space: nowrap;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 2px; height: 1px; background: var(--gold);
  transition: right .4s ease;
}
.nav a:hover::after, .nav a:focus-visible::after { right: 0; }

/* Shared */
section { padding: clamp(96px, 13vw, 170px) var(--gutter); position: relative; }
.eyebrow {
  font-family: var(--latin); font-size: 15px; letter-spacing: 0.42em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 28px;
}
.eyebrow::before { content: ""; display: inline-block; width: 28px; height: 1px; background: var(--gold); vertical-align: middle; margin-right: 14px; }
h2 { font-size: clamp(22px, 4vw, 42px); line-height: 1.7; }
.cta-row { display: flex; align-items: center; gap: 24px; margin-top: 48px; flex-wrap: wrap; }
.cta {
  display: inline-block; padding: 16px 40px; border: 1px solid var(--ink);
  font-family: var(--serif); font-size: 16px; letter-spacing: 0.2em; color: var(--ink); cursor: default;
}
.cta-note { font-family: var(--serif); font-size: 16px; letter-spacing: 0.2em; color: var(--rose); }

/* Hero: copy and sample rail on the left, portrait with the app phone on the right */
.hero { padding-top: clamp(40px, 5vw, 80px); overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.97) 40%, rgba(255, 255, 255, 0.65) 72%, rgba(255, 255, 255, 0.35)),
    url("images/silk.jpg") center / cover no-repeat;
}
.hero-inner {
  max-width: var(--measure); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: center;
}
.hero-text { min-width: 0; }
.hero h1 { font-size: clamp(30px, 4.2vw, 54px); line-height: 1.6; }
.lead { margin-top: 24px; font-family: var(--serif); font-size: clamp(18px, 2vw, 22px); color: var(--ink); line-height: 2.1; }
.hero-sub { margin-top: 20px; font-size: 15px; color: var(--muted); line-height: 2.1; }
.hero .cta-row { margin-top: 36px; }
.hero-visual { display: flex; justify-content: center; }
.phone-hero { width: clamp(280px, 28vw, 380px); }

/* Concept */
.concept { max-width: 780px; margin: 0 auto; text-align: center; }
.concept .eyebrow::before { display: none; }
.concept-body { margin-top: 56px; display: grid; gap: 32px; color: var(--muted); }
.concept-key { font-family: var(--serif); font-size: clamp(20px, 2.6vw, 28px); color: var(--ink); letter-spacing: 0.12em; margin-top: 24px; }
.concept-key::before, .concept-key::after { content: ""; display: block; width: 1px; height: 48px; background: var(--gold); margin: 0 auto 24px; }
.concept-key::after { margin: 24px auto 0; }
.band { margin: 0; height: clamp(220px, 32vw, 420px); overflow: hidden; }
.band img { width: 100%; height: 100%; object-fit: cover; }

/* Sample picker: a horizontal rail that snaps one portrait at a time. */
.samples { margin-top: 32px; min-width: 0; }
.samples-note { font-size: 13px; color: var(--muted); letter-spacing: 0.04em; }
.samples-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.samples-title { font-family: var(--serif); font-size: 16px; letter-spacing: 0.16em; }
.samples-arrows { display: flex; gap: 8px; }
.samples-arrow {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--gold); background: var(--white);
  color: var(--ink); font-size: 18px; line-height: 1; cursor: pointer;
}
.samples-arrow:disabled { opacity: 0.35; cursor: default; }
.samples-arrow:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.sample-rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(92px, 22%, 128px); gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 4px; padding: 6px 4px 12px;
  scrollbar-width: none; overscroll-behavior-x: contain;
  -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
  mask-image: linear-gradient(90deg, #000 85%, transparent);
}
.sample-rail::-webkit-scrollbar { display: none; }
.sample {
  scroll-snap-align: start; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; color: var(--ink);
  display: grid; gap: 8px; min-width: 0; width: 100%;
}
.sample img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 25%; outline: 1px solid var(--line); outline-offset: 3px; transition: outline-color .3s; }
/* Labels never widen a thumbnail: every column stays the same width. */
.sample span { font-size: 13px; letter-spacing: 0.04em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sample.is-active img, .sample:hover img { outline-color: var(--gold); }
.sample.is-active span { color: var(--rose); }
.sample:focus-visible { outline: 2px solid var(--gold); outline-offset: 6px; }
/* Phone: a generated photoreal frame (images/phone-frame.png, transparent
   screen) laid over the live app screen. Screen box from cut-phone-frame.py. */
.phone {
  container-type: inline-size;
  position: relative; aspect-ratio: 664 / 1343;
  filter: drop-shadow(0 36px 40px rgba(29, 26, 27, 0.22));
}
.phone-frame { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
/* Sizes inside the phone are in cqw: a share of the phone's own width. */
.phone-screen {
  position: absolute; left: 4.4%; top: 1.6%; width: 91.2%; height: 96.7%;
  border-radius: 11% / 5.3%; overflow: hidden; background: var(--white);
  display: flex; flex-direction: column; gap: 2cqw; padding: 0 4cqw 4.5cqw;
  font-family: var(--sans); color: var(--ink); letter-spacing: 0; line-height: 1.35;
}
/* The camera cutout comes from the frame image; time and battery sit beside it. */
.app-status { display: flex; align-items: center; justify-content: space-between; min-height: 11cqw; padding: 3.5cqw 6cqw 0; font-size: 4cqw; font-weight: 500; }
.app-battery { width: 7cqw; height: 3.4cqw; border: 0.5cqw solid var(--ink); border-radius: 1cqw; }
.app-header { display: flex; align-items: center; justify-content: space-between; font-size: 5cqw; font-weight: 500; padding-top: 1cqw; }
.app-icon-back { color: var(--rose); font-size: 8cqw; line-height: 1; }
.app-icon-grid { width: 5cqw; height: 5cqw; border: 0.6cqw solid var(--rose); border-radius: 1cqw; }
.app-compare {
  position: relative; flex: 1 1 auto; min-height: 0; border-radius: 5cqw; overflow: hidden;
  background: #efe7e8; touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.app-compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; pointer-events: none; }
.app-after { position: absolute; inset: 0; clip-path: inset(0 0 0 50%); }
.app-line { position: absolute; top: 0; bottom: 0; left: 50%; width: 0.6cqw; margin-left: -0.3cqw; background: var(--white); box-shadow: 0 0 6px rgba(0, 0, 0, 0.25); pointer-events: none; }
.app-line span {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 11cqw; height: 11cqw; border-radius: 50%; background: var(--white); color: var(--rose);
  display: grid; place-items: center; font-size: 4.6cqw; font-weight: 500; white-space: nowrap;
}
.app-tag {
  position: absolute; bottom: 3cqw; padding: 0.6cqw 2.4cqw; border-radius: 2cqw;
  background: rgba(255, 255, 255, 0.88); font-size: 3.2cqw; font-weight: 500; pointer-events: none;
}
.app-tag-left { left: 3cqw; }
.app-tag-right { right: 3cqw; }
.app-compare.is-original .app-after, .app-compare.is-original .app-line, .app-compare.is-original .app-tag-right { visibility: hidden; }
.app-compare[data-interactive-compare] { cursor: ew-resize; }
.app-compare:focus-visible { outline: 0.8cqw solid var(--gold); outline-offset: -0.8cqw; }
.app-hint {
  background: #dfeefd; color: #294a78; border-radius: 2.6cqw; text-align: center;
  font-size: 3.3cqw; font-weight: 500; padding: 1.6cqw 1cqw; white-space: nowrap;
}
.app-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.6cqw; }
.app-chips span {
  border: 0.3cqw solid rgba(150, 69, 92, 0.45); border-radius: 2.4cqw; color: var(--rose);
  text-align: center; font-size: 3.6cqw; padding: 1.5cqw 0; line-height: 1.3;
}
.app-chips .is-on { background: var(--rose); border-color: var(--rose); color: var(--white); }
.app-row { display: flex; justify-content: space-between; font-size: 4cqw; font-weight: 500; line-height: 1.3; }
.app-slider { height: 1.2cqw; border-radius: 1cqw; background: #d9d4d4; position: relative; }
.app-slider span { position: absolute; inset: 0 30% 0 0; background: var(--rose); border-radius: 1cqw; }
.app-slider span::after { content: ""; position: absolute; right: -2.4cqw; top: 50%; width: 4.8cqw; height: 4.8cqw; margin-top: -2.4cqw; border-radius: 50%; background: var(--rose); }
/* The website's stand-in for the app's long-press: a clear full-width button. */
.app-original {
  width: 100%; border: 0.4cqw solid var(--rose); border-radius: 3cqw; background: #f8eef0; color: var(--rose);
  font-size: 4cqw; font-weight: 500; padding: 2.4cqw 0; line-height: 1.3; cursor: pointer;
}
.app-original::before { content: "◐  "; }
.app-original[aria-pressed="true"] { background: var(--rose); color: var(--white); }
.app-original:focus-visible { outline: 0.8cqw solid var(--gold); outline-offset: 0.4cqw; }
.app-save { background: var(--rose); color: var(--white); border-radius: 3cqw; text-align: center; font-size: 4cqw; padding: 2.8cqw 0; line-height: 1.3; }

/* The First Step */
.first-step { background: var(--white); }
.first-step-inner {
  max-width: var(--measure); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center;
}
.first-step-figure { margin: 0; }
.first-step-figure img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.first-step h2 { font-size: clamp(22px, 3.6vw, 42px); }
.first-step-lead { margin-top: 40px; color: var(--muted); line-height: 2.3; }
.ritual {
  list-style: none; margin: clamp(64px, 9vw, 112px) auto 0; padding: 0; max-width: var(--measure);
  display: grid; grid-template-columns: repeat(3, 1fr); text-align: center;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.ritual li { padding: 40px 20px; display: grid; gap: 10px; position: relative; }
.ritual li + li { border-left: 1px solid var(--line); }
.ritual .num { font-family: var(--latin); font-size: 30px; color: var(--gold); letter-spacing: 0.1em; line-height: 1; }
.ritual-title { font-family: var(--serif); font-size: 19px; letter-spacing: 0.12em; }
.ritual-text { font-size: 15px; color: var(--muted); }
.ritual-key { background: var(--ivory); }
.ritual-key .ritual-title { color: var(--rose); }
.ritual-key::after {
  content: attr(data-badge); position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  padding: 0 12px; background: var(--white); font-size: 13px; letter-spacing: 0.16em; color: var(--rose); white-space: nowrap;
}

/* Features */
.features { max-width: var(--measure); margin: 0 auto; }
.feature-grid { margin-top: 64px; display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(24px, 3vw, 40px); }
.feature { border-top: 1px solid var(--ink); padding-top: 28px; }
.feature-en { font-family: var(--latin); font-style: italic; font-size: 20px; color: var(--gold); letter-spacing: 0.06em; }
.feature h3 { font-size: 20px; margin: 10px 0 16px; line-height: 1.7; }
.feature p:last-child { font-size: 15px; color: var(--muted); line-height: 2.1; }

/* How to */
.howto {
  max-width: var(--measure); margin: 0 auto;
  display: grid; grid-template-columns: 5fr 6fr; gap: clamp(32px, 7vw, 112px); align-items: center;
}
.howto-figure { margin: 0; }
.howto-figure img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.steps { margin: 48px 0 0; display: grid; }
.steps div { display: grid; grid-template-columns: 7em 1fr; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.steps div:first-child { border-top: 1px solid var(--line); }
.steps dt { font-family: var(--serif); font-size: 20px; letter-spacing: 0.16em; }
.steps dd { margin: 0; font-size: 16px; color: var(--muted); }

/* Price */
.price { text-align: center; background: var(--ivory); }
.price .eyebrow::before { display: none; }
.price h2 { font-size: clamp(32px, 5vw, 56px); }
.plans { max-width: 820px; margin: 64px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 3vw, 32px); text-align: left; }
.plan { background: var(--white); padding: 44px clamp(24px, 4vw, 48px); border: 1px solid var(--line); }
.plan-premium { border-color: var(--gold); }
.plan-en { font-family: var(--latin); font-size: 16px; letter-spacing: 0.36em; text-transform: uppercase; color: var(--gold); }
.plan-price { font-family: var(--latin); font-size: 56px; line-height: 1.2; margin-top: 12px; }
.plan-price span { font-family: var(--serif); font-size: 18px; margin-left: 6px; }
.plan-note { font-size: 14px; color: var(--muted); }
.plan ul { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 10px; font-size: 16px; }
.price-note { margin-top: 32px; font-size: 15px; color: var(--muted); }
.plan li::before { content: ""; display: inline-block; width: 14px; height: 1px; background: var(--gold); vertical-align: middle; margin-right: 12px; }

/* Closing: soft morning light */
.closing { text-align: center; background: var(--ivory); overflow: hidden; }
.closing-bg {
  position: absolute; inset: 0; opacity: 0.45;
  background: url("images/soft-light.jpg") center / cover no-repeat;
}
.closing > :not(.closing-bg) { position: relative; }
.closing .eyebrow::before { display: none; }
.closing h2 { font-size: clamp(26px, 4.4vw, 48px); }
.closing .cta-row { justify-content: center; }
.closing .cta { background: rgba(255, 255, 255, 0.7); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line); color: var(--muted);
  padding: 56px var(--gutter) 40px; text-align: center; font-size: 14px; display: grid; gap: 6px; line-height: 1.9;
}
.site-footer .brand-en { color: var(--ink); margin-bottom: 16px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; margin-top: 12px; }
.footer-links a { color: var(--muted); }
.copyright { margin-top: 20px; font-family: var(--latin); letter-spacing: 0.2em; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 1.2s ease, transform 1.2s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Four feature columns need room for each heading on one line. */
@media (max-width: 1100px) {
  .feature-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .nav { display: none; }
}
@media (max-width: 860px) {
  .hero-inner, .first-step-inner, .howto { grid-template-columns: 1fr; }
  .hero-visual { max-width: 560px; margin: 0 auto; width: 100%; }
  /* Stacked: copy, then the phone, then the sample rail and the store button. */
  .hero-inner { row-gap: 0; }
  .hero-text { display: contents; }
  .hero-text > * { order: 1; }
  .hero-visual { order: 2; margin-top: 40px; }
  .hero .samples { order: 3; }
  .hero .cta-row { order: 4; }
  .howto-figure, .first-step-figure { max-width: 520px; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .eyebrow { letter-spacing: 0.26em; font-size: 14px; }
  .phone-hero { width: min(320px, 84vw); }
  .sample-rail { grid-auto-columns: 30%; gap: 10px; }
  .sample span { font-size: 12px; letter-spacing: 0; }
  .ritual { grid-template-columns: 1fr; }
  .ritual li + li { border-left: 0; border-top: 1px solid var(--line); }
  .ritual-key::after { position: static; transform: none; padding: 0; background: none; order: -1; }
  .feature-grid, .plans { grid-template-columns: 1fr; }
  .steps div { grid-template-columns: 1fr; gap: 4px; }
  .cta { padding: 14px 28px; }
}
