@layer reset, base, layout, components, motion, responsive;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  body, h1, h2, p { margin: 0; }
  button, a { -webkit-tap-highlight-color: transparent; }
  button { font: inherit; }
  button, a { touch-action: manipulation; }
  button { cursor: pointer; }
  img { display: block; max-width: 100%; }
  [hidden] { display: none !important; }
}

@layer base {
  :root { color-scheme: light; --paper: #f8f6fa; --ink: #292536; --muted: #746d80; --plum: #685277; --line: #e5e0e9; --mint: #c2e5da; }
  html { min-width: 320px; background: var(--paper); }
  body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); -webkit-font-smoothing: antialiased; }
  ::selection { background: #d6c7e5; color: var(--ink); }
  a { color: inherit; text-decoration: none; }
  button { color: inherit; }
  button:focus-visible, a:focus-visible { outline: 3px solid #277d82; outline-offset: 6px; }
  svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
  .skip-link { position: fixed; left: 20px; top: -80px; z-index: 20; padding: 16px; background: white; border-radius: 8px; }
  .skip-link:focus { top: 16px; }
}

@layer layout {
  .page-shell { max-width: 1600px; min-height: 100svh; margin: auto; padding: 0 clamp(24px, 5.3vw, 88px); display: flex; flex-direction: column; overflow: clip; }
  .site-header { display: flex; align-items: center; justify-content: space-between; min-height: 120px; border-bottom: 1px solid var(--line); gap: 20px; }
  .hero { flex: 1; display: grid; grid-template-columns: 1fr 1fr; min-height: 710px; align-items: center; gap: 10px; padding: 35px 0 42px; }
  .hero-copy { z-index: 2; padding: 0 0 16px; }
  .preview-scene { position: relative; min-height: 650px; isolation: isolate; }
  .site-footer { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); gap: 20px; min-height: 87px; color: var(--muted); font-size: 12px; }
  .footer-right { display: flex; align-items: center; gap: 35px; }
  .legal-links { display: flex; align-items: center; gap: 20px; }
  .legal-links a { display: inline-flex; align-items: center; min-height: 44px; }
  .legal-links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
}

@layer components {
  .wordmark { display: inline-flex; align-items: center; gap: 10px; font-size: 33px; font-weight: 650; letter-spacing: -1.9px; }
  .wordmark img { width: 33px; height: auto; }
  .header-right { display: flex; align-items: center; gap: 26px; }
  .launch-label { display: flex; align-items: center; gap: 9px; font-size: 12px; color: #625b6f; }
  .status-dot { width: 6px; height: 6px; background: #6f917e; border-radius: 50%; box-shadow: 0 0 0 4px #70927e0c; }
  .icon-button { display: grid; place-items: center; padding: 10px; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: transparent; }
  .icon-button svg { width: 18px; height: 18px; }
  .icon-button:hover { background: #ece7f1; }
  .play-icon { display: none; }
  .motion-paused .pause-icon { display: none; }
  .motion-paused .play-icon { display: block; }
  .eyebrow { display: flex; align-items: center; gap: 12px; font-size: 10px; font-weight: 600; letter-spacing: 2px; color: var(--plum); }
  .tiny-line { display: inline-block; width: 26px; height: 1px; background: #9787a3; }
  h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(65px, 6.7vw, 104px); font-weight: 400; line-height: 1.075; letter-spacing: -4.7px; margin-top: 30px; margin-bottom: 31px; }
  h1 em { font-weight: 400; color: var(--plum); }
  .coming-soon { font-size: 18px; font-weight: 560; letter-spacing: -.25px; margin-bottom: 12px; }
  .description { max-width: 400px; font-size: 15px; line-height: 1.85; color: var(--muted); }
  .hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-top: 29px; }
  .primary-button, .no-js-preview { display: inline-flex; align-items: center; justify-content: space-between; gap: 27px; padding: 18px 25px; border: 1px solid var(--ink); border-radius: 99px; background: var(--ink); color: white; font-size: 13px; transition: background .2s, transform .2s, box-shadow .2s; }
  .primary-button span, .no-js-preview span { font-size: 21px; line-height: 15px; }
  .primary-button:hover, .no-js-preview:hover { background: var(--plum); transform: translateY(-3px); box-shadow: 0 8px 24px #55456025; }
  .primary-button:active { transform: translateY(0); }
  .platform-note { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
  .platform-note svg { width: 15px; height: 19px; }
  .small-note { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); margin-top: 49px; }
  .note-spark { color: #85728f; font-size: 20px; }
  .scene-glow { position: absolute; z-index: -2; width: 640px; height: 640px; top: 10px; left: 50%; transform: translateX(-50%); background: radial-gradient(ellipse at 50% 48%, #d8cee4bb 0, #e4dceca6 37%, #eee9f361 54%, transparent 70%); }
  .orbit { position: absolute; z-index: -1; border: 1px solid #d6cede80; width: 500px; height: 500px; left: 50%; top: 65px; border-radius: 50%; transform: translateX(-50%); }
  .orbit-two { width: 620px; height: 620px; top: 5px; border-color: #e4ddea77; }
  .orbit-one::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #b09cc0; position: absolute; top: 71px; right: 68px; }
  .scene-star { position: absolute; color: #9d8aa9; z-index: 2; }
  .star-one { top: 48px; left: 85px; font-size: 36px; }
  .star-two { right: 22px; top: 208px; font-size: 38px; color: #7eab9d; }
  .phone-position { position: absolute; top: 8px; left: 50%; width: 270px; margin-left: -123px; z-index: 3; perspective: 1200px; }
  .phone-float { transform: rotate(8deg); }
  .phone { position: relative; padding: 7px; border-radius: 43px; background: linear-gradient(130deg, #807a86, #2c2833 16%, #89838d 35%, #302c35 65%, #918c96); border: 1px solid #6d6774; box-shadow: 1px 2px 0 1px #b1abb6 inset, 4px 14px 17px #41324d17, 21px 31px 45px #45365327; transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)); transition: transform .5s ease-out; }
  .phone-screen { position: relative; overflow: hidden; border-radius: 35px; background: #fbfafc; border: 2px solid #232026; }
  .phone-screen img { width: 100%; height: auto; }
  .dynamic-island { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 70px; height: 19px; background: #151417; border-radius: 20px; }
  .phone-key { position: absolute; width: 3px; background: linear-gradient(90deg, #433e49, #9d97a3); border-radius: 3px; }
  .key-one { left: -3px; top: 95px; height: 20px; }
  .key-two { left: -3px; top: 130px; height: 45px; }
  .key-three { right: -3px; top: 141px; height: 49px; }
  .floating-letter { position: absolute; z-index: 1; top: 119px; left: -6px; width: 221px; height: 268px; background: #fffdfa; border: 1px solid #e6e1df; border-radius: 11px; padding: 21px; transform: rotate(-13deg); box-shadow: 0 18px 28px #61516a0d; }
  .letter-kicker { display: flex; align-items: center; gap: 8px; font-size: 8px; letter-spacing: 1.4px; font-weight: 600; color: #837c7a; }
  .letter-avatar { display: grid; place-items: center; letter-spacing: -1px; width: 30px; height: 30px; background: #eae0c9; color: #6c644c; font-size: 17px; font-weight: 500; border-radius: 9px; }
  .floating-letter p { font-family: Georgia, serif; font-size: 25px; line-height: 1.18; margin: 24px 0 18px; letter-spacing: -.6px; }
  .paper-lines { display: grid; gap: 7px; }
  .paper-lines span { height: 3px; border-radius: 2px; background: #e8e4e1; }
  .paper-lines span:nth-child(2) { width: 93%; }
  .paper-lines span:nth-child(3) { width: 64%; }
  .letter-footer { display: flex; justify-content: space-between; margin-top: 23px; padding-top: 13px; border-top: 1px solid #eee8e1; font-size: 7px; color: #8b837c; }
  .reading-note { display: flex; align-items: center; gap: 12px; position: absolute; z-index: 4; right: -11px; bottom: 107px; background: #42374e; color: #eee8f1; width: 249px; padding: 19px 17px; border-radius: 15px; font-size: 12px; line-height: 1.65; box-shadow: 0 14px 26px #4635501c; transform: rotate(-5deg); }
  .reading-note strong { font-weight: 500; color: #fff; }
  .reading-note-icon { display: grid; place-items: center; background: #ffffff0e; width: 40px; height: 40px; border: 1px solid #ffffff14; border-radius: 11px; color: #d9cbe5; }
  .reading-note-icon svg { width: 21px; height: 21px; }
  .note-dot { width: 7px; height: 7px; margin-left: auto; border-radius: 50%; background: #b9d8c7; }
  .preview-caption { position: absolute; bottom: 0; width: 100%; display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 8px; letter-spacing: 2px; color: #94889f; }
  .caption-line { width: 27px; height: 1px; background: #d6cddd; }
  .site-footer > p { font-family: Georgia, serif; font-style: italic; font-size: 15px; color: #776882; }
  .share-button { border: 0; background: transparent; padding: 14px 0 14px 10px; font-size: 11px; color: var(--plum); }
  .share-button span { display: inline-block; margin-left: 13px; font-size: 16px; transition: transform .2s; }
  .share-button:hover span { transform: translate(2px, -2px); }
  .preview-dialog { position: fixed; border: 1px solid #e2dbe8; border-radius: 22px; background: var(--paper); color: var(--ink); padding: 25px; width: min(500px, calc(100% - 32px)); max-height: calc(100svh - 32px); box-shadow: 0 25px 90px #20122944; }
  .preview-dialog::backdrop { background: #201828b3; backdrop-filter: blur(9px); }
  .dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
  .dialog-header .eyebrow { font-size: 8px; margin-bottom: 8px; }
  h2 { font: 400 26px/1.1 Georgia, serif; letter-spacing: -.8px; }
  .close-button { flex-shrink: 0; }
  .dialog-body img { max-height: 62svh; width: auto; margin: auto; border-radius: 22px; border: 1px solid var(--line); }
  .dialog-body p { text-align: center; color: var(--muted); margin-top: 19px; font-size: 11px; line-height: 1.7; }
  body.dialog-open { overflow: hidden; }
  .toast { position: fixed; z-index: 20; bottom: 24px; left: 50%; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 13px 22px; background: var(--ink); color: #fff; border-radius: 99px; font-size: 13px; transition: opacity .2s, transform .2s; max-width: calc(100% - 32px); width: max-content; text-align: center; }
  .toast.visible { opacity: 1; transform: translate(-50%, 0); }
}

@layer motion {
  @keyframes arrive { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
  @keyframes phone-arrive { from { opacity: 0; transform: translateY(45px) rotate(12deg) scale(.94); } to { opacity: 1; transform: translateY(0) rotate(0) scale(1); } }
  @keyframes float-phone { 0%, 100% { transform: translateY(0) rotate(8deg); } 50% { transform: translateY(-13px) rotate(6deg); } }
  @keyframes float-letter { 0%, 100% { transform: translateY(0) rotate(-13deg); } 50% { transform: translateY(11px) rotate(-10deg); } }
  @keyframes float-note { 0%, 100% { transform: translateY(0) rotate(-5deg); } 50% { transform: translateY(-9px) rotate(-3deg); } }
  @keyframes turn-star { 0%, 100% { transform: rotate(0) scale(1); } 50% { transform: rotate(40deg) scale(.85); } }
  @media (prefers-reduced-motion: no-preference) {
    .motion-enabled .reveal { animation: arrive .85s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--order) * 95ms + 80ms); }
    .motion-enabled .phone-position { animation: phone-arrive 1.2s cubic-bezier(.16,1,.3,1) both; }
    .motion-enabled .phone-float { animation: float-phone 8s ease-in-out 1.2s infinite; }
    .motion-enabled .floating-letter { animation: float-letter 9s ease-in-out infinite; }
    .motion-enabled .reading-note { animation: float-note 7s ease-in-out infinite; }
    .motion-enabled .scene-star { animation: turn-star 12s ease-in-out infinite; }
  }
  .motion-paused *, .dialog-open .preview-scene * { animation-play-state: paused !important; }
  .motion-paused .reveal, .motion-paused .phone-position { animation: none; }
  .motion-paused .phone { transform: none; }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .phone { transform: none; }
    .primary-button:hover { transform: none; }
  }
}

@layer responsive {
  @media (min-width: 1450px) { .hero { gap: 35px; } .phone-position { width: 294px; margin-left: -145px; } .preview-scene { min-height: 700px; } .reading-note { bottom: 126px; right: 8px; } .floating-letter { left: 2px; top: 146px; } }
  @media (max-width: 1120px) and (min-width: 781px) { h1 { font-size: 72px; letter-spacing: -4px; } .hero { grid-template-columns: 1.1fr 1fr; } .phone-position { width: 245px; margin-left: -116px; top: 39px; } .floating-letter { width: 190px; left: -13px; top: 152px; padding: 17px; } .floating-letter p { font-size: 22px; } .reading-note { right: -12px; width: 220px; bottom: 112px; } .star-one { left: 24px; top: 76px; } .hero-actions { gap: 15px; } .platform-note { font-size: 10px; } }
  @media (max-width: 780px) {
    .page-shell { padding: 0 26px; }
    .site-header { min-height: 91px; }
    .wordmark { font-size: 29px; }
    .wordmark img { width: 29px; }
    .header-right { gap: 12px; }
    .launch-label { font-size: 10px; }
    .motion-toggle { width: 36px; height: 36px; padding: 8px; }
    .hero { grid-template-columns: 1fr; gap: 14px; padding: 57px 0 29px; }
    .hero-copy { text-align: center; padding: 0; }
    .eyebrow { justify-content: center; font-size: 9px; letter-spacing: 1.6px; }
    .tiny-line { width: 18px; }
    h1 { font-size: clamp(59px, 11.2vw, 83px); line-height: 1.07; letter-spacing: -3.6px; margin: 24px 0; }
    .coming-soon { font-size: 17px; }
    .description { font-size: 14px; line-height: 1.8; max-width: 340px; margin: auto; }
    .hero-actions { justify-content: center; gap: 16px; margin-top: 25px; }
    .small-note { justify-content: center; margin-top: 27px; font-size: 10px; }
    .preview-scene { width: 100%; max-width: 520px; margin: auto; min-height: 628px; margin-top: 22px; }
    .phone-position { top: 28px; width: 253px; margin-left: -125px; }
    .floating-letter { width: 185px; height: 246px; left: 5px; top: 137px; padding: 17px; }
    .floating-letter p { font-size: 22px; }
    .letter-footer { font-size: 6px; }
    .reading-note { right: 5px; bottom: 81px; width: 230px; }
    .star-one { top: 33px; left: 30px; font-size: 29px; }
    .star-two { top: 188px; right: 6px; }
    .orbit { width: 410px; height: 410px; top: 109px; }
    .orbit-two { width: 530px; height: 530px; top: 49px; }
    .scene-glow { width: 570px; height: 610px; }
    .site-footer { padding: 24px 0; min-height: 113px; flex-direction: column; gap: 9px; }
    .footer-right { width: 100%; justify-content: center; flex-wrap: wrap; gap: 0 24px; font-size: 10px; }
    .footer-right .share-button { flex-basis: 100%; padding: 10px 0; }
    .site-footer > p { font-size: 14px; }
  }
  @media (max-width: 420px) {
    .page-shell { padding: 0 21px; }
    .launch-label { font-size: 0; gap: 0; }
    .status-dot { width: 6px; height: 6px; }
    .header-right { gap: 20px; }
    .hero { padding-top: 44px; }
    .description { max-width: 305px; font-size: 13px; }
    .desktop-break { display: none; }
    .hero-actions { flex-direction: column; gap: 13px; }
    .primary-button, .no-js-preview { padding: 17px 24px; }
    .small-note { font-size: 9px; gap: 6px; }
    .preview-scene { min-height: 581px; margin-top: 9px; }
    .phone-position { width: 229px; margin-left: -107px; }
    .phone { border-radius: 38px; padding: 6px; }
    .phone-screen { border-radius: 31px; }
    .dynamic-island { width: 61px; height: 16px; top: 7px; }
    .floating-letter { width: 153px; height: 222px; top: 121px; left: -4px; padding: 15px; }
    .floating-letter p { font-size: 20px; margin-top: 20px; }
    .letter-kicker { font-size: 6px; gap: 6px; }
    .letter-avatar { width: 24px; height: 24px; font-size: 14px; }
    .letter-footer { font-size: 5px; margin-top: 18px; }
    .reading-note { right: -1px; bottom: 79px; width: 201px; padding: 13px; font-size: 10px; gap: 10px; }
    .reading-note-icon { width: 34px; height: 34px; }
    .star-one { left: 17px; font-size: 25px; }
    .star-two { right: -5px; font-size: 27px; }
    .preview-caption { font-size: 7px; letter-spacing: 1.5px; }
  }
}
