/* ========================================
   CineMatch Shared Design System
   Modern Dark Cinema + Classic Elegant
   ======================================== */

/* --- Tokens --- */
:root {
  --bg-deep: #030304;
  --bg-base: #050506;
  --bg-elevated: #0a0a0c;
  --bg-surface: #111114;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.07);
  --foreground: #EDEDEF;
  --foreground-muted: #8A8F98;
  --foreground-subtle: #555860;
  --accent: #6366F1;
  --accent-light: #818CF8;
  --accent-glow: rgba(99, 102, 241, 0.15);
  --accent-violet: #8B5CF6;
  --green: #22C55E;
  --red: #EF4444;
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --easing: cubic-bezier(0.16, 1, 0.3, 1);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--foreground-muted);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

a { color: var(--accent-light); text-decoration: none; transition: color 0.2s; }
a:hover { color: #c4b5fd; }
img { display: block; max-width: 100%; }
strong { color: var(--foreground); }

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* --- Ambient Background --- */
.ambient-wrap {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.06;
  will-change: transform;
}

.ambient-orb--1 {
  width: 600px; height: 600px;
  background: var(--accent);
  top: -10%; right: -10%;
  animation: drift1 25s ease-in-out infinite alternate;
}

.ambient-orb--2 {
  width: 400px; height: 400px;
  background: var(--accent-violet);
  bottom: -10%; left: -8%;
  animation: drift2 30s ease-in-out infinite alternate;
}

@keyframes drift1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-60px, 40px) scale(1.1); }
}
@keyframes drift2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, -30px) scale(1.1); }
}

/* --- Reveal Animation --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--easing), transform 0.7s var(--easing);
}

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

/* --- Shared Nav --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 32px;
  background: rgba(5, 5, 6, 0.85);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 1px 0 var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--foreground);
}

.nav-brand:hover { color: var(--foreground); }

.nav-brand-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  overflow: hidden;
}

.nav-brand-icon img { width: 100%; height: 100%; object-fit: cover; }

.nav-brand-name {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--foreground-muted);
}

.nav-links a:hover { color: var(--foreground); }

/* --- Page Layout (subpages) --- */
.page-container {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 32px 80px;
}

.page-header {
  margin-bottom: 48px;
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 600;
  color: var(--foreground);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 8px;
}

.page-subtitle {
  font-size: 14px;
  color: var(--foreground-subtle);
}

/* --- Content Sections --- */
.content-section {
  margin-bottom: 48px;
}

.content-section h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 16px;
  padding-left: 16px;
  border-left: 2px solid var(--accent);
}

.content-section h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 8px;
  margin-top: 24px;
}

.content-section p {
  margin-bottom: 16px;
  font-size: 15px;
  line-height: 1.75;
}

.content-section ul, .content-section ol {
  margin-bottom: 16px;
  padding-left: 20px;
}

.content-section li {
  margin-bottom: 8px;
  font-size: 15px;
  line-height: 1.65;
}

.content-section li::marker {
  color: var(--accent-light);
}

/* --- Glass Card --- */
.glass-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}

.glass-card:hover {
  border-color: var(--border-hover);
}

/* --- Warning / Info Boxes --- */
.box-warning {
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.15);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 16px 0;
  font-size: 14px;
}

.box-warning strong { color: var(--red); }

.box-info {
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 16px 0;
  font-size: 14px;
}

.box-info strong { color: var(--accent-light); }

/* --- Steps --- */
.step-list {
  list-style: none;
  padding: 0;
  counter-reset: steps;
}

.step-list li {
  counter-increment: steps;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 20px;
  font-size: 15px;
}

.step-list li::before {
  content: counter(steps);
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-violet));
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Contact Cards --- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  transition: transform 0.3s var(--easing), border-color 0.3s;
}

.contact-card:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.2);
}

.contact-card-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-violet));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.contact-card-icon svg { width: 20px; height: 20px; color: #fff; }

.contact-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 4px;
}

.contact-card-text {
  font-size: 13px;
  color: var(--foreground-muted);
}

/* --- Plan Cards --- */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.plan-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
}

.plan-card--featured {
  border-color: rgba(99, 102, 241, 0.3);
}

.plan-card-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 4px;
}

.plan-card-price {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 16px;
}

.plan-card-price span {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  color: var(--foreground-muted);
}

/* --- Tables --- */
.styled-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 16px 0;
}

.styled-table th {
  text-align: left;
  padding: 12px 16px;
  background: var(--surface);
  color: var(--foreground);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

.styled-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

/* --- Shared Footer --- */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 32px;
  text-align: center;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  margin-bottom: 16px;
}

.footer-nav a {
  font-size: 13px;
  font-weight: 500;
  color: var(--foreground-subtle);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.footer-nav a:hover { color: var(--accent-light); }

.footer-brand {
  font-size: 13px;
  color: var(--foreground-subtle);
  opacity: 0.5;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .page-container { padding: 40px 20px 60px; }
  .nav { padding: 0 20px; }
  .nav-links { display: none; }
  .contact-grid { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: 1fr; }
}

/* --- Share Page (Mobile-First) --- */
.share-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  z-index: 1;
}

.share-card {
  width: 100%;
  max-width: 420px;
  text-align: center;
}

.share-logo {
  width: 64px; height: 64px;
  border-radius: 16px;
  overflow: hidden;
  margin: 0 auto 20px;
  box-shadow: 0 0 32px var(--accent-glow);
}

.share-logo img { width: 100%; height: 100%; object-fit: cover; }

.share-app-name {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 700;
  color: var(--foreground);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.share-type-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 24px;
}

.share-content-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  margin-bottom: 24px;
}

.share-content-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 8px;
  line-height: 1.2;
}

.share-content-meta {
  font-size: 14px;
  color: var(--foreground-muted);
  margin-bottom: 16px;
}

.share-content-desc {
  font-size: 14px;
  line-height: 1.65;
  color: var(--foreground-muted);
}

.share-poster {
  width: 100%;
  border-radius: var(--radius);
  margin-bottom: 20px;
  aspect-ratio: 2/3;
  object-fit: cover;
  background: var(--bg-elevated);
}

.share-btn {
  display: block;
  width: 100%;
  padding: 16px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: transform 0.2s var(--easing), box-shadow 0.2s;
  margin-bottom: 12px;
}

.share-btn:hover { transform: translateY(-1px); }

.share-btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-violet));
  color: #fff;
}

.share-btn--primary:hover {
  box-shadow: 0 8px 32px var(--accent-glow);
}

.share-btn--secondary {
  background: transparent;
  color: var(--foreground);
  border: 1px solid var(--border);
}

.share-btn--secondary:hover {
  border-color: var(--border-hover);
}

.share-footer {
  margin-top: 24px;
  font-size: 12px;
  color: var(--foreground-subtle);
}
