/* ==========================================================================
   Somnia — Twilight Glass Landing
   DreamLog-faithful palette + typography (Cormorant Garamond + Inter)
   ========================================================================== */

.somnia-page {
  --bg: #131420;
  --bg-deep: #1a1a2c;
  --bg-end: #211D49;
  --fg: #E5E8F6;
  --dim: #AAB1D0;
  --muted: #8188a8;
  --primary: #917efc;
  --primary-soft: rgba(145, 126, 252, 0.2);
  --primary-glow: rgba(145, 126, 252, 0.35);
  --glass: rgba(32, 35, 71, 0.42);
  --glass-strong: rgba(32, 35, 71, 0.6);
  --border: rgba(145, 126, 252, 0.24);
  --success: #A3E9C4;
  font-family: 'Inter', sans-serif;
  scroll-behavior: smooth;
}

.somnia-page ::selection {
  background: var(--primary);
  color: var(--fg);
}

.somnia-page::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(110% 80% at 80% 8%, rgba(145, 126, 252, 0.2) 0%, transparent 55%),
    radial-gradient(90% 90% at 20% 75%, rgba(111, 123, 255, 0.16) 0%, transparent 60%),
    radial-gradient(ellipse 90% 80% at 50% 40%, transparent 30%, rgba(19, 20, 32, 0.65) 100%);
}

.somnia-page canvas {
  opacity: 0.78;
}

.s-main {
  position: relative;
  z-index: 2;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.s-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 2.2rem;
  background: linear-gradient(to bottom, rgba(19, 20, 32, 0.75), rgba(19, 20, 32, 0));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: fadeIn 1s ease-out;
}

.s-nav__back,
.s-nav__link {
  text-decoration: none;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  transition: color 0.3s ease;
}

.s-nav__back:hover,
.s-nav__link:hover {
  color: var(--fg);
}

.s-nav__links {
  display: flex;
  gap: 1.5rem;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.s-hero {
  min-height: 100vh;
  padding: 8rem 2rem 3rem;
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 3rem;
}

.s-hero__eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 1.15rem;
  animation: fadeUp 1s ease-out both;
}

.s-hero__title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: clamp(4.5rem, 16vw, 9rem);
  line-height: 0.84;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  color: var(--fg);
  animation: fadeUp 1s ease-out 0.14s both;
}

.s-hero__tagline {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(1.25rem, 2.4vw, 2rem);
  color: var(--fg);
  line-height: 1.25;
  margin-bottom: 1rem;
  animation: fadeUp 1s ease-out 0.25s both;
}

.s-hero__subcopy {
  color: var(--dim);
  max-width: 44ch;
  line-height: 1.78;
  font-size: 0.95rem;
  margin-bottom: 2.2rem;
  animation: fadeUp 1s ease-out 0.36s both;
}

.s-hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--fg);
  font-size: 0.74rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  padding: 0.88rem 1.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: linear-gradient(120deg, rgba(145, 126, 252, 0.22), rgba(145, 126, 252, 0.1));
  box-shadow: 0 10px 30px rgba(17, 13, 39, 0.4);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  animation: fadeUp 1s ease-out 0.44s both;
}

.s-hero__cta:hover {
  transform: translateY(-2px);
  border-color: rgba(145, 126, 252, 0.45);
  box-shadow: 0 16px 38px rgba(17, 13, 39, 0.5);
}

.s-hero__apple-icon {
  width: 18px;
  height: 18px;
}

.s-hero__media[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
}

.s-hero__media[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.s-hero__card {
  position: relative;
  max-width: 280px;
  margin: 0 auto;
  padding: 0.85rem;
  border-radius: 38px;
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 24px 60px rgba(9, 9, 18, 0.48);
}

.s-hero__card img {
  display: block;
  width: 100%;
  border-radius: 30px;
}

/* ==========================================================================
   Shared section head
   ========================================================================== */

.s-section-head {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 1.6rem;
}

.s-section-head__eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.s-section-head__title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 0.98;
  color: var(--fg);
}

/* ==========================================================================
   Features
   ========================================================================== */

.s-features {
  max-width: 1140px;
  margin: 0 auto;
  padding: 1.5rem 2rem 4rem;
}

.s-features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.35rem;
}

.s-features__item {
  border: 1px solid var(--border);
  background: var(--glass);
  border-radius: 24px;
  padding: 1.7rem 1.45rem;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: border-color 0.35s ease, transform 0.35s ease, background 0.35s ease;
}

.s-features__item[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
}

.s-features__item[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.85s ease, transform 0.85s ease;
}

.s-features__item[data-reveal]:nth-child(2).revealed {
  transition-delay: 0.12s;
}

.s-features__item[data-reveal]:nth-child(3).revealed {
  transition-delay: 0.24s;
}

.s-features__item:hover {
  border-color: rgba(145, 126, 252, 0.42);
  background: var(--glass-strong);
  transform: translateY(-3px);
}

.s-features__number {
  display: block;
  margin-bottom: 1.25rem;
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  color: var(--primary);
  opacity: 0.9;
}

.s-features__heading {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.85rem;
  font-weight: 600;
  line-height: 1.02;
  margin-bottom: 0.8rem;
}

.s-features__desc {
  color: var(--dim);
  font-size: 0.88rem;
  line-height: 1.72;
}

/* ==========================================================================
   Journey
   ========================================================================== */

.s-journey {
  max-width: 1140px;
  margin: 0 auto;
  padding: 2rem 2rem 4.5rem;
}

.s-journey__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.s-journey__step {
  position: relative;
  border-radius: 20px;
  border: 1px solid rgba(129, 136, 168, 0.25);
  background: rgba(22, 24, 46, 0.55);
  padding: 1.35rem 1.25rem;
}

.s-journey__step[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
}

.s-journey__step[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.85s ease, transform 0.85s ease;
}

.s-journey__step[data-reveal]:nth-child(2).revealed {
  transition-delay: 0.11s;
}

.s-journey__step[data-reveal]:nth-child(3).revealed {
  transition-delay: 0.22s;
}

.s-journey__step h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.52rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--fg);
}

.s-journey__step p {
  font-size: 0.86rem;
  line-height: 1.72;
  color: var(--dim);
}

/* ==========================================================================
   Premium strip
   ========================================================================== */

.s-premium {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 2rem 5rem;
}

.s-premium__inner {
  border-radius: 28px;
  border: 1px solid var(--border);
  background:
    linear-gradient(130deg, rgba(145, 126, 252, 0.24), rgba(145, 126, 252, 0.08)),
    rgba(25, 22, 49, 0.72);
  padding: 2rem 1.7rem;
  box-shadow: 0 20px 48px rgba(10, 10, 24, 0.46);
}

.s-premium[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
}

.s-premium[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.s-premium__badge {
  display: inline-block;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--success);
  margin-bottom: 0.9rem;
}

.s-premium__title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 600;
  line-height: 0.95;
  margin-bottom: 0.75rem;
}

.s-premium__text {
  color: var(--dim);
  max-width: 62ch;
  line-height: 1.75;
  font-size: 0.9rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.s-footer {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border-top: 1px solid rgba(129, 136, 168, 0.25);
  padding: 2rem;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.s-footer__links {
  display: flex;
  gap: 1rem;
}

.s-footer__privacy {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.3s ease;
}

.s-footer__privacy:hover {
  color: var(--fg);
}

/* ==========================================================================
   Shared overrides
   ========================================================================== */

.somnia-page .coordinates {
  z-index: 101;
}

.somnia-page .footer {
  display: none;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 980px) {
  .s-hero {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
    padding-top: 7.5rem;
  }

  .s-hero__subcopy {
    margin-left: auto;
    margin-right: auto;
  }

  .s-features__grid,
  .s-journey__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .s-nav {
    padding: 1rem 1.2rem;
  }

  .s-nav__links {
    gap: 0.8rem;
  }

  .s-nav__link {
    font-size: 0.64rem;
    letter-spacing: 0.11em;
  }

  .s-hero,
  .s-features,
  .s-journey,
  .s-premium {
    padding-left: 1.2rem;
    padding-right: 1.2rem;
  }

  .s-hero__card {
    max-width: 230px;
    border-radius: 30px;
  }

  .s-hero__card img {
    border-radius: 24px;
  }

  .s-footer {
    flex-direction: column;
    text-align: center;
    padding: 1.7rem 1.2rem;
  }

  .somnia-page .coordinates {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 0 1rem 1.6rem;
  }
}

/* ==========================================================================
   Legal page
   ========================================================================== */

.s-legal {
  max-width: 860px;
  margin: 0 auto;
  padding: 7.5rem 2rem 4rem;
  z-index: 2;
}

.s-legal__title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.4rem, 7vw, 4rem);
  font-weight: 600;
  line-height: 0.95;
  margin-bottom: 0.8rem;
  color: var(--fg);
}

.s-legal__updated {
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
  margin-bottom: 2rem;
}

.s-legal h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.7rem;
  font-weight: 600;
  margin: 2rem 0 0.65rem;
  color: var(--fg);
}

.s-legal p,
.s-legal li {
  color: var(--dim);
  line-height: 1.8;
  font-size: 0.95rem;
}

.s-legal ul {
  padding-left: 1.2rem;
  margin: 0.5rem 0 1rem;
}

.s-legal a {
  color: var(--fg);
}

@media (max-width: 680px) {
  .s-legal {
    padding: 6.5rem 1.2rem 3rem;
  }
}
