/*
 * Brand accent: AppColors.schemeSeedOcean — default Material seed in the Flutter app
 * (apps/mobile/lib/core/theme/app_colors.dart, app_color_scheme_preset.dart).
 * Typography: Poppins via Google Fonts — matches AppTheme (GoogleFonts.poppins) in app_theme.dart.
 */
:root {
  color-scheme: light dark;
  --text: #1a1a1a;
  --muted: #454545;
  --bg: #f6fbfb;
  --surface: #ffffff;
  --border: #d8e8ea;
  --brand: #06b6d4;
  --brand-700: #0891b2;
  --brand-300: #67e8f9;
  --accent: var(--brand);
  --accent-muted: var(--brand-700);
  --hero-glow: color-mix(in srgb, var(--brand) 22%, transparent);
  --frame-border: color-mix(in srgb, var(--brand) 25%, var(--border));
  /* Match AppSizes.topBarBorderRadius — dashboard toolbar pill */
  --toolbar-radius: 26px;
  /* Safe area + bar height (approx. dashboard header row) */
  --toolbar-stack-height: calc(env(safe-area-inset-top, 0px) + 64px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #f4fafb;
    --muted: #9cb7bc;
    --bg: #0f1416;
    --surface: #161d20;
    --border: #2a363a;
    --brand: #22d3ee;
    --brand-700: #06b6d4;
    --brand-300: #a5f3fc;
    --accent: var(--brand);
    --accent-muted: var(--brand-300);
    --hero-glow: color-mix(in srgb, var(--brand) 18%, transparent);
    --frame-border: color-mix(in srgb, var(--brand) 20%, var(--border));
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--toolbar-stack-height) + 12px);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0.75rem;
  z-index: 300;
  padding: 0.5rem 1rem;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  border-radius: 0.375rem;
  text-decoration: none;
}
.skip-link:focus {
  left: 0.75rem;
}

body {
  margin: 0;
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

a {
  color: var(--accent);
}
a:hover {
  color: var(--accent-muted);
}

/* Fixed toolbar — rounded “floating” bar like [DashboardHeader] AppContainer */
.toolbar-shell {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding: max(0.375rem, env(safe-area-inset-top, 0px)) 6px 0.5rem;
  pointer-events: none;
}

.toolbar {
  pointer-events: auto;
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  min-height: 52px;
  padding: 0.25rem 0.5rem;
  border-radius: var(--toolbar-radius);
  /* surfaceContainerHigh-like: elevated card over content */
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  border: 1px solid var(--frame-border);
  box-shadow:
    0 4px 6px color-mix(in srgb, var(--text) 6%, transparent),
    0 12px 32px color-mix(in srgb, var(--brand) 10%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.toolbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.toolbar .brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  flex-shrink: 0;
  border: 1px solid var(--frame-border);
}

.toolbar a.brand-text {
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--text);
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.toolbar a.brand-text:hover,
.toolbar a.brand-text:active,
.toolbar a.brand-text:visited {
  color: var(--text);
}

.toolbar-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.35rem;
}

.toolbar-nav a {
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--muted);
  border: 1px solid transparent;
}
.toolbar-nav a:hover,
.toolbar-nav a:active,
.toolbar-nav a:visited {
  color: var(--muted);
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  border-color: var(--frame-border);
}

.hero-wrap {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 100% -20%, var(--hero-glow), transparent 55%),
    radial-gradient(80% 60% at -10% 60%, color-mix(in srgb, var(--brand) 12%, transparent), transparent 50%),
    var(--bg);
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: calc(var(--toolbar-stack-height) + 1.25rem) 1.25rem 2.75rem;
}

@media (min-width: 900px) {
  .hero-split {
    display: grid;
    grid-template-columns: 1fr minmax(240px, 320px);
    gap: 2.5rem;
    align-items: center;
  }
}

.hero h1 {
  font-size: clamp(1.85rem, 4.5vw, 2.65rem);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 0.85rem;
  letter-spacing: -0.03em;
}

.hero .tagline {
  color: var(--muted);
  font-size: 1.12rem;
  margin: 0 0 1.35rem;
  max-width: 36rem;
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.35rem;
}
.trust-strip span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--frame-border);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.15rem;
  border-radius: 0.65rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--surface);
}
.btn-primary {
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-700) 100%);
  color: #fff;
  border-color: color-mix(in srgb, var(--brand-700) 50%, #000);
  box-shadow: 0 2px 12px color-mix(in srgb, var(--brand) 35%, transparent);
}
.btn-primary:hover {
  color: #fff;
  filter: brightness(1.06);
}
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.65;
  cursor: not-allowed;
  pointer-events: none;
}

.coming-soon {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0;
}

.hero-device {
  justify-self: center;
  margin-top: 1.5rem;
}
@media (min-width: 900px) {
  .hero-device {
    margin-top: 0;
  }
}

.device-frame {
  border-radius: 1.85rem;
  padding: 0.55rem;
  background: linear-gradient(160deg, color-mix(in srgb, var(--text) 6%, var(--surface)), var(--surface));
  box-shadow:
    0 24px 48px color-mix(in srgb, var(--brand) 12%, transparent),
    0 0 0 1px var(--frame-border);
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}
.device-frame-inner {
  border-radius: 1.4rem;
  overflow: hidden;
  aspect-ratio: 9 / 19.5;
  background: linear-gradient(165deg, color-mix(in srgb, var(--brand) 14%, var(--bg)), var(--bg));
  display: flex;
  align-items: center;
  justify-content: center;
}
.device-frame picture {
  width: 100%;
  height: 100%;
  display: block;
}
.device-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 28px color-mix(in srgb, var(--brand) 40%, transparent));
}

main {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
}

section[id] {
  scroll-margin-top: calc(var(--toolbar-stack-height) + 12px);
}

section h2 {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.shots-intro {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 1.5rem;
  max-width: none;
}
.shots-intro code {
  font-size: 0.85em;
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
  background: color-mix(in srgb, var(--brand) 8%, var(--surface));
  border: 1px solid var(--border);
}

.device-shelf {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 0.5rem;
}

.shot {
  text-align: center;
}
.has-scroll-anim .shot {
  opacity: 0;
  transform: translateY(26px) scale(0.98);
  transition:
    opacity 520ms ease,
    transform 620ms cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: transform, opacity;
}
.has-scroll-anim .shot.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.shot .device-frame {
  max-width: 240px;
}
.shot figcaption {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}
.shot .caption-hint {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  margin-top: 0.2rem;
}

.features {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.features:not(:first-child) {
  margin-top: 2.75rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}

.shots {
  margin-top: 2.75rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
@media (max-width: 1100px) {
  .features-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  padding: 1.15rem 1.2rem;
  border-radius: 0.85rem;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--brand) 6%, transparent);
}
.feature-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}
.feature-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.55;
}

.contact {
  margin-top: 2.75rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
  max-width: none;
}
.contact p {
  color: var(--muted);
  margin: 0 0 0.75rem;
}
.contact-intro {
  margin-bottom: 1rem;
}
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.contact-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  background: var(--surface);
  padding: 1rem 1.05rem;
  color: var(--text);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--brand) 6%, transparent);
}
.contact-card:hover {
  border-color: var(--frame-border);
  transform: translateY(-1px);
}
.contact-card .contact-icon {
  width: 2rem;
  height: 2rem;
  min-width: 2rem;
  border-radius: 999px;
  border: 1px solid var(--frame-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  color: var(--accent);
  background: color-mix(in srgb, var(--brand) 12%, transparent);
}
.contact-card .contact-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}
.contact-card .contact-text strong {
  font-size: 0.96rem;
  line-height: 1.25;
}
.contact-card .contact-text span {
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--muted);
}
@media (max-width: 980px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.site-footer {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--muted);
}
.site-footer .footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 1rem;
}
.site-footer .footer-col {
  min-width: 10rem;
}
.site-footer .footer-col strong {
  display: block;
  color: var(--text);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}
.site-footer nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.site-footer a {
  color: var(--muted);
}
.site-footer a:hover {
  color: var(--accent);
}

.legal-page {
  max-width: 42rem;
  margin: 0 auto;
  padding: calc(var(--toolbar-stack-height) + 1rem) 1.25rem 3rem;
}
.legal-page h1 {
  font-size: 1.75rem;
  margin: 0 0 0.5rem;
}
.legal-page .meta {
  color: var(--muted);
  font-style: italic;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}
.legal-page p {
  color: var(--muted);
  margin: 0 0 1rem;
}
.legal-page footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--muted);
}

/* Privacy / policy long-form */
.policy {
  max-width: 42rem;
  margin: 0 auto;
  padding: calc(var(--toolbar-stack-height) + 1rem) 1.25rem 3rem;
}
.policy h1 {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 0.5rem;
}
.policy .meta {
  color: var(--muted);
  font-style: italic;
  margin-bottom: 2rem;
  font-size: 0.95rem;
}
.policy h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
  padding-top: 0.25rem;
  border-top: 1px solid var(--border);
}
.policy h2:first-of-type {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}
.policy p {
  margin: 0 0 1rem;
  color: var(--muted);
}
.policy ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  color: var(--muted);
}
.policy li {
  margin-bottom: 0.35rem;
}
.policy a {
  color: inherit;
}
.policy a:hover {
  color: var(--accent);
}
.policy footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--muted);
}
.policy-back {
  margin-bottom: 1rem;
}
.policy-back a {
  font-size: 0.95rem;
}

@media (prefers-reduced-motion: reduce) {
  .has-scroll-anim .shot,
  .has-scroll-anim .shot.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
