/* Readability and responsive improvements for the public 3D homepage only. */
:root {
  --home-text: #f5f8ff;
  --home-muted: #d5e0f4;
  --home-light-text: #202d45;
  --home-light-muted: #40506a;
}

html { scroll-padding-top: 1rem; }
body { color: var(--home-text); font-size: 17px; line-height: 1.6; }
.reveal { opacity: 1; transform: none; transition: none; }
main, section, article, .hero-copy, .demo-layout > *, .showcase > * { min-width: 0; }
a, button { -webkit-tap-highlight-color: rgba(146,231,236,.3); }
a:focus-visible, button:focus-visible { outline: 3px solid #73f5ea; outline-offset: 4px; }
.skip-link { background: #fff; border: 3px solid #0a2940; border-radius: 10px; color: #061521; font-weight: 800; left: 12px; padding: 12px 18px; position: fixed; top: 12px; transform: translateY(-150%); z-index: 1000; }
.skip-link:focus { transform: translateY(0); }

.nav { color: #eef3ff; font-size: 15px; font-weight: 700; }
.nav a, .footer a { border-radius: 6px; }
.nav a:hover, .nav a:focus-visible { color: #a9fff0; text-decoration: underline; text-underline-offset: 5px; }
.nav-cta, .btn { font-size: 15px; min-height: 48px; padding: 12px 20px; text-align: center; }
.menu-toggle { min-height: 48px; min-width: 48px; }

.eyebrow { background: rgba(5, 18, 37, .78); border: 1px solid rgba(172, 251, 242, .65); border-radius: 100px; color: #f0fffd; display: inline-flex; font-size: 13px; font-weight: 800; letter-spacing: .1em; line-height: 1.4; padding: 9px 14px; text-wrap: pretty; }
.hero-copy { max-width: 700px; }
.hero h1 { font-size: clamp(3.2rem, 6.7vw, 6.7rem); letter-spacing: -.065em; line-height: 1.08; text-wrap: balance; }
.hero-copy > p { color: #edf3ff; font-size: clamp(1.125rem, 1.3vw, 1.35rem); font-weight: 500; line-height: 1.65; max-width: 57ch; text-shadow: 0 1px 12px #050b18; }
.hero-foot { color: #e1ebfc; font-size: 15px; font-weight: 600; gap: 12px 24px; line-height: 1.5; }
.hero-foot b { color: #b4fff3; font-size: 19px; }

.overline { color: #d7faff; font-size: 13px; letter-spacing: .11em; line-height: 1.5; }
.section h2, .cta h2 { line-height: 1.17; text-wrap: balance; }
.section-lead, .demo p, .security p, .journey-tile p, .cta p { font-size: clamp(1.08rem, 1.25vw, 1.25rem); line-height: 1.7; }
.section-lead, .demo p, .journey-tile p, .cta p { color: var(--home-muted); }
.cta p[style] { color: #e5efff !important; }
.light, .security { color: var(--home-light-text); }
.light .section-lead, .security p { color: var(--home-light-muted); }
.light .overline, .security .overline { color: #3148a4; }
.process-card .step { color: #3347a0; font-size: 14px; }
.process-card h3, .journey-tile h3, .feature h3 { font-size: clamp(1.3rem, 1.7vw, 1.55rem); line-height: 1.3; }
.process-card p { color: #36465f; font-size: 17px; line-height: 1.65; }
.feature p { color: #d8e3f6; font-size: 17px; line-height: 1.65; }
.feature-icon { color: #efffff; }
.showcase-points, .problem-old > span:not(.comparison-tag), .problem-new > span:not(.comparison-tag) { color: #e3ebfa; font-size: 16px; line-height: 1.6; }
.comparison-tag { color: #d7e2f5; font-size: 14px; }
.problem-old strong, .problem-new strong { font-size: clamp(1.25rem, 2vw, 1.55rem); min-height: 0; }
.demo-status { color: #e1edff; font-size: 16px; line-height: 1.5; }
.form-caption, .demo-badge, .field label { color: #43536f; font-size: 13px; }
.field .value { color: #354762; font-size: 15px; height: auto; min-height: 44px; overflow-wrap: anywhere; padding: 9px 10px; }
.field .value.filled { color: #123d39; }
.footer { color: #cfdbef; font-size: 15px; }
.footer a { color: #f0f5ff; }

@media (min-width: 901px) {
  .hero::before { background: linear-gradient(90deg, rgba(5,11,25,.9), transparent 65%); opacity: 1; z-index: 2; }
  .hero #three-bg { bottom: 0; height: 100%; inset: 0 0 0 auto; transform: none; width: 46%; }
}

@media (min-width: 901px) and (max-width: 1100px) {
  .hero-copy { width: 46%; }
  .hero h1 { font-size: clamp(3rem, 5.9vw, 5.2rem); }
  .hero-foot { display: grid; gap: 8px; margin-top: 30px; }
}

@media (max-width: 1100px) {
  .process { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .process-card:last-child { grid-column: 1 / -1; min-height: 0; }
  .feature { padding: 28px; }
}

@media (max-width: 900px) {
  .menu-toggle { align-items: center; display: inline-flex; justify-content: center; }
  .nav { align-items: stretch; background: #0b1322; border-bottom: 1px solid #687b9c; display: none; flex-direction: column; gap: 12px; left: 0; padding: 20px var(--pad); position: absolute; right: 0; top: 84px; }
  .nav.open { display: flex; }
  .nav a { min-height: 44px; padding: 10px 0; }
  .nav-cta { display: none; }
  .hero { display: block; height: auto; max-height: none; min-height: 0; padding-top: 130px; padding-bottom: clamp(340px, 57vw, 540px); }
  .hero-copy { max-width: 720px; width: 100%; }
  .hero h1 { font-size: clamp(3.2rem, 8.2vw, 5.6rem); }
  #three-bg { bottom: 0; height: clamp(320px, 54vw, 510px); inset: auto 0 0; width: 100%; }
  .hero-foot { margin-top: 32px; }
  .section { padding-block: 92px; }
  .section-head { margin-bottom: 50px; }
  .section h2 { font-size: clamp(2.4rem, 5.8vw, 4rem); }
  .demo-layout, .showcase, .problem-layout, .security-layout { grid-template-columns: minmax(0, 1fr); }
  .showcase-scene { height: 440px; }
}

@media (max-width: 700px) {
  .process, .feature-grid, .journey-grid { grid-template-columns: minmax(0, 1fr); }
  .process-card:last-child { grid-column: auto; }
  .process-card, .feature { min-height: 0; }
  .feature:first-child { min-height: 480px; }
  .hero { padding-top: 115px; padding-bottom: 355px; }
  .hero h1 { font-size: clamp(2.9rem, 10.4vw, 4.6rem); }
  #three-bg { height: 350px; }
  .hero-foot { display: grid; gap: 8px; }
  .section { padding-block: 76px; }
  .section h2 { font-size: clamp(2.2rem, 8vw, 3.6rem); }
  .showcase-scene { height: 360px; }
  .cta { padding-block: 85px; }
  .cta h2 { font-size: clamp(2.5rem, 8vw, 4.5rem); }
  .footer { gap: 16px; }
}

@media (max-width: 520px) {
  :root { --pad: clamp(18px, 5vw, 26px); }
  header { height: 72px; }
  .nav { top: 72px; font-size: 17px; }
  .hero { padding-top: 112px; padding-bottom: 325px; }
  #three-bg { height: 320px; }
  .hero h1 { font-size: clamp(2.65rem, 11vw, 3.9rem); letter-spacing: -.055em; }
  .hero-copy > p { font-size: 18px; }
  .eyebrow { font-size: 12px; letter-spacing: .06em; }
  .hero-actions, .cta .hero-actions { align-items: stretch; flex-direction: column; }
  .hero-actions .btn, .cta .hero-actions .btn { width: 100%; }
  .section { padding-block: 64px; }
  .process-card { padding: 28px; }
  .feature { padding: 26px; }
  .feature:first-child { min-height: 455px; }
  .showcase-scene { height: 310px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .app-body { grid-template-columns: 48px minmax(0, 1fr); }
  .form-paper { padding: 18px 12px; }
  .app-top { padding-inline: 10px; }
  .footer-links { gap: 14px; }
}

@media (max-width: 360px) {
  .hero h1 { font-size: 2.5rem; }
  .hero { padding-bottom: 280px; }
  #three-bg { height: 275px; }
  .eyebrow { border-radius: 14px; }
  .feature:first-child { min-height: 420px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .process-card:hover, .feature:hover, .btn:hover, .nav-cta:hover { transform: none; }
  *, *::before, *::after { animation-duration: .01ms !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

@media (prefers-contrast: more) {
  .eyebrow, .overline, .hero-copy > p, .hero-foot, .section-lead, .demo p, .feature p, .journey-tile p, .footer { color: #fff; }
  .light .section-lead, .security p, .process-card p { color: #17243c; }
  .gradient { background: none; color: #fff; }
  .light .gradient, .security .gradient { color: #203878; }
  .btn, .nav-cta, .process-card, .feature { border-width: 2px; }
  a:focus-visible, button:focus-visible { outline-width: 4px; }
}

@media (forced-colors: active) {
  .gradient { background: none !important; color: CanvasText !important; }
  .btn, .nav-cta, .eyebrow { border: 2px solid ButtonText; box-shadow: none; }
  .feature, .process-card, .showcase-scene { border: 1px solid CanvasText; }
  .reveal { opacity: 1; transform: none; }
  #three-bg, #three-showcase, .noise { display: none; }
}
