/**
 * Atopos — Landing page redesign
 * Calm, human, trustworthy. Dark premium UI.
 *
 * Design tokens extend theme.css :root variables.
 * Motion: Apple.com-level subtlety — scroll-triggered fades only.
 */

/* ═══════════════════════════════════════════════════════
   0. Extended tokens
   ═══════════════════════════════════════════════════════ */
:root {
  --landing-max-width: 1080px;
  --landing-hero-min-h: 100vh;
  --landing-section-py: clamp(4rem, 8vw, 7rem);
  --landing-ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --landing-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --landing-warm: #d4a574;       /* warm amber for accents */
  --landing-warm-muted: rgba(212, 165, 116, 0.15);
  --landing-cool: rgba(91, 155, 213, 0.12);
}

/* ═══════════════════════════════════════════════════════
   1. Navigation override for landing
   ═══════════════════════════════════════════════════════ */
.nav-top--landing {
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  transition: background 0.4s var(--landing-ease), border-color 0.4s var(--landing-ease);
}

.nav-top--landing.nav-scrolled {
  background: rgba(26, 29, 36, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
}

/* ═══════════════════════════════════════════════════════
   2. Shared layout
   ═══════════════════════════════════════════════════════ */
.landing-container {
  max-width: var(--landing-max-width);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}

.landing-section {
  padding: var(--landing-section-py) 0;
}

.landing-section__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 2.5rem;
  text-align: center;
}

/* ═══════════════════════════════════════════════════════
   3. Hero
   ═══════════════════════════════════════════════════════ */
.landing-hero {
  position: relative;
  min-height: var(--landing-hero-min-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;

  /*
    HERO IMAGE:
    When the actual photograph is ready, replace this gradient with:
      background: url('/static/img/hero-dusk-room.jpg') center/cover no-repeat;
    Then keep the overlay for text legibility.
  */
  background:
    radial-gradient(ellipse 80% 60% at 50% 55%, rgba(212, 165, 116, 0.06) 0%, transparent 70%),
    linear-gradient(180deg, #1a1d24 0%, #16191f 100%);
}

.landing-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(26, 29, 36, 0.15) 0%, rgba(22, 25, 31, 0.5) 100%);
  pointer-events: none;
  z-index: 1;
}

.landing-hero__video-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.landing-hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 680px;
  padding: 0 1.5rem;
}

.landing-hero__headline {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin: 0 0 1.5rem;
  color: var(--text);
}

.landing-hero__sub {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 auto 2.5rem;
  max-width: 600px;
  font-weight: 400;
}

.landing-hero__ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

/* Scroll-down hint arrow */
.landing-hero__scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: var(--text-subtle);
  opacity: 0.5;
  animation: landing-bob 2.5s var(--landing-ease) infinite;
  transition: opacity 0.5s var(--landing-ease);
}

@keyframes landing-bob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(6px); }
}

/* ═══════════════════════════════════════════════════════
   4. Pill variants
   ═══════════════════════════════════════════════════════ */
.pill--lg {
  padding: 0.75rem 1.75rem;
  font-size: 1rem;
}

.pill--sm {
  padding: 0.5rem 1.1rem;
  font-size: 0.85rem;
}

.pill-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: background 0.25s var(--landing-ease), border-color 0.25s var(--landing-ease), transform 0.15s ease;
}

.pill-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--text);
  text-decoration: none;
}

/* ═══════════════════════════════════════════════════════
   5. What rooms are about (2-col: card + video)
   ═══════════════════════════════════════════════════════ */
.landing-rooms-about {
  background: var(--bg);
}

.landing-rooms-about__inner {
  display: grid;
  grid-template-columns: 0.48fr 0.52fr;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  align-items: stretch;
}

.landing-rooms-about__card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2rem);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.04), 0 0 32px rgba(212, 165, 116, 0.12), 0 0 64px rgba(91, 155, 213, 0.08);
}

.landing-rooms-about__title {
  font-size: clamp(1.5rem, 2.8vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 0.5rem;
}

.landing-rooms-about__sub {
  font-size: clamp(1rem, 1.3vw, 1.1rem);
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 1.5rem;
}

.landing-rooms-about__blocks {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.landing-rooms-about__block-title {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 0.6rem;
}

.landing-rooms-about__block:first-child .landing-rooms-about__block-title {
  color: rgba(147, 197, 253, 0.95);
  text-shadow: 0 0 20px rgba(91, 155, 213, 0.5), 0 0 40px rgba(91, 155, 213, 0.25);
}

.landing-rooms-about__block:last-child .landing-rooms-about__block-title {
  color: rgba(134, 239, 172, 0.95);
  text-shadow: 0 0 20px rgba(45, 157, 110, 0.5), 0 0 40px rgba(45, 157, 110, 0.25);
}

.landing-rooms-about__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.landing-rooms-about__list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: clamp(0.9rem, 1.1vw, 1rem);
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 0.45rem;
}

.landing-rooms-about__list li:last-child {
  margin-bottom: 0;
}

.landing-rooms-about__icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 0.2em;
  color: var(--landing-warm);
}

.landing-rooms-about__icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.landing-rooms-about__learn {
  display: inline-block;
  margin-top: 1.25rem;
  font-size: 1rem;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

.landing-rooms-about__learn:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.landing-rooms-about__media {
  position: relative;
  min-height: 0;
}

.landing-rooms-about__video-card {
  position: relative;
  height: 100%;
  min-height: 200px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.02), 0 0 48px rgba(91, 155, 213, 0.06);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
}

.landing-rooms-about__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.landing-rooms-about__video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.25) 100%);
  pointer-events: none;
}

.landing-rooms-about__video-fallback {
  position: relative;
  z-index: 1;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
  padding: 1rem;
  text-align: center;
}

@media (max-width: 768px) {
  .landing-rooms-about__inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .landing-rooms-about__card {
    order: 1;
  }

  .landing-rooms-about__media {
    order: 2;
  }

  .landing-rooms-about__video-card {
    height: auto;
    min-height: 180px;
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 375px) {
  .landing-rooms-about__card {
    padding: 1.25rem;
  }

  .landing-rooms-about__title {
    font-size: 1.35rem;
  }

  .landing-rooms-about__list li {
    font-size: 0.875rem;
  }

  .landing-rooms-about__video-card {
    height: auto;
    min-height: 160px;
  }
}

/* ═══════════════════════════════════════════════════════
   6. "How it feels" section
   ═══════════════════════════════════════════════════════ */
.landing-feel {
  background: var(--bg);
}

.landing-feel__words {
  display: flex;
  justify-content: center;
  gap: clamp(2rem, 5vw, 4rem);
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.landing-feel__word {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 300;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  position: relative;
}

.landing-feel__word::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--landing-warm);
  transition: width 0.8s var(--landing-ease-out);
}

.landing-feel__word.revealed::after {
  width: 100%;
}

/* Image area */
.landing-feel__image {
  max-width: 800px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.landing-feel__image-placeholder {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.landing-feel__image-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 30% 60%, var(--landing-warm-muted) 0%, transparent 60%),
    radial-gradient(ellipse 50% 70% at 70% 50%, var(--landing-cool) 0%, transparent 60%);
  opacity: 0.55;
  z-index: 1;
}

.landing-feel__image img {
  width: 100%;
  height: auto;
  display: block;
}

.landing-bg-video--feel {
  position: absolute;
  inset: 0;
  opacity: 0.4;
  filter: saturate(0.82) brightness(0.75);
  object-position: 50% 50%;
}

/* ═══════════════════════════════════════════════════════
   7. Dissolving message visual
   ═══════════════════════════════════════════════════════ */
.landing-dissolve {
  background: linear-gradient(180deg, var(--bg) 0%, var(--surface) 50%, var(--bg) 100%);
}

.landing-dissolve__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2rem;
}

.landing-dissolve__graphic {
  width: 100%;
  max-width: 360px;
}

.dissolve-bubble {
  width: 100%;
  height: auto;
}

.landing-dissolve__text {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0;
  max-width: 480px;
}

/* ═══════════════════════════════════════════════════════
   8. Personal vs Professional cards
   ═══════════════════════════════════════════════════════ */
.landing-modes__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 640px) {
  .landing-modes__grid {
    grid-template-columns: 1fr;
  }
}

.landing-modes__card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 390px;
  display: flex;
  align-items: flex-end;
  border: 1px solid var(--border);
  transition: border-color 0.3s var(--landing-ease), box-shadow 0.3s var(--landing-ease);
}

.landing-modes__card:hover {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Card background layer (image placeholder) */
.landing-modes__card-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.landing-modes__card-bg--warm {
  /*
    Replace with:
      background: url('/static/img/personal-crop.jpg') center/cover no-repeat;
    Then keep the gradient overlay below.
  */
  background:
    radial-gradient(ellipse 70% 80% at 50% 30%, rgba(212, 165, 116, 0.12) 0%, transparent 60%),
    linear-gradient(165deg, #2a2520 0%, var(--surface) 60%);
}

.landing-modes__card-bg--cool {
  /*
    Replace with:
      background: url('/static/img/professional-crop.jpg') center/cover no-repeat;
    Then keep the gradient overlay below.
  */
  background:
    radial-gradient(ellipse 70% 80% at 50% 30%, rgba(91, 155, 213, 0.1) 0%, transparent 60%),
    linear-gradient(165deg, #222830 0%, var(--surface) 60%);
}

/* Scrim for text legibility over future images */
.landing-modes__card-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(26, 29, 36, 0.85) 75%);
}

.landing-bg-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.landing-bg-video--hero {
  opacity: 0.72;
  filter: saturate(0.9) brightness(1.05);
}

.landing-bg-video--card {
  opacity: 0.35;
  filter: saturate(0.85) brightness(0.8);
}

.landing-bg-video--personal {
  transform: scale(0.93);
  transform-origin: 50% 50%;
}

.landing-bg-video--professional {
  object-position: 50% 82%;
}

.landing-modes__card-content {
  position: relative;
  z-index: 1;
  padding: 2rem 1.75rem;
  width: 100%;
}

.landing-modes__card-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--text);
}

.landing-modes__card-sub {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0 0 1.25rem;
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════
   9. Tokens section
   ═══════════════════════════════════════════════════════ */
.landing-tokens {
  background: var(--bg);
}

.landing-tokens__inner {
  text-align: center;
}

.landing-tokens__copy {
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 540px;
  margin: 0 auto 2rem;
}

.landing-tokens__ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.landing-tokens__link {
  font-size: 0.9rem;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

.landing-tokens__link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════
   10. Footer
   ═══════════════════════════════════════════════════════ */
.landing-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  background: var(--bg);
}

.landing-footer__inner {
  text-align: center;
}

.landing-footer__safety {
  font-size: 0.85rem;
  color: var(--text-subtle);
  margin: 0 0 1rem;
}

.landing-footer__links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0 0.5rem;
}

.landing-footer__links a {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

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

.landing-footer__copy {
  font-size: 0.8rem;
  color: var(--text-subtle);
  margin: 0;
}

/* ═══════════════════════════════════════════════════════
   11. Scroll-triggered reveal animations
   ═══════════════════════════════════════════════════════

   Motion spec:
   - Elements start 24px below and at 0 opacity
   - Transition to final position over 0.7s with ease-out
   - Stagger via data-delay attribute (JS adds .revealed class)
   - No parallax, no autoplay video
   - Prefer reduced-motion: all animations disabled
*/
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.7s var(--landing-ease-out),
    transform 0.7s var(--landing-ease-out);
  will-change: opacity, transform;
}

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

/* Hero has a slightly different intro */
.fade-in-up {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.9s var(--landing-ease-out),
    transform 0.9s var(--landing-ease-out);
  will-change: opacity, transform;
}

.fade-in-up.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════
   12. Accessibility: prefers-reduced-motion
   ═══════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .fade-in-up {
    opacity: 1;
    transform: none;
    transition: none;
    will-change: auto;
  }

  .landing-hero__scroll-hint {
    animation: none;
  }

  .landing-bg-video {
    display: none;
  }
}

/* ═══════════════════════════════════════════════════════
   13. Responsive refinements
   ═══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .landing-hero {
    min-height: 85vh;
  }

  .landing-hero__headline {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .landing-feel__words {
    gap: 1.5rem;
  }

  .landing-modes__card {
    min-height: 300px;
  }

  .landing-hero__ctas {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .landing-hero__headline {
    font-size: clamp(1.75rem, 8vw, 2rem);
  }

  .landing-section__title {
    font-size: 1.35rem;
  }

  .landing-feel__word {
    font-size: 1.1rem;
  }
}

/* Landing: glass-style drawer (script adds .nav-drawer--landing when nav has .nav-top--landing) */
.nav-drawer-backdrop.nav-drawer--landing {
  background: rgba(0, 0, 0, 0.4);
}
.nav-drawer.nav-drawer--landing {
  background: rgba(26, 29, 36, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-left-color: rgba(255, 255, 255, 0.06);
}
