/* ==========================================================================
   SCROLLRACK — styles.css
   ========================================================================== */

/* 1. Custom Properties
   ========================================================================== */
:root {
  --color-bg:            #0a0e1a;
  --color-bg-alt:        #0f1525;
  --color-surface:       rgba(255,255,255,0.06);
  --color-border:        rgba(255,255,255,0.10);
  --color-border-strong: rgba(255,255,255,0.18);
  --color-text-primary:  #f0f2f7;
  --color-text-secondary:#8b95b0;
  --color-accent:        #4f8ef7;
  --color-accent-glow:   rgba(79,142,247,0.25);
  --color-success:       #30d158;
  --color-warning:       #ff9f0a;

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;

  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  --nav-height: 64px;

  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
}

/* 2. Reset & Base
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text-primary);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { list-style: none; }

/* 3. Typography
   ========================================================================== */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
}

h1 { font-size: clamp(2.25rem, 6vw, 3.75rem); }
h2 { font-size: clamp(1.625rem, 4vw, 2.25rem); }
h3 { font-size: 1.125rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }

p { color: var(--color-text-secondary); }

small { font-size: 0.8125rem; }

/* 4. Layout Utilities
   ========================================================================== */
.section {
  padding: 5rem 1.25rem;
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-inner--narrow {
  max-width: 720px;
  margin: 0 auto;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}

.section-title {
  margin-bottom: 1rem;
}

.section-desc {
  font-size: 1.0625rem;
  max-width: 52ch;
  margin-bottom: 2.5rem;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--color-accent);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  z-index: 1000;
  transition: top var(--transition-fast);
}
.skip-link:focus { top: 0.5rem; text-decoration: none; }

/* 5. Components
   ========================================================================== */

/* --- Glass card --- */
.glass {
  background: var(--color-surface);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow:
    0 8px 32px rgba(0,0,0,0.40),
    inset 0 1px 0 rgba(255,255,255,0.12),
    inset 0 -1px 0 rgba(0,0,0,0.20);
  position: relative;
  overflow: hidden;
}

.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.07) 0%,
    transparent 50%
  );
  pointer-events: none;
  border-radius: inherit;
}

@supports not (backdrop-filter: blur()) {
  .glass { background: rgba(15,21,37,0.92); }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), opacity var(--transition-fast);
  text-decoration: none;
}

.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--color-accent);
  color: #ffffff;
  box-shadow: 0 4px 20px var(--color-accent-glow);
}
.btn--primary:hover {
  box-shadow: 0 8px 32px var(--color-accent-glow);
  opacity: 0.92;
}
.btn--primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  pointer-events: none;
}

.btn--ghost {
  background: var(--color-surface);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border-strong);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.btn--ghost:hover { border-color: var(--color-accent); }

/* --- Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.badge--success {
  background: rgba(48,209,88,0.15);
  color: var(--color-success);
  border: 1px solid rgba(48,209,88,0.25);
}
.badge--success::before { background: var(--color-success); }

.badge--warning {
  background: rgba(255,159,10,0.15);
  color: var(--color-warning);
  border: 1px solid rgba(255,159,10,0.25);
}
.badge--warning::before { background: var(--color-warning); }

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  background: rgba(10,14,26,0.72);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition-base);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.nav__logo {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
  text-decoration: none;
}
.nav__logo:hover { text-decoration: none; opacity: 0.85; }

.nav__logo-accent {
  color: var(--color-accent);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav__link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
}
.nav__link:hover,
.nav__link.is-active {
  color: var(--color-text-primary);
  background: rgba(255,255,255,0.06);
  text-decoration: none;
}

.nav__cta {
  margin-left: 0.5rem;
  padding: 0.45rem 1rem;
  font-size: 0.9rem;
}

/* Mobile hamburger */
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
}

.nav__toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text-primary);
  border-radius: 2px;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.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);
}

/* 6. Per-Section Layout
   ========================================================================== */

/* --- Hero --- */
#hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--nav-height) + 3rem);
  padding-bottom: 4rem;
  position: relative;
  overflow: hidden;
}

.hero__blobs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
}

.hero__blob--1 {
  width: 520px;
  height: 520px;
  top: -100px;
  left: -80px;
  background: radial-gradient(circle, rgba(79,142,247,0.22) 0%, transparent 70%);
}

.hero__blob--2 {
  width: 420px;
  height: 420px;
  bottom: 0;
  right: -60px;
  background: radial-gradient(circle, rgba(79,142,247,0.14) 0%, transparent 70%);
}

.hero__blob--3 {
  width: 300px;
  height: 300px;
  top: 40%;
  left: 50%;
  background: radial-gradient(circle, rgba(48,209,88,0.07) 0%, transparent 70%);
}

.hero__content {
  position: relative;
  z-index: 1;
}

.hero__tagline {
  font-size: clamp(1.125rem, 2.5vw, 1.375rem);
  font-weight: 400;
  color: var(--color-text-secondary);
  margin: 1rem 0 2rem;
  max-width: 48ch;
}

.hero__features {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.hero__feature {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.25rem;
  gap: 1rem;
}

.hero__feature-name {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-primary);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.hero__footnote {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}

/* --- Hero Phones --- */
.hero__phones {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 58%;
  pointer-events: none;
  z-index: 0;
  display: none;
  perspective: 900px;
  perspective-origin: 50% 50%;
}

/* Fade left edge so phones blend behind the text content */
.hero__phones::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--color-bg) 0%, transparent 28%);
  z-index: 10;
  pointer-events: none;
}

/* Fade bottom edge */
.hero__phones::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--color-bg) 0%, transparent 18%);
  z-index: 10;
  pointer-events: none;
}

/* The carousel ring — rotates continuously, children ride around it */
.hero__carousel {
  position: absolute;
  top: 52%;
  left: 46%;
  transform-style: preserve-3d;
  animation: carousel-spin 24s linear infinite;
  will-change: transform;
}

@keyframes carousel-spin {
  from { transform: rotateX(-14deg) rotateY(0deg); }
  to   { transform: rotateX(-14deg) rotateY(-360deg); }
}

/* Each phone: placed on the circle by rotating to its angle then pushing out */
.hero__phone {
  position: absolute;
  top: 0;
  left: 0;
  width: 210px;
  aspect-ratio: 722 / 1562;
  border-radius: 46px;
  overflow: hidden;
  border: 7px solid rgba(255,255,255,0.09);
  box-shadow:
    0 48px 96px rgba(0,0,0,0.70),
    0 0 0 1px rgba(255,255,255,0.05),
    inset 0 1px 0 rgba(255,255,255,0.13);
  background: #000;
  transform: translate(-50%, -50%) rotateY(var(--angle)) translateZ(230px);
}

.hero__phone:nth-child(1) { --angle:   0deg; }
.hero__phone:nth-child(2) { --angle:  90deg; }
.hero__phone:nth-child(3) { --angle: 180deg; }
.hero__phone:nth-child(4) { --angle: 270deg; }

.hero__phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 40px;
}

@media (min-width: 1024px) {
  .hero__phones {
    display: block;
  }
  /* Ensure text content layers above the phones */
  .hero__content {
    z-index: 2;
  }
}

/* --- Beta Section --- */
#beta {
  background-color: var(--color-bg-alt);
}

.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.step-card {
  padding: 1.75rem;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--color-accent-glow);
  border: 1px solid rgba(79,142,247,0.3);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.step-title {
  margin-bottom: 0.5rem;
  color: var(--color-text-primary);
}

.step-desc {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.55;
}

.step-desc a {
  color: var(--color-accent);
}

.beta-notice {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
}

.beta-notice__icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  line-height: 1;
}

.beta-notice__text {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.55;
}

/* --- Privacy & Legal --- */
#privacy,
#imprint {
  background-color: var(--color-bg);
}

#imprint {
  background-color: var(--color-bg-alt);
}

.legal-body {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.legal-block h3 {
  color: var(--color-text-primary);
  margin-bottom: 0.625rem;
  font-size: 1.0625rem;
}

.legal-block p,
.legal-block li {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.legal-block ul {
  list-style: disc;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.legal-block a {
  color: var(--color-accent);
}

.legal-updated {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  margin-bottom: 2rem;
}

/* --- Footer --- */
.footer {
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  padding: 2.5rem 1.25rem;
}

.footer__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer__copy {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.footer__link {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
}
.footer__link:hover { color: var(--color-text-primary); text-decoration: none; }

.footer__disclaimer {
  max-width: 1100px;
  margin: 1rem auto 0;
  padding: 0.875rem 0 0;
  border-top: 1px solid var(--color-border);
  font-size: 0.75rem;
  line-height: 1.6;
  color: rgba(139,149,176,0.55);
}

.footer__disclaimer a {
  color: rgba(139,149,176,0.65);
  text-decoration: underline;
  text-decoration-color: rgba(139,149,176,0.3);
}
.footer__disclaimer a:hover {
  color: var(--color-text-secondary);
  text-decoration-color: var(--color-text-secondary);
}

/* 7. Responsive
   ========================================================================== */

/* 640px — small tablets / large phones (landscape) */
@media (min-width: 640px) {
  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 768px — tablets */
@media (min-width: 768px) {
  .hero__features {
    max-width: 520px;
  }
}

/* 1024px — desktop */
@media (min-width: 1024px) {
  .steps-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .hero__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
  }
}

/* Mobile nav */
@media (max-width: 767px) {
  .nav__toggle {
    display: flex;
  }

  .nav__links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.75rem 1rem 1rem;
    background: rgba(10,14,26,0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--color-border);
  }

  .nav__links.is-open {
    display: flex;
  }

  .nav__link {
    padding: 0.875rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 1rem;
  }

  .nav__cta {
    margin-left: 0;
    margin-top: 0.25rem;
    text-align: center;
    justify-content: center;
  }
}

/* 8. Mobile Optimisation (hero overrides + phone carousel)
   ========================================================================== */

@media (max-width: 1023px) {

  /* Fix hero: add horizontal padding (it doesn't use .section so had none) */
  #hero {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: auto;
    padding-top: calc(var(--nav-height) + 2.5rem);
    padding-bottom: 0;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  /* Keep text content first (visually) */
  .hero__inner {
    order: 1;
    padding-bottom: 2rem;
  }

  /* Pull phone carousel into normal flow below the text */
  .hero__phones {
    display: block;
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: 100%;
    height: auto;
    order: 2;
    perspective: none;
  }

  /* Remove the left/bottom gradient overlays — not needed for flat layout */
  .hero__phones::before,
  .hero__phones::after {
    display: none;
  }

  /* Flat horizontal scroll strip */
  .hero__carousel {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    transform-style: flat;
    animation: none;
    will-change: auto;
    display: flex;
    gap: 1rem;
    padding: 0.5rem 1.25rem 2.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .hero__carousel::-webkit-scrollbar {
    display: none;
  }

  /* Each phone: flat card in the scroll row */
  .hero__phone {
    position: relative;
    top: auto;
    left: auto;
    width: 155px;
    flex-shrink: 0;
    transform: none;
    scroll-snap-align: center;
    border-radius: 32px;
  }

  /* Stack CTA buttons vertically, full width */
  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__actions .btn {
    justify-content: center;
  }
}

/* Small phones (<= 390px) — tighten up a bit more */
@media (max-width: 390px) {
  #hero {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  h1 { font-size: 2rem; }

  .hero__phone {
    width: 135px;
  }

  .section {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* 9. Reduced Motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .btn:hover { transform: none; }
  /* Pause carousel for users who prefer reduced motion */
  .hero__carousel { animation-play-state: paused; }
}

/* 10. Print
   ========================================================================== */
@media print {
  .nav,
  .hero__blobs,
  .hero__actions,
  #beta {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  .glass {
    background: none;
    border: 1px solid #ccc;
    box-shadow: none;
    backdrop-filter: none;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    color: #555;
  }

  #privacy, #imprint {
    background: #fff;
    page-break-before: always;
  }
}

/* ── Contact Form ─────────────────────────────────── */
.contact-form {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-primary);
}

.form-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: 1rem;
  font-family: inherit;
  padding: 0.75rem 1rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
  width: 100%;
  box-sizing: border-box;
}

.form-input::placeholder {
  color: var(--color-text-secondary);
  opacity: 0.7;
}

.form-input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-glow);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-submit {
  align-self: flex-start;
}

.form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-feedback {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
}

.form-feedback--success {
  background: rgba(48, 209, 88, 0.12);
  border: 1px solid rgba(48, 209, 88, 0.25);
  color: var(--color-success);
}

.form-feedback--error {
  background: rgba(255, 69, 58, 0.12);
  border: 1px solid rgba(255, 69, 58, 0.25);
  color: #ff453a;
}

.form-feedback--error a {
  color: inherit;
  text-decoration: underline;
}
