:root {
  /* Yomira app palette — no value outside this set appears anywhere. */
  --bg: #1E1726;
  --bg-deep: #181020;
  --surface: #2A2035;
  --surface-high: #362A45;
  --pink: #FF8FB1;
  --lavender: #C4A7E7;
  --text: #F3E9F0;
  --muted: #B9A8C4;
  --outline: #4D3F5C;

  --maxw: 1240px;
  --gutter: clamp(20px, 5vw, 64px);
  --spine: clamp(58px, 9vw, 132px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: "Shippori Mincho", Georgia, serif;
  font-weight: 400;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

/* Logo always perfectly square, never distorted. */
.brand-mark,
.device-logo,
.footer-mark {
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 20px var(--gutter);
  background: rgba(24, 16, 32, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--outline);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 28px; }
.brand-name { font-weight: 700; font-size: 1.05rem; letter-spacing: 0.02em; }
.nav-links { display: flex; gap: 30px; margin-left: auto; }
.nav-links a {
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.nav-links a:hover { color: var(--text); }
.link-cta {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--pink);
  padding: 10px 18px;
}
.link-cta:hover { background: var(--lavender); }

/* ---------- Page + section spine ---------- */
.page { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

.sec {
  display: grid;
  grid-template-columns: var(--spine) 1fr;
}

/* The spine carries a continuous vertical rule down the whole page (sections
   stack flush, so the right border reads as one unbroken line). */
.sec-spine {
  border-right: 1px solid var(--outline);
  padding-top: clamp(56px, 9vw, 116px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
}
.sec-body {
  padding: clamp(56px, 9vw, 116px) 0 clamp(56px, 9vw, 116px) clamp(26px, 4vw, 64px);
  min-width: 0;
}

/* Vertical katakana wordmark in the hero spine (tategaki, upright). */
.brand-vert {
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-weight: 700;
  font-size: clamp(1.5rem, 2.6vw, 2.4rem);
  letter-spacing: 0.3em;
  color: var(--muted);
}

/* Oversized faint index + rotated section label. */
.sec-index {
  font-weight: 700;
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  line-height: 0.9;
  color: var(--surface-high);
}
.v-label {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 0.76rem;
  color: var(--muted);
}

/* ---------- Section headings ---------- */
.sec-title {
  font-weight: 700;
  font-size: clamp(1.9rem, 4.4vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.sec-sub { color: var(--muted); margin-top: 14px; font-size: 1.05rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 14px 30px;
  border: 1px solid transparent;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.btn-solid { background: var(--pink); color: var(--bg-deep); }
.btn-solid:hover { background: var(--lavender); }
.btn-line { background: transparent; border-color: var(--outline); color: var(--text); }
.btn-line:hover { border-color: var(--text); }

/* ---------- Hero ---------- */
.hero-body {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 0.85fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}
.kicker {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--lavender);
  margin-bottom: 40px;
}
.hero-title {
  font-weight: 700;
  font-size: clamp(2.5rem, 6.6vw, 5rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin-bottom: 36px;
}
.hero-title .accent { color: var(--pink); }
.hero-lede {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 40ch;
  margin-bottom: 38px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.hero-note { color: var(--muted); font-size: 0.82rem; letter-spacing: 0.05em; }

/* Device pushed down into negative space, aligned to the right edge. */
.hero-visual { justify-self: end; margin-top: clamp(40px, 9vw, 130px); }
.device {
  width: clamp(196px, 21vw, 250px);
  background: var(--surface);
  border: 1px solid var(--outline);
  padding: 13px;
}
.device-bar { width: 42px; height: 5px; background: var(--outline); margin: 4px auto 15px; }
.device-screen {
  background: var(--bg-deep);
  border: 1px solid var(--outline);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.device-logo { width: 64px; margin-bottom: 16px; }
.device-title { font-weight: 700; font-size: 1.3rem; }
.device-status { color: var(--muted); font-size: 0.84rem; margin-top: 2px; }
.device-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
  margin-top: 24px;
}
.device-grid span {
  aspect-ratio: 2 / 3;
  background: var(--surface);
  border: 1px solid var(--surface-high);
}

/* ---------- Features: editorial two-column list ---------- */
.feature-list {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: clamp(32px, 5vw, 80px);
}
.feature {
  display: flex;
  gap: 22px;
  padding: 32px 0;
  border-top: 1px solid var(--outline);
}
.feature-no {
  font-weight: 700;
  font-size: 1rem;
  color: var(--surface-high);
  flex: none;
  width: 2.2em;
}
.feature h3 { font-weight: 700; font-size: 1.25rem; margin-bottom: 8px; letter-spacing: -0.01em; }
.feature p { color: var(--muted); font-size: 0.96rem; }

/* ---------- Screens: staggered figures ---------- */
.shots {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 3vw, 36px);
  align-items: start;
}
.shot {
  position: relative;
  aspect-ratio: 896 / 1920;
  background: var(--surface);
  border: 1px solid var(--outline);
  overflow: hidden;
}
.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.shot figcaption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text);
  background: var(--bg-deep);
  border: 1px solid var(--outline);
  padding: 6px 12px;
}
.shot-b { margin-top: clamp(28px, 7vw, 80px); }
.shot-c { margin-top: clamp(12px, 3vw, 32px); }

.hint { color: var(--muted); font-size: 0.84rem; margin-top: 42px; }
code { background: var(--surface-high); padding: 2px 7px; font-size: 0.85em; }

/* ---------- Download list ---------- */
.download-list { margin-top: 56px; border-top: 1px solid var(--outline); }
.dl-row {
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  align-items: baseline;
  gap: 20px;
  padding: 30px 4px;
  border-bottom: 1px solid var(--outline);
  transition: padding-left 0.2s;
}
.dl-row:hover { padding-left: 18px; }
.dl-platform { font-weight: 700; font-size: 1.6rem; letter-spacing: -0.01em; }
.dl-meta { color: var(--muted); font-size: 0.92rem; }
.dl-action {
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--pink);
}

/* ---------- FAQ ---------- */
.faq { margin-top: 48px; border-top: 1px solid var(--outline); max-width: 820px; }
.faq details { border-bottom: 1px solid var(--outline); padding: 24px 0; }
.faq summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 1.12rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--pink); font-size: 1.5rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); margin-top: 14px; max-width: 70ch; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--outline); }
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 56px var(--gutter) 76px calc(var(--gutter) + var(--spine));
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 16px;
}
.footer-mark { width: 24px; }
.footer-credit { color: var(--muted); }
.footer-credit a { color: var(--pink); }
.footer-credit a:hover { color: var(--lavender); }
.footer-mini { color: var(--muted); font-size: 0.8rem; margin-top: 8px; opacity: 0.65; }

/* ---------- Reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-reveal].in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-body { grid-template-columns: 1fr; }
  .hero-visual { justify-self: start; margin-top: 48px; }
  .feature-list { grid-template-columns: 1fr; }
}

/* Phones */
@media (max-width: 620px) {
  .nav { gap: 14px; padding: 16px var(--gutter); }
  .nav-links { display: none; }
  .link-cta { margin-left: auto; } /* keep the CTA pinned right without the links */

  /* Collapse the vertical spine into a horizontal header strip. */
  .sec { grid-template-columns: 1fr; }
  .sec-spine {
    flex-direction: row;
    align-items: center;
    gap: 14px;
    border-right: none;
    border-top: 1px solid var(--outline);
    padding: 26px 0 0;
  }
  .sec-hero .sec-spine { border-top: none; padding-top: 30px; }
  .brand-vert,
  .v-label {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    letter-spacing: 0.2em;
  }
  .sec-index { font-size: 2rem; }
  .sec-body { padding: 30px 0 56px; }
  .sec-sub { font-size: 1rem; }
  .feature { padding: 26px 0; }
  .faq summary { font-size: 1.05rem; }
  .footer-inner { padding-left: var(--gutter); }

  /* Screens → horizontal swipe carousel so the tall shots stay small. */
  .shots {
    display: flex;
    gap: 14px;
    margin-top: 36px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
  }
  .shot {
    flex: 0 0 62%;
    max-width: 240px;
    scroll-snap-align: start;
    margin-top: 0 !important; /* drop the desktop stagger */
  }

  /* Download rows: platform + action on the top line, meta wraps beneath. */
  .dl-row {
    grid-template-columns: 1fr auto;
    gap: 6px 16px;
    padding: 22px 2px;
  }
  .dl-row:hover { padding-left: 2px; } /* no hover-indent on touch */
  .dl-platform { font-size: 1.35rem; }
  .dl-meta { grid-column: 1 / -1; order: 3; }
}

/* Small phones */
@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .hero-visual { justify-self: center; align-self: center; }
  .device { width: min(72vw, 240px); }
  .shot { flex-basis: 70%; }
}
