:root {
    --bg: #060607;
    --bg2: #0a0a0c;
    --fg: #e8e8ec;
    --fg2: #7c7c88;
    --muted: #3e3e47;
    --line: #1a1a1f;
    --accent: #ffffff;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
  }

  * { box-sizing: border-box; margin: 0; }
  html { scroll-behavior: smooth; }
  html, body { background: var(--bg); color: var(--fg); overflow-x: hidden; }
  body {
    font-family: "Geist", -apple-system, sans-serif;
    font-size: 16px; line-height: 1.55;
    -webkit-font-smoothing: antialiased;
  }
  ::selection { background: rgba(255,255,255,0.12); }

  .page-bg {
    position: relative;
    background: var(--bg);
  }
  .page-bg::before {
    content: ''; position: fixed; inset: 0; z-index: 1; pointer-events: none;
    opacity: 0.045;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
    background-size: 200px;
  }
  .bg-orbs { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
  .orb-bar {
    position: absolute;
    width: 65%;
    height: 180px;
    left: 17%;
    top: 8%;
    border-radius: 100%;
    background: rgba(255,255,255,0.13);
    filter: blur(90px);
    transform: translateZ(0);
    will-change: transform;
    animation: barFlow 18s ease-in-out infinite;
  }
  @keyframes barFlow {
    0%, 100% { transform: translateZ(0) translateX(-22%) scaleX(0.85); }
    50%       { transform: translateZ(0) translateX(22%) scaleX(1.15); }
  }
  .page-bg > *:not(header):not(.bg-orbs) { position: relative; z-index: 2; }

  a { color: inherit; }
  h1, h2 { font-family: "Instrument Serif", Georgia, serif; font-weight: 400; }
  .wrap { max-width: 1200px; margin: 0 auto; padding: 0 48px; }

  /* curtain */
  .curtain {
    position: fixed; inset: 0; z-index: 200; background: var(--bg);
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.7s cubic-bezier(0.4,0,0,1), visibility 0.7s;
  }
  .curtain.done { opacity: 0; visibility: hidden; pointer-events: none; }
  .curtain-mark {
    font-family: "Instrument Serif", serif; font-style: italic;
    font-size: 34px; color: var(--fg); letter-spacing: -0.01em;
    opacity: 0; transform: translateY(6px);
    animation: curtainIn 0.5s var(--ease) 0.1s forwards;
  }
  @keyframes curtainIn { to { opacity: 1; transform: translateY(0); } }

  /* nav */
  header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 50;
    background: transparent;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.3s ease;
  }
  header.hidden { opacity: 0; }
  header.hidden .wordmark { pointer-events: none; }
  .nav { display: flex; align-items: center; height: 64px; pointer-events: none; }
  .wordmark {
    display: flex; align-items: center; justify-content: center;
    font-family: "Instrument Serif", serif; font-size: 22px; font-style: italic;
    letter-spacing: -0.01em;
    color: var(--fg);
    text-decoration: none;
    cursor: pointer;
    pointer-events: auto;
    transition: opacity 0.2s ease;
  }
  .wordmark:hover { opacity: 0.7; }

  /* buttons */
  .btn {
    font-family: "Geist", sans-serif;
    font-size: 15px; font-weight: 500; letter-spacing: 0.005em;
    padding: 14px 32px; border-radius: 3px;
    background: var(--accent); color: var(--bg);
    border: none; cursor: pointer;
    position: relative; overflow: hidden;
    transition: opacity 0.2s ease, transform 0.2s var(--ease), box-shadow 0.2s ease;
  }
  .btn::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.25) 50%, transparent 100%);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
  }
  .btn:hover::after { transform: translateX(100%); }
  .btn:hover { opacity: 0.92; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.25); }
  .btn:active { opacity: 0.8; transform: translateY(0) scale(0.98); box-shadow: none; }
  .btn-ghost {
    background: transparent;
    color: var(--fg);
    border: 1px solid var(--line);
  }
  .btn-ghost:hover { border-color: var(--muted); box-shadow: 0 4px 12px rgba(0,0,0,0.15); opacity: 1; }

  /* hero */
  .hero {
    position: relative;
    height: 100vh; height: 100dvh;
    display: flex; align-items: center;
    padding: 0;
  }
  .hero h1 {
    font-size: clamp(48px, 5.5vw, 72px);
    line-height: 1.04; letter-spacing: -0.035em;
    margin: 0;
  }
  .hero h1 em { font-style: italic; color: var(--fg2); }
  .hero-word {
    display: inline-block;
    opacity: 0; transform: translateY(32px);
    filter: blur(8px);
    animation: wordUp 0.8s var(--ease) both;
  }
  @keyframes wordUp {
    to { opacity: 1; transform: translateY(0); filter: blur(0); }
  }
  .hero .sub {
    color: var(--fg2); font-size: 20px; max-width: 38ch;
    margin: 24px 0 40px; line-height: 1.5;
    opacity: 0; transform: translateY(16px);
    animation: heroIn 0.9s var(--ease) 0.7s forwards;
  }
  .hero .btns {
    display: flex; gap: 10px; flex-wrap: wrap;
    opacity: 0; transform: translateY(14px);
    animation: heroIn 0.9s var(--ease) 0.85s forwards;
  }
  @keyframes heroIn { to { opacity: 1; transform: translateY(0); } }

  .scroll-hint {
    position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
    color: var(--muted);
    opacity: 0; animation: hintIn 0.6s ease 1.4s forwards;
    transition: opacity 0.4s ease;
  }
  .scroll-hint.hidden { opacity: 0 !important; }
  .scroll-hint svg { animation: hintBounce 2s var(--ease) infinite; }
  @keyframes hintIn { to { opacity: 1; } }
  @keyframes hintBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
  }

  section { padding: 0; }
  .s-statement { padding: 120px 0 112px; }
  .s-roles { padding: 0 0 120px; }
  .s-approach { padding: 0 0 120px; }
  .s-proof { padding: 0 0 120px; }
  .s-end { padding: 0 0 140px; }

  .kicker {
    font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--muted); margin: 0 0 20px; font-weight: 500;
  }

  /* statement */
  .statement {
    font-family: "Instrument Serif", serif;
    font-size: 40px;
    line-height: 1.3; max-width: 32ch; margin: 0;
  }
  .statement .w { color: var(--muted); transition: color 0.3s ease; }
  .statement .w.lit { color: var(--fg); }
  .statement em { font-style: italic; }

  /* roles */
  .roles-lead {
    font-family: "Instrument Serif", serif;
    font-size: 26px;
    line-height: 1.15; margin: 0 0 32px;
  }
  .role-grid { display: flex; flex-wrap: wrap; gap: 10px; }
  .role-tag {
    padding: 10px 20px; border: 1px solid var(--line); border-radius: 3px;
    font-size: 15px; color: var(--fg2); white-space: nowrap;
    transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s var(--ease), background 0.2s ease;
  }
  .role-tag:hover { border-color: var(--muted); color: var(--fg); transform: translateY(-1px); background: rgba(255,255,255,0.03); }
  .roles-rest { margin: 16px 0 0; font-size: 15px; color: var(--muted); }

  /* approach */
  .approach-list { display: flex; flex-direction: column; }
  .approach-row {
    display: flex; align-items: flex-start; gap: 24px;
    padding: 28px 0;
    border-bottom: 1px solid var(--line);
    opacity: 0; transform: translateY(16px);
    filter: blur(5px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease), filter 0.7s var(--ease);
  }
  .approach-row:first-child { border-top: 1px solid var(--line); }
  .approach-row.visible { opacity: 1; transform: translateY(0); filter: blur(0); }
  .approach-num {
    font-family: "Instrument Serif", serif;
    font-size: 32px; line-height: 0.9;
    color: var(--muted); min-width: 32px; flex-shrink: 0;
    transition: color 0.25s ease;
  }
  .approach-row:hover .approach-num { color: var(--fg2); }
  .approach-body { flex: 1; padding-top: 2px; }
  .approach-title { display: block; font-size: 18px; font-weight: 600; margin-bottom: 6px; letter-spacing: -0.01em; }
  .approach-desc { font-size: 16px; color: var(--fg2); margin: 0; line-height: 1.5; }
  .approach-h { margin: 0 0 40px; font-size: 26px; letter-spacing: -0.01em; }

  /* proof */
  .proof-row {
    display: flex; gap: 64px;
    padding: 28px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }
  .proof-item { display: flex; flex-direction: column; gap: 4px; }
  .proof-num {
    font-family: "Instrument Serif", serif;
    font-size: 44px; color: var(--fg); line-height: 1;
  }
  .proof-label { font-size: 14px; color: var(--muted); letter-spacing: 0.01em; }

  /* end CTA */
  .s-end h2 {
    font-size: 26px;
    letter-spacing: -0.025em; margin: 0 0 16px;
  }
  .end-sub { color: var(--fg2); font-size: 18px; max-width: 36ch; margin: 0 0 36px; line-height: 1.5; }
  .btn-lg { padding: 16px 40px; font-size: 16px; }
  .end-or { margin-top: 22px; font-size: 15px; color: var(--muted); }
  .link-btn {
    background: none; border: none; color: var(--fg2);
    font-family: inherit; font-size: inherit; cursor: pointer; padding: 0;
    text-decoration: underline; text-underline-offset: 3px;
    transition: color 0.2s ease;
  }
  .link-btn:hover { color: var(--fg); }

  /* footer */
  footer { border-top: 1px solid var(--line); }
  .footer-inner {
    padding: 36px 0 48px;
    display: flex; justify-content: center; align-items: center;
    font-size: 14px; color: var(--muted);
  }
  .footer-mark { font-family: "Instrument Serif", serif; font-style: italic; font-size: 16px; color: var(--fg2); }

  /* modal */
  .modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 100;
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }
  .modal-overlay.open { opacity: 1; visibility: visible; }
  .modal {
    background: var(--bg2);
    border: 1px solid var(--line); border-radius: 3px;
    width: 100%; max-width: 420px; padding: 36px 32px; position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.03);
    transform: translateY(14px) scale(0.97); opacity: 0;
    transition: transform 0.3s var(--ease), opacity 0.25s ease;
    overflow: hidden;
  }
  .modal-overlay.open .modal { transform: translateY(0) scale(1); opacity: 1; }
  .modal-close {
    position: absolute; top: 14px; right: 14px;
    background: none; border: none; font-size: 18px; color: var(--muted);
    cursor: pointer; padding: 6px; line-height: 1; z-index: 2;
    transition: color 0.2s ease;
  }
  .modal-close:hover { color: var(--fg); }

  .modal-dots {
    display: flex; gap: 6px; margin-bottom: 28px;
  }
  .modal-dot {
    width: 20px; height: 2px; border-radius: 1px;
    background: var(--line); transition: background 0.3s ease;
  }
  .modal-dot.active { background: var(--fg); }
  .modal-dot.done { background: var(--fg2); }

  .modal-slides {
    position: relative;
  }
  .modal-slide {
    display: none;
  }
  .modal-slide.active {
    display: block;
    animation: slideIn 0.25s var(--ease);
  }
  @keyframes slideIn {
    from { opacity: 0; transform: translateX(16px); }
    to { opacity: 1; transform: translateX(0); }
  }

  .modal-slide label {
    display: block; font-family: "Instrument Serif", serif;
    font-size: 20px; font-weight: 400; margin: 0 0 16px;
    line-height: 1.3;
  }
  .modal-slide .hint { font-size: 13px; color: var(--muted); margin: -10px 0 16px; }
  .modal-slide input, .modal-slide textarea {
    width: 100%; font-family: inherit; font-size: 16px;
    padding: 12px 0; border: none; border-bottom: 1px solid var(--line); border-radius: 0;
    background: transparent; color: var(--fg);
    transition: border-color 0.2s ease;
  }
  .modal-slide input:focus, .modal-slide textarea:focus { outline: none; border-color: var(--fg2); }
  .modal-slide input::placeholder, .modal-slide textarea::placeholder { color: var(--muted); }
  .modal-slide textarea { resize: none; }

  .modal-nav {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 28px;
  }
  .modal-back {
    background: none; border: none; color: var(--muted); font-size: 13px;
    cursor: pointer; padding: 6px 0; transition: color 0.2s ease;
    visibility: hidden;
  }
  .modal-back.show { visibility: visible; }
  .modal-back:hover { color: var(--fg); }
  .modal-next {
    font-family: "Geist", sans-serif; font-size: 14px; font-weight: 500;
    padding: 10px 24px; border-radius: 3px;
    background: var(--accent); color: var(--bg); border: none; cursor: pointer;
    transition: opacity 0.2s ease, transform 0.15s var(--ease);
    display: flex; align-items: center; gap: 6px;
  }
  .modal-next:hover { opacity: 0.88; transform: translateY(-1px); }
  .modal-next svg { width: 14px; height: 14px; }
  .modal-hint {
    font-size: 12px; color: var(--muted); margin-top: 12px;
    text-align: right;
  }

  .modal-done {
    display: none; text-align: center; padding: 24px 0;
  }
  .modal-done.active { display: block; animation: slideIn 0.3s var(--ease); }
  .modal-done h3 {
    font-family: "Instrument Serif", serif; font-weight: 400;
    font-size: 24px; margin: 0 0 8px;
  }
  .modal-done p { color: var(--fg2); font-size: 14px; margin: 0; line-height: 1.5; }

  a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }

  /* scroll-reveal */
  .reveal {
    opacity: 0; transform: translateY(20px);
    filter: blur(6px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease), filter 0.8s var(--ease);
  }
  .reveal.visible { opacity: 1; transform: translateY(0); filter: blur(0); }

  .role-tag {
    opacity: 0; transform: translateY(10px);
    filter: blur(4px);
    transition-property: opacity, transform, border-color, color, background, filter;
    transition-duration: 0.5s;
    transition-timing-function: var(--ease);
  }
  .role-tag.visible { opacity: 1; transform: translateY(0); filter: blur(0); }

  @media (max-width: 640px) {
    .wrap { padding: 0 24px; }
    .hero { padding-top: 52px; height: 100dvh; box-sizing: border-box; }
    .hero h1 { font-size: 42px; text-align: left; }
    .hero .sub { font-size: 18px; margin: 20px 0 32px; max-width: 100%; text-align: left; }
    .btn { padding: 10px 18px; font-size: 14px; }
    .hero .btns { gap: 8px; flex-direction: row; flex-wrap: wrap; justify-content: flex-start; }
    .hero .btns .btn { align-self: auto; width: auto; }
    .s-statement { padding: 80px 0 72px; }
    .s-roles { padding: 0 0 80px; }
    .s-approach { padding: 0 0 80px; }
    .s-proof { padding: 0 0 80px; }
    .s-end { padding: 0 0 96px; }
    .statement { font-size: 28px; }
    .approach-row { gap: 16px; padding: 22px 0; }
    .approach-num { font-size: 28px; min-width: 28px; }
    .approach-title { font-size: 17px; }
    .approach-desc { font-size: 16px; }
    .proof-row { gap: 0; flex-wrap: nowrap; justify-content: space-between; }
    .proof-num { font-size: 36px; }
    .proof-label { font-size: 14px; }
    .s-end h2 { font-size: 24px; }
    .btn-lg { padding: 15px 34px; font-size: 16px; }
    .nav { height: 52px; }
  }

  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
      animation-duration: 0.001ms !important;
      animation-iteration-count: 1 !important;
      scroll-behavior: auto !important;
      transition-duration: 0.001ms !important;
    }
    .orb-bar { animation: none !important; }
  }
