/* ==========================================================================
   Aviator Style — Landing styles
   Replace placeholder values marked with "EDIT:" comments in HTML files.
   ========================================================================== */

:root {
  --color-accent: #FB0035;
  --color-bg: #313030;
  --color-green: #2EB055;
  --color-burgundy: #4C0B15;
  --color-surface: #3d3c3c;
  --color-surface-raised: #484747;
  --color-text: #f4f2ef;
  --color-text-muted: #b8b4ae;
  --color-border: rgba(244, 242, 239, 0.1);
  --font-display: "Syne", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-glow: 0 0 40px rgba(251, 0, 53, 0.25);
  --header-height: 72px;
  --max-width: 1140px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-text);
  background-color: var(--color-bg);
  min-height: 100vh;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition);
}

a:hover {
  color: var(--color-green);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

/* --- Background atmosphere --- */
.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(251, 0, 53, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(251, 0, 53, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black, transparent);
}

.bg-horizon {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40vh;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(
    to top,
    var(--color-burgundy) 0%,
    transparent 70%
  );
  opacity: 0.35;
}

/* --- Layout --- */
.site-wrap {
  position: relative;
  z-index: 1;
}

.container {
  width: min(100% - 2.5rem, var(--max-width));
  margin-inline: auto;
}

.section {
  padding: 5rem 0;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.section-label::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--color-accent);
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin-bottom: 1.25rem;
}

.section-lead {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  max-width: 42rem;
}

.section-lead code {
  font-size: 0.9em;
  padding: 0.15em 0.4em;
  background: var(--color-surface);
  border-radius: 4px;
  color: var(--color-green);
}

/* --- Header --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(49, 48, 48, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow var(--transition);
}

.site-header.is-scrolled {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100% - 2.5rem, var(--max-width));
  height: var(--header-height);
  margin-inline: auto;
}

.header-end {
  display: none;
  align-items: center;
  gap: 1.25rem;
  flex-shrink: 1;
  min-width: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--color-text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
}

.logo:hover {
  color: var(--color-text);
}

.logo svg {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.nav-desktop ul {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-desktop li {
  display: block;
}

.nav-desktop a {
  display: block;
  white-space: nowrap;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.2;
  padding: 0.25rem 0;
}

.nav-desktop a:hover,
.nav-desktop a.is-active {
  color: var(--color-text);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  background: var(--color-accent);
  color: var(--color-text) !important;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
}

.nav-cta:hover {
  background: #e0002f;
  color: var(--color-text) !important;
  transform: translateY(-1px);
}

.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  padding: 10px;
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--color-text);
}

.menu-toggle span {
  display: block;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: var(--transition);
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-mobile {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 1.25rem;
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 99;
}

.nav-mobile.is-open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.nav-mobile ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.nav-mobile a {
  display: block;
  padding: 0.65rem 0;
  color: var(--color-text);
  font-weight: 500;
}

@media (min-width: 768px) {
  .header-end {
    display: flex;
  }

  .menu-toggle {
    display: none;
  }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-text);
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  background: #e0002f;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-outline:hover {
  border-color: var(--color-green);
  color: var(--color-green);
}

/* --- Hero (home) --- */
.hero {
  min-height: 100vh;
  padding-top: calc(var(--header-height) + 3rem);
  padding-bottom: 4rem;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 15%;
  right: -20%;
  width: 70vmin;
  height: 70vmin;
  background: radial-gradient(circle, rgba(251, 0, 53, 0.12) 0%, transparent 65%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background: var(--color-burgundy);
  border: 1px solid rgba(251, 0, 53, 0.3);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 1.25rem;
}

.hero-badge svg {
  width: 16px;
  height: 16px;
  color: var(--color-green);
}

.hero h1 {
  font-size: clamp(2.5rem, 7vw, 4rem);
  margin-bottom: 0.5rem;
}

.hero h1 span {
  display: block;
  font-size: 0.45em;
  font-weight: 600;
  color: var(--color-accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 0.35em;
}

.hero-subtitle {
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  color: var(--color-green);
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.hero-desc {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  max-width: 32rem;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.altitude-track {
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 120px;
  background: var(--color-surface-raised);
  border-radius: 2px;
  display: none;
}

.altitude-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 0%;
  background: linear-gradient(to top, var(--color-accent), var(--color-green));
  border-radius: 2px;
  transition: height 0.15s ease-out;
}

.altitude-label {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
  transform-origin: center;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  white-space: nowrap;
}

@media (min-width: 1100px) {
  .altitude-track {
    display: block;
  }
}

/* Phone mockup stack */
.phone-stack {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 2rem 0;
}

.phone-frame {
  position: relative;
  width: min(260px, 72vw);
  aspect-ratio: 9 / 19.5;
  background: var(--color-surface);
  border-radius: 32px;
  padding: 10px;
  border: 2px solid var(--color-surface-raised);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.45),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.phone-frame::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 22px;
  background: var(--color-bg);
  border-radius: 12px;
  z-index: 2;
}

.phone-screen {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 24px;
  background: var(--color-burgundy);
}

.phone-frame--back {
  position: absolute;
  width: min(220px, 62vw);
  right: 5%;
  top: 8%;
  opacity: 0.55;
  transform: rotate(8deg) scale(0.92);
  z-index: 0;
}

.phone-frame--front {
  z-index: 1;
  transform: rotate(-4deg);
}

.phone-frame--back .phone-screen {
  filter: brightness(0.7);
}

/* --- Screenshot strip --- */
.screenshots-section {
  background: linear-gradient(180deg, transparent, rgba(76, 11, 21, 0.25));
}

.screenshot-rail {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  padding: 1rem 0 2rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--color-accent) var(--color-surface);
}

.screenshot-rail::-webkit-scrollbar {
  height: 6px;
}

.screenshot-rail::-webkit-scrollbar-thumb {
  background: var(--color-accent);
  border-radius: 3px;
}

.screenshot-card {
  flex: 0 0 auto;
  width: min(200px, 42vw);
  scroll-snap-align: center;
  text-align: center;
}

.screenshot-card .phone-frame {
  width: 100%;
  margin-inline: auto;
}

.screenshot-card figcaption {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* --- Feature runway (zigzag) --- */
.runway-list {
  display: flex;
  flex-direction: column;
  gap: 4rem;
  margin-top: 3rem;
}

.runway-item {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

@media (min-width: 768px) {
  .runway-item {
    grid-template-columns: auto 1fr;
    gap: 2.5rem;
  }

  .runway-item:nth-child(even) {
    direction: rtl;
  }

  .runway-item:nth-child(even) > * {
    direction: ltr;
  }
}

.runway-icon {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-burgundy);
  border-radius: var(--radius-md);
  border: 1px solid rgba(251, 0, 53, 0.2);
}

.runway-icon svg {
  width: 36px;
  height: 36px;
  color: var(--color-accent);
}

.runway-item h3 {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
}

.runway-item p {
  color: var(--color-text-muted);
}

/* --- Era chips --- */
.era-band {
  background: var(--color-surface);
  border-block: 1px solid var(--color-border);
  padding: 4rem 0;
}

.era-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.era-card {
  position: relative;
  padding: 1.75rem;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  overflow: hidden;
  transition: var(--transition);
}

.era-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.era-card:hover {
  border-color: rgba(251, 0, 53, 0.35);
  transform: translateY(-4px);
}

.era-card:hover::after {
  transform: scaleX(1);
}

.era-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.era-card p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.era-era-tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-green);
  margin-bottom: 0.75rem;
}

/* --- Steps --- */
.steps-row {
  display: grid;
  gap: 1.5rem;
  margin-top: 2.5rem;
  counter-reset: step;
}

@media (min-width: 700px) {
  .steps-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step-card {
  position: relative;
  padding: 1.75rem 1.5rem;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.step-card::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-accent);
  opacity: 0.35;
  line-height: 1;
  margin-bottom: 0.75rem;
}

.step-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.step-card p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* --- Stats band --- */
.stats-band {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: 3rem;
}

@media (min-width: 600px) {
  .stats-band {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-cell {
  background: var(--color-surface);
  padding: 1.5rem 1rem;
  text-align: center;
}

.stat-cell strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--color-green);
  margin-bottom: 0.25rem;
}

.stat-cell span {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* --- Legal teaser on home --- */
.legal-teaser {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

@media (min-width: 700px) {
  .legal-teaser {
    grid-template-columns: repeat(3, 1fr);
  }
}

.legal-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  transition: var(--transition);
}

.legal-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-3px);
  color: var(--color-text);
}

.legal-card h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.legal-card p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  flex: 1;
  margin-bottom: 1rem;
}

.legal-card .link-arrow {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-accent);
}

/* --- Page hero (inner pages) --- */
.page-hero {
  padding-top: calc(var(--header-height) + 3rem);
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--color-border);
  background: linear-gradient(135deg, var(--color-burgundy) 0%, var(--color-bg) 55%);
}

.page-hero h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
}

.page-hero .meta {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* --- Legal content --- */
.legal-body {
  padding: 3rem 0 5rem;
}

.legal-body article {
  max-width: 720px;
}

.legal-body h2 {
  font-size: 1.35rem;
  margin: 2.5rem 0 1rem;
  color: var(--color-text);
}

.legal-body h2:first-child {
  margin-top: 0;
}

.legal-body p,
.legal-body li {
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.legal-body ul {
  margin: 0 0 1rem 1.25rem;
}

.legal-body strong {
  color: var(--color-text);
}

.legal-callout {
  padding: 1.25rem 1.5rem;
  background: var(--color-burgundy);
  border-left: 3px solid var(--color-accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 2rem 0;
}

.legal-callout p {
  margin: 0;
  color: var(--color-text);
  font-size: 0.95rem;
}

/* --- Contact page --- */
.contact-grid {
  display: grid;
  gap: 3rem;
  padding: 3rem 0 5rem;
}

@media (min-width: 800px) {
  .contact-grid {
    grid-template-columns: 1fr 1.1fr;
    align-items: start;
  }
}

.contact-card {
  padding: 2rem;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}

.contact-card h2 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

.contact-list {
  list-style: none;
}

.contact-list li {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
}

.contact-list li:last-child {
  border-bottom: none;
}

.contact-list svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--color-accent);
  margin-top: 0.15rem;
}

.contact-list strong {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 0.25rem;
}

.contact-list a {
  color: var(--color-text);
  word-break: break-all;
}

.contact-list a:hover {
  color: var(--color-green);
}

.contact-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--color-text-muted);
}

.contact-form .field {
  margin-bottom: 1.25rem;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  outline: none;
  border-color: var(--color-accent);
}

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

.form-note {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 1rem;
}

.form-success {
  display: none;
  padding: 1rem;
  background: rgba(46, 176, 85, 0.15);
  border: 1px solid var(--color-green);
  border-radius: var(--radius-sm);
  color: var(--color-green);
  margin-top: 1rem;
}

.form-success.is-visible {
  display: block;
}

/* --- Footer --- */
.site-footer {
  padding: 3rem 0 2rem;
  border-top: 1px solid var(--color-border);
  background: rgba(76, 11, 21, 0.2);
}

.footer-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 700px) {
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr;
  }
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-top: 0.75rem;
  max-width: 280px;
}

.footer-nav h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.footer-nav ul {
  list-style: none;
}

.footer-nav li {
  margin-bottom: 0.5rem;
}

.footer-nav a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.footer-nav a:hover {
  color: var(--color-text);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* --- Utility --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center {
  text-align: center;
}

.mt-lg {
  margin-top: 3rem;
}
