/* Cliplume static site stylesheet
 * Palette directly matches iOS/CliplumeMobile/Shared/Theme.swift and Art/AppIcon B-clip-r3:
 * Porcelain (#F7F3EC), Midnight (#16213A), Navy (#2A4068), Orange (#F2683B), Apricot (#FFB25C), Stage (#0C111E).
 * Zero external fonts, zero trackers, responsive mobile-first, light/dark & high-contrast aware.
 */

:root {
  --midnight: #16213a;
  --navy: #2a4068;
  --orange: #f2683b;
  --orange-deep: #d95226;
  --apricot: #ffb25c;
  --porcelain: #f7f3ec;
  --stage: #0c111e;

  --bg-top: #faf6f0;
  --bg-bottom: #ede5d9;
  --surface: rgba(255, 255, 255, 0.84);
  --surface-solid: #ffffff;
  --surface-muted: rgba(22, 33, 58, 0.045);
  --border: rgba(92, 76, 56, 0.14);
  --border-strong: rgba(22, 33, 58, 0.24);
  --text: #16213a;
  --text-secondary: #435069;
  --link: #c24219;
  --link-hover: #9e3210;
  --badge-bg: rgba(242, 104, 59, 0.12);
  --badge-text: #a83714;
  --notice-bg: rgba(42, 64, 104, 0.08);
  --notice-border: rgba(42, 64, 104, 0.24);
  --draft-bg: #fff5e6;
  --draft-border: #d9822b;
  --draft-text: #7a4208;
  --shadow: 0 12px 32px rgba(22, 33, 58, 0.08);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --max-width: 1040px;
  --prose-width: 740px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-top: #111728;
    --bg-bottom: #090c16;
    --surface: rgba(27, 34, 51, 0.88);
    --surface-solid: #182034;
    --surface-muted: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.11);
    --border-strong: rgba(255, 255, 255, 0.24);
    --text: #f5f2ec;
    --text-secondary: #b7c2d6;
    --link: #ff9268;
    --link-hover: #ffb25c;
    --badge-bg: rgba(242, 104, 59, 0.2);
    --badge-text: #ffb28c;
    --notice-bg: rgba(102, 146, 214, 0.14);
    --notice-border: rgba(145, 182, 240, 0.28);
    --draft-bg: rgba(217, 130, 43, 0.16);
    --draft-border: #f0a44b;
    --draft-text: #ffd8a6;
    --shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  }
}

@media (prefers-contrast: more) {
  :root {
    --surface: var(--surface-solid);
    --border: var(--border-strong);
    --shadow: none;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(circle at 96% 4%, rgba(242, 104, 59, 0.14), transparent 44%),
    radial-gradient(circle at 4% 96%, rgba(42, 64, 104, 0.12), transparent 50%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  background-attachment: fixed;
}

@media (prefers-contrast: more) {
  body {
    background: var(--bg-top);
  }
}

img,
svg {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--link);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}

a:hover,
a:focus-visible {
  color: var(--link-hover);
}

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 10px 16px;
  background: var(--midnight);
  color: #ffffff;
  font-weight: 600;
  z-index: 100;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.container--prose {
  max-width: var(--prose-width);
}

/* Prelaunch / preview banner (rendered ONLY in preview mode) */
.preview-banner {
  background: var(--midnight);
  color: #f7f3ec;
  font-size: 0.875rem;
  border-bottom: 2px solid var(--orange);
}

.preview-banner__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 10px 0;
}

.preview-banner strong {
  color: var(--apricot);
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(250, 246, 240, 0.86);
  border-bottom: 1px solid var(--border);
}

@media (prefers-color-scheme: dark) {
  .site-header {
    background: rgba(17, 23, 40, 0.86);
  }
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  min-height: 64px;
  padding: 10px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.015em;
}

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

.brand__icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: block;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text);
  background: var(--surface-muted);
}

.site-nav a[aria-current="page"] {
  color: var(--text);
  background: var(--badge-bg);
  font-weight: 600;
}

/* Main */
.site-main {
  flex: 1 0 auto;
  padding: 36px 0 64px;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 28px;
  align-items: center;
  padding: 20px 0 36px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--badge-bg);
  color: var(--badge-text);
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 14px;
}

h1,
h2,
h3 {
  line-height: 1.22;
  letter-spacing: -0.02em;
  margin-top: 0;
}

h1 {
  font-size: clamp(2rem, 4.4vw, 3rem);
  margin-bottom: 14px;
}

h2 {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  margin-bottom: 12px;
}

h3 {
  font-size: 1.08rem;
  margin-bottom: 8px;
}

.lead {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin: 0 0 22px;
  max-width: 58ch;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.96rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.12s ease, background-color 0.12s ease;
}

.button--primary {
  background: var(--orange);
  color: #ffffff;
}

.button--primary:hover,
.button--primary:focus-visible {
  background: var(--orange-deep);
  color: #ffffff;
}

.button--secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}

.button--secondary:hover,
.button--secondary:focus-visible {
  background: var(--surface-solid);
  color: var(--text);
}

.availability-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--midnight);
  color: #f7f3ec;
  font-size: 0.92rem;
  font-weight: 600;
}

.availability-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--apricot);
  flex: 0 0 auto;
}

/* Stage Illustration Card */
.stage-card {
  background: var(--stage);
  color: #f5f2ec;
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
}

.stage-card__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 0.8rem;
  color: #a9b6cc;
}

.stage-dots {
  display: inline-flex;
  gap: 6px;
}

.stage-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.stage-canvas {
  background: linear-gradient(135deg, #22406a 0%, #111e37 100%);
  border-radius: 14px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.stage-window {
  background: #f7f3ec;
  color: #16213a;
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.stage-window__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.82rem;
  font-weight: 600;
}

.stage-window__line {
  height: 9px;
  border-radius: 999px;
  background: rgba(22, 33, 58, 0.14);
  margin-bottom: 8px;
}

.stage-window__line--short {
  width: 62%;
}

.stage-redaction {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #16213a;
  color: #f7f3ec;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 0.76rem;
  font-weight: 600;
  margin-top: 10px;
}

.stage-redaction span:last-child {
  color: var(--apricot);
}

.stage-timeline {
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 10px 12px;
}

.stage-track {
  position: relative;
  height: 16px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
  border: 2px solid var(--orange);
}

.stage-track__cut {
  position: absolute;
  left: 38%;
  width: 14%;
  top: 0;
  bottom: 0;
  background: rgba(242, 104, 59, 0.35);
}

.stage-track__playhead {
  position: absolute;
  left: 58%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #ffffff;
}

.stage-caption {
  margin: 10px 0 0;
  font-size: 0.78rem;
  color: #a9b6cc;
}

/* Cards & Grids */
.section {
  margin-top: 32px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow);
}

.card p:last-child,
.card ul:last-child {
  margin-bottom: 0;
}

.card ul {
  padding-left: 1.2rem;
  margin: 10px 0;
}

.card li + li {
  margin-top: 6px;
}

.platform-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--badge-text);
  background: var(--badge-bg);
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.notice {
  background: var(--notice-bg);
  border: 1px solid var(--notice-border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin: 18px 0;
}

.draft-notice {
  background: var(--draft-bg);
  border: 1.5px solid var(--draft-border);
  color: var(--draft-text);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin: 0 0 24px;
}

.draft-notice strong {
  color: inherit;
}

/* Prose / Legal / Support */
.prose {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow);
}

.prose h1 {
  font-size: clamp(1.75rem, 3.6vw, 2.35rem);
  margin-bottom: 10px;
}

.prose h2 {
  font-size: 1.28rem;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.prose h2:first-of-type {
  margin-top: 20px;
}

.prose p,
.prose li {
  color: var(--text);
}

.prose .meta-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: grid;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.prose ul,
.prose ol {
  padding-left: 1.3rem;
}

.prose li + li {
  margin-top: 6px;
}

.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9em;
  background: var(--surface-muted);
  padding: 2px 6px;
  border-radius: 6px;
}

.table-wrap {
  overflow-x: auto;
  margin: 14px 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

th,
td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  font-weight: 600;
  background: var(--surface-muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0 36px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.site-footer__links a {
  color: var(--text-secondary);
  text-decoration: none;
}

.site-footer__links a:hover,
.site-footer__links a:focus-visible {
  color: var(--text);
  text-decoration: underline;
}

/* Mobile Responsive */
@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 8px;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .prose {
    padding: 22px 18px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .site-main {
    padding: 24px 0 48px;
  }

  .site-nav {
    width: 100%;
  }

  .site-nav a {
    padding: 6px 10px;
    font-size: 0.9rem;
  }
}
