/* ===========================
   WORDCAST LANDING PAGE
   =========================== */

/* --- Fonts --- */
@font-face {
  font-family: 'Kalice';
  src: url('fonts/KaliceTrial-Italic.otf') format('opentype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Kalice';
  src: url('fonts/KaliceTrial-MediumItalic.otf') format('opentype');
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

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

:root {
  --color-bg: #ffffff;
  --color-bg-alt: #ffffff;
  --color-green: #1a6b3c;
  --color-green-dark: #1a3c2a;
  --color-text: #1a3c2a;
  --color-text-light: #6b7280;
  --color-white: #ffffff;
  --color-border: #d4cfc5;

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-serif: 'Kalice', 'Playfair Display', 'Georgia', serif;

  --container-max: 1120px;
  --section-pad: 80px;
  --section-pad-sm: 48px;
}

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

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
  letter-spacing: -0.04em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Typography --- */
.section-title {
  font-family: var(--font-sans);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1.15;
  color: var(--color-green-dark);
}

.section-title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0;
  color: #8E1BDD;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(26, 60, 42, 0.15);
}

.btn--primary {
  background: var(--color-green-dark);
  color: var(--color-white);
  padding: 14px 28px;
  border-radius: 50px;
}

.btn--lg {
  font-size: 1.1rem;
  padding: 18px 36px;
}

/* App Store badge */
.app-store-badge {
  display: inline-block;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.app-store-badge:hover {
  transform: translateY(-2px);
  opacity: 0.85;
}

.app-store-badge img {
  display: block;
}

/* ===========================
   NAV
   =========================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.nav--scrolled {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

/* Centered logo (default) */
.nav__logo-center {
  transition: opacity 0.2s ease 0.25s;
}

.nav--scrolled .nav__logo-center {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

/* Left logo (on scroll) */
.nav__logo-left {
  position: absolute;
  left: 24px;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.nav--scrolled .nav__logo-left {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  transition: opacity 0.3s ease 0.25s, transform 0.3s ease 0.25s;
}

/* Download badge (on scroll) */
.nav__download {
  position: absolute;
  right: 24px;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.nav--scrolled .nav__download {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  transition: opacity 0.3s ease 0.25s, transform 0.3s ease 0.25s;
}

.nav__download img {
  display: block;
}

.nav--scrolled .nav__download {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nav__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 64px;
  position: relative;
}

.nav__logo svg {
  width: 28px;
  height: 28px;
}

.nav__links {
  display: flex;
  gap: 32px;
}

.nav__link {
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav__link:hover {
  color: var(--color-green);
}

/* Mobile hamburger */
.nav__menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-green-dark);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ===========================
   HERO
   =========================== */
.hero {
  padding: calc(64px + var(--section-pad)) 0 var(--section-pad);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
}

.hero__title {
  font-family: var(--font-sans);
  font-size: clamp(2.6rem, 5.2vw, 3.95rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.045em;
  color: var(--color-green-dark);
  margin-bottom: 16px;
  max-width: 520px;
}

.hero__title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0;
  color: #8E1BDD;
}

.hero__subtitle {
  font-size: 20px;
  color: var(--color-text-light);
  margin-bottom: 32px;
  max-width: 480px;
  text-wrap: balance;
}

.hero__illustration {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Dividers removed */

/* ===========================
   FEATURES
   =========================== */
.features {
  padding: var(--section-pad) 0;
  background: var(--color-bg);
}

.features__header {
  text-align: center;
  margin-bottom: 48px;
}

.features__header-img {
  width: 240px;
  margin: 0 auto 16px;
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Feature card */
.feature-card {
  text-align: center;
}

.feature-card__img {
  width: 100%;
  max-width: 280px;
  border-radius: 24px;
}

.feature-card__label {
  margin-bottom: 20px;
}

.feature-card__label span {
  font-size: 20px;
  font-weight: 500;
  color: var(--color-text-light);
  text-wrap: balance;
}

.feature-card__phone {
  display: flex;
  justify-content: center;
  position: relative;
}

.feature-card__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.feature-card__overlay img {
  position: absolute;
}

.overlay-crayon {
  width: 240px;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

/* ===========================
   VOICES
   =========================== */
.voices {
  padding: var(--section-pad) 0;
}

.voices__track {
  display: flex;
  gap: 32px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 80px calc(50vw - 112px);
  -ms-overflow-style: none;
  scrollbar-width: none;
}

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

.voice-card {
  flex-shrink: 0;
  width: 225px;
  background: var(--color-white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.06);
  scroll-snap-align: center;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  cursor: pointer;
}

.voice-card--active {
  transform: scale(1.15);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  z-index: 2;
}

.voice-card__portrait {
  width: 100%;
  aspect-ratio: 3 / 3.5;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.voice-card__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.voice-card__portrait-placeholder {
  font-size: 2.5rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
}

.voice-card__info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
}

.voice-card__details {
  display: flex;
  flex-direction: column;
}

.voice-card__name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

.voice-card__meta {
  font-size: 14px;
  letter-spacing: -0.01em;
  color: var(--color-text-light);
}

/* Play button circle */
.voice-card__play {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-text);
  transition: background 0.2s ease, opacity 0.3s ease;
  flex-shrink: 0;
  opacity: 0;
  pointer-events: none;
}

.voice-card--active .voice-card__play {
  opacity: 1;
  pointer-events: auto;
}

.voice-card__play:hover {
  background: #f3f4f6;
}

.voice-card__play .play-icon { display: flex; }
.voice-card__play .pause-icon { display: none; }
.voice-card--playing .voice-card__play .play-icon { display: none; }
.voice-card--playing .voice-card__play .pause-icon { display: flex; }

/* ===========================
   CUSTOMIZE
   =========================== */
.customize {
  padding: var(--section-pad) 0;
  background: var(--color-bg);
}

.customize__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
}

.customize__content .section-title {
  margin-bottom: 40px;
}

.customize__illustration {
  margin-top: 24px;
}

.customize__phone {
  display: flex;
  justify-content: center;
}

/* ===========================
   CTA
   =========================== */
.cta {
  padding: var(--section-pad) 0 calc(var(--section-pad) + 20px);
  background: var(--color-bg);
}

.cta__inner {
  text-align: center;
}

.cta__title {
  font-family: var(--font-sans);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1.1;
  color: var(--color-green-dark);
  margin-bottom: 40px;
}

.cta__title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0;
  color: #8E1BDD;
}

/* ===========================
   FOOTER
   =========================== */
.footer {
  padding: 40px 0;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  font-size: 14px;
  letter-spacing: 0;
  color: var(--color-text-light);
  flex-wrap: wrap;
}

.footer__inner a {
  color: var(--color-text-light);
  transition: color 0.2s;
}

.footer__inner a:hover {
  color: var(--color-text);
}

/* ===========================
   PLACEHOLDERS (swap with real images)
   =========================== */
.illustration-placeholder {
  width: 280px;
  height: 300px;
  border: 2px dashed var(--color-green);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-green);
  font-size: 0.85rem;
  font-weight: 500;
  position: relative;
}

.illustration-placeholder::after {
  content: attr(data-label);
}

.illustration-placeholder--sm {
  width: 160px;
  height: 120px;
}

.phone-placeholder {
  width: 200px;
  height: 380px;
  border: 2px dashed var(--color-green);
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-green);
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--color-white);
  position: relative;
}

.phone-placeholder::after {
  content: attr(data-label);
}

.phone-placeholder--lg {
  width: 240px;
  height: 440px;
}

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

/* Tablet */
@media (max-width: 900px) {
  :root {
    --section-pad: 56px;
  }

  .hero__grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero__subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero__content {
    order: 1;
  }

  .hero__illustration {
    order: 0;
    margin-bottom: 16px;
  }

  .hero__illustration .illustration-placeholder {
    width: 220px;
    height: 240px;
  }

  .features__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .features__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .phone-placeholder {
    width: 160px;
    height: 300px;
  }

  .customize__grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .customize__illustration {
    display: flex;
    justify-content: center;
  }

  .customize__illustration .illustration-placeholder {
    width: 200px;
    height: 200px;
  }

  .customize__phone {
    order: -1;
  }
}

/* Mobile */
@media (max-width: 600px) {
  :root {
    --section-pad: 40px;
  }

  /* Nav mobile */
  .nav__links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--color-border);
  }

  .nav__links--open {
    display: flex;
  }

  .nav__menu-btn {
    display: flex;
  }

  /* Features go single-column on mobile */
  .features__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .phone-placeholder {
    width: 200px;
    height: 380px;
  }

  .phone-placeholder--lg {
    width: 220px;
    height: 400px;
  }

  .illustration-placeholder {
    width: 200px;
    height: 220px;
  }

  .btn--lg {
    font-size: 1rem;
    padding: 16px 28px;
  }
}
