/* Frame Capture — framecaptureapp.com
   Colours come from the app's Material 3 theme (ui/theme/Color.kt). */

@font-face { font-family: "Google Sans Flex"; src: url("/fonts/google-sans-flex-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Google Sans Flex"; src: url("/fonts/google-sans-flex-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Google Sans Flex"; src: url("/fonts/google-sans-flex-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #fcf8ff;
  --bg-tint: #f3edff;
  --surface: #ffffff;
  --surface-2: #f6f1ff;
  --container: #e8deff;
  --text: #1f1a2c;
  --muted: #5d5670;
  --primary: #6a42f4;
  --primary-hover: #5a32e4;
  --on-primary: #ffffff;
  --primary-soft: #efe8ff;
  --line: rgba(31, 26, 44, 0.09);
  --shadow: 0 1px 2px rgba(60, 30, 140, 0.06), 0 12px 32px -12px rgba(76, 44, 190, 0.22);
  --shadow-lg: 0 2px 6px rgba(60, 30, 140, 0.06), 0 30px 60px -24px rgba(76, 44, 190, 0.35);
  --radius-s: 10px;
  --radius: 18px;
  --radius-l: 28px;
  --max: 1160px;
  --font: "Google Sans Flex", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161220;
    --bg-tint: #1d1729;
    --surface: #211b2e;
    --surface-2: #272036;
    --container: #3a2d63;
    --text: #efe9fb;
    --muted: #b7adcc;
    --primary: #d2c1ff;
    --primary-hover: #e2d6ff;
    --on-primary: #2a1170;
    --primary-soft: #2c2342;
    --line: rgba(255, 255, 255, 0.09);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -12px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.3), 0 30px 60px -24px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-hover); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.5em; font-weight: 700; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 6vw, 4rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; font-weight: 600; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; gap: 16px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.08rem; letter-spacing: -0.01em; }
.brand img { width: 36px; height: 36px; }
.nav-links { display: flex; gap: 4px; margin: 0 0 0 auto; padding: 0; list-style: none; }
.nav-links a { display: block; padding: 8px 12px; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 0.95rem; font-weight: 500; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); background: var(--primary-soft); }
.nav-cta { margin-left: 8px; }
.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; background: transparent; color: var(--text); border-radius: 12px; cursor: pointer; }
.nav-toggle svg { width: 24px; height: 24px; }

@media (max-width: 880px) {
  .nav-toggle { display: inline-grid; place-items: center; }
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 68px;
    flex-direction: column; gap: 0; padding: 8px 16px 16px;
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 14px 12px; font-size: 1.05rem; border-radius: 12px; }
  .nav .nav-cta { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font: 600 1rem/1 var(--font); text-decoration: none; cursor: pointer; border: 0;
  transition: background-color .15s, transform .15s, box-shadow .15s;
}
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 6px 18px -8px rgba(106, 66, 244, 0.7); }
.btn-primary:hover { background: var(--primary-hover); color: var(--on-primary); transform: translateY(-1px); }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 0.92rem; }
.btn svg { width: 20px; height: 20px; flex: none; }

.play-badge { display: inline-block; line-height: 0; border-radius: 10px; }
.play-badge img { height: 64px; width: auto; margin: -8px -9px; } /* official badge includes clear space */
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.cta-note { color: var(--muted); font-size: 0.92rem; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 48px 0 72px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 100%;
  background: linear-gradient(180deg, var(--bg-tint) 0%, var(--bg) 100%);
  z-index: -1;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
.hero-icon { width: 72px; height: 72px; margin-bottom: 20px; filter: drop-shadow(0 10px 18px rgba(106, 66, 244, 0.25)); }
.eyebrow { display: inline-block; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--primary); margin-bottom: 14px; }
.hero h1 { margin-bottom: 18px; }
.lead { font-size: clamp(1.08rem, 2vw, 1.25rem); color: var(--muted); max-width: 34em; margin-bottom: 28px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 0; padding: 0; list-style: none; }
.chips li { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 0.9rem; color: var(--text); }
.chips svg { width: 16px; height: 16px; color: var(--primary); flex: none; }
.hero-visual { position: relative; display: flex; justify-content: center; }
.hero-visual .shot { width: min(360px, 82vw); }
.hero-visual .shot-back { position: absolute; width: min(300px, 64vw); right: 2%; top: 9%; transform: rotate(5deg); opacity: 0.95; z-index: -1; }
@media (max-width: 880px) {
  .hero { padding: 28px 0 48px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual .shot-back { display: none; }
}

.shot { border-radius: var(--radius-l); box-shadow: var(--shadow-lg); background: var(--surface); overflow: hidden; }
.shot img { width: 100%; height: auto; }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section-alt { background: var(--surface-2); }
.section-head { max-width: 680px; margin: 0 auto 48px; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.1rem; margin: 0; }
@media (max-width: 640px) { .section { padding: 64px 0; } .section-head { margin-bottom: 36px; } }

/* Features */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: 0 1px 0 rgba(0,0,0,0.02); }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); margin: 0; font-size: 0.98rem; }
.card .icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); margin-bottom: 16px; }
.card .icon svg { width: 22px; height: 22px; }
.premium-tag { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.02em; background: var(--container); color: var(--text); vertical-align: middle; }
@media (max-width: 960px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .feature-grid { grid-template-columns: 1fr; } }

/* How it works */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.steps li::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: var(--on-primary); font-weight: 700; margin-bottom: 16px; }
.steps h3 { font-size: 1.1rem; margin-bottom: 6px; }
.steps p { color: var(--muted); font-size: 0.97rem; margin: 0; }
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 0; padding: 0; list-style: none; }
.gallery figure { margin: 0; }
.gallery li:nth-child(even) { margin-top: 40px; }
.gallery figcaption { margin-top: 14px; font-size: 0.95rem; color: var(--muted); text-align: center; }
.gallery figcaption strong { display: block; color: var(--text); font-weight: 600; }
@media (max-width: 880px) {
  .gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; padding: 4px 20px 16px; margin: 0 -20px; scrollbar-width: none; }
  .gallery::-webkit-scrollbar { display: none; }
  .gallery li { flex: 0 0 68%; max-width: 280px; scroll-snap-align: center; }
  .gallery li:nth-child(even) { margin-top: 0; }
}
.scroll-hint { display: none; text-align: center; color: var(--muted); font-size: 0.88rem; margin-top: 8px; }
@media (max-width: 880px) { .scroll-hint { display: block; } }

/* Use cases */
.usecases { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.usecase { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.usecase:hover { border-color: color-mix(in srgb, var(--primary) 40%, transparent); }
.usecase .more { margin-top: auto; padding-top: 14px; color: var(--primary); font-weight: 600; font-size: 0.95rem; }

/* Free vs premium */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 880px; margin: 0 auto; }
.plan h3 { font-size: 1.35rem; }
.plan .price { color: var(--muted); margin-bottom: 16px; }
.plan-premium { border: 2px solid var(--primary); }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 30px; color: var(--text); font-size: 0.98rem; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--primary-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236a42f4' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/12px no-repeat; }
.plans-note { text-align: center; color: var(--muted); font-size: 0.92rem; margin-top: 20px; }
@media (max-width: 700px) { .plans { grid-template-columns: 1fr; } }

/* Guides */
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.guide-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
.guide-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: inherit; }
.guide-card .kicker { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--primary); margin-bottom: 10px; }
.guide-card h3 { font-size: 1.12rem; }
.guide-card .more { margin-top: auto; padding-top: 14px; color: var(--primary); font-weight: 600; font-size: 0.95rem; }
@media (max-width: 960px) { .guide-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .guide-grid { grid-template-columns: 1fr; } }

/* FAQ */
.faq { max-width: 800px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 22px; }
.faq summary { list-style: none; cursor: pointer; padding: 20px 32px 20px 0; position: relative; font-weight: 600; font-size: 1.05rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 2px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq summary h3 { display: inline; font-size: inherit; font-weight: inherit; letter-spacing: 0; margin: 0; }
.faq .answer { padding: 0 0 20px; color: var(--muted); }
.faq .answer p:last-child { margin-bottom: 0; }

/* Final CTA */
.final-cta { text-align: center; }
.final-cta .inner { background: var(--surface); border: 1px solid var(--line); border-radius: 32px; padding: 56px 24px; box-shadow: var(--shadow); }
.final-cta img.icon { width: 80px; height: 80px; margin: 0 auto 20px; }
.final-cta p { color: var(--muted); font-size: 1.1rem; max-width: 520px; margin: 0 auto 26px; }
.final-cta .cta-row { justify-content: center; }

/* Footer */
.site-footer { padding: 56px 0 40px; border-top: 1px solid var(--line); margin-top: 40px; font-size: 0.95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.footer-grid h2 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 14px; font-weight: 600; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-grid a { color: var(--text); text-decoration: none; }
.footer-grid a:hover { color: var(--primary); }
.footer-about p { color: var(--muted); margin: 12px 0 16px; max-width: 30em; }
.footer-bottom { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 0.88rem; }
.footer-bottom p { margin: 0; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }

/* Sticky mobile CTA */
.sticky-cta {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40;
  display: none; align-items: center; gap: 12px; padding: 10px 10px 10px 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg);
  transform: translateY(140%); transition: transform .3s ease;
}
.sticky-cta img { width: 40px; height: 40px; }
.sticky-cta .txt { flex: 1; min-width: 0; line-height: 1.25; }
.sticky-cta strong { display: block; font-size: 0.98rem; }
.sticky-cta span { font-size: 0.82rem; color: var(--muted); }
.sticky-cta.is-visible { transform: translateY(0); }
@media (max-width: 880px) { .sticky-cta { display: flex; } body.has-sticky { padding-bottom: 84px; } }

/* ---------- Article / guide / legal pages ---------- */
.page-hero { padding: 40px 0 8px; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 22px; font-size: 0.9rem; color: var(--muted); }
.breadcrumbs li + li::before { content: "›"; margin-right: 6px; color: var(--muted); }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--primary); }
.page-hero h1 { font-size: clamp(2rem, 4.6vw, 3rem); max-width: 22em; }
.meta { color: var(--muted); font-size: 0.92rem; margin-bottom: 0; }

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; padding: 32px 0 40px; align-items: start; }
.prose { max-width: 720px; }
.prose h2 { font-size: clamp(1.45rem, 2.6vw, 1.85rem); margin-top: 2.2em; }
.prose h3 { margin-top: 1.6em; }
.prose p, .prose li { color: var(--text); }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.45em; }
.prose li::marker { color: var(--primary); font-weight: 600; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.5em; font-size: 0.96rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-weight: 600; background: var(--surface-2); }
.answer-box { background: var(--primary-soft); border-radius: var(--radius); padding: 20px 22px; margin: 0 0 1.6em; }
.answer-box p:last-child { margin-bottom: 0; }
.answer-box strong:first-child { display: block; margin-bottom: 4px; }
.callout { border-left: 4px solid var(--primary); background: var(--surface); padding: 14px 18px; border-radius: 0 12px 12px 0; margin: 0 0 1.4em; }
.callout p:last-child { margin-bottom: 0; }
.prose figure { margin: 1.6em 0; max-width: 340px; }
.prose figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 10px; }
.app-box { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin: 2em 0; box-shadow: var(--shadow); }
.app-box img.icon { width: 64px; height: 64px; }
.app-box h2, .app-box h3 { margin: 0 0 4px; font-size: 1.2rem; }
.app-box p { margin: 0 0 12px; color: var(--muted); font-size: 0.97rem; }
@media (max-width: 520px) { .app-box { grid-template-columns: 1fr; } }

.aside { position: sticky; top: 92px; display: grid; gap: 18px; }
.aside .card h2 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 12px; font-weight: 600; }
.aside ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 0.95rem; }
.aside a { text-decoration: none; }
.aside .app-mini { text-align: center; }
.aside .app-mini img.icon { width: 60px; height: 60px; margin: 0 auto 10px; }
.aside .app-mini p { font-size: 0.92rem; margin-bottom: 14px; }
@media (max-width: 960px) { .article-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; } .aside { position: static; } }
.prose code { overflow-wrap: anywhere; font-size: 0.9em; }

.related { padding: 8px 0 24px; }
.related h2 { font-size: 1.5rem; }

.legal .prose h2 { font-size: 1.35rem; }
.legal .prose h3 { font-size: 1.08rem; }
.toc { columns: 2; column-gap: 28px; font-size: 0.95rem; padding-left: 1.2em; }
@media (max-width: 600px) { .toc { columns: 1; } }

.notfound { text-align: center; padding: 96px 0; }
.notfound .cta-row { justify-content: center; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
