/* Simple GIF Maker website. Dark, to match the app and its Steam art.
   No web fonts, no JavaScript: the system UI font loads instantly. */

:root {
  --bg: #0e0f14;
  --bg-2: #12131a;
  --surface: #171821;
  --surface-2: #1e1f2b;
  --border: #2a2b3b;
  --text: #ececf3;
  --muted: #a9aabb;
  --faint: #85869a;
  --accent: #7c3aed;
  --accent-hi: #8f57f5;
  --accent-soft: #b49cfb;
  --ok: #8fe39a;
  --radius: 14px;
  --wrap: 1120px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--font);
  text-rendering: optimizeLegibility;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-soft); text-underline-offset: 3px; }
a:hover { color: #d3c6fd; }
:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.18; letter-spacing: -0.015em; margin: 0 0 .6em; text-wrap: balance; }
h1 { font-size: clamp(2.05rem, 5.2vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.55rem, 3.2vw, 2.25rem); font-weight: 750; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
code, kbd, .mono { font-family: var(--mono); font-size: .9em; }
code { background: var(--surface-2); border: 1px solid var(--border); padding: .1em .35em; border-radius: 6px; }
kbd { background: var(--surface-2); border: 1px solid var(--border); border-bottom-width: 2px; padding: .05em .4em; border-radius: 6px; }
pre { background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 1rem 1.1rem; overflow-x: auto; line-height: 1.5; }
pre code { background: none; border: 0; padding: 0; font-size: .86rem; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap { padding: 0 24px; } }

.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: var(--accent); color: #fff; padding: .5rem 1rem; border-radius: 8px; }

/* ---- Buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  padding: .72em 1.25em; border-radius: 10px; border: 1px solid transparent;
  font-weight: 650; font-size: 1rem; line-height: 1.2; text-decoration: none; white-space: nowrap;
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}
.btn-primary {
  background: linear-gradient(180deg, #9466f6 0%, var(--accent) 100%);
  color: #fff; box-shadow: 0 6px 22px -8px rgba(124, 58, 237, .8), inset 0 1px 0 rgba(255,255,255,.18);
}
.btn-primary:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 10px 28px -8px rgba(124, 58, 237, .95), inset 0 1px 0 rgba(255,255,255,.22); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { color: var(--text); background: var(--surface-2); }
.btn-lg { padding: .9em 1.6em; font-size: 1.08rem; }
.btn-sm { padding: .5em .9em; font-size: .92rem; }
.btn-icon { width: 1.15em; height: 1.15em; flex: none; }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } .btn:hover { transform: none; } }

/* ---- Header ----------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 15, 20, .86); backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid rgba(42, 43, 59, .7);
}
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--text); text-decoration: none; font-weight: 750; letter-spacing: -.01em; }
.brand:hover { color: var(--text); }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.main-nav { display: none; gap: 1.6rem; margin-left: auto; }
.main-nav a { color: var(--muted); text-decoration: none; font-weight: 550; font-size: .97rem; }
.main-nav a:hover { color: var(--text); }
.site-header .btn { margin-left: auto; }
@media (min-width: 760px) {
  .main-nav { display: flex; }
  .site-header .btn { margin-left: 1.4rem; }
}
@media (max-width: 420px) {
  .brand span { font-size: .95rem; }
  .site-header .btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .site-header .btn { padding: .55em .7em; }
}

.crumbs { font-size: .9rem; color: var(--faint); padding-top: 1.1rem; display: flex; flex-wrap: wrap; gap: .45rem; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }
.crumb-sep { color: var(--border); }

/* ---- Sections --------------------------------------------------------- */
section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-alt { background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.eyebrow { display: inline-block; color: var(--accent-soft); font-weight: 700; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: .8rem; }
.lede { font-size: clamp(1.08rem, 1.8vw, 1.25rem); color: var(--muted); max-width: 46rem; }
.center { text-align: center; }
.center .lede { margin-left: auto; margin-right: auto; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

/* ---- Hero ------------------------------------------------------------- */
.hero { padding-top: clamp(2.5rem, 6vw, 4.5rem); padding-bottom: clamp(2.5rem, 6vw, 4rem); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto; height: 120%; z-index: -1;
  background: radial-gradient(60% 50% at 50% 30%, rgba(124, 58, 237, .28), transparent 70%);
}
.hero h1 { max-width: 15em; margin-left: auto; margin-right: auto; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, #c7b5ff, #9c6cf8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lede { margin-bottom: 1.8rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; }
.trust { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.3rem; list-style: none; padding: 0; margin: 1.4rem 0 0; color: var(--muted); font-size: .93rem; }
.trust li::before { content: "✓"; color: var(--ok); font-weight: 800; margin-right: .45em; }

.demo { margin: clamp(2.2rem, 5vw, 3.5rem) auto 0; max-width: 960px; }
.demo-frame { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: 0 30px 80px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.02); }
.demo-frame img { width: 100%; }
.demo-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem 1rem; padding: .85rem 1.1rem; border-top: 1px solid var(--border); font-size: .9rem; }
.demo-file { font-weight: 700; }
.demo-size { color: var(--ok); font-weight: 700; }
.tradeoff, p.tradeoff, .term p.tradeoff { font-family: var(--mono); color: var(--ok); font-size: .88rem; line-height: 1.5; }
.demo figcaption { text-align: center; color: var(--faint); font-size: .86rem; margin-top: .8rem; }

/* ---- Pain/answer strip ------------------------------------------------ */
.grid-3 { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.grid-2 { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem 1.4rem 1.2rem; }
.card h3 { margin-bottom: .45em; }
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--muted); }
.card .card-kicker { color: var(--accent-soft); font-size: .8rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; margin-bottom: .5rem; }

/* ---- Feature rows ----------------------------------------------------- */
.feature { display: grid; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; grid-template-columns: 1fr; }
.feature + .feature { margin-top: clamp(3rem, 7vw, 5rem); }
.feature > .feature-media { order: 2; }   /* phones: heading first, picture after */
@media (min-width: 900px) {
  .feature { grid-template-columns: 1.05fr 1fr; }
  .feature > .feature-media { order: 0; }
  .feature.flip > .feature-media { order: 2; }
}
.feature-media img { border-radius: var(--radius); border: 1px solid var(--border); box-shadow: 0 24px 60px -30px rgba(0,0,0,.9); }
.feature-text p { color: var(--muted); }
.feature-text h2 { margin-bottom: .45em; }
.check-list { list-style: none; padding: 0; margin: 1rem 0 0; }
.check-list li { position: relative; padding-left: 1.7em; margin-bottom: .55em; color: var(--text); }
.check-list li::before { content: ""; position: absolute; left: 0; top: .52em; width: .95em; height: .55em; border-left: 2.5px solid var(--ok); border-bottom: 2.5px solid var(--ok); transform: rotate(-45deg); }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; padding: 0; margin: 1rem 0; }
.chips li { background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: .28em .8em; font-size: .88rem; color: var(--text); }
.term { background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: .9rem 1rem; margin: 1rem 0; }
.term p { margin: 0; }
.term p + p { margin-top: .5rem; }

/* ---- Wide images, gallery, video ------------------------------------- */
.wide-img { margin: 2rem auto 0; max-width: 1040px; }
.wide-img img { border-radius: var(--radius); border: 1px solid var(--border); width: 100%; }
.wide-img figcaption, figure figcaption { color: var(--faint); font-size: .88rem; margin-top: .7rem; text-align: center; }
figure { margin: 0; }
.pixelated { image-rendering: pixelated; }
.gallery { display: grid; gap: 1rem; grid-template-columns: 1fr; margin-top: 2rem; }
@media (min-width: 760px) { .gallery { grid-template-columns: repeat(2, 1fr); } .gallery figure:first-child { grid-column: 1 / -1; } }
.gallery img { border-radius: 12px; border: 1px solid var(--border); width: 100%; }
.gallery a { display: block; border-radius: 12px; }
.gallery a:hover img { border-color: #4b3a80; }
.video-wrap { max-width: 960px; margin: 2rem auto 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: #000; }
.video-wrap video { width: 100%; aspect-ratio: 16 / 9; }

/* ---- Feature grid (small) -------------------------------------------- */
.mini-grid { display: grid; gap: 1px; grid-template-columns: 1fr; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-top: 2rem; }
@media (min-width: 640px) { .mini-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .mini-grid { grid-template-columns: repeat(3, 1fr); } }
.mini { background: var(--surface); padding: 1.3rem 1.35rem; }
.mini h3 { font-size: 1.05rem; margin-bottom: .35em; }
.mini p { color: var(--muted); font-size: .96rem; margin: 0; }

/* ---- Tables ----------------------------------------------------------- */
.table-wrap { overflow-x: auto; margin: 1.2rem 0 1.6rem; border: 1px solid var(--border); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: .96rem; min-width: 520px; }
th, td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--surface-2); font-weight: 700; color: var(--text); }
tr:last-child td { border-bottom: 0; }
td { color: var(--muted); }
td strong { color: var(--text); }

/* ---- Pricing ---------------------------------------------------------- */
.price-card { max-width: 760px; margin: 0 auto; background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--border); border-radius: 20px; padding: clamp(1.6rem, 4vw, 2.6rem); text-align: center; }
.price { font-size: clamp(2.6rem, 6vw, 3.6rem); font-weight: 800; letter-spacing: -.03em; line-height: 1; margin: .3rem 0 .2rem; }
.price small { font-size: 1rem; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.req { display: grid; gap: 1rem; grid-template-columns: 1fr; text-align: left; margin-top: 1.8rem; }
@media (min-width: 640px) { .req { grid-template-columns: 1fr 1fr; } }
.req div { background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.1rem; }
.req h3 { font-size: 1rem; margin-bottom: .3rem; }
.req p { margin: 0; color: var(--muted); font-size: .93rem; }

/* ---- FAQ -------------------------------------------------------------- */
.faq-list { max-width: 820px; margin: 2rem auto 0; }
details.faq { border-bottom: 1px solid var(--border); }
details.faq:first-child { border-top: 1px solid var(--border); }
details.faq summary { cursor: pointer; list-style: none; padding: 1.1rem 2.2rem 1.1rem 0; font-weight: 650; font-size: 1.06rem; position: relative; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; position: absolute; right: .3rem; top: .85rem; font-size: 1.5rem; font-weight: 400; color: var(--accent-soft); transition: transform .15s; }
details.faq[open] summary::after { transform: rotate(45deg); }
details.faq > div { padding: 0 0 1.1rem; color: var(--muted); }
details.faq > div p:last-child { margin-bottom: 0; }

/* ---- CTA band --------------------------------------------------------- */
.cta-band { display: grid; gap: 1.2rem; align-items: center; justify-items: center; text-align: center; background: radial-gradient(120% 140% at 0% 0%, rgba(124,58,237,.35), transparent 60%), var(--surface); border: 1px solid #3a2d63; border-radius: 20px; padding: clamp(1.5rem, 4vw, 2.2rem); margin: clamp(2.5rem, 6vw, 4rem) 0; }
.cta-band img { border-radius: 16px; }
.cta-band-title { font-size: clamp(1.3rem, 2.6vw, 1.65rem); font-weight: 750; color: var(--text); margin-bottom: .35rem; line-height: 1.25; }
.cta-band p { margin: 0; color: var(--muted); }
@media (min-width: 860px) {
  .cta-band { grid-template-columns: auto 1fr auto; text-align: left; justify-items: start; }
}

/* ---- Article pages ---------------------------------------------------- */
.article-head { padding: clamp(1.6rem, 4vw, 3rem) 0 clamp(1.2rem, 3vw, 2rem); }
.article-head h1 { font-size: clamp(1.95rem, 4.6vw, 3rem); max-width: 20em; }
.article-head .lede { margin-bottom: 1.4rem; }
.article-meta { color: var(--faint); font-size: .9rem; margin-top: 1rem; }
.prose { max-width: 760px; }
.prose h2 { margin-top: 2.3em; font-size: clamp(1.4rem, 2.6vw, 1.8rem); }
.prose h3 { margin-top: 1.8em; }
.prose p, .prose li { color: #d3d4de; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--accent-soft); }
.prose figure { margin: 1.8rem 0; }
.prose figure img { border-radius: 12px; border: 1px solid var(--border); width: 100%; }
.prose .table-wrap table { min-width: 480px; }
.steps { counter-reset: step; list-style: none; padding-left: 0 !important; }
.steps > li { counter-increment: step; position: relative; padding-left: 3rem; margin-bottom: 1.1rem; min-height: 2.2rem; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: -.05rem; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--surface-2); border: 1px solid #3a2d63; color: var(--accent-soft); font-weight: 800; display: grid; place-items: center; font-size: .95rem; }
.note { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 10px; padding: 1rem 1.15rem; margin: 1.5rem 0; }
.note p:last-child { margin-bottom: 0; }
.note strong { color: var(--text); }
.inline-cta { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; margin: 1.4rem 0 0; }
.inline-cta .small { color: var(--faint); }
.compare { display: grid; gap: 1rem; grid-template-columns: 1fr; margin: 1.5rem 0; }
@media (min-width: 640px) { .compare { grid-template-columns: 1fr 1fr; } }
.compare figure { margin: 0 !important; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: .7rem; }
.compare figure img { border-radius: 8px !important; border: 0 !important; }
.compare figcaption { text-align: left !important; margin-top: .6rem; }
.compare .size { font-family: var(--mono); color: var(--ok); font-weight: 700; }

/* ---- Link cards (guides, related) ------------------------------------ */
.link-cards { list-style: none; padding: 0 !important; margin: 1.2rem 0 0; display: grid; gap: .8rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .link-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .link-cards { grid-template-columns: repeat(3, 1fr); } }
.link-cards li { margin: 0 !important; }
.link-cards a { display: block; height: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.1rem; text-decoration: none; transition: border-color .12s, background-color .12s; }
.link-cards a:hover { border-color: #4b3a80; background: var(--surface-2); }
.link-card-title { display: block; color: var(--text); font-weight: 700; margin-bottom: .2rem; }
.link-card-title::after { content: " →"; color: var(--accent-soft); }
.link-card-sum { display: block; color: var(--muted); font-size: .93rem; line-height: 1.5; }
.related { padding: clamp(2rem, 5vw, 3rem) 0 0; }
.related h2 { font-size: 1.4rem; }

/* ---- Footer ----------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-2); margin-top: clamp(3rem, 7vw, 5rem); padding: 3rem 0 2rem; font-size: .95rem; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer-brand p { color: var(--muted); max-width: 22rem; margin: .8rem 0 1.1rem; }
.footer-h { font-weight: 750; color: var(--text); margin-bottom: .6rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .4rem; }
.site-footer nav a { color: var(--muted); text-decoration: none; }
.site-footer nav a:hover { color: var(--text); text-decoration: underline; }
.footer-small { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); color: var(--faint); font-size: .84rem; }
.footer-small p { margin-bottom: .5rem; }
.footer-small a { color: var(--muted); }

/* ---- 404 -------------------------------------------------------------- */
.page-404 main { min-height: 50vh; }
