/* ═══════════════════════════════════════════════════
   flaynn.com — Landing investisseurs BA / Family Offices
   Design System + Responsive
   ═══════════════════════════════════════════════════ */

/* ── Variables ── */
:root {
  --bg: #0D0D0D;
  --violet: #7B2D8E;
  --orange: #E8651A;
  --gradient: linear-gradient(135deg, #7B2D8E, #E8651A);
  --text-primary: #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-tertiary: rgba(255, 255, 255, 0.4);
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: 16px;
}

/* ── Reset ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 400;
  color: var(--text-primary);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Canvas layers ── */
#starfield {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

#warp-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
}

/* ── Permanent vignette overlay ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.4) 100%);
}

/* ── Main content ── */
.page {
  position: relative;
  z-index: 2;
}

/* ── Stations ── */
.station {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  position: relative;
}

/* ═══════════════════════════════════════════════════
   STATION 1 — Le Constat
   ═══════════════════════════════════════════════════ */
.station-1 {
  text-align: center;
  height: 100vh;
}

.hero-title {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 700;
  font-size: clamp(2.5rem, 6vw, 4rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text-primary);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1.5s ease-out 0.3s forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.3;
  animation: scrollBounce 2s ease-in-out infinite;
  font-size: 1.5rem;
  color: var(--text-primary);
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ── Warp travel zones ── */
.warp-zone {
  height: 150vh;
  width: 100%;
  position: relative;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════
   STATION 2 — Les Chiffres
   ═══════════════════════════════════════════════════ */
.station-2 {
  min-height: auto;
  padding: 0 1.5rem;
}

.station-2-intro {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.station-2-intro h2 {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  line-height: 1.3;
  max-width: 600px;
  color: var(--text-secondary);
}

/* Stat blocks */
.stat-block {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.stat-number {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  font-size: clamp(4rem, 10vw, 7rem);
  color: var(--orange);
  line-height: 1;
  margin-bottom: 1.5rem;
}

.stat-text {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 400;
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 480px;
  line-height: 1.6;
  margin: 0 auto;
}

.stat-text-highlight {
  color: var(--text-primary);
}

.stat-source {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 500;
  font-size: 0.7rem;
  color: var(--text-tertiary);
  margin-top: 1.2rem;
  text-align: right;
  width: 100%;
  max-width: 480px;
}

/* Punchline */
.punchline {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.punchline-line {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--text-primary);
  line-height: 1.5;
  max-width: 600px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.punchline-line.visible {
  opacity: 1;
  transform: translateY(0);
}

.punchline-line.orange {
  color: var(--orange);
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════════
   STATION 3 — La Vision + Le Produit
   ═══════════════════════════════════════════════════ */
.station-3 {
  text-align: center;
  min-height: 100vh;
  height: auto;
  padding: 4rem 1.5rem;
  gap: 0;
}

/* Vision headline */
.vision-headline {
  margin-bottom: 60px;
  text-align: center;
}

.vision-line {
  display: block;
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 600;
  font-size: clamp(1.3rem, 3vw, 2rem);
  color: var(--text-primary);
  line-height: 1.5;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.vision-line.visible {
  opacity: 1;
  transform: translateY(0);
}

.vision-line.orange {
  color: var(--orange);
}

/* Two-column layout */
.station-3-columns {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 60px;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.column-left {
  flex: 1;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.column-right {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Scoring card ── */
.scoring-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  max-width: 400px;
  width: 100%;
  transition: transform 0.15s ease-out, box-shadow 0.3s ease;
  will-change: transform;
  box-shadow: 0 0 60px rgba(123, 45, 142, 0.12), 0 0 120px rgba(123, 45, 142, 0.05);
}

.scoring-card:hover {
  box-shadow: 0 0 80px rgba(123, 45, 142, 0.22), 0 0 160px rgba(123, 45, 142, 0.08);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.card-label {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.card-score {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 700;
  font-size: 2rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.card-verdict-badge {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 700;
  font-size: 0.85rem;
  color: #D97706;
  margin-left: 0.8rem;
}

/* Score rows */
.score-row {
  display: flex;
  align-items: center;
  margin-bottom: 0.9rem;
}

.score-row-label {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--text-secondary);
  width: 90px;
  text-align: left;
  flex-shrink: 0;
}

.score-bar {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
  margin: 0 0.8rem;
}

.score-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--gradient);
  width: 0;
  transition: width 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.score-row-value {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 500;
  font-size: 0.75rem;
  color: var(--text-tertiary);
  width: 45px;
  text-align: right;
  flex-shrink: 0;
}

/* Verdict */
.card-verdict {
  margin-top: 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.verdict-label {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.verdict-value {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 700;
  font-size: 1rem;
  color: var(--orange);
}

.card-badge {
  margin-top: 1.2rem;
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 500;
  font-size: 0.65rem;
  color: var(--text-tertiary);
  letter-spacing: 0.05em;
}

/* Below card text */
.card-subtext {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 400;
  font-style: italic;
  font-size: 0.9rem;
  color: var(--text-tertiary);
  margin-top: 16px;
  text-align: center;
  max-width: 400px;
}

/* ═══════════════════════════════════════════════════
   iPhone Mockup
   ═══════════════════════════════════════════════════ */
.iphone-wrapper {
  position: relative;
}

.iphone-wrapper::before {
  content: '';
  position: absolute;
  inset: -20px;
  z-index: -1;
  background: radial-gradient(ellipse, rgba(123, 45, 142, 0.3), transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}

.iphone-frame {
  width: 280px;
  height: 580px;
  border-radius: 44px;
  border: 4px solid rgba(255, 255, 255, 0.12);
  background: #000;
  padding: 12px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06),
              0 40px 80px rgba(0, 0, 0, 0.5),
              inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  position: relative;
  animation: phoneFloat 4s ease-in-out infinite;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s ease, transform 1s ease;
}

.iphone-frame.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes phoneFloat {
  0%, 100% { transform: translateY(-5px); }
  50% { transform: translateY(5px); }
}

.iphone-frame.visible {
  animation: phoneFloat 4s ease-in-out infinite;
}

/* Dynamic Island */
.iphone-frame::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 28px;
  background: #000;
  border-radius: 20px;
  z-index: 10;
}

.iphone-screen {
  width: 100%;
  height: 100%;
  border-radius: 36px;
  overflow-y: auto;
  overflow-x: hidden;
  background: #0a0a0a;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.iphone-screen::-webkit-scrollbar {
  display: none;
}

/* Phone content screens */
.phone-screen-section {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.phone-logo {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: 8px;
}

.phone-tagline {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 400;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 24px;
}

.phone-btn {
  display: inline-block;
  padding: 8px 24px;
  background: var(--gradient);
  color: #fff;
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 600;
  font-size: 0.75rem;
  border-radius: 20px;
  text-decoration: none;
  pointer-events: none;
}

/* Mini scoring card inside phone */
.phone-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px 14px;
  width: 100%;
  max-width: 220px;
}

.phone-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.phone-card-label {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 600;
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
}

.phone-card-score {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 700;
  font-size: 1rem;
  color: var(--orange);
}

.phone-bar-row {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
}

.phone-bar-label {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.55rem;
  color: rgba(255, 255, 255, 0.5);
  width: 55px;
  text-align: left;
}

.phone-bar {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
  margin-left: 6px;
}

.phone-bar-fill {
  height: 100%;
  background: var(--gradient);
  border-radius: 2px;
}

.phone-verdict {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.phone-verdict-label {
  font-size: 0.5rem;
  color: rgba(255, 255, 255, 0.3);
  text-transform: uppercase;
}

.phone-verdict-value {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 700;
  font-size: 0.65rem;
  color: #D97706;
}

/* Phone dashboard screen */
.phone-dashboard-title {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  color: #fff;
  margin-bottom: 16px;
}

.phone-score-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--orange);
  margin: 0 auto 12px;
}

.phone-status {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.4);
}

/* Phone result screen */
.phone-result-title {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  color: #fff;
  margin-bottom: 8px;
}

.phone-result-price {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--orange);
  margin-bottom: 16px;
}

.phone-pillar-list {
  list-style: none;
  text-align: left;
  width: 100%;
  max-width: 180px;
}

.phone-pillar-list li {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.5);
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

/* Phone CTA screen */
.phone-cta-link {
  display: inline-block;
  padding: 10px 28px;
  background: var(--gradient);
  color: #fff;
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 600;
  font-size: 0.75rem;
  border-radius: 20px;
  text-decoration: none;
  transition: opacity 0.2s;
}

.phone-cta-link:hover {
  opacity: 0.9;
}

/* Mobile fallback link (replaces iPhone on small screens) */
.mobile-platform-link {
  display: none;
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
  margin-top: 2rem;
}

.mobile-platform-link:hover {
  border-bottom-color: var(--text-secondary);
}

/* ── CTAs section ── */
.cta-section {
  margin-top: 60px;
  text-align: center;
  width: 100%;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2.2rem;
  background: var(--gradient);
  color: #fff;
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.btn-cta:hover {
  opacity: 0.92;
  transform: translateY(-2px);
}

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

.invest-line {
  margin-top: 40px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

.invest-link {
  color: var(--text-tertiary);
  text-decoration: none;
  transition: text-decoration 0.2s;
}

.invest-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ═══════════════════════════════════════════════════
   Footer
   ═══════════════════════════════════════════════════ */
.site-footer {
  padding: 3rem 1.5rem 2rem;
  text-align: center;
  position: relative;
  z-index: 2;
}

.footer-divider {
  width: 120px;
  height: 1px;
  background: var(--glass-border);
  margin: 0 auto 2rem;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}

.footer-logo {
  height: 40px;
  opacity: 0.6;
}

.footer-tagline {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

.footer-legal {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 400;
  font-size: 0.7rem;
  color: var(--text-tertiary);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  opacity: 0.6;
  transition: opacity 0.2s;
  margin-top: 0.5rem;
}

.footer-legal:hover {
  opacity: 1;
}

/* ── Mobile logo (fixed) ── */
.mobile-logo {
  display: none;
}

/* ── Legal modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: #1a1a1a;
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 2.5rem;
  max-width: 520px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}

.modal-content h3 {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 1.2rem;
}

.modal-content p {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 0.8rem;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-size: 1.5rem;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* ═══════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════ */

/* Mobile ≤ 639px */
@media (max-width: 639px) {
  .mobile-logo {
    display: block;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 50;
    opacity: 0.4;
    height: 20px;
  }

  .station {
    padding: 1.5rem 1.25rem;
  }

  .station-3 {
    padding: 2rem 1.25rem;
  }

  .warp-zone {
    height: 120vh;
  }

  .scoring-card {
    padding: 2rem 1.5rem;
  }

  .score-row-label {
    width: 72px;
    font-size: 0.7rem;
  }

  .modal-content {
    padding: 2rem 1.5rem;
  }
}

/* Mobile: hide iPhone, show fallback link */
@media (max-width: 767px) {
  .station-3-columns {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }

  .column-right {
    display: none;
  }

  .mobile-platform-link {
    display: inline-block;
  }
}

/* Tablet 640-767px */
@media (min-width: 640px) and (max-width: 767px) {
  .mobile-logo {
    display: block;
    position: fixed;
    top: 1rem;
    left: 1.5rem;
    z-index: 50;
    opacity: 0.4;
    height: 22px;
  }
}

/* Desktop 1024+ */
@media (min-width: 1024px) {
  .station {
    padding: 2rem 3rem;
  }

  .station-3 {
    min-height: 100vh;
    height: auto;
    padding: 4rem 3rem;
  }

  .warp-zone {
    height: 180vh;
  }

  .scoring-card {
    max-width: 440px;
    padding: 3rem 2.5rem;
  }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .hero-title {
    animation: none;
    opacity: 1;
    transform: none;
  }

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

  .score-bar-fill {
    transition: none;
  }

  .btn-cta {
    transition: none;
  }

  .scoring-card {
    transition: none;
  }

  .iphone-frame {
    animation: none;
  }

  .punchline-line,
  .vision-line {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
