/* ============================================================
   TALA — Pre-launch
   css/styles.css
   ============================================================ */

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

/* --- Design tokens ---------------------------------------- */
:root {
  --bg-deep:        #060D0B;
  --bg-dark:        #0B1917;
  --bg-mid:         #0F2421;

  --accent:         #5BC8B5;
  --accent-dim:     #2E7A6D;
  --accent-glow:    rgba(91, 200, 181, 0.18);

  --text-primary:   #F0EEEB;
  --text-muted:     rgba(240, 238, 235, 0.48);
  --text-accent:    #5BC8B5;

  --font: 'Raleway', system-ui, sans-serif;

  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  3.5rem;
  --space-xl:  6.5rem;

  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-pill: 100px;

  --container:        1100px;
  --container-narrow: 640px;

  --ease:     cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
}

/* --- Base -------------------------------------------------- */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-weight: 300;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

h1, h2, h3 {
  font-family: var(--font);
  font-weight: 200;
  letter-spacing: 0.06em;
  line-height: 1.2;
}

/* Screen-reader only */
.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;
}

/* --- Language visibility ---------------------------------- */
[data-lang="fr"] .lang-en { display: none; }
[data-lang="en"] .lang-fr { display: none; }

/* --- Language selector ------------------------------------ */
.lang-selector {
  position: fixed;
  top: 1.5rem;
  right: 1.75rem;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.lang-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-weight: 400;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  padding: 0.3em 0;
  transition: color 0.2s var(--ease);
  text-transform: uppercase;
}

.lang-btn.active {
  color: var(--text-accent);
}

.lang-btn:hover {
  color: var(--text-primary);
}

.lang-sep {
  font-size: 0.55rem;
  color: var(--text-muted);
  opacity: 0.3;
  pointer-events: none;
  line-height: 1;
}

/* --- Layout helpers --------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container--narrow {
  max-width: var(--container-narrow);
}


/* ============================================================
   HERO
   ============================================================ */

#hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  overflow: hidden;
  isolation: isolate;
}

/* Background radial gradient — matches logo atmosphere */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: radial-gradient(
    ellipse 90% 80% at 50% 44%,
    #12302A 0%,
    #081812 50%,
    #040A07 100%
  );
}

/* Subtle drifting ambient light */
#hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(
    ellipse 50% 42% at 50% 38%,
    rgba(91, 200, 181, 0.07) 0%,
    transparent 68%
  );
  animation: ambientShift 14s ease-in-out infinite alternate;
}

@keyframes ambientShift {
  0%   { opacity: 0.55; transform: scale(1)    translateY(0); }
  100% { opacity: 1;    transform: scale(1.14) translateY(-2%); }
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.9rem, 2.5vw, 1.55rem);
  width: 100%;
  max-width: 580px;
}

/* --- Logo mark -------------------------------------------- */
.logo-mark {
  width: clamp(44px, 10vw, 10px);
  animation: fadeUp 1.2s var(--ease-out) both;
}

.logo-mark img {
  width: 100%;
  mix-blend-mode: screen;
  animation: logoPulse 6s ease-in-out infinite;
  will-change: filter;
}

@keyframes logoPulse {
  0%, 100% { filter: drop-shadow(0 0  5px rgba(91, 200, 181, 0.18)); }
  50%       { filter: drop-shadow(0 0 22px rgba(91, 200, 181, 0.52)); }
}

/* --- Wordmark --------------------------------------------- */
.wordmark {
  font-size: clamp(3.2rem, 10.5vw, 7rem);
  font-weight: 100;
  letter-spacing: 0.44em;
  text-transform: lowercase;
  color: var(--text-primary);
  line-height: 1;
  /* pad-right offsets the trailing tracking gap */
  padding-left: 0.44em;
  animation: fadeUp 1.2s 0.15s var(--ease-out) both;
}

/* --- Thin teal divider ------------------------------------ */
.teal-divider {
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: fadeUp 1.2s 0.28s var(--ease-out) both;
}

/* --- Tagline ---------------------------------------------- */
.hero-tagline {
  font-size: clamp(0.57rem, 1.25vw, 0.7rem);
  font-weight: 200;
  letter-spacing: 0.52em;
  text-transform: uppercase;
  color: var(--text-accent);
  padding-right: 0.52em;
  animation: fadeUp 1.2s 0.42s var(--ease-out) both;
}

/* --- One-liner -------------------------------------------- */
.hero-one-liner {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  animation: fadeUp 1.2s 0.58s var(--ease-out) both;
}

.hero-one-liner span {
  font-size: clamp(0.95rem, 2.2vw, 1.18rem);
  font-weight: 200;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  opacity: 0.9;
}

/* --- Coming-soon badge ------------------------------------ */
.coming-soon-badge {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-accent);
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius-pill);
  padding: 0.38em 1.15em;
  /* offset trailing letter-spacing */
  padding-right: calc(1.15em + 0.22em);
  animation: fadeUp 1.2s 0.72s var(--ease-out) both;
}

/* --- Waitlist form (hero) --------------------------------- */
.waitlist-form {
  width: 100%;
  max-width: 420px;
  animation: fadeUp 1.2s 0.88s var(--ease-out) both;
}

.form-inner {
  display: flex;
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(10, 26, 22, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition:
    border-color 0.3s var(--ease),
    box-shadow   0.3s var(--ease);
}

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

.form-inner input[type="email"] {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font);
  font-weight: 300;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  padding: 0.88rem 1rem;
}

.form-inner input[type="email"]::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

.form-inner button {
  flex-shrink: 0;
  background: var(--accent);
  color: #051210;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.88rem 1.1rem;
  white-space: nowrap;
  transition:
    background  0.25s var(--ease),
    box-shadow  0.25s var(--ease);
}

.form-inner button:hover,
.form-inner button:focus-visible {
  background: #72D4C4;
  box-shadow: 0 0 18px rgba(91, 200, 181, 0.42);
  outline: none;
}

/* Form success message */
.form-success {
  display: none;
  margin-top: 0.9rem;
  font-size: 0.84rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--text-accent);
  text-align: center;
  line-height: 1.7;
}

.form-success.visible {
  display: block;
  animation: fadeUp 0.5s var(--ease-out) both;
}

/* Form error message */
.form-error {
  display: none;
  margin-top: 0.7rem;
  font-size: 0.82rem;
  font-weight: 300;
  letter-spacing: 0.03em;
  color: #e88a80;
  text-align: center;
  line-height: 1.6;
}

.form-error.visible {
  display: block;
  animation: fadeUp 0.4s var(--ease-out) both;
}

/* --- Larger waitlist form variant (CTA section) ----------- */
.waitlist-form--lg {
  max-width: 520px;
  animation: none;
}

.waitlist-form--lg .form-inner {
  flex-direction: column;
  border-radius: var(--radius-md);
}

.waitlist-form--lg input[type="email"] {
  font-size: 1rem;
  padding: 1.05rem 1.2rem;
  border-bottom: 1px solid rgba(46, 122, 110, 0.3);
}

.waitlist-form--lg button {
  padding: 1rem 1.2rem;
  font-size: 0.78rem;
}

@media (min-width: 520px) {
  .waitlist-form--lg .form-inner {
    flex-direction: row;
  }

  .waitlist-form--lg input[type="email"] {
    border-bottom: none;
  }
}

/* --- Scroll indicator ------------------------------------- */
.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  animation: fadeUp 1s 1.5s var(--ease-out) both;
}

.scroll-indicator span {
  display: block;
  width: 1px;
  height: 42px;
  background: linear-gradient(to bottom, var(--accent-dim), transparent);
  animation: scrollLine 2.4s ease-in-out 2s infinite;
}

@keyframes scrollLine {
  0%   { opacity: 0; transform: translateY(-8px); }
  25%  { opacity: 0.8; }
  70%  { opacity: 0.8; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(8px); }
}

/* --- Shared fade-up keyframe ------------------------------ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ============================================================
   ABOUT
   ============================================================ */

#about {
  padding: var(--space-xl) 0;
  background: var(--bg-dark);
  border-top:    1px solid rgba(91, 200, 181, 0.07);
  border-bottom: 1px solid rgba(91, 200, 181, 0.07);
}

#about h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  letter-spacing: 0.06em;
}

#about p {
  font-size: clamp(0.9rem, 1.8vw, 1.02rem);
  color: var(--text-primary);
  opacity: 0.85;
  line-height: 1.88;
  margin-bottom: var(--space-sm);
}

.about-quote {
  margin-top: var(--space-lg);
  padding-left: 1.1rem;
  border-left: 2px solid var(--accent-dim);
  font-size: clamp(0.85rem, 1.6vw, 0.96rem);
  font-weight: 200;
  font-style: italic;
  color: var(--text-accent);
  opacity: 0.82;
  line-height: 1.75;
}


/* ============================================================
   PILLARS
   ============================================================ */

#pillars {
  padding: var(--space-xl) 0;
  background: var(--bg-deep);
}

.pillars-grid {
  display: grid;
  gap: var(--space-md);
}

@media (min-width: 640px) {
  .pillars-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.pillar {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: var(--space-md) clamp(1rem, 2.5vw, 1.5rem);
  border: 1px solid rgba(91, 200, 181, 0.09);
  border-radius: var(--radius-sm);
  background: rgba(10, 26, 22, 0.4);
  transition:
    border-color 0.35s var(--ease),
    background   0.35s var(--ease);
}

.pillar:hover {
  border-color: rgba(91, 200, 181, 0.28);
  background:   rgba(10, 26, 22, 0.7);
}

.pillar-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  opacity: 0.85;
}

.pillar h3 {
  font-size: 0.68rem;
  font-weight: 300;
  letter-spacing: 0.44em;
  text-transform: uppercase;
  color: var(--text-accent);
  line-height: 1;
  /* offset trailing tracking */
  padding-right: 0.44em;
}

.pillar-text {
  font-size: clamp(0.92rem, 1.7vw, 1rem);
  font-weight: 300;
  color: var(--text-primary);
  opacity: 0.88;
  line-height: 1.72;
}

/* Stagger pillar reveal */
.pillar.reveal-item:nth-child(2) { transition-delay: 0.12s; }
.pillar.reveal-item:nth-child(3) { transition-delay: 0.24s; }


/* ============================================================
   WAITLIST CTA
   ============================================================ */

#waitlist {
  padding: var(--space-xl) 0;
  background: var(--bg-dark);
  border-top: 1px solid rgba(91, 200, 181, 0.07);
  text-align: center;
}

#waitlist .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.waitlist-title {
  font-size: clamp(1.6rem, 3.8vw, 2.6rem);
  color: var(--text-primary);
  letter-spacing: 0.06em;
}

.waitlist-sub {
  max-width: 440px;
  font-size: clamp(0.85rem, 1.7vw, 0.95rem);
  color: var(--text-muted);
  line-height: 1.85;
}


/* ============================================================
   FOOTER
   ============================================================ */

#footer {
  padding: var(--space-lg) var(--space-md);
  border-top: 1px solid rgba(91, 200, 181, 0.07);
  background: var(--bg-deep);
}

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

.footer-logo {
  width: 30px;
  mix-blend-mode: screen;
  opacity: 0.55;
  transition: opacity 0.3s var(--ease);
}

.footer-logo:hover {
  opacity: 0.9;
}

.footer-tagline {
  font-size: 0.74rem;
  font-weight: 200;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  text-align: center;
}

.footer-copy {
  font-size: 0.67rem;
  font-weight: 300;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  opacity: 0.4;
}


/* ============================================================
   SCROLL REVEAL
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity   0.95s var(--ease-out),
    transform 0.95s var(--ease-out);
}

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

.reveal-item {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity   0.85s var(--ease-out),
    transform 0.85s var(--ease-out);
}

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


/* ============================================================
   MOBILE RESPONSIVE
   ============================================================ */

@media (max-width: 480px) {
  :root {
    --space-xl: 4rem;
    --space-lg: 2.5rem;
  }

  .lang-selector {
    top: 1rem;
    right: 1.1rem;
  }

  .wordmark {
    letter-spacing: 0.3em;
    padding-right: 0.3em;
  }

  .waitlist-form {
    max-width: 100%;
  }
}

/* ============================================================
   ACCESSIBILITY — REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal,
  .reveal-item {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
