/* FiberFlow palette — matches app/src/main/java/com/fiberflow/app/ui/theme/Color.kt */
:root {
  --ink-deep: #1c1d22;
  --ink-surface: #20232a;
  --ink-card: #262a32;
  --ink-elevated: #2e343e;
  --ink-border: #3d4651;
  --outline-variant: #363d48;

  --brand-coral: #eb786a;
  --brand-coral-light: #fb9d8a;
  --brand-coral-dark: #c9504c;

  --brand-teal: #88d7ce;
  --brand-teal-light: #8ac6ce;
  --brand-teal-dark: #3e7d8f;
  --brand-teal-deep: #559dac;

  --brand-plum: #4b2e6a;
  --brand-plum-mid: #725c89;
  --brand-plum-light: #9d83b4;

  --brand-rose: #8c5571;
  --brand-rose-light: #d98390;

  --brand-blue: #437395;
  --brand-blue-light: #709cb3;

  --text-primary: #e8eaed;
  --text-secondary: #acb0b3;
  --text-muted: #6d7279;

  --gradient-hero: linear-gradient(
    135deg,
    var(--brand-plum) 0%,
    var(--brand-rose) 35%,
    var(--brand-teal-dark) 70%,
    var(--brand-teal) 100%
  );

  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 28px;

  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.25);
  --header-height: 72px;

  --font-serif: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --font-sans: "DM Sans", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--ink-surface);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand-teal);
  text-decoration: none;
}

a:hover {
  color: var(--brand-teal-light);
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 1000;
  padding: 0.75rem 1rem;
  background: var(--brand-teal);
  color: var(--ink-deep);
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(32, 35, 42, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--outline-variant);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.125rem;
}

.brand:hover {
  color: var(--text-primary);
}

.brand-icon {
  border-radius: 10px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-nav a {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color 0.2s;
}

.site-nav a:hover {
  color: var(--text-primary);
}

.nav-cta {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: rgba(136, 215, 206, 0.15);
  color: var(--brand-teal) !important;
}

.nav-cta:hover {
  background: rgba(136, 215, 206, 0.25);
  color: var(--brand-teal-light) !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--ink-card);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin-inline: auto;
  background: var(--text-primary);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Hero */
.hero-block {
  padding: 1.5rem 1rem 2.5rem;
}

.hero {
  max-width: 1120px;
  margin-inline: auto;
  background: var(--gradient-hero);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1.5rem, 4vw, 2.5rem) clamp(1.75rem, 4vw, 2.5rem);
  display: flex;
  flex-direction: column;
  gap: clamp(1.75rem, 4vw, 2.5rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.hero-eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 2px rgba(28, 29, 34, 0.35);
}

.hero h1 {
  margin: 0 0 0.875rem;
  font-family: var(--font-serif);
  font-size: clamp(1.625rem, 3.2vw, 2.25rem);
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
  max-width: 22ch;
}

.hero-lead {
  margin: 0 0 1.5rem;
  font-size: 1rem;
  line-height: 1.6;
  color: #fff;
  max-width: 36rem;
  text-shadow: 0 1px 2px rgba(28, 29, 34, 0.2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.5rem;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: #fff;
  color: var(--ink-deep);
  border-color: transparent;
}

.btn-primary:hover {
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink-deep);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.hero-art,
.hero-phone {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-inline: 0.5rem;
}

.hero-logo {
  width: min(100%, 280px);
  filter: drop-shadow(0 12px 32px rgba(0, 0, 0, 0.3));
}

/* Hero stats */
.hero-stats {
  padding-top: clamp(1.25rem, 3vw, 1.75rem);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.stat-chip {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  background: var(--ink-deep);
  border: 1px solid var(--ink-border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.stat-value {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.stat-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.stat-teal {
  border-left: 3px solid var(--brand-teal);
}

.stat-teal .stat-value {
  color: var(--brand-teal-light);
}

.stat-coral {
  border-left: 3px solid var(--brand-coral);
}

.stat-coral .stat-value {
  color: var(--brand-coral-light);
}

.stat-plum {
  border-left: 3px solid var(--brand-plum-light);
}

.stat-plum .stat-value {
  color: var(--brand-plum-light);
}

/* Sections */
.section {
  padding: 4.5rem 0;
}

.section-alt {
  background: var(--ink-deep);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
}

.section-header h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
}

.section-header p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 1.0625rem;
}

/* Feature cards */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.feature-card {
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, var(--ink-card), var(--ink-elevated));
  border: 1px solid var(--outline-variant);
  transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
  transform: translateY(-2px);
}

.feature-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 700;
}

.feature-card p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.accent-teal {
  border-left: 3px solid var(--brand-teal);
}

.accent-teal h3 {
  color: var(--brand-teal);
}

.accent-plum {
  border-left: 3px solid var(--brand-plum-mid);
}

.accent-plum h3 {
  color: var(--brand-plum-light);
}

.accent-coral {
  border-left: 3px solid var(--brand-coral);
}

.accent-coral h3 {
  color: var(--brand-coral);
}

.accent-rose {
  border-left: 3px solid var(--brand-rose);
}

.accent-rose h3 {
  color: var(--brand-rose-light);
}

.accent-blue {
  border-left: 3px solid var(--brand-blue);
}

.accent-blue h3 {
  color: var(--brand-blue-light);
}

/* Steps */
.steps-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  max-width: 720px;
  margin-inline: auto;
}

.step-card {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  background: var(--ink-card);
  border: 1px solid var(--outline-variant);
}

.step-number {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(136, 215, 206, 0.15);
  color: var(--brand-teal);
  font-weight: 700;
  font-size: 1.125rem;
}

.step-card h3 {
  margin: 0 0 0.375rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.step-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

/* Download */
.download-section {
  text-align: center;
}

.download-inner {
  max-width: 520px;
}

.download-icon {
  margin: 0 auto 1.5rem;
  border-radius: 22px;
  box-shadow: var(--shadow-card);
}

.download-section h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.download-section > .container > p,
.download-inner > p:not(.download-note) {
  margin: 0 0 2rem;
  color: var(--text-secondary);
}

.play-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.75rem 1.25rem 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: #000;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: opacity 0.2s, transform 0.15s;
}

.play-badge:not(.play-badge--placeholder):hover {
  transform: translateY(-1px);
  color: #fff;
}

.play-badge--placeholder {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.play-badge-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}

.play-badge-label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.85;
}

.play-badge-store {
  font-size: 1.25rem;
  font-weight: 600;
}

.download-note {
  margin: 1.25rem 0 0 !important;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.download-note.is-live {
  color: var(--brand-teal);
}

/* Footer */
.site-footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--outline-variant);
  background: var(--ink-deep);
}

.footer-inner {
  text-align: center;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.footer-brand img {
  border-radius: 8px;
}

.footer-tagline {
  margin: 0 0 1rem;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.footer-copy {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 860px) {
  .hero-block {
    padding: 1rem 1rem 2rem;
  }

  .hero {
    border-radius: var(--radius-md);
  }

  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero h1 {
    max-width: none;
    margin-inline: auto;
  }

  .hero-lead {
    margin-inline: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-art,
  .hero-phone {
    order: -1;
    margin-bottom: 0.5rem;
  }

  .hero-logo {
    width: min(220px, 72%);
    margin-inline: auto;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem;
    background: var(--ink-card);
    border-bottom: 1px solid var(--outline-variant);
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.25s, opacity 0.25s, visibility 0.25s;
  }

  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .site-nav a {
    padding: 0.875rem 1rem;
    border-radius: var(--radius-sm);
  }

  .site-nav a:hover {
    background: var(--ink-elevated);
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 3rem 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
