/* Homepage-only styles, loaded after styles.css (shared tokens, top bar, footer). */

:root {
  --phone-shadow: 0 2px 4px rgba(0, 0, 0, 0.06), 0 30px 60px -24px rgba(0, 0, 0, 0.35);
  --phone-ring: rgba(0, 0, 0, 0.08);
  --band-bg: #000000;
  --band-fg: #f5f5f7;
  --band-muted: #a1a1a6;
  --band-accent: #5eead4;
  --section-space: clamp(5rem, 12vw, 9.5rem);
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --phone-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.9);
    --phone-ring: rgba(255, 255, 255, 0.16);
    --band-bg: #0b0b0c;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

h1, h2, h3, p { margin: 0; }

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Shared type */
.eyebrow {
  color: var(--accent);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}

.feature-title,
.section-title {
  font-size: clamp(2rem, 4.6vw, 3.25rem);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.028em;
  text-wrap: balance;
  hyphens: auto;
}

:lang(ja) .feature-title,
:lang(ja) .section-title,
:lang(ja) .hero-headline,
:lang(zh) .feature-title,
:lang(zh) .section-title,
:lang(zh) .hero-headline {
  letter-spacing: 0;
  line-height: 1.25;
  word-break: auto-phrase;
}

:lang(ja) .feature-title,
:lang(zh) .feature-title { font-size: clamp(1.75rem, 3.8vw, 2.75rem); }

.feature-text {
  color: var(--muted);
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  line-height: 1.5;
  margin-top: 1.25rem;
  max-width: 34rem;
  text-wrap: pretty;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  background: var(--button-bg);
  color: var(--button-fg);
  font-size: 1.0625rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.button:hover { filter: brightness(1.12); }
.button:active { transform: scale(0.98); }

/* Device frame */
.phone {
  --pw: 260px;
  position: relative;
  flex: none;
  width: var(--pw);
  padding: calc(var(--pw) * 0.03);
  border-radius: calc(var(--pw) * 0.155);
  background: #0b0b0c;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    0 0 0 1px var(--phone-ring),
    var(--phone-shadow);
}

.phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--pw) * 0.125);
  background: #f2f2f2;
}

/* Hero */
.hero {
  padding: clamp(3.5rem, 9vw, 6.5rem) var(--gutter) 0;
  text-align: center;
  overflow: hidden;
  background: radial-gradient(60% 45% at 50% 100%, var(--glow), transparent 70%);
}

.hero-copy {
  max-width: 60rem;
  margin: 0 auto;
}

.hero-name {
  display: block;
  color: var(--accent);
  font-size: clamp(1.125rem, 2.2vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}

.hero-headline {
  display: block;
  font-size: clamp(2.25rem, 6.4vw, 4.5rem);
  line-height: 1.06;
  font-weight: 700;
  letter-spacing: -0.032em;
  text-wrap: balance;
  hyphens: auto;
}

:lang(ja) .hero-headline,
:lang(zh) .hero-headline { font-size: clamp(1.875rem, 5vw, 3.5rem); }

.hero-sub {
  color: var(--muted);
  font-size: clamp(1.0625rem, 1.8vw, 1.3125rem);
  line-height: 1.5;
  max-width: 40rem;
  margin: 1.5rem auto 0;
  text-wrap: pretty;
}

:lang(ja) .hero-sub,
:lang(zh) .hero-sub,
:lang(ja) .feature-text,
:lang(zh) .feature-text { word-break: auto-phrase; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem 1.75rem;
  margin-top: 2rem;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin-top: clamp(3rem, 7vw, 4.5rem);
  /* Phones bleed past the section edge for an editorial crop. */
  margin-bottom: calc(clamp(190px, 52vw, 340px) * -0.6);
}

.hero-visual .phone--front {
  --pw: clamp(190px, 52vw, 340px);
  z-index: 1;
  margin-left: calc(var(--pw) * -0.32);
  margin-top: calc(var(--pw) * 0.16);
}

.hero-visual .phone--back {
  --pw: clamp(172px, 47vw, 310px);
}

.hero + .statement { position: relative; z-index: 2; }

/* Statement pillars: one big idea, no picture. */
.statement {
  background: var(--bg);
  border-top: 0.5px solid var(--hairline);
  padding: var(--section-space) var(--gutter);
}

.statement--band {
  background:
    radial-gradient(60% 70% at 50% 0%, var(--glow), transparent 70%),
    var(--surface);
  border-top: 0;
  margin-bottom: var(--section-space);
}

.statement-inner {
  max-width: 50rem;
  margin: 0 auto;
  text-align: center;
}

.statement-title {
  font-size: clamp(2.125rem, 5.6vw, 4rem);
  line-height: 1.06;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-wrap: balance;
  hyphens: auto;
}

:lang(ja) .statement-title,
:lang(zh) .statement-title {
  font-size: clamp(1.75rem, 4.2vw, 3rem);
  letter-spacing: 0;
  line-height: 1.3;
  word-break: auto-phrase;
}

.statement-text {
  color: var(--muted);
  font-size: clamp(1.125rem, 1.9vw, 1.375rem);
  line-height: 1.5;
  max-width: 38rem;
  margin: 1.5rem auto 0;
  text-wrap: pretty;
}

:lang(ja) .statement-text,
:lang(zh) .statement-text { word-break: auto-phrase; }

/* Features */
.feature {
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 var(--gutter) var(--section-space);
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.stage {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: clamp(2.25rem, 6vw, 4rem) clamp(1rem, 4vw, 3rem);
  border-radius: clamp(1.5rem, 3vw, 2rem);
  background:
    radial-gradient(70% 55% at 50% 40%, var(--glow), transparent 75%),
    var(--surface);
}

.stage .phone { --pw: clamp(200px, 60vw, 280px); }

.stage--duo { padding-inline: 1rem; }

.stage--duo .phone--duo { --pw: clamp(136px, 40vw, 210px); }

.stage--duo .phone--offset {
  margin-left: calc(var(--pw) * -0.14);
  margin-top: calc(var(--pw) * 0.22);
}

@media (min-width: 900px) {
  .feature {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: clamp(3rem, 6vw, 6rem);
  }
  .feature--reverse .feature-copy { order: 2; }
  .feature--reverse .stage { order: 1; }
}

/* Customization */
.panel {
  width: min(100%, 22rem);
  background: var(--bg);
  border-radius: 1.5rem;
  padding: 1.25rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 24px 48px -28px rgba(0, 0, 0, 0.35);
  font-size: 0.9375rem;
}

.panel-label {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

.panel-label--group { margin-top: 1.25rem; }

:lang(ja) .panel-label,
:lang(zh) .panel-label { letter-spacing: 0; }

.swatches {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.swatches span {
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--swatch);
}

.swatches .is-on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--swatch); }

.segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  padding: 2px;
  border-radius: 0.75rem;
  background: var(--toggle-bg);
  margin-bottom: 1.25rem;
  text-align: center;
}

.segmented span {
  padding: 0.45rem 0.25rem;
  border-radius: 0.625rem;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.segmented .is-on {
  background: var(--toggle-active-bg);
  color: var(--fg);
  box-shadow: var(--toggle-active-shadow);
}

.switches {
  list-style: none;
  margin: 0;
  padding: 0;
}

.switches li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border-top: 0.5px solid var(--hairline);
}

.switch {
  flex: none;
  width: 2.5rem;
  height: 1.5rem;
  border-radius: 999px;
  background: var(--hairline);
  position: relative;
}

.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(1.5rem - 4px);
  height: calc(1.5rem - 4px);
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.switch.is-on { background: #14b8a6; }
.switch.is-on::after { left: calc(100% - 1.5rem + 2px); }

/* Everything else */
.more {
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 var(--gutter) var(--section-space);
}

.more .section-title {
  max-width: 40rem;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.tiles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

@media (min-width: 600px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1000px) {
  .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.tile {
  background: var(--surface);
  border-radius: 1.25rem;
  padding: 1.5rem 1.5rem 1.625rem;
}

.tile-icon {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-bottom: 1rem;
}

.tile h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

@media (max-width: 599px) {
  .tile {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    column-gap: 1rem;
    padding: 1.25rem;
  }
  .tile .tile-icon {
    grid-row: span 2;
    margin: 0;
  }
}

.tile p {
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.45;
  margin-top: 0.375rem;
}

/* Privacy band (always dark) */
.privacy-band {
  background:
    radial-gradient(55% 60% at 80% 50%, rgba(45, 212, 191, 0.16), transparent 70%),
    var(--band-bg);
  color: var(--band-fg);
  padding: var(--section-space) var(--gutter);
  scroll-margin-top: 3.5rem;
}

.privacy-inner {
  max-width: var(--content);
  margin: 0 auto;
  display: grid;
  gap: 3rem;
  align-items: center;
}

.privacy-band .eyebrow { color: var(--band-accent); }

.privacy-text {
  color: var(--band-muted);
  font-size: clamp(1.0625rem, 1.5vw, 1.1875rem);
  line-height: 1.6;
  margin-top: 1.5rem;
  max-width: 36rem;
  text-wrap: pretty;
}

.privacy-text a { color: var(--band-accent); }

.privacy-band :focus-visible { outline-color: var(--band-accent); }

.pills {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pills li {
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--band-fg);
}

.cloud-card {
  margin-top: 2.5rem;
  max-width: 36rem;
  padding: 1.5rem 1.5rem 1.375rem;
  border-radius: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
}

.cloud-title {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.cloud-icon {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: var(--band-accent);
  stroke-width: 1.7;
  stroke-linejoin: round;
}

.cloud-lead,
.cloud-text {
  color: var(--band-muted);
  font-size: 0.9375rem;
  line-height: 1.55;
  text-wrap: pretty;
}

.cloud-lead { margin-top: 0.625rem; }

.cloud-list {
  margin: 1rem 0;
  display: grid;
  gap: 1px;
  border-radius: 0.875rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}

.cloud-list div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1rem;
  padding: 0.75rem 1rem;
  background: var(--band-bg);
}

.cloud-list dt {
  min-width: 4.5rem;
  font-weight: 600;
  font-size: 0.9375rem;
}

.cloud-list dd {
  margin: 0;
  flex: 1 1 12rem;
  color: var(--band-fg);
  font-size: 0.9375rem;
}

.cloud-text a { color: var(--band-accent); }

.privacy-visual {
  display: flex;
  justify-content: center;
}

.privacy-visual .phone {
  --pw: clamp(200px, 60vw, 280px);
  --phone-ring: rgba(255, 255, 255, 0.16);
  --phone-shadow: 0 30px 80px -20px rgba(45, 212, 191, 0.25);
}

@media (min-width: 900px) {
  .privacy-inner {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: clamp(3rem, 6vw, 6rem);
  }
}

.privacy-band + .more { padding-top: var(--section-space); }

/* Final call to action */
.cta {
  text-align: center;
  padding: var(--section-space) var(--gutter);
}

.cta-icon {
  display: block;
  width: 96px;
  height: 96px;
  margin: 0 auto 1.75rem;
  border-radius: 22.5%;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.35);
}

.cta .section-title {
  max-width: 40rem;
  margin: 0 auto;
}

.cta-text {
  color: var(--muted);
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  margin: 1rem auto 2rem;
}

/* Scroll reveal: only when JS is running and motion is allowed. */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translate3d(0, 28px, 0);
    transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  }
  .js .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}
