/* ============================================
   RISETIME DESIGN SYSTEM — tokens, reset, base
   ============================================ */

:root {
  /* Shared tokens */
  --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max-width: 680px;
  --max-width-wide: 960px;
  --base-font: 1rem;
  --line-height: 1.7;
  --radius-sm: 6px;
  --radius-md: 12px;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-xxl: 6rem;
  --focus-offset: 2px;

  /* Default: light theme */
  --bg: #faf8f5;
  --bg-elevated: #ffffff;
  --surface: #f0ede8;
  --accent: #9e5c2c;
  --accent-hover: #884e24;
  --accent-muted: #9e5c2c1a;
  --text: #2c2c2c;
  --text-strong: #1a1a1a;
  --muted: #6b6b6b;
  --border: #d9d4cc;
  --border-accent: #9e5c2c40;
  --code-bg: #eae6e0;
  --screenshot-bg: #f0ede8;
  --screenshot-border: #d9d4cc;
  --badge-coming-soon: #706660;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1117;
    --bg-elevated: #161824;
    --surface: #1a1a2e;
    --accent: #e8a87c;
    --accent-hover: #f0b88e;
    --accent-muted: #e8a87c33;
    --text: #e8e8e8;
    --text-strong: #ffffff;
    --muted: #9a9a9a;
    --border: #2a2a3e;
    --border-accent: #e8a87c40;
    --code-bg: #1e1e32;
    --screenshot-bg: #1a1a2e;
    --screenshot-border: #2a2a3e;
    --badge-coming-soon: #8e8e9a;
  }
}

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

/* ---- BASE ---- */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-stack);
  font-size: var(--base-font);
  line-height: var(--line-height);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- SKIP LINK ---- */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-sm);
  background: var(--accent);
  color: var(--bg);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: 100;
  text-decoration: none;
}
.skip-link:focus {
  top: var(--space-sm);
}

/* ---- FOCUS ---- */
*:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: var(--focus-offset);
}

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

/* ---- HEADER / NAV ---- */
.site-header {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: var(--space-md) var(--space-sm);
}
.site-header nav {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  width: 100%;
}
.wordmark {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-decoration: none;
  margin-right: auto;
}
.site-header nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}
.site-header nav a:hover {
  color: var(--accent);
}

/* ---- FOOTER ---- */
.site-footer {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: var(--space-md) var(--space-sm) var(--space-lg);
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted);
}
.site-footer nav {
  margin-top: var(--space-xs);
}
.site-footer a {
  color: var(--muted);
  text-decoration: none;
}
.site-footer a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ---- LINKS (global) ---- */
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  color: var(--accent-hover);
}

/* Inline links inside body text must be underlined for accessibility */
p a, li a, dd a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

/* ---- CODE ---- */
code {
  background: var(--code-bg);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  font-size: 0.9em;
}

/* ---- PLAY BADGE (CTA button — used everywhere) ---- */
.play-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  background: var(--text-strong);
  color: var(--bg);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  min-height: 44px;
  min-width: 44px;
  transition: opacity 0.15s ease;
}
.play-badge:hover {
  opacity: 0.85;
  text-decoration: none;
  color: var(--bg);
}
.play-badge svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.play-badge--coming-soon {
  background: var(--surface);
  color: var(--badge-coming-soon);
  cursor: default;
  pointer-events: none;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.65rem 1.5rem;
}
.play-badge--coming-soon .badge-sub {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.play-badge--coming-soon .badge-main {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}
.footer-coming-soon {
  color: var(--muted);
  font-size: inherit;
  cursor: default;
}

/* ---- HIGHLIGHT BOX (used on content + privacy pages) ---- */
.highlight-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: var(--space-sm) var(--space-md);
  margin: var(--space-md) 0;
}
.highlight-box p {
  margin: 0;
}
.highlight-box p + p {
  margin-top: 0.5rem;
}

/* ---- SCREEN READER ONLY ---- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================
   LANDING PAGE — homepage-only components
   ============================================ */

/* ---- SECTION DEFAULTS ---- */
.landing section {
  padding: var(--space-xl) var(--space-sm);
}
.landing section > * {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

/* ---- SECTION HEADING (reusable) ---- */
.section-heading {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 700;
  color: var(--text-strong);
  text-align: center;
  margin-bottom: var(--space-lg);
}

/* ---- HERO ---- */
.hero {
  text-align: center;
  padding-top: var(--space-xxl);
  padding-bottom: var(--space-xl);
}
.hero > * {
  max-width: var(--max-width-wide);
}
.hero h1 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 600;
  color: var(--text-strong);
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.hero-brand {
  color: var(--accent);
  font-weight: 700;
}
.hero-sep {
  color: var(--muted);
  font-weight: 300;
}
.hero-celestial {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin-top: var(--space-xs);
}
.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--muted);
  margin-top: var(--space-sm);
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}
.hero-screenshot {
  margin-top: var(--space-lg);
  margin-bottom: var(--space-lg);
}
.hero-screenshot img {
  display: block;
  width: 280px;
  height: auto;
  margin: 0 auto;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}
@media (prefers-color-scheme: dark) {
  .hero-screenshot img {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  }
}
.cta-group {
  margin-top: var(--space-md);
}

/* ---- HOW IT WORKS ---- */
.how-it-works > * {
  max-width: var(--max-width-wide);
}
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  list-style: none;
  counter-reset: step-counter;
}
.steps li {
  counter-increment: step-counter;
  position: relative;
  padding-left: 3.5rem;
}
.steps li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--accent-muted);
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}
.steps li strong {
  display: block;
  color: var(--text-strong);
  font-size: 1.05rem;
}
.steps li span {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---- FEATURES ---- */
.features > * {
  max-width: var(--max-width-wide);
}
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}
.feature-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
}
.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: var(--space-xs);
}
.feature-card p {
  color: var(--text);
  font-size: 0.95rem;
}

/* ---- USE CASES ---- */
.use-cases > * {
  max-width: var(--max-width-wide);
}
.use-case-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-sm);
}
.use-case-list li {
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.6;
}
.use-case-list li strong {
  color: var(--text-strong);
}

/* ---- SCREENSHOT SHOWCASE ---- */
.screenshots > * {
  max-width: var(--max-width-wide);
}
.screenshot-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}
.screenshot-row figure {
  text-align: center;
  margin: 0;
}
.screenshot-row img {
  display: block;
  width: 100%;
  max-width: 220px;
  height: auto;
  margin: 0 auto;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}
@media (prefers-color-scheme: dark) {
  .screenshot-row img {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  }
}
.screenshot-row figcaption {
  margin-top: var(--space-xs);
  color: var(--muted);
  font-size: 0.875rem;
}

/* ---- CALLOUT BOX ---- */
.callout-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-md);
  padding: var(--space-md);
}
.callout-box p {
  color: var(--text);
  margin-bottom: var(--space-sm);
}
.callout-box ul {
  list-style: none;
  padding: 0;
  margin-bottom: var(--space-sm);
}
.callout-box li {
  padding: 0.4rem 0 0.4rem 1.6rem;
  position: relative;
  color: var(--text);
}
.callout-box li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}
.privacy-link {
  display: inline-block;
  margin-top: var(--space-xs);
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.privacy-link:hover {
  text-decoration: underline;
  color: var(--accent-hover);
}

/* ---- FAQ ---- */
.faq-list dt {
  font-weight: 600;
  color: var(--text-strong);
  margin-top: var(--space-md);
  font-size: 1.05rem;
}
.faq-list dd {
  color: var(--text);
  margin-top: var(--space-xs);
  margin-bottom: 0;
  padding-left: 0;
}

/* ---- FINAL CTA ---- */
.final-cta {
  text-align: center;
  padding: var(--space-xxl) var(--space-sm);
}

/* ---- RESPONSIVE: TABLET+ ---- */
@media (min-width: 640px) {
  .feature-grid {
    grid-template-columns: 1fr 1fr;
  }
  .use-case-list {
    grid-template-columns: 1fr 1fr;
  }
  .screenshot-row {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .steps {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .steps li {
    text-align: center;
    padding-left: 0;
    padding-top: 3.5rem;
  }
  .steps li::before {
    left: 50%;
    transform: translateX(-50%);
    top: 0;
  }
}

/* ============================================
   CONTENT PAGES — narrow-layout article pages
   ============================================ */

/* ---- NARROW LAYOUT ---- */
.layout-narrow .site-header {
  max-width: var(--max-width);
}
.layout-narrow .site-footer {
  max-width: var(--max-width);
  margin-bottom: var(--space-lg);
  padding-bottom: 0;
}

/* ---- PAGE HEADER ---- */
.page-header {
  max-width: var(--max-width);
  margin: var(--space-lg) auto var(--space-md);
  padding: 0 var(--space-sm);
  border-bottom: 1px solid var(--border);
  padding-bottom: var(--space-md);
}
.page-header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-strong);
  margin-top: 0.4rem;
  line-height: 1.2;
}
.page-header .subtitle {
  font-size: 1.05rem;
  color: var(--muted);
  margin-top: 0.5rem;
}
.page-header .meta {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 0.4rem;
}

/* ---- CONTENT MAIN ---- */
.content-main {
  max-width: var(--max-width);
  margin: 0 auto var(--space-xl);
  padding: 0 var(--space-sm);
}
.content-main section {
  margin-top: var(--space-lg);
}
.content-main h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-strong);
  margin-bottom: 0.75rem;
}
.content-main h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.content-main p {
  color: var(--text);
  margin-bottom: 0.75rem;
}

/* ---- CONTENT LISTS ---- */
.content-main ul {
  list-style: none;
  padding: 0;
  margin-bottom: 0.75rem;
}
.content-main ul li {
  padding: 0.3rem 0 0.3rem 1.4rem;
  position: relative;
  color: var(--text);
}
.content-main ul li::before {
  content: "\2022";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ---- NUMBERED STEPS (how-it-works detail page) ---- */
.step {
  margin-top: var(--space-md);
  padding-left: 3.5rem;
  position: relative;
}
.step::before {
  position: absolute;
  left: 0;
  top: 0;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--accent-muted);
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}
.step-1::before { content: "1"; }
.step-2::before { content: "2"; }
.step-3::before { content: "3"; }
.step-4::before { content: "4"; }
.step h3 {
  margin-top: 0.15rem;
}

/* ---- TIMING TABLE (golden-hour page) ---- */
.timing-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-md) 0;
  font-size: 0.95rem;
}
.timing-table th,
.timing-table td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
.timing-table th {
  color: var(--text-strong);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.timing-table td {
  color: var(--text);
}
.timing-table td:first-child {
  color: var(--accent);
  font-weight: 500;
}

/* ---- CTA SECTION (bottom of content pages) ---- */
.cta-section {
  text-align: center;
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
}
.cta-section h2 {
  margin-bottom: var(--space-md);
}

/* ---- CONTENT SCREENSHOT ---- */
.content-screenshot {
  text-align: center;
  margin: var(--space-lg) 0;
}
.content-screenshot img {
  display: block;
  width: 100%;
  max-width: 260px;
  height: auto;
  margin: 0 auto;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}
@media (prefers-color-scheme: dark) {
  .content-screenshot img {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  }
}
.content-screenshot figcaption {
  margin-top: var(--space-xs);
  color: var(--muted);
  font-size: 0.875rem;
}

/* ---- CONTENT LINK ---- */
.content-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.content-link:hover {
  text-decoration: underline;
  color: var(--accent-hover);
}
