/* Curtain Call — design tokens & layout (docs/WEBSITE_DESIGN_SPEC.md) */

:root {
  color-scheme: dark;
  --background: #0a0a0f;
  --surface: #14141c;
  --surface-elevated: #1d1d28;
  --surface-pressed: #262633;
  --text-primary: #f5f5f7;
  --text-secondary: #a0a0ac;
  --text-tertiary: #63636f;
  --text-on-accent: #14100a;
  --text-on-media: #f5f5f7;
  --text-on-media-muted: rgba(245, 245, 247, 0.78);
  --accent: #ffb43a;
  --accent-muted: rgba(255, 180, 58, 0.16);
  --danger: #f4526a;
  --success: #3dd68c;
  --status-watching: #3dd68c;
  --status-paused: #ffb43a;
  --status-completed: #a78bfa;
  --status-dropped: #f4526a;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --glass-tint: rgba(16, 16, 24, 0.6);
  --scrim: rgba(10, 10, 15, 0.55);
  --backdrop-scrim: rgba(10, 10, 15, 0.72);
  --poster-placeholder: #1d1d28;
  --media-control-glass: rgba(10, 10, 15, 0.45);
  --media-control-border: rgba(255, 255, 255, 0.2);

  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
  --space-xxl: 32px;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --content-max: 880px;
  --marketing-max: 1100px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 400;
  line-height: 21px;
  color: var(--text-primary);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

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

/* Typography */

.text-display {
  font-size: 34px;
  font-weight: 800;
  line-height: 40px;
  letter-spacing: 0.2px;
  margin: 0;
}

.text-title {
  font-size: 26px;
  font-weight: 700;
  line-height: 32px;
  letter-spacing: 0.2px;
  margin: 0;
}

.text-heading {
  font-size: 20px;
  font-weight: 700;
  line-height: 26px;
  margin: 0;
}

.text-subheading {
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
  margin: 0;
}

.text-body {
  font-size: 15px;
  font-weight: 400;
  line-height: 21px;
  margin: 0;
}

.text-body-secondary {
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  margin: 0;
}

.text-caption {
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  margin: 0;
}

.text-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  margin: 0;
}

.color-primary {
  color: var(--text-primary);
}
.color-secondary {
  color: var(--text-secondary);
}
.color-tertiary {
  color: var(--text-tertiary);
}
.color-accent {
  color: var(--accent);
}
.color-on-accent {
  color: var(--text-on-accent);
}

/* Atmosphere */

.page-shell {
  position: relative;
  isolation: isolate;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.atmosphere {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.atmosphere__wash {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(255, 180, 58, 0.112) 0%,
    rgba(255, 180, 58, 0.042) 39.6%,
    rgba(255, 180, 58, 0) 72%
  );
  opacity: 0;
  animation: wash-in 520ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.atmosphere--splash .atmosphere__wash {
  background: linear-gradient(
    155deg,
    rgba(255, 180, 58, 0.18) 0%,
    rgba(255, 180, 58, 0.04) 42%,
    rgba(10, 10, 15, 0) 100%
  );
}

.atmosphere__orb {
  position: absolute;
  border-radius: 50%;
  background: var(--accent);
  filter: blur(2px);
}

.atmosphere__orb--primary {
  width: 220px;
  height: 220px;
  top: 12%;
  right: -64px;
  opacity: 0.09;
  animation: orb-drift 3200ms ease-in-out infinite alternate;
}

.atmosphere__orb--secondary {
  width: 160px;
  height: 160px;
  bottom: 16%;
  left: -48px;
  opacity: 0.06;
  animation: orb-drift 3600ms ease-in-out infinite alternate-reverse;
}

.page-content {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Nav */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  background: var(--glass-tint);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  max-width: var(--marketing-max);
  margin: 0 auto;
  padding: var(--space-xs) var(--space-lg) var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
  letter-spacing: 0.6px;
}

.site-logo:hover {
  text-decoration: none;
  color: var(--text-primary);
}

.site-logo img {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav a:not(.btn) {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  text-decoration: none;
}

.site-nav a:not(.btn):hover,
.site-nav a:not(.btn)[aria-current="page"] {
  color: var(--accent);
  text-decoration: none;
}

.site-nav__cta {
  display: none;
  color: var(--text-on-accent);
}

.site-nav__cta:hover {
  color: var(--text-on-accent);
  text-decoration: none;
}

@media (min-width: 720px) {
  .site-header__inner {
    padding-left: var(--space-xl);
    padding-right: var(--space-xl);
  }

  .site-nav__cta {
    display: inline-flex;
  }
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  min-height: 46px;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 200ms ease, opacity 200ms ease, background-color 200ms ease;
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: scale(0.96);
}

.btn--primary {
  background: var(--accent);
  color: var(--text-on-accent);
}

.btn--primary:hover {
  color: var(--text-on-accent);
  filter: brightness(1.05);
}

.btn--secondary {
  background: var(--surface-elevated);
  color: var(--text-primary);
  border-color: var(--border);
}

.btn--secondary:hover {
  color: var(--text-primary);
  background: var(--surface-pressed);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* Layout sections */

.section {
  width: 100%;
  padding: var(--space-xxl) var(--space-lg);
}

@media (min-width: 720px) {
  .section {
    padding-left: var(--space-xxl);
    padding-right: var(--space-xxl);
  }
}

.section__inner {
  max-width: var(--marketing-max);
  margin: 0 auto;
}

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

.section__eyebrow {
  margin-bottom: var(--space-sm);
}

.section__title {
  margin-bottom: var(--space-sm);
}

.section__lede {
  max-width: 42rem;
  color: var(--text-secondary);
}

/* Hero — first viewport recipe */

.hero {
  min-height: min(100vh, 880px);
  display: flex;
  align-items: center;
  padding-top: var(--space-xxl);
  padding-bottom: var(--space-xxl);
}

.hero__inner {
  max-width: var(--marketing-max);
  margin: 0 auto;
  width: 100%;
  display: grid;
  gap: var(--space-xxl);
  align-items: center;
}

@media (min-width: 860px) {
  .hero__inner {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
  }
}

.hero__copy {
  opacity: 0;
  transform: translateY(12px);
  animation: settle-in 520ms cubic-bezier(0.22, 1, 0.36, 1) 80ms forwards;
}

.hero__eyebrow {
  margin-bottom: var(--space-md);
}

.hero__headline {
  margin-bottom: var(--space-sm);
}

.hero__support {
  margin-bottom: var(--space-xl);
  max-width: 36rem;
  color: var(--text-secondary);
}

.hero__visual {
  display: flex;
  justify-content: center;
  opacity: 0;
  animation: settle-in 600ms cubic-bezier(0.22, 1, 0.36, 1) 160ms forwards;
}

.hero-mark {
  position: relative;
  width: min(280px, 70vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.hero-mark__halo {
  position: absolute;
  width: 168px;
  height: 168px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.34;
  animation: halo-breathe 1600ms ease-in-out infinite alternate;
}

.hero-mark__icon {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: var(--radius-xl);
  box-shadow: none;
}

/* Features — settings-style rows, not dashboard cards */

.feature-stack {
  margin-top: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.feature-row {
  display: flex;
  gap: 14px;
  padding: var(--space-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.feature-row__bar {
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
}

.feature-row__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: var(--surface-elevated);
  color: var(--accent);
  margin-left: var(--space-xs);
}

.feature-row__icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-row__title {
  margin-bottom: var(--space-xs);
}

.feature-row__body {
  color: var(--text-secondary);
}

/* Download */

.download {
  padding-bottom: 80px;
}

.download__panel {
  padding: var(--space-xxl) var(--space-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
}

.download__panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    155deg,
    rgba(255, 180, 58, 0.16) 0%,
    rgba(255, 180, 58, 0.06) 40%,
    rgba(255, 180, 58, 0) 85%
  );
  pointer-events: none;
}

.download__panel > * {
  position: relative;
}

.download__note {
  margin-top: var(--space-lg);
  color: var(--text-tertiary);
}

/* Legal / prose pages */

.legal-page,
.support-page {
  padding-top: var(--space-xxl);
  padding-bottom: 100px;
}

.legal-page__title,
.support-page__title {
  margin-bottom: var(--space-sm);
}

.legal-page__meta {
  margin-bottom: var(--space-xl);
  color: var(--text-tertiary);
}

.legal-body {
  max-width: 65ch;
  color: var(--text-primary);
}

.legal-body h1 {
  font-size: 26px;
  font-weight: 700;
  line-height: 32px;
  letter-spacing: 0.2px;
  margin: 0 0 var(--space-sm);
  color: var(--text-primary);
}

.legal-body h2,
.legal-body h3 {
  font-size: 20px;
  font-weight: 700;
  line-height: 26px;
  margin: var(--space-xl) 0 var(--space-sm);
  color: var(--text-primary);
}

.legal-body p,
.legal-body li {
  font-size: 15px;
  font-weight: 400;
  line-height: 21px;
  color: var(--text-secondary);
  margin: 0 0 var(--space-md);
}

.legal-body strong {
  color: var(--text-primary);
  font-weight: 700;
}

.legal-body em {
  font-style: italic;
}

.legal-body hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: var(--space-xl) 0;
}

.legal-body ul {
  padding-left: 1.25rem;
  margin: 0 0 var(--space-md);
}

.legal-body a {
  color: var(--accent);
}

.legal-placeholder {
  padding: var(--space-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.legal-placeholder p + p {
  margin-top: var(--space-sm);
}

.support-list {
  margin-top: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.support-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.support-row__label {
  color: var(--text-secondary);
}

.support-row__value {
  color: var(--text-primary);
  word-break: break-word;
}

.support-row__value a {
  color: var(--accent);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-xl) var(--space-lg) 100px;
}

.site-footer__inner {
  max-width: var(--marketing-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

@media (min-width: 720px) {
  .site-footer {
    padding-left: var(--space-xxl);
    padding-right: var(--space-xxl);
  }

  .site-footer__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.site-footer__tagline {
  color: var(--text-tertiary);
  letter-spacing: 1.1px;
  text-transform: uppercase;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
}

.site-footer__links a {
  color: var(--accent);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  text-decoration: none;
}

.site-footer__links a:hover {
  text-decoration: underline;
}

.site-footer__copy {
  color: var(--text-tertiary);
}

/* Motion */

@keyframes wash-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes settle-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes orb-drift {
  from {
    transform: translate(0, 0);
  }
  to {
    transform: translate(-10px, 12px);
  }
}

@keyframes halo-breathe {
  from {
    opacity: 0.28;
    transform: scale(0.97);
  }
  to {
    opacity: 0.46;
    transform: scale(1.03);
  }
}

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

  .atmosphere__wash,
  .hero__copy,
  .hero__visual {
    opacity: 1;
    transform: none;
  }
}
