/* ==========================================================================
   fxjima — the special-effects island
   Design system: "Lagoon"
   Apple idiom: system type, quiet paper, one living scene.
   No frameworks. No external requests. Everything on the island.
   ========================================================================== */

:root {
  --paper: #fbfbfd;
  --card: #ffffff;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --hairline: rgba(0, 0, 0, 0.09);
  --tint: #087e9c;            /* deep lagoon — AA on paper */
  --tint-ink: #ffffff;
  --warm: #ffb35c;            /* the sparkle */
  --grad: linear-gradient(96deg, #2fc4de 0%, #4e8df5 55%, #9b6cf6 100%);
  --shadow-card: 0 1px 2px rgba(10, 20, 40, 0.05), 0 12px 32px rgba(10, 20, 40, 0.07);
  --shadow-lift: 0 2px 4px rgba(10, 20, 40, 0.06), 0 20px 48px rgba(10, 20, 40, 0.12);
  --nav-bg: rgba(251, 251, 253, 0.72);
  --radius: 24px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0a0a0c;
    --card: #16161a;
    --ink: #f5f5f7;
    --ink-2: #a1a1a6;
    --hairline: rgba(255, 255, 255, 0.14);
    --tint: #4fd6ec;
    --tint-ink: #06232b;
    --nav-bg: rgba(10, 10, 12, 0.72);
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.45);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.5), 0 20px 48px rgba(0, 0, 0, 0.6);
  }
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
               "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--tint); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: rgba(47, 196, 222, 0.28); }

:focus-visible {
  outline: 2.5px solid var(--tint);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--card); color: var(--ink);
  padding: 10px 16px; border-radius: 0 0 12px 0; z-index: 200;
}
.skip:focus { left: 0; }

.container { max-width: 1080px; margin-inline: auto; padding-inline: 24px; }
.narrow { max-width: 760px; }

/* ---------- nav ---------- */

.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.nav.scrolled { border-bottom-color: var(--hairline); }

.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 52px;
}

.brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 17px; font-weight: 600; letter-spacing: -0.01em;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand svg { width: 25px; height: 25px; border-radius: 6px; }

.nav-links { display: flex; gap: 26px; }
.nav-links a {
  font-size: 14px; color: var(--ink); opacity: 0.85;
}
.nav-links a:hover { opacity: 1; text-decoration: none; color: var(--tint); }

main { padding-top: 52px; }

/* ---------- type ---------- */

.eyebrow {
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--tint); margin: 0 0 14px;
}

h1 {
  font-size: clamp(44px, 7.4vw, 86px);
  line-height: 1.04; letter-spacing: -0.03em;
  font-weight: 700; margin: 0 0 22px;
}

h2 {
  font-size: clamp(32px, 4.6vw, 52px);
  line-height: 1.08; letter-spacing: -0.025em;
  font-weight: 700; margin: 0 0 14px;
}

h3 { font-size: 21px; letter-spacing: -0.015em; margin: 0 0 8px; }

.lead {
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.5; color: var(--ink-2);
  max-width: 640px; margin: 0 auto;
}

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.fineprint { font-size: 13px; color: var(--ink-2); }

/* ---------- buttons ---------- */

.actions {
  display: flex; gap: 14px; justify-content: center;
  flex-wrap: wrap; align-items: center; margin-top: 30px;
}

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--tint); color: var(--tint-ink);
  font-size: 16px; font-weight: 500;
  padding: 11px 24px; border-radius: 980px;
  border: none; cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); filter: brightness(0.95); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--tint); font-size: 16px; font-weight: 500;
  padding: 11px 6px;
}
.btn-ghost::after { content: "›"; font-size: 18px; transition: transform 0.18s ease; }
.btn-ghost:hover { text-decoration: none; }
.btn-ghost:hover::after { transform: translateX(3px); }

/* ---------- hero + scene ---------- */

.hero { text-align: center; padding: clamp(56px, 9vw, 108px) 0 0; }

.scene-wrap {
  margin-top: clamp(40px, 6vw, 64px);
  border-radius: clamp(20px, 3vw, 32px);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
  background: #0a1030;
  line-height: 0;
}
.scene-wrap svg { width: 100%; height: auto; }

/* ---------- sections ---------- */

.section { padding-block: clamp(80px, 10vw, 128px); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto clamp(40px, 6vw, 60px); }
.section-head .lead { margin-top: 6px; }

/* ---------- app cards ---------- */

.apps-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.app-card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 26px;
  display: flex; flex-direction: column; gap: 14px;
  color: var(--ink);
  box-shadow: var(--shadow-card);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}
a.app-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
  text-decoration: none;
}

.app-top { display: flex; gap: 18px; align-items: center; }
.app-icon {
  width: 68px; height: 68px; flex: none;
  border-radius: 22.4%;
  box-shadow: 0 2px 6px rgba(10, 20, 40, 0.18);
}
.app-sub { color: var(--ink-2); font-size: 15.5px; margin: 3px 0 0; line-height: 1.45; }

.badges { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: auto; }
.pill {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--tint);
  background: color-mix(in srgb, var(--tint) 12%, transparent);
  padding: 4px 10px; border-radius: 980px;
}
.plat { font-size: 12.5px; color: var(--ink-2); }
.card-more { font-size: 14.5px; font-weight: 500; color: var(--tint); }

.bench {
  margin-top: 20px;
  border: 1px dashed var(--hairline);
  border-radius: var(--radius);
  padding: 22px 26px;
  display: flex; gap: 14px; align-items: center;
  color: var(--ink-2); font-size: 15px;
}
.bench svg { width: 22px; height: 22px; flex: none; }

/* ---------- story ---------- */

.story-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.kanji {
  font-size: clamp(160px, 22vw, 280px);
  line-height: 1; font-weight: 300;
  color: color-mix(in srgb, var(--tint) 16%, transparent);
  text-align: center; user-select: none;
}

.story-copy p { margin: 0 0 18px; font-size: 17.5px; line-height: 1.65; }
.story-copy .fineprint { margin-top: 26px; }

/* ---------- principles ---------- */

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tile {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: var(--shadow-card);
}
.tile svg { width: 38px; height: 38px; margin-bottom: 16px; color: var(--tint); }
.tile p { color: var(--ink-2); font-size: 15.5px; margin: 0; line-height: 1.55; }

/* ---------- CTA band ---------- */

.cta-band {
  background: #0b1224;
  background-image: radial-gradient(720px 340px at 82% -10%, rgba(47, 196, 222, 0.22), transparent 70%);
  border-radius: clamp(24px, 3vw, 36px);
  padding: clamp(52px, 8vw, 88px) 28px;
  text-align: center; color: #f5f5f7;
}
.cta-band h2 { color: #f5f5f7; }
.cta-band .lead { color: #a8b0c2; }
.cta-band .btn { background: #f5f5f7; color: #0b1224; }
.cta-band .btn-ghost { color: #7fe3f2; }

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--hairline);
  padding: 40px 0 56px;
  font-size: 13px; color: var(--ink-2);
}
.foot-row {
  display: flex; justify-content: space-between;
  align-items: center; gap: 16px; flex-wrap: wrap;
}
.foot-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); }
.foot-brand svg { width: 18px; height: 18px; border-radius: 4.5px; }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; }
.foot-links a { color: var(--ink-2); }
.foot-links a:hover { color: var(--tint); }
.foot-jima { margin-top: 18px; opacity: 0.75; }

/* ---------- prose (support / legal) ---------- */

.prose { max-width: 760px; margin-inline: auto; padding-block: clamp(48px, 7vw, 80px); }
.prose h1 { font-size: clamp(36px, 5vw, 54px); }
.prose .lead { margin: 0 0 8px; max-width: none; }
.prose h2 { font-size: 26px; margin: 52px 0 12px; }
.prose h3 { font-size: 19px; margin: 32px 0 8px; }
.prose p, .prose li { color: var(--ink); font-size: 16.5px; line-height: 1.65; }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose .muted { color: var(--ink-2); }
.prose hr { border: none; border-top: 1px solid var(--hairline); margin: 44px 0; }

.prose table {
  width: 100%; border-collapse: collapse;
  font-size: 15px; margin: 18px 0;
}
.prose th, .prose td {
  text-align: left; padding: 10px 12px;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
}
.prose th { font-weight: 600; font-size: 13.5px; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.05em; }

.note {
  background: color-mix(in srgb, var(--tint) 7%, var(--card));
  border: 1px solid color-mix(in srgb, var(--tint) 22%, transparent);
  border-radius: 16px; padding: 16px 20px;
  font-size: 15px; margin: 20px 0;
}

/* ---------- contact card + copy button ---------- */

.contact-card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 26px 28px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap; margin: 28px 0 8px;
}
.contact-card .email { font-size: 21px; font-weight: 600; letter-spacing: -0.01em; }

.copy-btn {
  background: transparent; border: 1px solid var(--hairline);
  color: var(--ink); font-size: 14px; font-weight: 500;
  padding: 8px 16px; border-radius: 980px; cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease;
}
.copy-btn:hover { border-color: var(--tint); color: var(--tint); }
.copy-btn.copied { border-color: var(--tint); color: var(--tint); }

/* ---------- FAQ ---------- */

.faq { display: grid; gap: 12px; margin-top: 28px; }
.faq details {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 18px; padding: 18px 22px;
}
.faq summary {
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  font-weight: 600; font-size: 16.5px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-size: 22px; font-weight: 400;
  color: var(--tint); transition: transform 0.2s ease; flex: none;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 12px 0 4px; color: var(--ink-2); font-size: 15.5px; }

/* ---------- app page ---------- */

.app-hero {
  display: grid; grid-template-columns: auto 1fr;
  gap: clamp(24px, 4vw, 44px); align-items: center;
  padding-block: clamp(56px, 8vw, 96px) 0;
}
.app-hero .app-icon-lg {
  width: clamp(104px, 14vw, 148px); height: clamp(104px, 14vw, 148px);
  border-radius: 22.4%; box-shadow: var(--shadow-lift);
}
.app-hero h1 { margin-bottom: 10px; }
.app-hero .lead { margin: 0; }

.demo-card {
  background: #10131c;
  background-image: radial-gradient(560px 260px at 12% -20%, rgba(255, 179, 92, 0.14), transparent 70%);
  color: #eef1f8;
  border-radius: var(--radius);
  padding: clamp(28px, 5vw, 44px);
  margin-top: clamp(44px, 6vw, 64px);
}
.demo-card h3 { color: #fff; }
.demo-card p { color: #a8b0c2; max-width: 560px; }
.demo-card .btn { background: var(--warm); color: #221302; margin-top: 8px; }
.demo-card .fineprint { color: #7d879c; margin-top: 14px; }

.feature-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 44px; }

/* ---------- reveal ---------- */

.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- 404 ---------- */

.void { text-align: center; padding-block: clamp(100px, 18vw, 200px); }
.void .kanji { font-size: 120px; margin-bottom: 8px; }

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .tiles { grid-template-columns: 1fr; }
  .story-grid { grid-template-columns: 1fr; }
  .kanji { font-size: 140px; }
  .feature-list { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .apps-grid { grid-template-columns: 1fr; }
  .nav-links { gap: 18px; }
  .nav-links a { font-size: 13px; }
  .app-hero { grid-template-columns: 1fr; text-align: center; justify-items: center; }
}

/* ---------- motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* -- launch-wave pill variant -- */
.pill-soon {
  color: #9a6712;
  background: color-mix(in srgb, var(--warm) 18%, transparent);
}
@media (prefers-color-scheme: dark) {
  .pill-soon { color: var(--warm-2); }
}
