:root {
  --dark: #010120;
  --dark-soft: #171733;
  --ink: #08080f;
  --white: #ffffff;
  --warm-white: #faf9f7;
  --muted: #686872;
  --hairline: #dfdfe5;
  --orange: #fc4c02;
  --magenta: #ef2cc1;
  --periwinkle: #bdbbff;
  --mint: #c8f6f9;
  --display: "Noto Sans JP", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--white);
  color: var(--ink);
  font-family: var(--display);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
.shell { width: min(1180px, calc(100% - 64px)); margin-inline: auto; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; transform: translateY(-160%); background: var(--white); padding: 10px 14px; color: var(--ink); }
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid var(--mint); outline-offset: 4px; }

.header-band { background: var(--dark); color: var(--white); }
.site-header { position: relative; z-index: 20; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 72px; gap: 28px; border-bottom: 1px solid rgba(255,255,255,.13); }
.brand { display: inline-flex; align-items: center; gap: 11px; width: max-content; min-height: 44px; text-decoration: none; font-size: 15px; font-weight: 700; }
.brand img { width: 34px; height: 34px; border-radius: 4px; }
.desktop-nav { display: flex; gap: 30px; font-size: 14px; }
.desktop-nav a { color: rgba(255,255,255,.76); text-decoration: none; transition: color 180ms ease; }
.desktop-nav a:hover { color: var(--white); }
.site-header > .button { justify-self: end; }
.mobile-menu { display: none; position: relative; justify-self: end; }
.mobile-menu summary { cursor: pointer; list-style: none; color: var(--white); font: 500 11px/1 var(--mono); letter-spacing: .08em; }
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu nav { position: absolute; top: 44px; right: 0; display: grid; min-width: 172px; border: 1px solid rgba(255,255,255,.16); border-radius: 8px; padding: 8px; background: var(--dark-soft); box-shadow: 0 14px 40px rgba(0,0,0,.3); }
.mobile-menu nav a { display: flex; align-items: center; min-height: 44px; padding: 10px 12px; color: var(--white); font-size: 13px; text-decoration: none; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; border: 1px solid transparent; border-radius: 4px; padding: 10px 18px; background: var(--ink); color: var(--white); font: 500 12px/1 var(--mono); letter-spacing: .04em; text-decoration: none; }
.button-light { background: var(--white); color: var(--ink); }
.button-disabled { cursor: not-allowed; opacity: .56; }

.hero-band { overflow: hidden; background: var(--dark); color: var(--white); }
.hero { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(500px, .92fr); gap: 24px; align-items: center; min-height: 748px; padding-block: 56px 72px; }
.hero-copy { position: relative; z-index: 5; }
.eyebrow { margin: 0 0 18px; color: #74747e; font: 500 11px/1 var(--mono); letter-spacing: .1em; }
.eyebrow.on-dark { color: rgba(255,255,255,.56); }
.hero h1 { max-width: 690px; margin: 0; font-size: clamp(42px, 4.1vw, 58px); font-weight: 500; line-height: 1.2; letter-spacing: -.045em; }
.mobile-br { display: none; }
.hero-lead { max-width: 580px; margin: 26px 0 0; color: rgba(255,255,255,.7); font-size: 16px; line-height: 1.9; }
.hero-actions { display: flex; align-items: center; gap: 24px; margin-top: 32px; }
.text-link { color: var(--white); font-size: 14px; text-underline-offset: 5px; }

.hero-demo { position: relative; min-height: 610px; margin: 0; isolation: isolate; }
.demo-meta { position: absolute; z-index: 6; top: 20px; right: 8px; display: flex; align-items: center; gap: 10px; border: 1px solid rgba(255,255,255,.16); border-radius: 99px; padding: 7px 12px; background: rgba(1,1,32,.62); backdrop-filter: blur(10px); font-size: 10px; }
.demo-meta span { color: rgba(255,255,255,.55); }
.demo-meta strong { font-weight: 500; }
.character-glow { position: absolute; z-index: -1; inset: 56px -80px 30px 30px; border-radius: 46% 18% 42% 20%; background: radial-gradient(circle at 28% 42%, rgba(200,246,249,.9) 0 7%, transparent 33%), linear-gradient(135deg, var(--orange), var(--magenta) 47%, var(--periwinkle)); opacity: .92; transform: rotate(-5deg); }
.character-glow::after { content: ""; position: absolute; inset: 62px 48px; border-radius: 42% 20% 38% 24%; background: var(--dark); opacity: .68; }
.mai-portrait { position: absolute; z-index: 1; bottom: -48px; left: -50px; width: 440px; height: 660px; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 20px 30px rgba(0,0,0,.35)); }
.mai-name, .hero-memory, .hero-message { position: absolute; z-index: 3; border: 1px solid rgba(255,255,255,.18); background: rgba(17,17,44,.9); box-shadow: 0 18px 45px rgba(0,0,0,.24); backdrop-filter: blur(12px); }
.mai-name { bottom: 42px; left: 190px; display: grid; min-width: 205px; border-radius: 8px; padding: 17px 19px; }
.mai-name > span, .hero-memory > span { color: var(--mint); font: 500 9px/1 var(--mono); letter-spacing: .08em; }
.mai-name strong { margin-top: 7px; font-size: 24px; font-weight: 500; }
.mai-name small { margin-top: 4px; color: rgba(255,255,255,.56); font-size: 10px; }
.hero-memory { top: 315px; right: 0; display: grid; width: 210px; border-radius: 8px; padding: 17px 18px; }
.hero-memory strong { margin-top: 9px; font-size: 15px; font-weight: 500; }
.hero-memory small { margin-top: 5px; color: rgba(255,255,255,.5); font-size: 10px; }
.hero-message { top: 105px; right: 8px; width: 276px; border-radius: 14px; padding: 15px; }
.message-head { display: flex; align-items: center; gap: 8px; }
.message-head strong { font-size: 12px; font-weight: 500; }
.mini-avatar, .story-avatar { display: block; overflow: hidden; flex: 0 0 auto; border-radius: 50%; background: linear-gradient(145deg, var(--mint), var(--periwinkle)); }
.mini-avatar { width: 32px; height: 32px; }
.mini-avatar img, .story-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.ai-badge { margin-left: auto; border-radius: 99px; padding: 5px 7px; background: rgba(189,187,255,.15); color: #dfddff; font: 500 8px/1 var(--mono); }
.hero-message p { margin: 13px 0 8px; border-radius: 4px 13px 13px 13px; padding: 12px 14px; background: var(--white); color: var(--ink); font-size: 13px; line-height: 1.65; }
.hero-message > small { display: block; color: rgba(255,255,255,.46); font-size: 9px; text-align: right; }
.hero-demo figcaption { position: absolute; z-index: 5; right: 8px; bottom: 4px; color: rgba(255,255,255,.46); font-size: 9px; }
.motion-item { opacity: 0; animation: hero-enter 320ms cubic-bezier(.22,1,.36,1) forwards; }
.motion-portrait { animation-delay: 60ms; }
.motion-name { animation-delay: 100ms; }
.motion-memory { animation-delay: 140ms; }
.motion-message { animation-delay: 180ms; }
@keyframes hero-enter { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

.story-band { padding: 92px 0 96px; background: var(--warm-white); }
.section-heading { display: grid; grid-template-columns: 1.12fr .88fr; gap: 72px; align-items: end; }
.section-heading h2 { margin: 0; font-size: clamp(36px, 4.1vw, 54px); font-weight: 500; line-height: 1.27; letter-spacing: -.035em; }
.section-heading > p { max-width: 410px; margin: 0 0 5px; color: var(--muted); line-height: 1.85; }
.story-flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 54px; scroll-margin-top: 24px; }
.story-step { position: relative; display: grid; grid-template-rows: auto auto 1fr; min-width: 0; min-height: 440px; overflow: hidden; border: 1px solid var(--hairline); border-radius: 14px; padding: 24px; background: var(--white); box-shadow: 0 12px 36px rgba(1,1,32,.04); }
.story-step::before { content: ""; position: absolute; top: 0; right: 0; left: 0; height: 4px; background: linear-gradient(90deg, var(--orange), var(--magenta), var(--periwinkle)); }
.step-number { display: flex; align-items: center; justify-content: space-between; color: #8a8a93; font: 500 10px/1 var(--mono); }
.step-copy h3 { margin: 34px 0 10px; font-size: 23px; font-weight: 500; line-height: 1.45; letter-spacing: -.02em; }
.step-copy p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.75; }
.conversation-preview, .memory-preview, .followup-preview { align-self: end; margin-top: 26px; border-radius: 10px; padding: 18px; background: #f2f2f5; }
.story-bubble { width: fit-content; max-width: 88%; margin: 0; border-radius: 13px; padding: 10px 12px; font-size: 12px; line-height: 1.6; }
.fan-bubble { margin-left: auto; border-top-right-radius: 4px; background: #91e77b; }
.mai-reply { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; }
.story-avatar { width: 34px; height: 34px; }
.mai-bubble { border-top-left-radius: 4px; background: var(--white); }
.memory-preview { display: grid; gap: 13px; background: var(--dark-soft); color: var(--white); }
.memory-owner { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,.12); }
.memory-owner i { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--mint); color: var(--ink); font: normal 500 10px/1 var(--mono); }
.memory-owner span { display: grid; gap: 4px; }
.memory-owner small { color: rgba(255,255,255,.45); font: 500 8px/1 var(--mono); }
.memory-owner strong { font-size: 11px; font-weight: 500; }
.memory-entry { display: grid; grid-template-columns: auto 1fr; gap: 6px 9px; align-items: center; }
.memory-entry > span { border-radius: 99px; padding: 5px 7px; background: var(--mint); color: var(--ink); font: 500 8px/1 var(--mono); }
.memory-entry strong { font-size: 12px; font-weight: 500; }
.memory-entry small { grid-column: 2; color: rgba(255,255,255,.46); font-size: 9px; }
.followup-preview { padding: 0; overflow: hidden; background: var(--dark); color: var(--white); }
.followup-top { display: flex; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.12); padding: 13px 16px; color: rgba(255,255,255,.48); font: 500 9px/1 var(--mono); }
.followup-top strong { color: var(--mint); font-weight: 500; }
.followup-message { display: flex; gap: 10px; padding: 16px; }
.followup-message b { font-size: 11px; font-weight: 500; }
.followup-message b small { margin-left: 5px; color: var(--periwinkle); font: 500 7px/1 var(--mono); }
.followup-message p { margin: 8px 0 0; border-radius: 4px 12px 12px 12px; padding: 10px 12px; background: var(--white); color: var(--ink); font-size: 12px; line-height: 1.6; }
.fiction-note { margin: 18px 0 0; color: #777781; font-size: 10px; }

.workflow-band { padding: 88px 0 92px; }
.workflow-list { display: grid; grid-template-columns: repeat(3, 1fr); margin: 52px 0 0; padding: 0; border-top: 1px solid var(--hairline); border-left: 1px solid var(--hairline); list-style: none; }
.workflow-list li { display: grid; grid-template-columns: auto 1fr; gap: 22px; min-height: 180px; border-right: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); padding: 28px 24px; }
.workflow-list > li > span { padding-top: 4px; color: #8b8b94; font: 500 10px/1 var(--mono); }
.workflow-list h3 { margin: 0 0 10px; font-size: 19px; font-weight: 500; }
.workflow-list p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }

.trust-band { padding: 78px 0; background: var(--mint); }
.trust-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 88px; }
.trust-layout h2 { margin: 0; font-size: clamp(34px, 3.8vw, 48px); font-weight: 500; line-height: 1.36; letter-spacing: -.03em; }
.trust-list { border-top: 1px solid rgba(0,0,0,.2); }
.trust-list article { display: grid; grid-template-columns: 140px 1fr; gap: 22px; border-bottom: 1px solid rgba(0,0,0,.2); padding: 18px 0; }
.trust-list strong { font-size: 14px; font-weight: 500; }
.trust-list p { margin: 0; color: rgba(0,0,0,.6); font-size: 13px; line-height: 1.7; }

.pricing-band { padding: 88px 0 92px; }
.plan-shared { display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; margin-top: 48px; border-radius: 10px; padding: 20px 24px; background: var(--dark); color: var(--white); }
.plan-shared > span { color: var(--mint); font: 500 9px/1 var(--mono); letter-spacing: .08em; }
.plan-shared strong { font-size: 15px; font-weight: 500; }
.plan-shared p { margin: 0; color: rgba(255,255,255,.58); font-size: 12px; }
.pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 12px; border-top: 1px solid var(--hairline); border-left: 1px solid var(--hairline); }
.pricing-grid article { min-width: 0; min-height: 210px; border-right: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); padding: 24px; }
.pricing-grid article > span { color: #7e7e87; font: 500 9px/1 var(--mono); letter-spacing: .08em; }
.pricing-grid h3 { margin: 48px 0 14px; font-size: 15px; font-weight: 400; white-space: nowrap; }
.pricing-grid h3 b { margin-right: 3px; font-size: clamp(28px, 3vw, 40px); font-weight: 500; letter-spacing: -.04em; }
.pricing-grid h3 small { color: var(--muted); font-size: 10px; }
.pricing-grid article > p { margin: 0; border-top: 1px solid var(--hairline); padding-top: 13px; color: var(--muted); font-size: 12px; }
.pricing-notes { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 17px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.pricing-notes p { margin: 0; }
.pricing-notes a, .footer-row a:not(.brand) { color: inherit; text-underline-offset: 3px; }

.closing-band { padding: 82px 0; background: var(--dark); color: var(--white); }
.closing-layout { display: flex; align-items: end; justify-content: space-between; gap: 60px; }
.closing-layout h2 { margin: 0; font-size: clamp(38px, 5vw, 64px); font-weight: 500; line-height: 1.24; letter-spacing: -.04em; }
.closing-layout > .button { flex: 0 0 auto; margin-bottom: 8px; }
.site-footer { overflow: hidden; padding: 56px 0 0; }
.footer-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 30px; align-items: start; }
.footer-brand { color: var(--ink); }
.footer-row p { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.footer-row .legal { text-align: right; }
.footer-row .legal p { margin: 8px 0 0; }
.footer-wordmark { margin: 66px -1vw -1.7vw; color: #ededf0; font-size: clamp(68px, 11.8vw, 190px); font-weight: 500; line-height: .9; letter-spacing: -.065em; text-align: center; white-space: nowrap; }

@media (max-width: 1040px) {
  .hero { grid-template-columns: minmax(0, .9fr) minmax(460px, 1.1fr); gap: 20px; }
  .mai-portrait { left: -80px; width: 420px; }
  .story-flow { grid-template-columns: 1fr; }
  .story-step { grid-template-columns: 150px .8fr 1.2fr; grid-template-rows: auto; gap: 24px; align-items: center; min-height: 240px; }
  .step-copy h3 { margin-top: 0; }
  .conversation-preview, .memory-preview, .followup-preview { align-self: center; width: 100%; margin-top: 0; }
}

@media (max-width: 900px) {
  .desktop-nav { display: none; }
  .site-header { grid-template-columns: 1fr auto; }
  .site-header > .button { display: none; }
  .mobile-menu { display: block; }
  .mobile-menu summary { display: grid; place-items: center; min-width: 44px; min-height: 44px; }
  .hero { grid-template-columns: 1fr; gap: 20px; padding-top: 56px; }
  .hero-copy { max-width: 680px; }
  .hero-demo { width: min(650px, 100%); min-height: 570px; margin-inline: auto; }
  .section-heading { grid-template-columns: 1fr; gap: 18px; }
  .story-step { grid-template-columns: 110px 1fr; }
  .story-step > :last-child { grid-column: 1 / -1; }
  .trust-layout { grid-template-columns: 1fr; gap: 38px; }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .closing-layout { display: grid; }
  .footer-row { grid-template-columns: 1fr 1fr; }
  .footer-row .legal { grid-column: 1 / -1; text-align: left; }
}

@media (max-width: 640px) {
  .shell { width: min(100% - 32px, 1180px); }
  .site-header { min-height: 64px; }
  .brand { font-size: 13px; }
  .brand img { width: 30px; height: 30px; }
  .hero { min-height: auto; padding: 48px 0 44px; }
  .hero h1 { font-size: clamp(34px, 10.3vw, 42px); line-height: 1.28; }
  .mobile-br { display: initial; }
  .desktop-br { display: none; }
  .hero-lead { margin-top: 20px; font-size: 14px; line-height: 1.8; }
  .hero-actions { align-items: stretch; flex-direction: column; gap: 14px; margin-top: 25px; }
  .hero-actions .button { width: 100%; min-height: 44px; }
  .text-link { display: flex; align-items: center; min-height: 44px; }
  .hero-demo { min-height: 500px; margin-top: 4px; }
  .demo-meta { top: 12px; right: 0; }
  .character-glow { inset: 50px -100px 36px 2px; }
  .mai-portrait { bottom: -35px; left: -105px; width: 390px; height: 545px; }
  .mai-name { bottom: 26px; left: 98px; min-width: 158px; padding: 12px 13px; }
  .mai-name strong { font-size: 19px; }
  .hero-message { top: 106px; right: -3px; width: 226px; padding: 12px; }
  .hero-message p { font-size: 11px; }
  .hero-memory { top: 295px; right: -3px; width: 180px; padding: 13px; }
  .hero-memory strong { font-size: 13px; }
  .hero-demo figcaption { right: 0; bottom: -10px; max-width: 180px; line-height: 1.5; text-align: right; }
  .story-band, .workflow-band, .pricing-band { padding: 64px 0; }
  .section-heading h2 { font-size: 32px; }
  .section-heading > p { font-size: 14px; }
  .story-flow { gap: 10px; margin-top: 36px; }
  .story-step { display: grid; grid-template-columns: 1fr; grid-template-rows: auto; gap: 0; min-height: auto; padding: 20px; }
  .story-step > :last-child { grid-column: auto; }
  .step-number { margin-bottom: 22px; }
  .step-copy h3 { margin: 0 0 8px; font-size: 20px; }
  .conversation-preview, .memory-preview, .followup-preview { margin-top: 20px; }
  .fiction-note { line-height: 1.6; }
  .workflow-list { grid-template-columns: 1fr; margin-top: 36px; }
  .workflow-list li { min-height: 128px; padding: 22px 20px; }
  .trust-band { padding: 60px 0; }
  .trust-layout { gap: 32px; }
  .trust-layout h2 { font-size: 31px; }
  .trust-list article { grid-template-columns: 1fr; gap: 6px; padding: 15px 0; }
  .pricing-heading { gap: 12px; }
  .plan-shared { grid-template-columns: 1fr; gap: 8px; margin-top: 32px; padding: 17px 18px; }
  .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 10px; }
  .pricing-grid article { min-height: 164px; padding: 18px 14px; }
  .pricing-grid h3 { margin: 31px 0 11px; font-size: 12px; }
  .pricing-grid h3 b { font-size: clamp(24px, 8vw, 32px); }
  .pricing-grid h3 small { display: block; margin-top: 3px; }
  .pricing-notes { display: grid; gap: 5px; font-size: 10px; }
  .closing-band { padding: 62px 0; }
  .closing-layout { gap: 30px; }
  .closing-layout h2 { font-size: 36px; }
  .closing-layout > .button { width: 100%; min-height: 44px; }
  .site-footer { padding-top: 48px; }
  .footer-row { grid-template-columns: 1fr; gap: 14px; }
  .footer-row .legal { grid-column: auto; }
  .footer-wordmark { margin-top: 50px; font-size: 17vw; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; }
  .motion-item { opacity: 1; transform: none; }
}
