/*
 * Hand-authored stylesheet — no Tailwind, no build step.
 *
 * Design: light SaaS landing. Gradient hero, the editor wrapped in browser
 * chrome, tinted icon chips on the feature cards, alternating section bands so
 * the page reads as sections rather than one endless scroll. Dark mode is
 * driven entirely by the variable block.
 */

:root {
  color-scheme: light dark;

  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-soft: #eff6ff;
  --green: #16a34a;
  --green-dark: #15803d;

  --ink: #0f172a;
  --ink-soft: #1e293b;
  --muted: #475569;
  --faint: #64748b;
  --line: #e2e8f0;

  --bg: #ffffff;
  --surface: #ffffff;
  --band: #f8fafc;

  --radius: 12px;
  --radius-lg: 16px;
  --wrap: 1152px;
  --shadow-sm: 0 1px 2px rgb(15 23 42 / .06), 0 1px 3px rgb(15 23 42 / .08);
  --shadow: 0 4px 6px -1px rgb(15 23 42 / .08), 0 2px 4px -2px rgb(15 23 42 / .06);
  --shadow-lg: 0 12px 24px -8px rgb(15 23 42 / .16), 0 4px 8px -4px rgb(15 23 42 / .08);
  --shadow-xl: 0 24px 48px -12px rgb(15 23 42 / .25);
}

@media (prefers-color-scheme: dark) {
  :root {
    --blue: #60a5fa;
    --blue-dark: #93c5fd;
    --blue-soft: #172554;
    --green: #4ade80;
    --green-dark: #86efac;

    --ink: #e2e8f0;
    --ink-soft: #f1f5f9;
    --muted: #94a3b8;
    --faint: #94a3b8;
    --line: #1e293b;

    --bg: #0b1120;
    --surface: #111827;
    --band: #0f172a;

    --shadow-sm: 0 1px 2px rgb(0 0 0 / .4);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / .5);
    --shadow-lg: 0 12px 24px -8px rgb(0 0 0 / .6);
    --shadow-xl: 0 24px 48px -12px rgb(0 0 0 / .7);
  }
}

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

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

/* Header scrolls away with the page, so anchors need only breathing room. */
[id] { scroll-margin-top: 16px; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.2; color: var(--ink-soft); letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 1.2rem + 3.2vw, 3.4rem); margin: 0 0 1.1rem; font-weight: 800; }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem); margin: 0 0 1.1rem; font-weight: 700; }
h3 { font-size: 1.08rem; margin: .75rem 0 .5rem; font-weight: 650; }
p  { margin: 0 0 1rem; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 1.25rem; }
.wrap.narrow { max-width: 48rem; }
.center { text-align: center; }
.center .lead { margin-inline: auto; }

.section { padding-block: clamp(2.5rem, 1.75rem + 2.5vw, 4rem); }
.band { background: var(--band); }

.lead { font-size: 1.08rem; color: var(--muted); max-width: 46rem; }
.note { font-size: .9rem; color: var(--faint); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--surface); padding: .6rem 1rem; border: 2px solid var(--blue);
}
.skip-link:focus { left: 0; }

:where(a, button, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 6px;
}

/* ── Header ─────────────────────────────────────────────────────────────── */

.site-header { position: relative; z-index: 100; background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .85rem; }
.logo { display: inline-flex; align-items: center; flex: 0 0 auto; }
.logo img { height: 32px; width: auto; object-fit: contain; }

.nav-desktop { display: none; }
.nav-list { display: flex; align-items: center; gap: 1.35rem; list-style: none; margin: 0; padding: 0; }
.nav-list a, .dropdown-toggle {
  font-size: .92rem; font-weight: 500; color: var(--muted);
  background: none; border: 0; padding: 0; cursor: pointer; font-family: inherit;
}
.nav-list a:hover, .dropdown-toggle:hover { color: var(--blue); text-decoration: none; }
.nav-list a.is-active, .dropdown-toggle.is-active { color: var(--blue); font-weight: 650; }

.has-dropdown { position: relative; }
.dropdown {
  position: absolute; inset-inline-end: 0; top: 100%;
  min-width: 13rem; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  list-style: none; margin: .55rem 0 0; padding: .35rem; display: none; z-index: 110;
}

/*
 * Hover bridge. The menu sits below the button with a gap, and that gap is not
 * part of any hoverable box — so moving the pointer towards the menu dropped
 * :hover and the menu closed before it could be reached. This pseudo-element
 * fills the gap so the pointer never leaves .has-dropdown.
 */
.dropdown::before {
  content: ""; position: absolute; inset-inline: 0;
  top: -.65rem; height: .65rem;
}

.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown,
.dropdown.is-open { display: block; }

.dropdown li { list-style: none; }
.dropdown a, .dropdown .lang-current {
  display: block; padding: .5rem .7rem; border-radius: 8px;
  font-size: .9rem; line-height: 1.4;
}
.dropdown a { color: var(--muted); }
.dropdown a:hover, .dropdown a:focus-visible { background: var(--blue-soft); color: var(--blue); text-decoration: none; }

.header-right { display: flex; align-items: center; gap: .85rem; }

/* ── Language menu ──────────────────────────────────────────────────────── */

.lang-switch { position: relative; }
.lang-toggle {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .4rem .6rem; border-radius: 8px; font-size: .875rem;
  color: var(--muted); border: 1px solid var(--line); background: var(--surface);
}
.lang-toggle:hover { color: var(--blue); border-color: color-mix(in srgb, var(--blue) 40%, var(--line)); }
.lang-toggle .caret { transition: transform .18s; }
.lang-toggle[aria-expanded="true"] .caret { transform: rotate(180deg); }
.dropdown-lang { min-width: 11rem; }
.lang-current { font-weight: 650; color: var(--ink); background: var(--blue-soft); }

.menu-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; padding: 8px; background: none; border: 0; cursor: pointer;
}
.menu-bar { display: block; height: 2px; background: var(--muted); border-radius: 2px; transition: transform .2s, opacity .2s; }
.menu-toggle[aria-expanded="true"] .menu-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-bar:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile { border-top: 1px solid var(--line); background: var(--surface); }
.nav-mobile ul { list-style: none; margin: 0; padding: .5rem 1.25rem 1rem; }
.nav-mobile a { display: block; padding: .6rem .75rem; border-radius: 8px; color: var(--muted); font-size: .95rem; }
.nav-mobile a:hover, .nav-mobile a.is-active { background: var(--blue-soft); color: var(--blue); text-decoration: none; }

@media (min-width: 900px) {
  .nav-desktop { display: block; }
  .menu-toggle { display: none; }
  .nav-mobile { display: none !important; }
}

/* ── Hero ───────────────────────────────────────────────────────────────── */

.hero {
  position: relative; text-align: center; overflow: hidden;
  padding-block: clamp(3rem, 2rem + 5vw, 6rem) clamp(3.5rem, 2rem + 6vw, 7rem);
  background:
    radial-gradient(60rem 30rem at 50% -10%, color-mix(in srgb, var(--blue) 18%, transparent), transparent 70%),
    linear-gradient(180deg, var(--band), var(--bg));
}
.hero h1 { max-width: 24ch; margin-inline: auto; }
.hero-desc { max-width: 52rem; margin-inline: auto; font-size: 1.1rem; color: var(--muted); margin-bottom: 2rem; }
.hero-note { font-size: .85rem; color: var(--faint); margin-top: 1.5rem; max-width: 44rem; margin-inline: auto; }

.trust {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem 1.5rem;
  list-style: none; margin: 1.75rem 0 0; padding: 0;
  font-size: .9rem; font-weight: 550; color: var(--muted);
}
.trust li { display: inline-flex; align-items: center; gap: .4rem; }
.trust svg { color: var(--green); flex: 0 0 auto; }

.btn {
  display: inline-block; padding: .85rem 1.9rem; border-radius: var(--radius);
  font-weight: 650; color: #fff; border: 0; cursor: pointer;
  font-size: 1rem; font-family: inherit;
  transition: transform .15s, box-shadow .15s, background-color .15s;
}
.btn:hover { text-decoration: none; color: #fff; transform: translateY(-1px); }
.btn-lg { padding: 1rem 2.4rem; font-size: 1.05rem; }
.btn-primary { background: var(--blue); box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--blue) 70%, transparent); }
.btn-primary:hover { background: var(--blue-dark); box-shadow: 0 10px 22px -8px color-mix(in srgb, var(--blue) 80%, transparent); }
.btn-success { background: var(--green); box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--green) 70%, transparent); }
.btn-success:hover { background: var(--green-dark); }

@media (prefers-color-scheme: dark) {
  .btn-primary, .btn-success { color: #0b1120; }
  .btn:hover { color: #0b1120; }
}

/* ── Editor ─────────────────────────────────────────────────────────────── */

/*
 * Bounded, not 100vh — a full-viewport iframe pushed every word of content a
 * whole screen below the fold. The chrome is decorative and aria-hidden.
 */
/* Full-bleed — spans the viewport edge to edge, no max-width container. */
.editor { padding: 0; margin: 0; }
.editor-frame {
  width: 100%; background: #1e293b;
  border-block: 1px solid #334155; border-inline: 0; border-radius: 0;
}
.editor-frame iframe {
  width: 100%; height: min(82vh, 900px); border: 0; display: block; background: #0f172a;
}

/* ── Cards & grids ──────────────────────────────────────────────────────── */

.grid { display: grid; gap: 1.5rem; }
.grid-3 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  position: relative; padding: 1.6rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); transition: box-shadow .18s, transform .18s, border-color .18s;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: color-mix(in srgb, var(--blue) 35%, var(--line)); }
.card h3 { margin: .9rem 0 .5rem; }
.card p { color: var(--muted); margin: 0; font-size: .95rem; }

/* Tinted icon chips — the colour lives on the chip, not the bare stroke. */
.chip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 12px;
  background: color-mix(in srgb, currentColor 12%, transparent);
}
.chip .icon { width: 26px; height: 26px; }
.chip-layers { color: #2563eb; } .chip-export { color: #16a34a; }
.chip-browser { color: #9333ea; } .chip-background { color: #dc2626; }
.chip-typography { color: #ea580c; } .chip-crop { color: #4f46e5; }
.chip-color { color: #db2777; } .chip-filters { color: #0f766e; }
.chip-vector { color: #0d9488; } .chip-ai { color: #ca8a04; }
.chip-compatibility { color: #475569; } .chip-smart { color: #0891b2; }

@media (prefers-color-scheme: dark) {
  .chip-layers { color: #60a5fa; } .chip-export { color: #4ade80; }
  .chip-browser { color: #c084fc; } .chip-background { color: #f87171; }
  .chip-typography { color: #fb923c; } .chip-crop { color: #818cf8; }
  .chip-color { color: #f472b6; } .chip-filters { color: #2dd4bf; }
  .chip-vector { color: #2dd4bf; } .chip-ai { color: #facc15; }
  .chip-compatibility { color: #94a3b8; } .chip-smart { color: #22d3ee; }
}

.card-link { display: block; color: inherit; padding-bottom: 2.6rem; }
.card-link:hover { text-decoration: none; }
.card-link h3 { color: var(--blue); margin-top: 0; }
.card-link p { font-size: .9rem; }
.card-arrow {
  position: absolute; inset-block-end: 1.3rem; inset-inline-start: 1.6rem;
  color: var(--blue); font-size: 1.15rem; transition: transform .18s;
}
.card-link:hover .card-arrow { transform: translateX(4px); }

.steps { padding-inline-start: 1.4rem; color: var(--muted); }
.steps li { margin-bottom: .7rem; }
.steps li::marker { color: var(--blue); font-weight: 700; }

.tiles .tile {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 6rem; padding: 1.25rem; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius); font-weight: 550;
  transition: box-shadow .18s, transform .18s, border-color .18s;
}
.tiles .tile:hover {
  box-shadow: var(--shadow-lg); transform: translateY(-3px); color: var(--blue);
  text-decoration: none; border-color: color-mix(in srgb, var(--blue) 35%, var(--line));
}

.prose { margin-bottom: 2rem; }
.prose p, .prose li { color: var(--muted); }
.prose ul { padding-inline-start: 1.25rem; }
.prose li { margin-bottom: .4rem; }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); border: 1px solid var(--line); }
.compare { width: 100%; border-collapse: collapse; min-width: 34rem; font-size: .95rem; background: var(--surface); }
.compare th, .compare td { padding: .85rem 1.1rem; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
.compare thead th { background: var(--band); font-weight: 650; }
.compare tbody th { font-weight: 600; width: 30%; }
.compare td { color: var(--muted); }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 0; }

/* ── FAQ ────────────────────────────────────────────────────────────────── */

/* <details> keeps every answer in the DOM whether open or not, which is what
   makes the FAQPage structured data honest. */
.faq details {
  border: 1px solid var(--line); border-radius: var(--radius);
  margin-bottom: .85rem; background: var(--surface); overflow: hidden;
}
.faq details[open] { box-shadow: var(--shadow-sm); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.05rem 1.25rem; cursor: pointer; list-style: none; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--blue); }
.faq summary h3 { margin: 0; font-size: 1rem; font-weight: 600; color: inherit; }
.faq summary::after {
  content: ""; flex: 0 0 auto; width: 9px; height: 9px;
  border-right: 2px solid var(--faint); border-bottom: 2px solid var(--faint);
  transform: rotate(45deg); transition: transform .2s; margin-top: -4px;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.faq details p { padding: 0 1.25rem 1.15rem; margin: 0; color: var(--muted); }

/* ── Topic pages & internal linking ─────────────────────────────────────── */

.breadcrumb { padding-block: 1.1rem 0; font-size: .85rem; color: var(--faint); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: "/"; margin-inline-end: .5rem; color: var(--line); }
.breadcrumb [aria-current] { color: var(--muted); }

.article { max-width: 46rem; }
.article h2 { font-size: 1.35rem; margin-top: 2.25rem; }
.article .btn { margin-bottom: 1rem; }

.more-link { margin-top: .6rem; }
.more-link a { font-weight: 650; }

.hub-cta {
  margin-top: 2.5rem; padding: 1.2rem 1.4rem;
  background: var(--blue-soft); border-inline-start: 3px solid var(--blue);
  border-radius: 0 var(--radius) var(--radius) 0; color: var(--muted);
}
.hub-cta a { font-weight: 650; }

.related { padding-top: 0; }
.related h2 { font-size: 1.35rem; }

.format-list { padding-inline-start: 1.25rem; color: var(--muted); }
.format-list li { margin-bottom: .4rem; }

/* ── CTA / footer ───────────────────────────────────────────────────────── */

.cta {
  text-align: center; padding-block: clamp(3rem, 2rem + 3vw, 4.5rem);
  background:
    radial-gradient(50rem 24rem at 50% 110%, color-mix(in srgb, var(--green) 15%, transparent), transparent 70%),
    var(--band);
}

.site-footer { border-top: 1px solid var(--line); padding-block: 2.5rem; background: var(--surface); }
.footer-inner { display: grid; gap: 1.75rem; font-size: .875rem; color: var(--faint); }
@media (min-width: 768px) { .footer-inner { grid-template-columns: 2fr 1.2fr 1fr; align-items: start; } }
.disclaimer { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1rem; }
@media (min-width: 768px) { .footer-links { justify-content: flex-end; } }
.footer-links a { text-decoration: underline; color: var(--faint); }
.footer-links a:hover { color: var(--blue); }

.footer-topics h2 { font-size: .875rem; color: var(--ink); margin: 0 0 .6rem; letter-spacing: 0; }
.footer-topics ul { list-style: none; margin: 0; padding: 0; }
.footer-topics li { margin-bottom: .4rem; }
.footer-topics a { color: var(--faint); }
.footer-topics a:hover { color: var(--blue); }

.back-to-top {
  position: fixed; inset-block-end: 1.5rem; inset-inline-end: 1.5rem; z-index: 120;
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border: 0; border-radius: 50%;
  background: var(--blue); color: #fff; cursor: pointer; box-shadow: var(--shadow-lg);
}
.back-to-top:hover { background: var(--blue-dark); }
.back-to-top[hidden] { display: none; }
@media (prefers-color-scheme: dark) { .back-to-top { color: #0b1120; } }

/* ── Static pages ───────────────────────────────────────────────────────── */

.page { max-width: 48rem; }
.page h1 { margin-bottom: 1.25rem; }
.clause { margin-bottom: 1.75rem; }
.clause h2 { font-size: 1.2rem; margin-bottom: .45rem; }
.clause p { color: var(--muted); margin: 0; }

.contact-list { margin: 1.75rem 0; }
.contact-list dt { font-weight: 650; margin-top: 1.1rem; color: var(--ink); }
.contact-list dd { margin: .25rem 0 0; color: var(--muted); }

.not-found { text-align: center; padding-block: 4rem; }
.error-code { font-size: 4rem; font-weight: 800; color: var(--line); margin: 0; line-height: 1; }

/* ── Ads ────────────────────────────────────────────────────────────────── */

/*
 * No reserved height. A slot that never fills used to leave ~140px of blank
 * page between two sections, which is a worse defect than the small shift a
 * loading ad causes. An unfilled responsive unit collapses to zero on its own.
 */
.ad-slot { display: flex; justify-content: center; margin-block: 1.25rem; padding-inline: 1.25rem; }
.ad-slot ins { width: 100%; }
.ad-desktop { display: none; }
.ad-mobile  { display: block; }
@media (min-width: 1024px) {
  .ad-desktop { display: block; }
  .ad-mobile  { display: none; }
}

/* Three independent belts, deliberately not combined into one selector list:
   an unsupported :has() would invalidate the whole list and take the other
   rules down with it. */
.ad-slot.is-empty { display: none; }
.ad-slot:empty { display: none; }
.ad-slot:has(> ins[data-ad-status="unfilled"]) { display: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .btn:hover, .card:hover, .tiles .tile:hover { transform: none; }
}
