/* AUN Bizznes marketing landing — tokens mirror app_colors.dart + legal.css */

:root {
  color-scheme: light;
  --primary: #d97d55;
  --primary-dark: #b86442;
  --primary-light: #e59a7a;
  --primary-container: #f3d6c8;
  --accent: #b8c4a9;
  --accent-dark: #7e8f70;
  --accent-light: #d3ddc8;
  --surface: #fffbf9;
  --background: #f5f3ef;
  --card: #ffffff;
  --text-primary: #1c3035;
  --text-muted: #6b7280;
  --text-soft: #4b5563;
  --border: #ede7df;
  --hero-top: #162d5a;
  --hero-mid: #0f2042;
  --hero-dark: #091530;
  --hero-ink: #fff5ee;
  --hero-ink-soft: #f0e6de;
  --ok: #2e7d32;
  --shadow: 0 18px 36px rgba(15, 32, 66, 0.08);
  --shadow-strong: 0 24px 48px rgba(15, 32, 66, 0.18);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --max-width: 1120px;
  --nav-h: 64px;
  --font: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + 12px);
  -webkit-text-size-adjust: 100%;
  /* Navy behind status bar / overscroll (hero at top, footer at bottom are both navy) */
  background-color: var(--hero-mid);
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text-primary);
  background: var(--background);
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

img,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary-dark);
  text-decoration: none;
}

a:hover {
  color: var(--primary);
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--card);
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: var(--shadow);
}

.skip-link:focus {
  top: 12px;
}

/* —— Nav —— */
/* Fixed (not sticky): iOS Safari repaints sticky bars with a lag while the
   toolbar collapses, which makes the appbar visibly scroll/jitter. The bar
   also extends into the notch/status-bar safe area so navy always covers
   the top of the screen. */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: calc(var(--nav-h) + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  display: flex;
  align-items: center;
  background: rgba(15, 32, 66, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 245, 238, 0.08);
  transition: box-shadow 0.3s var(--ease-out), background 0.3s var(--ease-out);
}

.site-nav.is-scrolled {
  background: rgba(9, 21, 48, 0.96);
  box-shadow: 0 8px 24px rgba(9, 21, 48, 0.35);
}

.site-nav__inner {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--hero-ink);
  text-decoration: none;
}

.site-nav__brand:hover {
  color: var(--hero-ink);
}

.site-nav__brand img {
  height: 36px;
  width: auto;
}

.site-nav__links {
  display: none;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__links a {
  color: var(--hero-ink-soft);
  font-size: 0.92rem;
  font-weight: 500;
}

.site-nav__links a:hover {
  color: var(--hero-ink);
}

.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff !important;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(217, 125, 85, 0.35);
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
  touch-action: manipulation;
}

.btn-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(217, 125, 85, 0.45);
  color: #fff !important;
}

.btn-pill:active {
  transform: translateY(0);
}

@media (min-width: 768px) {
  .site-nav__links {
    display: flex;
  }
}

/* —— Layout helpers —— */
.section {
  padding: 64px 16px;
}

.section--tight {
  padding-top: 40px;
  padding-bottom: 40px;
}

.section__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section__eyebrow {
  margin: 0 0 10px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-dark);
}

.section__title {
  margin: 0 0 14px;
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.section__lead {
  margin: 0;
  max-width: 58ch;
  color: var(--text-soft);
  font-size: 1.05rem;
}

@media (min-width: 640px) {
  .section {
    padding: 88px 24px;
  }
}

/* —— Hero —— */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--hero-dark) 0%, var(--hero-mid) 48%, var(--hero-top) 100%);
  color: var(--hero-ink);
  /* Top padding compensates for the fixed nav (it no longer takes layout space) */
  padding: calc(40px + var(--nav-h) + env(safe-area-inset-top, 0px)) 16px 56px;
}

.hero__glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(40px);
}

.hero__glow--terracotta {
  width: 280px;
  height: 280px;
  top: -40px;
  right: -60px;
  background: rgba(217, 125, 85, 0.22);
}

.hero__glow--sage {
  width: 240px;
  height: 240px;
  bottom: 10%;
  left: -80px;
  background: rgba(184, 196, 169, 0.18);
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  gap: 40px;
  align-items: center;
}

.hero__eyebrow {
  margin: 0 0 12px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-light);
}

.hero__title {
  margin: 0 0 16px;
  font-size: clamp(1.85rem, 5.2vw, 3.25rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--hero-ink);
}

.hero__sub {
  margin: 0 0 28px;
  max-width: 40ch;
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  color: var(--hero-ink-soft);
  line-height: 1.65;
}

.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  align-items: center;
}

.store-badge {
  display: inline-flex;
  transition: transform 0.2s var(--ease-out), opacity 0.2s;
}

.store-badge:hover {
  transform: translateY(-2px);
  opacity: 0.95;
}

.store-badge img {
  height: 50px;
  width: auto;
  object-fit: contain;
}

.hero__micro {
  margin: 0;
  font-size: 0.875rem;
  color: rgba(240, 230, 222, 0.75);
}

.hero__visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero__phone {
  width: min(310px, 78vw);
  filter: drop-shadow(0 28px 48px rgba(0, 0, 0, 0.45));
}

@media (min-width: 1024px) {
  .hero {
    padding: calc(56px + var(--nav-h) + env(safe-area-inset-top, 0px)) 24px 72px;
  }

  .hero__inner {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
  }

  .hero__visual {
    justify-content: flex-end;
  }
}

/* —— Trust strip —— */
.trust {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 28px 16px;
}

.trust__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 12px;
}

.trust__chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 100px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.trust__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* —— Problem —— */
.problem {
  background: var(--surface);
}

.problem .section__lead {
  max-width: 62ch;
}

/* —— Features —— */
.features {
  background: var(--background);
}

.feature-block {
  display: grid;
  gap: 28px;
  align-items: center;
  padding: 36px 0;
}

.feature-block + .feature-block {
  border-top: 1px solid var(--border);
}

.feature-block__title {
  margin: 0 0 10px;
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.feature-block__body {
  margin: 0;
  color: var(--text-soft);
  max-width: 48ch;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.feature-card__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.feature-card__row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.feature-card__row:first-child {
  padding-top: 0;
}

.feature-card__label {
  color: var(--text-muted);
}

.feature-card__value {
  font-weight: 600;
  color: var(--text-primary);
}

.feature-card__value--ok {
  color: var(--ok);
}

.swatches {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.swatch {
  height: 72px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.swatch--navy {
  background: linear-gradient(135deg, #0f2042, #162d5a);
}

.swatch--terracotta {
  background: linear-gradient(135deg, #b86442, #d97d55);
}

.swatch--sage {
  background: linear-gradient(135deg, #7e8f70, #b8c4a9);
}

.list-preview {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list-preview li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}

.list-preview li:last-child {
  border-bottom: none;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--primary-container);
  color: var(--primary-dark);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.sync-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 28px 12px;
}

.sync-visual__node {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
}

.sync-visual__arrow {
  color: var(--primary);
  font-size: 1.4rem;
  font-weight: 700;
}

@media (min-width: 768px) {
  .feature-block {
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    padding: 48px 0;
  }

  .feature-block--reverse .feature-block__copy {
    order: 2;
  }

  .feature-block--reverse .feature-block__visual {
    order: 1;
  }
}

/* —— How it works —— */
.how {
  background: var(--card);
}

.steps {
  list-style: none;
  margin: 36px 0 0;
  padding: 0;
  display: grid;
  gap: 20px;
  counter-reset: step;
}

.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 22px 22px 72px;
  box-shadow: var(--shadow);
}

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 18px;
  top: 22px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.step h3 {
  margin: 0 0 6px;
  font-size: 1.1rem;
}

.step p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.95rem;
}

@media (min-width: 900px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
}

/* —— More grid —— */
.more {
  background: var(--background);
}

.grid-cards {
  list-style: none;
  margin: 36px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}

.grid-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.grid-card__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  background: var(--primary-container);
  color: var(--primary-dark);
  font-size: 1.15rem;
}

.grid-card h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.grid-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

@media (min-width: 640px) {
  .grid-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
}

/* —— Privacy —— */
.privacy {
  background: linear-gradient(160deg, var(--hero-dark), var(--hero-mid));
  color: var(--hero-ink);
}

.privacy .section__eyebrow {
  color: var(--accent-light);
}

.privacy .section__title {
  color: var(--hero-ink);
}

.privacy .section__lead {
  color: var(--hero-ink-soft);
}

.privacy a {
  color: var(--primary-light);
  font-weight: 600;
}

.privacy a:hover {
  color: var(--hero-ink);
}

/* —— FAQ —— */
.faq {
  background: var(--surface);
}

.faq-list {
  margin: 28px 0 0;
  display: grid;
  gap: 10px;
}

.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  min-height: 52px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  color: var(--text-primary);
  cursor: pointer;
  touch-action: manipulation;
}

.faq-question__icon {
  position: relative;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--primary-container);
  transition: transform 0.22s var(--ease-out);
}

.faq-question__icon::before,
.faq-question__icon::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 2px;
  border-radius: 1px;
  background: var(--primary-dark);
  content: "";
  transform: translate(-50%, -50%);
}

.faq-question__icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.faq-item.is-open .faq-question__icon {
  transform: rotate(45deg);
}

.faq-answer {
  display: none;
  padding: 0 18px 16px;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.faq-item.is-open .faq-answer {
  display: block;
}

/* —— Final CTA —— */
.final-cta {
  background: linear-gradient(160deg, var(--hero-mid), var(--hero-top));
  color: var(--hero-ink);
  text-align: center;
}

.final-cta .section__title {
  color: var(--hero-ink);
}

.final-cta .section__lead {
  margin-left: auto;
  margin-right: auto;
  color: var(--hero-ink-soft);
}

.final-cta .store-badges {
  justify-content: center;
  margin-top: 28px;
}

/* —— Footer —— */
.site-footer {
  background: var(--hero-dark);
  color: var(--hero-ink-soft);
  padding: 36px 16px calc(28px + env(safe-area-inset-bottom, 0px));
  text-align: center;
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  margin-bottom: 16px;
}

.site-footer__nav a {
  color: var(--hero-ink-soft);
  font-size: 0.9rem;
  font-weight: 500;
}

.site-footer__nav a:hover {
  color: var(--hero-ink);
}

.site-footer p {
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: rgba(240, 230, 222, 0.65);
}

.site-footer a.mail {
  color: var(--primary-light);
}

/* —— Animations —— */
@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-in {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes phone-in {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes glow-pulse {
  0%,
  100% {
    opacity: 0.7;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.06);
  }
}

@keyframes nav-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .site-nav {
    animation: nav-in 0.4s var(--ease-out) both;
  }

  .hero-animate {
    opacity: 0;
    animation: hero-in 0.6s var(--ease-out) both;
  }

  .hero-animate--1 {
    animation-delay: 0ms;
  }
  .hero-animate--2 {
    animation-delay: 80ms;
  }
  .hero-animate--3 {
    animation-delay: 160ms;
  }
  .hero-animate--4 {
    animation-delay: 240ms;
  }

  .hero-animate--phone {
    animation: phone-in 0.7s var(--ease-out) 280ms both;
  }

  .hero__glow {
    animation: glow-pulse 7s ease-in-out infinite;
  }

  .hero__glow--sage {
    animation-delay: 1.5s;
  }

  @supports (animation-timeline: view()) {
    .reveal {
      animation: reveal-up linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 40%;
    }

    .reveal-delay-1 {
      animation-range: entry 5% cover 42%;
    }
    .reveal-delay-2 {
      animation-range: entry 10% cover 44%;
    }
    .reveal-delay-3 {
      animation-range: entry 15% cover 46%;
    }

    .hero__phone-wrap {
      animation: phone-parallax linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 100%;
    }
  }

  @keyframes phone-parallax {
    from {
      transform: translateY(0);
    }
    to {
      transform: translateY(-24px);
    }
  }

  /* IntersectionObserver fallback (when no view() timeline) */
  html.no-scroll-timeline .js-reveal:not(.in-view) {
    opacity: 0;
    transform: translateY(28px);
  }

  html.no-scroll-timeline .js-reveal.in-view {
    opacity: 1;
    transform: translateY(0);
    transition:
      opacity 0.55s var(--ease-out),
      transform 0.55s var(--ease-out);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-animate,
  .hero-animate--phone,
  .site-nav,
  .hero__glow {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
