@import url("tokens/colors.css");
@import url("tokens/typography.css");
@import url("tokens/spacing.css");
@import url("tokens/web.css");

/* Phone layout: content stays in the viewport and controls remain easy to tap. */
@media (max-width: 767px) {
  html { scroll-padding-top: 20px; scroll-padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  body { -webkit-text-size-adjust: 100%; }
  main, main section, main section > div, main figure { min-width: 0; }
  main section { box-sizing: border-box; }
  .hero { grid-template-columns: minmax(0, 1fr) !important; }
  .hero > div > p:first-child { font-size: 11px !important; letter-spacing: .13em !important; }
  main h2 { font-size: clamp(30px, 8.5vw, 40px) !important; line-height: 1.08 !important; letter-spacing: -.04em !important; }
  #no-surprises > div > div:first-child { order: 2; }
  #no-surprises > div > div:last-child { order: 1; }
  [data-stack-panel] { position: relative !important; min-height: 0 !important; box-shadow: none !important; }
  [data-stack-panel] > div { padding-top: 48px !important; padding-bottom: 48px !important; }
  .stack-reading-hold { display: none; }
  footer nav[aria-label="Footer"] { margin-left: 0 !important; justify-content: flex-start !important; gap: 4px 24px !important; width: 100%; }
  .mobile-buy-bar { box-sizing: border-box; padding-left: max(12px, env(safe-area-inset-left)) !important; padding-right: max(12px, env(safe-area-inset-right)) !important; gap: 8px !important; }
  .mobile-buy-bar > span { font-size: 13px !important; }
  .mobile-buy-bar > a { padding: 0 12px !important; font-size: 14px !important; justify-content: center; }
  button[aria-label="Close announcement"] { width: 44px !important; height: 44px !important; }
  .demo-close { width: 44px; height: 44px; }
}

@media (max-width: 767px) {
  .hero-product-details { display: none !important; }
}

@media (max-width: 767px) {
  .header-buy { display: none !important; }
}

/* Inset workflow previews let the copy lead on phones. */
@media (max-width: 767px) {
  #how-it-works > ol { gap: 24px !important; }
  #how-it-works > ol > li {
    gap: 0 !important;
    overflow: hidden;
    border: 1px solid rgba(85,164,255,.16);
    border-radius: 16px;
    background: #0d121c;
  }
  #how-it-works > ol > li > div:first-child {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 28px;
    aspect-ratio: auto !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: radial-gradient(ellipse at 50% 60%, #194a85 0%, #112b50 55%, #101b30 100%) !important;
  }
  #how-it-works > ol > li > div:first-child > img {
    height: auto !important;
    object-fit: contain !important;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 6px;
    box-shadow: 0 12px 28px #0006;
  }
  #how-it-works > ol > li > div:nth-child(2) {
    justify-content: center;
    border-top: 0 !important;
    padding: 26px 24px 0 !important;
    gap: 10px !important;
  }
  #how-it-works h3 { font-size: 28px !important; letter-spacing: -.035em !important; }
  #how-it-works > ol > li > p {
    padding: 14px 24px 30px;
    text-align: center;
    font-size: 17px !important;
    line-height: 1.6 !important;
    color: #c3cbd7 !important;
  }
}

@media (max-width: 767px) {
  #how-it-works > ol > li {
    box-shadow: 0 18px 24px -6px rgba(0, 0, 0, .95), 0 6px 10px rgba(0, 0, 0, .7), 0 0 24px rgba(50, 114, 210, .13);
  }
  #how-it-works > ol > li > div:nth-child(2) {
    flex-direction: column;
    align-items: center !important;
    gap: 8px !important;
  }
}

.testimonial-section { position: relative; }
.testimonial-mark {
  position: absolute;
  right: clamp(20px, 4vw, 56px);
  bottom: 28px;
  width: 46px;
  height: 46px;
  pointer-events: none;
  filter: drop-shadow(0 0 12px rgba(85,164,255,.3));
  animation: testimonial-sway 5s ease-in-out infinite;
}
@keyframes testimonial-sway {
  0%, 100% { transform: translateY(0) rotate(-8deg); }
  50% { transform: translateY(-6px) rotate(8deg); }
}
@media (prefers-reduced-motion: reduce) {
  .testimonial-mark { animation: none; }
}

/* Ambient Stories squares drift independently of scroll movement. */
.surprises-squares {
  width: 112% !important;
  max-width: none;
  margin-left: -6%;
  animation: stories-drift 18s ease-in-out infinite alternate;
}
@keyframes stories-drift {
  from { translate: -3% 0; }
  to { translate: 3% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .surprises-squares { animation: none; translate: none; }
}

.site-footer {border-top:1px solid var(--color-line);background:var(--web-color-dark);}
.footer-inner {max-width:1440px;margin:auto;padding:44px clamp(20px,4vw,56px) 36px;box-sizing:border-box;}
.footer-row {display:grid;grid-template-columns:160px minmax(0,1fr);gap:48px;align-items:center;}
.footer-row img {display:block;height:auto;}
.site-footer nav[aria-label="Footer"] {display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:4px 12px;margin:0;}
.site-footer nav a, .site-footer nav .fs-meta-settings {display:inline-flex;align-items:center;min-height:44px;font-size:14px;color:var(--web-text-on-dark-body);}
.site-footer nav .fs-meta-settings:hover {color:#88C4FF;}
.site-footer nav span {color:#657184;}
.footer-copyright {margin:18px 0 0;text-align:center;font-size:12px;line-height:1.6;color:var(--color-muted);}
@media(max-width:767px){
 .footer-row {grid-template-columns:1fr;gap:20px;}
 .site-footer nav[aria-label="Footer"] {justify-content:center!important;gap:2px 10px!important;}
 .site-footer .footer-inner {padding-bottom:calc(104px + env(safe-area-inset-bottom));}
}

/* Equal side columns keep footer navigation centred on the page. */
.footer-row { grid-template-columns: 160px minmax(0,1fr) 160px; gap: 24px; }
.footer-row::after { content: ""; }
#faqs { display: block !important; padding-top: 40px !important; padding-bottom: 40px !important; }
.faq-disclosure > summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; cursor: pointer; list-style: none; min-height: 64px; }
.faq-disclosure > summary::-webkit-details-marker { display: none; }
.faq-disclosure > summary h2 { margin: 0; font-size: clamp(36px,4.4vw,64px); font-weight: 720; letter-spacing: -.052em; line-height: 1.1; }
.faq-chevron { flex-shrink: 0; transition: transform .2s ease; color: #afb5bd; }
.faq-disclosure[open] > summary .faq-chevron { transform: rotate(180deg); }
.faq-disclosure > summary:focus-visible { outline: 2px solid #88c4ff; outline-offset: 6px; border-radius: 4px; }
.faq-disclosure > div { margin-top: 28px; }
@media(max-width:767px) { .footer-row { grid-template-columns:1fr; gap:20px; } .footer-row::after { display:none; } }
@media(prefers-reduced-motion:reduce) { .faq-chevron { transition:none; } }

.header-contact-links { margin-left:auto; display:flex; align-items:center; gap:28px; }
.header-contact-links a { display:inline-flex; align-items:center; min-height:44px; color:var(--web-text-on-dark-body); font-size:14px; font-weight:500; }
.header-contact-links a:hover { color:#88c4ff; }
.header-contact-links a:focus-visible { outline:2px solid #88c4ff; outline-offset:4px; border-radius:3px; }
@media(max-width:767px) { .header-contact-links { display:none; } }

.faq-answer { font-size:16px; line-height:1.6; color:var(--web-text-on-dark-body); }
.faq-answer p { margin:0 0 18px; }
.faq-answer p:last-child { margin-bottom:0; }

.faq-answer { font-size:16px; line-height:1.6; color:var(--web-text-on-dark-body); }
.faq-answer p { margin:0 0 18px; }
.faq-answer p:last-child { margin-bottom:0; }

.faq-answer { font-size:16px; line-height:1.6; color:var(--web-text-on-dark-body); }
.faq-answer p { margin:0 0 18px; }
.faq-answer p:last-child { margin-bottom:0; }
