:root {
  --ink: #eaf4fb;
  --muted: #9eb1c2;
  --navy-950: #050a12;
  --navy-900: #08121e;
  --navy-800: #0d2033;
  --blue: #1b79b7;
  --blue-bright: #2da8e8;
  --teal: #27c7c3;
  --line: rgba(158, 197, 222, 0.16);
  --surface: rgba(12, 30, 47, 0.76);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  --radius: 22px;
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--navy-950);
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--navy-950);
  color: var(--ink);
}

body.landing-mode {
  overflow-x: hidden;
}

body.landing-mode flutter-view {
  visibility: hidden;
  pointer-events: none;
}

button,
a {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: white;
  color: #07101a;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.landing {
  position: relative;
  z-index: 20;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 8%, rgba(24, 106, 157, 0.16), transparent 28%),
    var(--navy-950);
  opacity: 1;
  transition: opacity 320ms ease, visibility 320ms ease;
}

.landing.is-leaving {
  opacity: 0;
  visibility: hidden;
}

.site-header {
  position: absolute;
  z-index: 50;
  top: 0;
  width: 100%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(5, 10, 18, 0.68);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1180px, calc(100% - 40px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 36px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 1.08rem;
  font-weight: 760;
  letter-spacing: -0.02em;
}

.brand img,
.mini-brand img,
.app-loader img {
  border-radius: 10px;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-left: auto;
}

.site-header nav a {
  color: var(--muted);
  font-size: 0.9rem;
  transition: color 180ms ease;
}

.site-header nav a:hover,
.site-header nav a:focus-visible {
  color: white;
}

.button {
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: white;
  font-weight: 700;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button:focus-visible,
.update-toast button:focus-visible {
  outline: 3px solid rgba(45, 168, 232, 0.55);
  outline-offset: 3px;
}

.button-primary {
  background: linear-gradient(135deg, #196ca6, #178ca7 70%, #1ba6a3);
  box-shadow: 0 14px 36px rgba(22, 119, 169, 0.3);
}

.button-primary:hover {
  box-shadow: 0 18px 42px rgba(25, 138, 190, 0.4);
}

.button-secondary,
.button-ghost {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
}

.button-ghost {
  min-height: 40px;
  padding-inline: 17px;
  margin-left: 4px;
}

.hero {
  position: relative;
  min-height: 760px;
  padding: 150px 0 94px;
  display: grid;
  align-items: center;
  isolation: isolate;
}

.hero-grid {
  position: absolute;
  z-index: -2;
  inset: 0;
  background-image:
    linear-gradient(rgba(88, 153, 195, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 153, 195, 0.055) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 92%);
}

.hero-glow {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(8px);
  opacity: 0.56;
  animation: drift 10s ease-in-out infinite alternate;
}

.hero-glow-one {
  width: 480px;
  height: 480px;
  right: -120px;
  top: 100px;
  background: radial-gradient(circle, rgba(18, 109, 166, 0.38), transparent 68%);
}

.hero-glow-two {
  width: 360px;
  height: 360px;
  left: 8%;
  bottom: -190px;
  background: radial-gradient(circle, rgba(26, 189, 185, 0.16), transparent 68%);
  animation-delay: -4s;
}

@keyframes drift {
  to { transform: translate3d(-34px, 26px, 0) scale(1.08); }
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.92fr);
  align-items: center;
  gap: clamp(54px, 8vw, 112px);
}

.eyebrow {
  margin: 0 0 16px;
  color: #54c9d3;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 730px;
  margin: 0;
  font-size: clamp(3.15rem, 6vw, 5.65rem);
  line-height: 0.98;
  letter-spacing: -0.062em;
}

.hero h1 span {
  color: transparent;
  background: linear-gradient(100deg, var(--blue-bright), #4ed7cf);
  background-clip: text;
  -webkit-background-clip: text;
}

.hero-lead {
  max-width: 650px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 32px;
  color: #b7c7d3;
  font-size: 0.82rem;
}

.trust-row span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.trust-row span::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 14px rgba(39, 199, 195, 0.8);
  content: "";
}

.hero-visual {
  position: relative;
}

.visual-orbit {
  position: absolute;
  inset: -74px;
  border: 1px solid rgba(45, 168, 232, 0.1);
  border-radius: 50%;
  animation: orbit 22s linear infinite;
}

.visual-orbit::before {
  position: absolute;
  top: 14%;
  left: 8%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 22px var(--teal);
  content: "";
}

@keyframes orbit {
  to { transform: rotate(360deg); }
}

.product-card {
  position: relative;
  padding: 26px;
  border: 1px solid rgba(97, 173, 218, 0.22);
  border-radius: 26px;
  background: linear-gradient(150deg, rgba(15, 43, 66, 0.94), rgba(8, 20, 32, 0.96));
  box-shadow: var(--shadow), inset 0 1px rgba(255, 255, 255, 0.05);
  transform: perspective(1000px) rotateY(-4deg) rotateX(2deg);
}

.product-topline,
.mini-brand,
.metric-row,
.sync-badge {
  display: flex;
  align-items: center;
}

.product-topline {
  justify-content: space-between;
}

.mini-brand {
  gap: 10px;
  font-weight: 760;
}

.sync-badge {
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid rgba(52, 211, 153, 0.18);
  border-radius: 20px;
  color: #8ce6bd;
  background: rgba(20, 118, 81, 0.12);
  font-size: 0.72rem;
}

.sync-badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #50d89c;
  box-shadow: 0 0 10px #50d89c;
}

.metric-row {
  gap: 12px;
  margin: 28px 0 14px;
}

.metric-row > div {
  flex: 1;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.metric-row strong,
.metric-row span {
  display: block;
}

.metric-row strong {
  font-size: 1.65rem;
}

.metric-row span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.73rem;
}

.issue-preview {
  padding: 21px;
  border-radius: 16px;
  background: rgba(5, 12, 20, 0.58);
}

.severity {
  display: inline-block;
  padding: 5px 8px;
  border-radius: 6px;
  color: #ffbd93;
  background: rgba(224, 97, 42, 0.16);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.issue-preview h2 {
  margin: 14px 0 6px;
  font-size: 1rem;
}

.issue-preview p,
.issue-preview small {
  color: var(--muted);
}

.issue-preview p {
  margin: 0;
  font-size: 0.76rem;
}

.issue-preview small {
  font-size: 0.67rem;
}

.progress {
  height: 5px;
  margin: 20px 0 10px;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
}

.progress span {
  display: block;
  width: 68%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--teal));
}

.section {
  padding: 112px 0;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 48px;
}

.section-heading h2,
.install-banner h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.45rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.section-heading > p:last-child,
.install-banner p {
  color: var(--muted);
  line-height: 1.7;
}

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

.feature-card {
  min-height: 250px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(15, 40, 61, 0.7), rgba(7, 17, 28, 0.75));
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.feature-card:hover {
  transform: translateY(-7px);
  border-color: rgba(71, 177, 224, 0.34);
  background: linear-gradient(145deg, rgba(17, 49, 73, 0.82), rgba(8, 20, 32, 0.86));
}

.feature-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 42px;
  border: 1px solid rgba(65, 191, 207, 0.28);
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #63d0d6;
  background: rgba(39, 199, 195, 0.08);
  font-size: 0.7rem;
  font-weight: 800;
}

.feature-card h3,
.workflow-step h3,
.role-card h3 {
  margin: 0 0 10px;
  font-size: 1.06rem;
}

.feature-card p,
.workflow-step p,
.role-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.68;
}

.workflow-section {
  border-block: 1px solid var(--line);
  background: #07101b;
}

.workflow-grid {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  list-style: none;
}

.workflow-step {
  position: relative;
  min-height: 210px;
  padding: 30px;
  border-left: 2px solid rgba(45, 168, 232, 0.32);
  display: flex;
  gap: 20px;
}

.workflow-step > span {
  flex: 0 0 auto;
  color: #55ced3;
  font-size: 0.76rem;
  font-weight: 800;
}

.roles-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(430px, 1.2fr);
  gap: clamp(50px, 9vw, 120px);
}

.role-list {
  display: grid;
  gap: 12px;
}

.role-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(13, 32, 50, 0.5);
}

.role-card > span {
  display: block;
  margin-bottom: 9px;
  color: #52c8d2;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.install-banner {
  padding: 78px 0;
  border-block: 1px solid rgba(65, 191, 207, 0.18);
  background:
    radial-gradient(circle at 78% 30%, rgba(39, 199, 195, 0.13), transparent 30%),
    linear-gradient(120deg, rgba(15, 58, 87, 0.72), rgba(8, 26, 40, 0.86));
}

.install-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 50px;
}

.banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

footer {
  padding: 32px 0;
  background: #04080e;
}

.footer-layout {
  display: flex;
  align-items: center;
  gap: 30px;
  color: var(--muted);
}

.footer-layout p {
  margin: 0 auto 0 0;
  font-size: 0.8rem;
}

.footer-layout small {
  font-size: 0.72rem;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 650ms ease, transform 650ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.feature-grid .reveal:nth-child(2),
.role-list .reveal:nth-child(2) { transition-delay: 80ms; }
.feature-grid .reveal:nth-child(3),
.role-list .reveal:nth-child(3) { transition-delay: 160ms; }
.feature-grid .reveal:nth-child(5) { transition-delay: 80ms; }
.feature-grid .reveal:nth-child(6) { transition-delay: 160ms; }

.app-loader {
  position: fixed;
  z-index: 15;
  inset: 0;
  background: var(--navy-950);
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  color: var(--muted);
}

.app-loader[hidden],
.update-toast[hidden],
.ios-install-hint[hidden],
.install-action[hidden] {
  display: none !important;
}

.loader-track {
  width: 180px;
  height: 3px;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.loader-track span {
  display: block;
  width: 45%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--teal));
  animation: loading 1.15s ease-in-out infinite alternate;
}

@keyframes loading {
  from { transform: translateX(-30%); }
  to { transform: translateX(150%); }
}

.update-toast {
  position: fixed;
  z-index: 110;
  right: 22px;
  bottom: 22px;
  max-width: calc(100% - 44px);
  padding: 16px;
  border: 1px solid rgba(92, 189, 220, 0.28);
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 20px;
  background: #10283d;
  box-shadow: var(--shadow);
}

.update-toast strong,
.update-toast span {
  display: block;
}

.update-toast span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
}

.update-toast button {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  color: white;
  background: #1979ad;
  font-weight: 700;
}

.ios-install-hint {
  position: fixed;
  z-index: 110;
  left: 22px;
  bottom: 22px;
  max-width: min(380px, calc(100% - 44px));
  padding: 16px;
  border: 1px solid rgba(92, 189, 220, 0.28);
  border-radius: 14px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #10283d;
  box-shadow: var(--shadow);
  animation: ios-hint-in 320ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.ios-install-hint-icon {
  flex: 0 0 auto;
  border-radius: 10px;
}

.ios-install-hint-body strong {
  display: block;
  font-size: 0.9rem;
}

.ios-install-hint-body p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.55;
}

.ios-share-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin: 0 2px;
  border-radius: 6px;
  color: var(--blue-bright);
  background: rgba(45, 168, 232, 0.14);
  vertical-align: -5px;
}

#ios-install-hint-dismiss {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  margin: -4px -4px 0 0;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 1.1rem;
  line-height: 1;
  transition: background 160ms ease, color 160ms ease;
}

#ios-install-hint-dismiss:hover,
#ios-install-hint-dismiss:focus-visible {
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

@keyframes ios-hint-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 620px) {
  .ios-install-hint {
    left: 14px;
    bottom: 14px;
    max-width: calc(100% - 28px);
  }
}

@media (max-width: 900px) {
  .site-header nav {
    display: none;
  }

  .button-ghost {
    margin-left: auto;
  }

  .hero {
    padding-top: 132px;
  }

  .hero-layout,
  .roles-layout {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    max-width: 760px;
  }

  .hero-visual {
    width: min(560px, 92%);
    margin: 20px auto 0;
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .workflow-grid {
    grid-template-columns: 1fr;
  }

  .workflow-step {
    min-height: auto;
  }

  .install-layout {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .shell,
  .nav-shell {
    width: min(100% - 28px, 1180px);
  }

  .nav-shell {
    min-height: 68px;
  }

  .brand {
    font-size: 1rem;
  }

  .brand img {
    width: 36px;
    height: 36px;
  }

  .hero {
    min-height: auto;
    padding: 120px 0 74px;
  }

  .hero h1 {
    font-size: clamp(2.75rem, 14vw, 4rem);
  }

  .hero-actions,
  .banner-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions .button,
  .banner-actions .button {
    width: 100%;
  }

  .trust-row {
    gap: 12px 18px;
  }

  .hero-visual {
    width: 100%;
  }

  .product-card {
    padding: 18px;
    transform: none;
  }

  .metric-row {
    align-items: stretch;
    flex-direction: column;
  }

  .section {
    padding: 80px 0;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .feature-card {
    min-height: auto;
  }

  .feature-icon {
    margin-bottom: 30px;
  }

  .roles-layout {
    gap: 36px;
  }

  .footer-layout {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .update-toast {
    right: 14px;
    bottom: 14px;
    max-width: calc(100% - 28px);
    align-items: stretch;
    flex-direction: column;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
