/* Impouria Coming Soon — palette derived from logo (#002050 navy · #28b8d0 cyan) */

:root {
  --bg: #050b14;
  --bg-elevated: #0a1522;
  --navy: #002050;
  --navy-mid: #183050;
  --cyan: #28b8d0;
  --cyan-bright: #5ad4e8;
  --cyan-soft: rgba(40, 184, 208, 0.16);
  --paper: #e8f2f6;
  --muted: #8aa0b0;
  --line: rgba(40, 184, 208, 0.22);
  --line-soft: rgba(255, 255, 255, 0.08);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --font-fa: "Vazirmatn", system-ui, sans-serif;
  --font-display: "Outfit", "Vazirmatn", system-ui, sans-serif;
  --space: clamp(1rem, 2.5vw, 2rem);
  --header-h: 72px;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
  background: var(--bg);
  color-scheme: dark;
}

body {
  min-height: 100dvh;
  background:
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(0, 32, 80, 0.55), transparent 55%),
    radial-gradient(ellipse 50% 40% at 85% 20%, rgba(40, 184, 208, 0.08), transparent 50%),
    var(--bg);
  color: var(--paper);
  font-family: var(--font-fa);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 30;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

#scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 30% 40%, rgba(40, 184, 208, 0.07), transparent 42%),
    radial-gradient(circle at 70% 60%, rgba(0, 32, 80, 0.45), transparent 50%);
  animation: atmosphere-drift 18s ease-in-out infinite alternate;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 40%, transparent 25%, rgba(5, 11, 20, 0.72) 100%);
}

.progress {
  position: fixed;
  z-index: 40;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  transform-origin: right center;
  background: linear-gradient(90deg, var(--navy), var(--cyan));
  transform: scaleX(0);
  will-change: transform;
}

/* ——— Header / Logo ——— */
.topbar {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  padding: 0 clamp(16px, 4vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(180deg, rgba(5, 11, 20, 0.88) 0%, rgba(5, 11, 20, 0.55) 70%, transparent 100%);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease-out), background 0.3s;
}

.topbar.is-scrolled {
  border-bottom-color: var(--line-soft);
  background: rgba(5, 11, 20, 0.82);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  padding: 6px 10px 6px 6px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(24, 48, 80, 0.55), rgba(5, 11, 20, 0.35));
  border: 1px solid rgba(40, 184, 208, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(90, 212, 232, 0.12),
    0 8px 28px rgba(0, 20, 40, 0.35);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), border-color 0.25s;
  cursor: pointer;
}

.brand:hover {
  transform: translateY(-1px);
  border-color: rgba(40, 184, 208, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(90, 212, 232, 0.2),
    0 12px 36px rgba(0, 32, 80, 0.45),
    0 0 32px rgba(40, 184, 208, 0.12);
}

.brand:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.brand-mark {
  display: block;
  height: clamp(40px, 5.8vw, 52px);
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 14px rgba(40, 184, 208, 0.35));
}

.brand-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-size: clamp(15px, 2vw, 18px);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--paper);
  line-height: 1.1;
}

.brand-tag {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--cyan);
  white-space: nowrap;
  opacity: 0.9;
}

.top-nav {
  display: flex;
  align-items: center;
}

.top-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 4px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.25s;
  cursor: pointer;
}

.top-link:hover,
.top-link:focus-visible {
  color: var(--cyan-bright);
}

.top-link:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
  border-radius: 4px;
}

.top-link svg {
  opacity: 0.7;
}

/* ——— Layout ——— */
main {
  position: relative;
  z-index: 2;
}

section {
  position: relative;
  padding: clamp(64px, 12vh, 120px) clamp(20px, 6vw, 72px);
}

/* ——— Hero ——— */
.hero {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: calc(var(--header-h) + 24px);
  padding-bottom: 80px;
}

.hero-inner {
  max-width: 920px;
  transform-style: preserve-3d;
  perspective: 1000px;
  padding: 28px 20px;
  border-radius: 24px;
  background: radial-gradient(ellipse at 50% 40%, rgba(5, 11, 20, 0.55) 0%, rgba(5, 11, 20, 0.2) 55%, transparent 75%);
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 28px;
}

h1 {
  margin: 0;
}

.brand-line {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(48px, 11vw, 140px);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.04em;
  background: linear-gradient(180deg, #ffffff 10%, var(--cyan-bright) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 12px 40px rgba(40, 184, 208, 0.18));
}

.outline-line {
  display: block;
  margin-top: 8px;
  font-size: clamp(36px, 7vw, 88px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(232, 242, 246, 0.45);
}

.lead {
  margin: 32px auto 0;
  max-width: 560px;
  font-size: clamp(15px, 1.6vw, 19px);
  font-weight: 300;
  line-height: 2;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 40px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 12px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.2s var(--ease-out), box-shadow 0.25s, background 0.25s, color 0.25s, border-color 0.25s;
  cursor: pointer;
  touch-action: manipulation;
}

.button:focus-visible {
  outline: 2px solid var(--cyan-bright);
  outline-offset: 3px;
}

.button.primary {
  color: #041018;
  background: linear-gradient(135deg, var(--cyan-bright), var(--cyan) 55%, #1a9bb0);
  box-shadow: 0 10px 36px rgba(40, 184, 208, 0.28);
}

.button.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 44px rgba(40, 184, 208, 0.38);
}

.button.primary:active {
  transform: translateY(0) scale(0.98);
}

.button.ghost {
  color: var(--paper);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.button.ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan-bright);
  background: var(--cyan-soft);
}

.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.28em;
}

.scroll-cue i {
  display: block;
  width: 1px;
  height: 44px;
  background: linear-gradient(var(--cyan), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}

/* ——— Chapters ——— */
.chapters {
  display: flex;
  flex-direction: column;
  gap: clamp(48px, 10vh, 120px);
  padding-top: 40px;
  padding-bottom: 40px;
}

.chapter {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 6vw, 80px);
  align-items: center;
  min-height: min(78vh, 720px);
  transform-style: preserve-3d;
}

.chapter.reverse {
  direction: ltr;
}

.chapter.reverse .chapter-copy {
  direction: rtl;
  order: 2;
}

.chapter.reverse .chapter-visual {
  order: 1;
}

.chapter-copy {
  max-width: 520px;
  justify-self: start;
}

.chapter.reverse .chapter-copy {
  justify-self: end;
}

.index {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.28em;
  color: var(--cyan);
  margin-bottom: 16px;
}

h2 {
  font-size: clamp(32px, 5.5vw, 68px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.04em;
  margin: 0 0 22px;
}

.chapter-copy p,
.statement p,
.cta-panel p {
  color: var(--muted);
  font-weight: 300;
  font-size: clamp(15px, 1.3vw, 17px);
  line-height: 2.05;
}

.topics {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.topics li {
  padding: 8px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 12px;
  color: #b5c8d4;
  background: rgba(10, 21, 34, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: border-color 0.25s, color 0.25s;
}

.topics li:hover {
  border-color: var(--line);
  color: var(--cyan-bright);
}

.chapter-visual {
  position: relative;
  min-height: 280px;
  display: grid;
  place-items: center;
  perspective: 800px;
}

.depth-num {
  font-family: var(--font-display);
  font-size: clamp(120px, 18vw, 260px);
  font-weight: 700;
  line-height: 0.75;
  letter-spacing: -0.08em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(40, 184, 208, 0.18);
  user-select: none;
  transform: rotateY(-12deg) rotateX(6deg);
  transition: transform 0.6s var(--ease-out);
}

.chapter:hover .depth-num {
  transform: rotateY(-4deg) rotateX(2deg) scale(1.03);
}

.orb {
  position: absolute;
  width: min(52vw, 280px);
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.35;
  animation: orb-float 10s ease-in-out infinite alternate;
  pointer-events: none;
}

.orb-a {
  background: radial-gradient(circle, var(--cyan), transparent 70%);
  animation-delay: 0s;
}

.orb-b {
  background: radial-gradient(circle, #3a6ea5, transparent 70%);
  animation-delay: -3s;
}

.orb-c {
  background: radial-gradient(circle, #1a8fa3, transparent 70%);
  animation-delay: -6s;
}

/* ——— Statement ——— */
.statement {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.statement h2 {
  max-width: 900px;
  font-size: clamp(36px, 6.5vw, 84px);
}

.statement em {
  font-style: normal;
  color: var(--cyan-bright);
}

.statement p {
  max-width: 520px;
  margin-top: 8px;
}

/* ——— CTA ——— */
.cta {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.cta-panel {
  width: min(720px, 100%);
  padding: clamp(40px, 8vw, 72px) clamp(20px, 4vw, 40px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(40, 184, 208, 0.04), transparent 40%, rgba(0, 32, 80, 0.2));
}

.cta-panel h2 {
  margin-bottom: 12px;
}

.cta-panel p {
  max-width: 480px;
  margin: 0 auto 32px;
}

/* ——— Footer ——— */
footer {
  position: relative;
  z-index: 3;
  padding: 24px clamp(16px, 4vw, 48px) 36px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: #6a8090;
  font-size: 11px;
  border-top: 1px solid var(--line-soft);
}

/* ——— Reveal motion ——— */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

/* ——— Animations ——— */
@keyframes scroll-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scaleY(1);
  }
  50% {
    opacity: 0.35;
    transform: scaleY(0.85) translateY(6px);
  }
}

@keyframes orb-float {
  from {
    transform: translate(-8%, -6%) scale(1);
  }
  to {
    transform: translate(10%, 8%) scale(1.12);
  }
}

@keyframes atmosphere-drift {
  from {
    opacity: 0.85;
    transform: scale(1);
  }
  to {
    opacity: 1;
    transform: scale(1.05);
  }
}

/* ——— Responsive ——— */
@media (max-width: 900px) {
  .chapter,
  .chapter.reverse {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 28px;
    text-align: center;
    direction: rtl;
  }

  .chapter.reverse .chapter-copy,
  .chapter .chapter-copy {
    order: 1;
    justify-self: center;
    direction: rtl;
  }

  .chapter.reverse .chapter-visual,
  .chapter .chapter-visual {
    order: 2;
    min-height: 180px;
  }

  .topics {
    justify-content: center;
  }

  .depth-num {
    transform: none;
    font-size: clamp(100px, 28vw, 160px);
  }

  .chapter:hover .depth-num {
    transform: scale(1.02);
  }
}

@media (max-width: 600px) {
  :root {
    --header-h: 64px;
  }

  .topbar {
    padding: 0 12px;
    gap: 10px;
  }

  .brand {
    padding: 4px 8px 4px 4px;
    border-radius: 12px;
    gap: 8px;
    max-width: calc(100% - 56px);
    min-width: 0;
  }

  .brand-mark {
    height: 34px;
    flex-shrink: 0;
  }

  .brand-tag {
    display: none;
  }

  .brand-name {
    font-size: 13px;
    letter-spacing: 0.06em;
  }

  .top-link {
    font-size: 0;
    gap: 0;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
    flex-shrink: 0;
  }

  .top-link svg {
    width: 18px;
    height: 18px;
    opacity: 1;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .button {
    width: 100%;
  }

  .outline-line {
    -webkit-text-stroke-width: 0.8px;
  }

  .cta-panel {
    padding-inline: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .atmosphere,
  .scroll-cue i,
  .orb {
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .brand,
  .button,
  .depth-num {
    transition: none;
  }
}
