/* opencapture.org: support and legal page styles.
   Yellow accent from the OpenInstaCine icon. Light by default, dark via prefers-color-scheme.
   No build step; Vercel serves this as-is. */

:root {
  color-scheme: light dark;
  --yellow:      #FDEA02;
  --yellow-deep: #FDDA01;
  --night:       #0B0B0B;
  --paper:       #F4F6F7;
  --ink-dark:    #16181A;
  --titan:       #5E6262;
  --silver:      #A0A5A5;

  --bg:          var(--paper);
  --surface:     #FFFFFF;
  --ink:         var(--ink-dark);
  --muted:       #3A3E41;
  --faint:       var(--titan);
  --accent:      #7A6200; /* yellow text fails contrast on paper; 5.4:1 */
  --accent-soft: rgba(253, 218, 1, 0.28);
  --hairline:    rgba(22, 24, 26, 0.10);
  --hairline-2:  rgba(22, 24, 26, 0.18);
  --nav-bg:      rgba(244, 246, 247, 0.94);

  --sans: 'IBM Plex Sans', -apple-system, 'SF Pro Text', system-ui, sans-serif;
  --display: 'Sora', 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --r-xl: 20px;
  --r-md: 10px;
  --r-sm: 6px;
  --maxw: 1160px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:          var(--night);
    --surface:     #1C1C1C;
    --ink:         #F4F6F8;
    --muted:       var(--silver);
    --faint:       #8A9090;
    --accent:      var(--yellow);
    --accent-soft: rgba(253, 234, 2, 0.16);
    --hairline:    rgba(244, 246, 248, 0.12);
    --hairline-2:  rgba(244, 246, 248, 0.2);
    --nav-bg:      rgba(11, 11, 11, 0.92);
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { width: 100%; overflow-x: clip; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  width: 100%;
  overflow-x: clip;
  scroll-behavior: smooth;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
main [id] { scroll-margin-top: 88px; }
code { font-family: var(--mono); color: var(--accent); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(16px, 5vw, 48px); }

h1, h2 { font-family: var(--display); font-weight: 600; }
h1 { font-size: clamp(40px, 6.4vw, 80px); line-height: 1.02; letter-spacing: -0.038em; }
h2 { font-size: clamp(28px, 4vw, 46px); line-height: 1.1; letter-spacing: -0.03em; }
h3 { font-size: clamp(20px, 2.2vw, 24px); line-height: 1.25; letter-spacing: -0.02em; font-weight: 600; }
.lead { font-size: clamp(16px, 1.8vw, 20px); color: var(--muted); max-width: 48ch; line-height: 1.55; }
.accent { color: var(--accent); }

.kicker, .section-label {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-weight: 600; font-size: 15px;
  padding: 12px 22px; border-radius: 8px; border: none; cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.btn--primary { background: var(--yellow); color: var(--ink-dark); }
.btn--primary:hover, .btn--primary:focus-visible { background: #E8C800; }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--hairline-2); }
.btn--ghost:hover, .btn--ghost:focus-visible { border-color: var(--accent); color: var(--accent); }
.btn--disabled { background: transparent; color: var(--faint); border: 1px solid var(--hairline-2); cursor: default; }
.btn__arrow { opacity: 0.7; }
.btn__status {
  padding: 2px 7px; border: 1px solid var(--hairline-2); border-radius: 4px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
}
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; justify-content: center; }
.cta .btn { min-width: 184px; }

.skip-link {
  position: fixed; left: 16px; top: 12px; z-index: 200;
  padding: 10px 14px; border-radius: var(--r-sm);
  background: var(--yellow); color: var(--ink-dark); font-weight: 700;
  transform: translateY(-160%); transition: transform .2s ease;
}
.skip-link:focus { transform: translateY(0); }

/* Nav */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--hairline);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.site-nav__inner { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 600; letter-spacing: -0.02em; font-family: var(--display); white-space: nowrap; }
.brand img { border-radius: 6px; }
.site-nav__links { display: flex; align-items: center; gap: clamp(14px, 2.5vw, 28px); color: var(--muted); font-size: 14px; font-weight: 500; }
.site-nav__links a:hover { color: var(--ink); }

/* Hero and sections */
.hero { padding: clamp(72px, 11vw, 140px) 0 clamp(56px, 8vw, 100px); text-align: center; }
.hero__inner { display: flex; flex-direction: column; align-items: center; }
.hero__icon { width: 96px; height: 96px; border-radius: 22px; margin-bottom: 28px; }
.hero h1 { margin: 10px 0 22px; max-width: 14ch; text-wrap: balance; }
.hero .lead { max-width: 60ch; margin-inline: auto; }
.hero__note { margin-top: 16px; color: var(--faint); font-size: 13px; }

.section { padding: clamp(64px, 9vw, 110px) 0; border-top: 1px solid var(--hairline); }
.section--compact { padding-top: clamp(48px, 7vw, 80px); }
.section-heading { margin-bottom: clamp(28px, 5vw, 48px); }
.section-heading h2 { margin: 7px 0 14px; max-width: 18ch; }
.section-heading .lead { max-width: 64ch; }
.article { max-width: 1020px; }

.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.card-grid--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
  padding: 22px; border-radius: var(--r-md); min-height: 170px;
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--hairline);
  transition: transform .25s var(--ease-out), border-color .25s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--accent); }
.card > span { color: var(--accent); font: 500 12px/1 var(--mono); letter-spacing: .1em; }
.card h3 { margin: auto 0 8px; }
.card p { color: var(--muted); font-size: 14px; }

.columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 6vw, 72px); }
.columns h3 { margin-bottom: 16px; }
.steps, .list { display: flex; flex-direction: column; gap: 17px; }
.steps { list-style: none; counter-reset: steps; }
.steps li { position: relative; padding-left: 42px; counter-increment: steps; }
.steps li::before {
  content: counter(steps); position: absolute; left: 0; top: -2px;
  display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%;
  background: var(--accent-soft); color: var(--ink); font: 600 12px/1 var(--mono);
}
.steps strong { display: block; margin-bottom: 3px; }
.steps span, .list { color: var(--muted); font-size: 15px; }
.list { padding-left: 20px; }
.list li::marker { color: var(--accent); }
.callout { align-self: start; padding: 24px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--hairline); }
.callout h3 { margin-bottom: 12px; }
.callout p { color: var(--muted); font-size: 15px; }
.callout p + p { margin-top: 14px; }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--hairline); }
.features article { padding: 24px 24px 24px 0; border-bottom: 1px solid var(--hairline); }
.features article:not(:nth-child(3n+1)) { padding-left: 24px; border-left: 1px solid var(--hairline); }
.features h3 { margin-bottom: 8px; }
.features p { color: var(--muted); font-size: 15px; }

.faq { border-top: 1px solid var(--hairline); }
.faq details { border-bottom: 1px solid var(--hairline); }
.faq summary { position: relative; cursor: pointer; list-style: none; padding: 22px 48px 22px 0; font-size: clamp(17px, 2vw, 20px); font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 8px; top: 18px; color: var(--accent); font: 400 27px/1 var(--mono); }
.faq details[open] summary::after { content: "\2212"; }
.faq details div { max-width: 76ch; padding: 0 48px 22px 0; color: var(--muted); }
.faq details p + p { margin-top: 10px; }
.faq a, .contact a:not(.btn) { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.contact { text-align: center; }
.contact__inner { padding: clamp(32px, 7vw, 72px) clamp(20px, 7vw, 72px); border-radius: var(--r-xl); display: flex; flex-direction: column; align-items: center; background: var(--surface); border: 1px solid var(--hairline); }
.contact h2 { margin: 8px 0 12px; }
.contact .lead { margin-inline: auto; }
.contact__hint { max-width: 72ch; margin-top: 24px; color: var(--muted); font-size: 13px; }

/* Legal article */
.legal-hero { padding: clamp(72px, 12vw, 140px) 0 clamp(28px, 4vw, 44px); }
.legal-hero h1 { font-size: clamp(34px, 5vw, 56px); margin: 10px 0 18px; }
.legal-updated { font: 500 13px/1.4 var(--mono); color: var(--faint); letter-spacing: .04em; }
.legal { max-width: 720px; padding-bottom: clamp(64px, 9vw, 110px); }
.legal-hero .legal { padding-bottom: 0; }
.legal h2 { font-size: clamp(21px, 2.6vw, 27px); margin: clamp(36px, 5vw, 52px) 0 14px; }
.legal p, .legal li { color: var(--muted); font-size: 15.5px; line-height: 1.65; }
.legal p + p { margin-top: 12px; }
.legal strong { color: var(--ink); }
.legal ul { list-style: disc; padding-left: 20px; display: flex; flex-direction: column; gap: 12px; }
.legal li::marker { color: var(--accent); }
.legal a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }

/* Footer: always dark */
.footer { background: #070707; color: #F4F6F8; border-top: 1px solid rgba(255,255,255,.08); padding: 48px 0; }
.footer__inner { display: flex; flex-direction: column; gap: 14px; }
.footer__brand { display: flex; align-items: center; gap: 9px; font-weight: 600; font-family: var(--display); }
.footer__brand img { border-radius: 6px; }
.footer__meta { color: var(--silver); font-size: 14px; }
.footer__meta a:hover { color: var(--yellow); }
.footer__disclaimer { color: #8A9090; font-size: 12px; line-height: 1.5; max-width: 70ch; }

/* Root page */
.root { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 48px 16px; }
.root h1 { font-size: clamp(36px, 7vw, 64px); margin-bottom: 14px; }
.root .lead { margin: 0 auto 28px; }
.apps { display: flex; flex-direction: column; gap: 12px; width: min(100%, 320px); margin: 0 auto; }
.apps .btn { justify-content: flex-start; }
.apps .btn img { border-radius: 7px; }
.apps .btn__arrow { margin-left: auto; }

@media (max-width: 820px) {
  .card-grid, .card-grid--four, .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .features article:not(:nth-child(3n+1)) { padding-left: 0; border-left: 0; }
  .features article:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--hairline); }
}
@media (max-width: 580px) {
  .site-nav__links .hide-sm { display: none; }
  .card-grid, .card-grid--four, .columns, .features { grid-template-columns: 1fr; }
  .card { min-height: 130px; }
  .features article, .features article:nth-child(even) { padding: 20px 0; border-left: 0; }
  .cta { display: grid; grid-template-columns: 1fr; width: 100%; max-width: 400px; }
  .cta .btn { min-width: 0; }
  .faq summary { padding-right: 36px; }
  .faq details div { padding-right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  body { scroll-behavior: auto; }
}
