:root {
  --paper: #f3f5f8;
  --ink: #11141a;
  --muted: #646b78;
  --line: rgba(17, 20, 26, 0.13);
  --white: #fff;
  --accent: #be4e37;
  --accent-soft: #f1ddd7;
  --night: #171713;
  --panel: rgba(255,255,255,.52);
  --display: "Instrument Serif", Georgia, serif;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  --max: 1180px;
  --radius: 28px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
body.orati {
  --paper: #0c0e13; --ink: #f6f7fa; --muted: #9ca2ae;
  --line: rgba(255,255,255,.12); --accent: #ff684a;
  --accent-soft: rgba(255,104,74,.14); --night: #151820;
  --panel: rgba(255,255,255,.055);
  background:
    radial-gradient(circle at 82% 7%, rgba(108,92,255,.14), transparent 28%),
    radial-gradient(circle at 12% 35%, rgba(255,104,74,.035), transparent 20%),
    var(--paper);
}
body.train {
  --paper: #080d20; --ink: #f5f7ff; --muted: #9ba7c5;
  --line: rgba(163,179,255,.16); --accent: #7188ff;
  --accent-soft: rgba(113,136,255,.15); --night: #050916;
  --panel: rgba(126,149,255,.07);
  background: radial-gradient(circle at 78% 8%, rgba(72,103,255,.2), transparent 30%), var(--paper);
}
body.hanabi {
  --paper: #0d0919; --ink: #fff7fb; --muted: #b1a4bb;
  --line: rgba(255,198,224,.15); --accent: #ff5b91;
  --accent-soft: rgba(255,91,145,.15); --night: #07050e;
  --panel: rgba(255,111,166,.065);
  background:
    radial-gradient(circle at 82% 8%, rgba(130,72,255,.2), transparent 28%),
    radial-gradient(circle at 12% 32%, rgba(255,67,132,.09), transparent 22%),
    var(--paper);
}
body.orati .site-header, body.train .site-header, body.hanabi .site-header { background: color-mix(in srgb, var(--paper) 82%, transparent); }
body.orati .nav-links.open, body.train .nav-links.open, body.hanabi .nav-links.open { background: var(--paper); }
a { color: inherit; }
img { display: block; max-width: 100%; }
button, input, textarea { font: inherit; }

.skip-link { position: fixed; left: 16px; top: -100px; z-index: 100; background: var(--white); padding: 12px 16px; border-radius: 12px; }
.skip-link:focus { top: 16px; }
.shell { width: min(var(--max), calc(100% - 40px)); margin-inline: auto; }
.site-header { position: sticky; top: 0; z-index: 30; backdrop-filter: blur(18px); background: color-mix(in srgb, var(--paper) 86%, transparent); border-bottom: 1px solid var(--line); }
.nav { min-height: 72px; display: flex; align-items: center; gap: 28px; }
.wordmark { text-decoration: none; font-weight: 750; letter-spacing: -.03em; display: inline-flex; align-items: center; gap: 11px; }
.wordmark img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 5px 14px rgba(0,0,0,.12); }
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.nav-links a { text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 600; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-menu { display: none; margin-left: auto; color: var(--ink); border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 9px 13px; }

.hero { min-height: calc(100svh - 72px); display: grid; align-items: center; padding: 76px 0 90px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.02fr .98fr; gap: 64px; align-items: center; }
.kicker { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px; color: var(--accent); font-size: 12px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }
.kicker::before { content: ""; width: 26px; height: 1px; background: currentColor; }
h1, h2, .display { font-family: var(--display); font-weight: 400; letter-spacing: -.045em; }
h1 { margin: 0; max-width: 12ch; font-size: clamp(64px, 8.4vw, 126px); line-height: .86; }
.hero-copy > p:not(.kicker) { max-width: 580px; margin: 30px 0 0; color: var(--muted); font-size: clamp(17px, 2vw, 21px); line-height: 1.55; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 0 20px; border-radius: 999px; text-decoration: none; font-size: 14px; font-weight: 700; border: 1px solid var(--line); transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.button:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(0,0,0,.10); }
.button.primary { color: var(--white); background: var(--accent); border-color: transparent; }
.button.secondary { background: rgba(255,255,255,.54); }
.button[aria-disabled="true"] { pointer-events: none; color: var(--muted); background: rgba(255,255,255,.55); }

.visual-stage { position: relative; min-height: 690px; }
.visual-stage::before { content: ""; position: absolute; inset: 10% -20% 2%; background: radial-gradient(circle at 50% 45%, var(--accent-soft), transparent 62%); filter: blur(20px); }
.app-icon { position: absolute; z-index: 5; width: 104px; height: 104px; top: 5%; right: 7%; border-radius: 25%; box-shadow: 0 24px 60px rgba(0,0,0,.22); transform: rotate(7deg); }
.phone { position: absolute; overflow: hidden; border: 8px solid #191917; border-radius: 42px; background: #000; box-shadow: 0 35px 90px rgba(0,0,0,.26); }
.phone img { width: 100%; height: 100%; object-fit: cover; }
.phone.main { width: 330px; height: 650px; right: 8%; top: 3%; transform: rotate(4deg); }
.phone.side { width: 260px; height: 540px; left: 0; bottom: 0; transform: rotate(-8deg); }
.watch-shot { position: absolute; width: 180px; bottom: 8%; left: 8%; border-radius: 36px; box-shadow: 0 24px 70px rgba(0,0,0,.24); transform: rotate(-7deg); }

.marquee { border-block: 1px solid var(--line); overflow: hidden; }
.marquee-track { width: max-content; display: flex; gap: 36px; padding: 18px 0; animation: drift 30s linear infinite; }
.marquee span { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.marquee span::after { content: "✦"; margin-left: 36px; color: var(--accent); }
@keyframes drift { to { transform: translateX(-50%); } }

.section { padding: 120px 0; }
.section.dark { color: var(--white); background: var(--night); }
.section.soft { background: var(--accent-soft); }
.section-head { display: grid; grid-template-columns: 190px 1fr; gap: 40px; align-items: start; margin-bottom: 62px; }
.section-number { color: var(--accent); font-size: 12px; font-weight: 750; letter-spacing: .13em; text-transform: uppercase; }
h2 { margin: 0; max-width: 15ch; font-size: clamp(48px, 6.2vw, 82px); line-height: .96; }
.section-intro { max-width: 640px; margin: 26px 0 0; color: var(--muted); font-size: 18px; line-height: 1.65; }
.dark .section-intro { color: rgba(255,255,255,.62); }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { min-height: 320px; padding: 28px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.dark .feature { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.11); }
.feature .glyph { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 15px; color: var(--accent); background: var(--accent-soft); font-size: 21px; }
.feature h3 { margin: auto 0 11px; font-size: 21px; letter-spacing: -.03em; }
.feature p { margin: 0; color: var(--muted); line-height: 1.6; font-size: 15px; }
.dark .feature p { color: rgba(255,255,255,.6); }

.proof-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: center; }
.proof-copy { padding: 44px; }
.proof-copy blockquote { margin: 0; font-family: var(--display); font-size: clamp(36px, 5vw, 65px); line-height: 1; letter-spacing: -.035em; }
.proof-list { list-style: none; padding: 0; margin: 36px 0 0; display: grid; gap: 15px; color: rgba(255,255,255,.67); }
.proof-list li { display: flex; gap: 12px; }
.proof-list li::before { content: "✓"; color: var(--accent); font-weight: 800; }
.screenshot-pair { min-height: 720px; position: relative; }
.screenshot-pair img { position: absolute; width: 47%; border-radius: 28px; box-shadow: 0 30px 80px rgba(0,0,0,.4); }
.screenshot-pair img:first-child { left: 4%; top: 3%; transform: rotate(-4deg); }
.screenshot-pair img:last-child { right: 4%; bottom: 2%; transform: rotate(4deg); }

.trust-strip { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--line); }
.trust-item { padding: 26px 18px; text-align: center; border-right: 1px solid var(--line); }
.trust-item:last-child { border-right: 0; }
.trust-item strong { display: block; font-size: 14px; }
.trust-item span { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }

.cta-panel { padding: 70px; border-radius: 40px; color: var(--white); background: var(--night); display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 42px; }
.cta-panel h2 { max-width: 12ch; }
.cta-panel p { max-width: 55ch; color: rgba(255,255,255,.62); line-height: 1.6; }

.page-hero { padding: 92px 0 70px; border-bottom: 1px solid var(--line); }
.page-hero h1 { max-width: 14ch; font-size: clamp(55px, 8vw, 104px); }
.page-hero p { max-width: 720px; color: var(--muted); font-size: 18px; line-height: 1.65; }
.page-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.pill { padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 12px; }
.content-layout { display: grid; grid-template-columns: 250px minmax(0, 760px); gap: 80px; align-items: start; padding: 80px 0 120px; }
.toc { position: sticky; top: 110px; display: grid; gap: 5px; }
.toc strong { margin-bottom: 12px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.toc a { padding: 8px 0; text-decoration: none; color: var(--muted); font-size: 14px; }
.toc a:hover { color: var(--accent); }
.prose { min-width: 0; }
.prose section { scroll-margin-top: 110px; padding: 0 0 54px; margin: 0 0 54px; border-bottom: 1px solid var(--line); }
.prose section:last-child { border-bottom: 0; }
.prose h2 { max-width: none; margin-bottom: 23px; font-family: var(--sans); font-size: 30px; font-weight: 700; letter-spacing: -.04em; }
.prose h3 { margin: 30px 0 10px; font-size: 18px; }
.prose p, .prose li { color: var(--muted); font-size: 16px; line-height: 1.75; }
.prose li + li { margin-top: 9px; }
.prose a { color: var(--accent); }
.callout { margin: 0 0 54px; padding: 26px; border-radius: 20px; background: var(--accent-soft); line-height: 1.7; }
.faq { display: grid; gap: 10px; }
.faq details { border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.faq summary { cursor: pointer; list-style: none; padding: 21px 55px 21px 22px; font-weight: 700; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 22px; top: 17px; color: var(--accent); font-size: 24px; }
.faq details[open] summary::after { content: "−"; }
.faq .answer { padding: 0 22px 22px; color: var(--muted); line-height: 1.7; }
.contact-card { padding: 34px; border-radius: 26px; color: var(--white); background: var(--night); }
.contact-card h2 { font-family: var(--sans); font-size: 28px; font-weight: 700; }
.contact-card p { color: rgba(255,255,255,.65); }

.apps-hero { padding: 110px 0 70px; }
.apps-hero h1 { max-width: 11ch; }
.app-cards { display: grid; gap: 18px; padding-bottom: 120px; }
.app-card { min-height: 430px; display: grid; grid-template-columns: .8fr 1.2fr; overflow: hidden; border-radius: 36px; color: var(--white); background: var(--card-bg, var(--night)); text-decoration: none; }
.app-card-copy { padding: 48px; display: flex; flex-direction: column; align-items: flex-start; }
.app-card-copy img { width: 80px; height: 80px; aspect-ratio: 1; object-fit: cover; flex: 0 0 auto; border-radius: 21px; box-shadow: 0 17px 40px rgba(0,0,0,.28); }
.app-card-copy h2 { margin-top: auto; font-size: 60px; }
.app-card-copy p { color: rgba(255,255,255,.68); line-height: 1.55; }
.app-card-art { min-height: 430px; position: relative; overflow: hidden; background: radial-gradient(circle at 50% 30%, rgba(255,255,255,.2), transparent 55%); }
.app-card-art img { position: absolute; width: 230px; height: auto; aspect-ratio: auto; object-fit: contain; left: 50%; top: 55px; border-radius: 28px; transform: translateX(-50%) rotate(5deg); box-shadow: 0 26px 70px rgba(0,0,0,.38); transition: transform .35s ease; }
.app-card:hover .app-card-art img { transform: translateX(-50%) translateY(-10px) rotate(2deg); }

/* Portfolio index: a cooler, product-led gallery distinct from the editorial app pages. */
body.apps-index {
  --paper: #090b10;
  --ink: #f4f7fb;
  --muted: #9ca5b5;
  --line: rgba(255,255,255,.12);
  --accent: #7c8cff;
  background:
    radial-gradient(circle at 78% 8%, rgba(91,108,255,.16), transparent 29%),
    radial-gradient(circle at 15% 30%, rgba(59,202,255,.08), transparent 24%),
    var(--paper);
}
.apps-index .site-header { background: rgba(9,11,16,.78); }
.apps-index .nav-links.open { background: #0d1017; }
.apps-index .apps-hero { min-height: 620px; display: flex; flex-direction: column; justify-content: center; }
.apps-index .apps-hero h1 { max-width: 10ch; text-wrap: balance; }
.apps-index .apps-hero .section-intro { color: var(--muted); }
.apps-index .app-card { border: 1px solid rgba(255,255,255,.11); box-shadow: 0 30px 90px rgba(0,0,0,.28); }
.apps-index .app-card-copy p { color: rgba(255,255,255,.68); }
.apps-index .button.secondary { color: #f7f9ff; background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.16); backdrop-filter: blur(12px); }
.apps-index .site-footer { color: var(--muted); }
.apps-index .site-footer .footer-grid > span { color: var(--ink); }

/* Dark product pages share structure, while each body supplies its own palette. */
.orati .button.secondary, .train .button.secondary, .hanabi .button.secondary {
  color: var(--ink); background: rgba(255,255,255,.07); border-color: var(--line);
}
.orati .button[aria-disabled="true"], .train .button[aria-disabled="true"], .hanabi .button[aria-disabled="true"] {
  color: var(--muted); background: rgba(255,255,255,.07); border-color: var(--line);
}
.orati .site-footer .footer-grid > span, .train .site-footer .footer-grid > span, .hanabi .site-footer .footer-grid > span { color: var(--ink); }
.orati .pill, .train .pill, .hanabi .pill { background: rgba(255,255,255,.035); }
.orati .callout, .train .callout, .hanabi .callout { border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.orati .content-layout, .train .content-layout, .hanabi .content-layout { color: var(--ink); }

.site-footer { padding: 52px 0; color: var(--muted); border-top: 1px solid var(--line); }
.footer-grid { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.footer-grid > span { font-weight: 700; color: var(--ink); }
.footer-links { margin-left: auto; display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { font-size: 13px; text-decoration: none; }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
@media (max-width: 900px) {
  .nav-menu { display: block; }
  .nav-links { display: none; position: absolute; top: 73px; left: 0; right: 0; padding: 18px 20px 24px; flex-direction: column; align-items: flex-start; background: var(--paper); border-bottom: 1px solid var(--line); }
  .nav-links.open { display: flex; }
  .hero-grid, .proof-grid, .app-card { grid-template-columns: 1fr; }
  .hero { padding-top: 62px; }
  .visual-stage { min-height: 590px; margin-top: 20px; }
  .phone.main { width: 280px; height: 550px; }
  .phone.side { width: 210px; height: 440px; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature { min-height: 240px; }
  .section-head { grid-template-columns: 1fr; gap: 16px; }
  .trust-strip { grid-template-columns: 1fr 1fr; }
  .trust-item:nth-child(2) { border-right: 0; }
  .trust-item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .cta-panel { grid-template-columns: 1fr; padding: 42px 28px; }
  .content-layout { grid-template-columns: 1fr; gap: 44px; }
  .toc { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toc strong { grid-column: 1 / -1; }
  .app-card-art { min-height: 500px; }
}
@media (max-width: 560px) {
  .shell { width: min(100% - 28px, var(--max)); }
  h1 { font-size: 58px; }
  .section { padding: 88px 0; }
  .visual-stage { min-height: 520px; }
  .phone.main { width: 245px; height: 485px; right: 0; }
  .phone.side { width: 175px; height: 365px; left: -5%; }
  .app-icon { width: 78px; height: 78px; right: 0; }
  .watch-shot { width: 130px; left: 0; }
  .screenshot-pair { min-height: 560px; }
  .proof-copy { padding: 20px 6px 48px; }
  .trust-strip { grid-template-columns: 1fr; }
  .trust-item { border-right: 0; border-bottom: 1px solid var(--line); }
  .trust-item:last-child { border-bottom: 0; }
  .toc { grid-template-columns: 1fr; }
  .app-card-copy { padding: 32px 26px; min-height: 380px; }
  .app-card-copy h2 { font-size: 50px; }
  .footer-links { width: 100%; margin-left: 0; }
}
