/*
  VivreFR Brand Transition Experience — V5.0 (Cinematic Rhythm)
  Version: V6.07.063
  Philosophy: Luxury is breathing room. One thought, one screen, one focus at a time.
*/

/* ────────────────────────────────────────────────────────
   DESIGN TOKENS — VivreFR Brand
──────────────────────────────────────────────────────── */
:root {
  /* Backgrounds — warm cream, NOT cold white */
  --bg:             #f6f2ec;
  --white:          #FFFFFF;
  --surface:        #ece6de;

  /* Text hierarchy */
  --ink-deep:       #080f1e;
  --ink-mid:        #374151;
  --ink-soft:       #64748b;
  --ink-ghost:      #9CA3AF;

  /* Brand colours — VivreFR Navy */
  --brand-navy:     #1c3281;
  --brand-navy-dark:#14245c;
  --brand-navy-deep:#0c1a40;
  --brand-navy-dim: rgba(28, 50, 129, 0.06);
  --brand-navy-mid: rgba(28, 50, 129, 0.12);

  /* Borders */
  --border-hair:    rgba(0, 0, 0, 0.06);
  --border-light:   rgba(0, 0, 0, 0.10);

  /* Radii */
  --r-md:           18px;
  --r-pill:         999px;

  /* Shadows */
  --shadow-sm:      0 10px 30px rgba(0,0,0,0.04);
  --shadow-md:      0 18px 50px rgba(28,50,129,0.08);

  /* Type — matched to main VivreFR site */
  --font-ui:        'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display:   'Clash Display', 'Plus Jakarta Sans', sans-serif;

  /* Motion */
  --ease-out:       cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:    cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  font-family: var(--font-ui);
  font-size: 16px;
  background: var(--bg);
  color: var(--ink-deep);
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  min-height: 100dvh;
}

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

button {
  font-family: inherit;
  cursor: pointer;
}

a {
  color: inherit;
}

/* ────────────────────────────────────────────────────────
   SILENT REDIRECT PROGRESS
──────────────────────────────────────────────────────── */
.redirect-progress-rail {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 3px;
  background: transparent;
  opacity: 0;
  transition: opacity 600ms var(--ease-out);
  pointer-events: none;
}

.redirect-progress-rail.visible {
  opacity: 1;
  background: var(--border-hair);
}

.redirect-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--brand-navy);
  border-radius: 0 2px 2px 0;
  transition: width 1s linear;
}

/* ────────────────────────────────────────────────────────
   EXPERIENCE WRAPPER
──────────────────────────────────────────────────────── */
.experience-wrapper {
  width: 100%;
  max-width: 580px; /* narrowed to align layouts and optimize readability */
  margin: 0 auto;
  padding: 0 24px;
}

/* ────────────────────────────────────────────────────────
   ABOVE THE FOLD — Large Breathing Spacing
──────────────────────────────────────────────────────── */
.above-fold {
  min-height: 85dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 0 40px;
}

/* 
  VERTICAL LOGO FLOW
  Muted Past Logo -> has grown into -> Luminous Present Logo
*/
.vertical-logo-flow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-bottom: 72px; /* Generous breathing separation */
}

.logo-past-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-ghost);
  margin-bottom: 2px;
}

.logo-past-wrapper {
  opacity: 0.85; /* Refined visual presence (V5.1) */
  transition: opacity 300ms var(--ease-out);
}

.logo-past-wrapper:hover {
  opacity: 1;
}

.helpexpats-logo {
  width: 140px; /* Refined desktop size (V5.1) */
  height: auto;
  object-fit: contain;
}

.logo-bridge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  max-width: 240px; /* Limits horizontal stretch of bridge lines */
  margin: 6px 0;
}

.logo-bridge-line {
  flex: 1;
  height: 1px;
  background: var(--border-light);
}

.logo-bridge-text {
  font-size: 0.72rem;
  font-weight: 500;
  font-style: italic;
  color: var(--ink-ghost);
  white-space: nowrap;
}

.logo-future-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 24px;
}

.vivrefr-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 80% at 50% 50%, var(--brand-navy-dim), transparent 75%);
  filter: blur(16px);
  pointer-events: none;
  z-index: 0;
}

.vivrefr-logo {
  position: relative;
  z-index: 1;
  width: 220px; /* Refined desktop size (V5.1) */
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(15, 23, 42, 0.04));
}

/* HEADLINE */
.headline-block {
  margin-bottom: 40px;
}

.headline {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink-deep);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.headline-sub {
  color: var(--ink-mid);
}

/* FOUNDER ACKNOWLEDGEMENT */
.founder-acknowledgement {
  max-width: 480px;
  margin-bottom: 56px; /* Optimized spacing before CTA (V5.2) */
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.founder-acknowledgement p {
  font-size: 1.05rem;
  color: var(--ink-mid);
  line-height: 1.6;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.founder-acknowledgement .emphasis-line {
  color: var(--ink-deep);
  font-weight: 700;
  margin-top: 4px;
}

/* ACTION CLUSTER */
.action-cluster {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0; /* Remove generic gap to allow precise spacing control */
  width: 100%;
}

.cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--brand-navy);
  color: var(--white);
  font-size: 1.025rem;
  font-weight: 700;
  padding: 14px 36px;
  border: none;
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-sm);
  transition: background 220ms var(--ease-out),
              transform 220ms var(--ease-out),
              box-shadow 220ms var(--ease-out);
}

.cta-primary:hover {
  background: var(--brand-navy-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

.cta-primary:focus-visible {
  outline: 3px solid rgba(28, 50, 129, 0.4);
  outline-offset: 3px;
}

.cta-primary svg {
  transition: transform 220ms var(--ease-out);
  flex-shrink: 0;
}

.cta-primary:hover svg {
  transform: translateX(4px);
}

/* 
  Redirect status — quiet, appears late.
  Reserves height and remains present in DOM layout to prevent 
  the fallback link from jumping when the status fades in (UX stability).
*/
.redirect-status {
  font-size: 0.8rem;
  color: var(--ink-ghost);
  font-weight: 500;
  margin-top: 12px;
  height: 20px;
  line-height: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 400ms var(--ease-out);
}

.redirect-status.active {
  opacity: 1;
}

.status-dots span {
  animation: dotBlink 1.4s infinite;
  animation-fill-mode: both;
}

.status-dots span:nth-child(2) { animation-delay: 0.2s; }
.status-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotBlink {
  0%, 80%, 100% { opacity: 0.2; }
  40%           { opacity: 1; }
}

/* Fallback link — separated cleanly from CTA target zone */
.fallback-link {
  font-size: 0.78rem;
  color: var(--ink-ghost);
  text-decoration: none;
  margin-top: 24px;
  transition: color 220ms var(--ease-out);
}

.fallback-link span {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.fallback-link:hover {
  color: var(--brand-navy);
}

.fallback-link:focus-visible {
  outline: 2px solid var(--brand-navy);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ────────────────────────────────────────────────────────
   BELOW THE FOLD
──────────────────────────────────────────────────────── */
.below-fold {
  padding: 80px 0 100px;
  display: flex;
  flex-direction: column;
  gap: 60px;
}

/* Section divider */
.section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-divider span {
  flex: 1;
  height: 1px;
  background: var(--border-hair);
}

.divider-dot {
  flex: 0 0 5px !important;
  height: 5px !important;
  border-radius: 50%;
  background: var(--ink-ghost) !important;
}

/* Continuity Cards — clean, no badges */
.continuity-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.continuity-card {
  background: var(--white);
  border: 1px solid var(--border-hair);
  border-radius: var(--r-md);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: var(--shadow-sm);
}

.continuity-card--new {
  background: rgba(28, 50, 129, 0.02);
  border-color: rgba(28, 50, 129, 0.12);
}

.continuity-card-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-deep);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.continuity-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.continuity-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--ink-mid);
  font-weight: 500;
  line-height: 1.45;
}

.tick {
  width: 14px;
  height: 14px;
  color: #16A34A;
  flex-shrink: 0;
  margin-top: 3px;
}

.tick--new {
  color: var(--brand-navy);
}

/* ────────────────────────────────────────────────────────
   FOOTER
──────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border-hair);
  padding: 32px 0;
  text-align: center;
}

.site-footer p {
  font-size: 0.78rem;
  color: var(--ink-ghost);
  line-height: 1.6;
}

/* ────────────────────────────────────────────────────────
   ANIMATION SYSTEM
──────────────────────────────────────────────────────── */
.fade-in {
  opacity: 0;
  animation: anim-fade-in 800ms var(--ease-out) forwards;
}

.fade-up {
  opacity: 0;
  transform: translateY(16px);
  animation: anim-fade-up 900ms var(--ease-out) forwards;
}

@keyframes anim-fade-in {
  to { opacity: 1; }
}

@keyframes anim-fade-up {
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .fade-in,
  .fade-up {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ────────────────────────────────────────────────────────
   RESPONSIVE
──────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .above-fold {
    padding: 80px 0 60px;
  }

  .vertical-logo-flow {
    margin-bottom: 48px;
    gap: 16px;
  }

  .logo-bridge {
    max-width: 180px;
  }

  .helpexpats-logo {
    width: 115px; /* Refined mobile size */
  }

  .vivrefr-logo {
    width: 180px; /* Refined mobile size */
  }

  .headline {
    font-size: 1.85rem;
  }

  .founder-acknowledgement {
    margin-bottom: 48px;
  }

  .founder-acknowledgement p {
    font-size: 0.95rem;
  }

  .continuity-cards {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 400px) {
  .cta-primary {
    width: 100%;
    justify-content: center;
  }
}
