/* ============================================================
   SixExit — product site (Cloudflare Pages /delight4.com/sixexit)
   Static site: index.html + css/ + js/  (no build step)
   ============================================================ */

:root {
  --navy-950: #070b16;
  --navy-900: #0b0f1e;
  --navy-800: #101731;
  --navy-700: #182246;
  --navy-line: #22305c;

  --blue: #389fd6;
  --blue-strong: #2b86bd;
  --blue-soft: rgba(56, 159, 214, 0.14);

  /* ---- theme tokens: DARK is the default (fallback + [data-theme="dark"]) ---- */
  --fg: #f4f6fc;
  --heading-fg: #dfe6f5;
  --ink: #eef2fb;
  --ink-2: #ccd6ee;
  --ink-3: #a7b3d2;
  --bg: #0b1020;
  --bg-alt: #0e1428;
  --card: #141c33;
  --line: #243052;
  --accent: #6cc4ef;
  --accent-soft: rgba(108, 196, 239, 0.14);
  --accent-border: rgba(108, 196, 239, 0.32);
  --accent-ink: #8fd0f5;

  --header-bg: rgba(7, 11, 22, 0.72);
  --header-bg-solid: rgba(7, 11, 22, 0.92);
  --header-fg: rgba(255, 255, 255, 0.85);
  --header-hover-fg: #ffffff;
  --header-line: rgba(255, 255, 255, 0.06);
  --menu-bg: rgba(11, 15, 30, 0.98);
  --menu-line: rgba(255, 255, 255, 0.1);
  --hover-bg: rgba(255, 255, 255, 0.08);
  --code-bg: #101731; /* code panels stay dark in both themes */
  --code-line: #22305c;
  --hero-grad: radial-gradient(
      900px 480px at 78% -10%,
      rgba(56, 159, 214, 0.28),
      transparent 60%
    ),
    radial-gradient(
      700px 420px at 8% 110%,
      rgba(43, 134, 189, 0.18),
      transparent 60%
    );
  --btn-toggle-bg: rgba(255, 255, 255, 0.08);
  --btn-toggle-line: rgba(255, 255, 255, 0.18);
  --btn-toggle-fg: #e6ebf7;
  --btn-toggle-hover-bg: rgba(255, 255, 255, 0.16);
  --btn-primary-bg: #2778ae;
  --btn-primary-hover-bg: #206894;

  --kbd-bg: linear-gradient(180deg, #182246 0%, #101731 100%);
  --kbd-fg: var(--ink);
  --kbd-border: rgba(255, 255, 255, 0.16);
  --kbd-border-b: rgba(255, 255, 255, 0.28);
  --kbd-shadow: 0 2px 0 rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.12);

  /* ---- fixed dark surfaces (hero / IDE section / CTA / footer) ---- */
  --fg-strong: #ffffff;
  --heading-bright: rgba(255, 255, 255, 0.9);
  --fg-muted: rgba(255, 255, 255, 0.86);
  --fg-dim: rgba(255, 255, 255, 0.79);
  --fg-faint: rgba(255, 255, 255, 0.7);
  --line-soft: rgba(255, 255, 255, 0.08);

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 30px rgba(16, 24, 58, 0.08);
  --shadow-lg: 0 24px 60px rgba(16, 24, 58, 0.16);

  --font:
    "IBM Plex Sans KR", "Apple SD Gothic Neo", "Malgun Gothic",
    "Noto Sans KR", system-ui, sans-serif;
  --mono:
    "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono",
    monospace;

  --header-h: 68px;
  --max-w: 1140px;
}

/* ---- light theme (applied via [data-theme="light"] or system) ---- */
:root[data-theme="light"] {
  --fg: #17203a;
  --heading-fg: #17203a;
  --ink: #17203a;
  --ink-2: #333d5e;
  --ink-3: #4d5772;
  --bg: #f5f7fc;
  --bg-alt: #eef2fa;
  --card: #ffffff;
  --line: #dfe5f2;
  --accent: #1f6fb0;
  --accent-soft: rgba(56, 159, 214, 0.1);
  --accent-border: rgba(56, 159, 214, 0.3);
  --accent-ink: #1c5f8a;

  --header-bg: rgba(255, 255, 255, 0.78);
  --header-bg-solid: rgba(255, 255, 255, 0.95);
  --header-fg: rgba(23, 32, 58, 0.82);
  --header-hover-fg: #17203a;
  --header-line: rgba(23, 32, 58, 0.08);
  --menu-bg: rgba(255, 255, 255, 0.98);
  --menu-line: rgba(23, 32, 58, 0.12);
  --hover-bg: rgba(23, 32, 58, 0.06);
  --code-bg: #101731; /* code panels stay dark in both themes */
  --code-line: #22305c;
  --hero-grad: radial-gradient(
      900px 480px at 78% -10%,
      rgba(56, 159, 214, 0.16),
      transparent 60%
    ),
    radial-gradient(
      700px 420px at 8% 110%,
      rgba(43, 134, 189, 0.1),
      transparent 60%
    );
  --btn-toggle-bg: rgba(23, 32, 58, 0.06);
  --btn-toggle-line: rgba(23, 32, 58, 0.14);
  --btn-toggle-fg: #17203a;
  --btn-toggle-hover-bg: rgba(23, 32, 58, 0.12);
  --btn-primary-bg: #389fd6;
  --btn-primary-hover-bg: #2b86bd;

  --kbd-bg: linear-gradient(180deg, #ffffff 0%, #edf2fa 100%);
  --kbd-fg: #17203a;
  --kbd-border: #cbd5e1;
  --kbd-border-b: #94a3b8;
  --kbd-shadow: 0 2px 0 rgba(15, 23, 42, 0.12), inset 0 1px 0 #ffffff;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --fg: #17203a;
    --heading-fg: #17203a;
    --ink: #17203a;
    --ink-2: #333d5e;
    --ink-3: #4d5772;
    --bg: #f5f7fc;
    --bg-alt: #eef2fa;
    --card: #ffffff;
    --line: #dfe5f2;
    --accent: #1f6fb0;
    --accent-soft: rgba(56, 159, 214, 0.1);
    --accent-border: rgba(56, 159, 214, 0.3);
    --accent-ink: #1c5f8a;

    --header-bg: rgba(255, 255, 255, 0.78);
    --header-bg-solid: rgba(255, 255, 255, 0.95);
    --header-fg: rgba(23, 32, 58, 0.82);
    --header-hover-fg: #17203a;
    --header-line: rgba(23, 32, 58, 0.08);
    --menu-bg: rgba(255, 255, 255, 0.98);
    --menu-line: rgba(23, 32, 58, 0.12);
    --hover-bg: rgba(23, 32, 58, 0.06);
    --code-bg: #101731;
    --code-line: #22305c;
    --hero-grad: radial-gradient(
        900px 480px at 78% -10%,
        rgba(56, 159, 214, 0.16),
        transparent 60%
      ),
      radial-gradient(
        700px 420px at 8% 110%,
        rgba(43, 134, 189, 0.1),
        transparent 60%
      );
    --btn-toggle-bg: rgba(23, 32, 58, 0.06);
    --btn-toggle-line: rgba(23, 32, 58, 0.14);
    --btn-toggle-fg: #17203a;
    --btn-toggle-hover-bg: rgba(23, 32, 58, 0.12);
    --btn-primary-bg: #389fd6;
    --btn-primary-hover-bg: #2b86bd;

    --kbd-bg: linear-gradient(180deg, #ffffff 0%, #edf2fa 100%);
    --kbd-fg: #17203a;
    --kbd-border: #cbd5e1;
    --kbd-border-b: #94a3b8;
    --kbd-shadow: 0 2px 0 rgba(15, 23, 42, 0.12), inset 0 1px 0 #ffffff;
  }
}

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

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

body {
  font-family: var(--font);
  color: var(--fg);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s ease, color 0.25s ease;
}

/* smooth theme switch, but only when the user toggles (JS adds .theme-anim) */
html.theme-anim body,
html.theme-anim .site-header,
html.theme-anim .site-nav a,
html.theme-anim .value-card,
html.theme-anim .section-alt,
html.theme-anim .check-list li,
html.theme-anim .steps li,
html.theme-anim .usage-facts,
html.theme-anim .media-card,
html.theme-anim .demo-player,
html.theme-anim kbd,
html.theme-anim .fd-points li::before,
html.theme-anim .fd-attention,
html.theme-anim .fd-attention::before,
html.theme-anim .fd-gallery-tab,
html.theme-anim .fd-gallery-thumb,
html.theme-anim .hero,
html.theme-anim .cta-band,
html.theme-anim .site-footer {
  transition: background-color 0.25s ease, color 0.25s ease,
    border-color 0.25s ease, box-shadow 0.25s ease;
}

img,
video {
  display: block;
  max-width: 100%;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: rgba(56, 159, 214, 0.1);
  border: 1px solid var(--accent-border);
  border-radius: 5px;
  padding: 0.08em 0.35em;
  color: var(--accent-ink);
}

kbd {
  display: inline-block;
  font-family: var(--mono), var(--font);
  font-size: 0.8em;
  font-weight: 600;
  line-height: 1.25;
  color: var(--kbd-fg);
  background: var(--kbd-bg);
  border: 1px solid var(--kbd-border);
  border-bottom: 2px solid var(--kbd-border-b);
  border-radius: 5px;
  padding: 2px 6px;
  margin: 0 2px;
  vertical-align: 0.08em;
  box-shadow: var(--kbd-shadow);
  white-space: nowrap;
}

/* ---------------- layout ---------------- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
}

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  max-width: 720px;
  margin: 0 auto 56px;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--heading-fg);
}

.section-sub {
  margin-top: 14px;
  color: var(--ink-3);
  font-size: 1.02rem;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  padding: 4px 14px;
  margin-bottom: 18px;
}

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease,
    background 0.12s ease, border-color 0.12s ease;
  text-decoration: none !important;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn-sm {
  font-size: 0.86rem;
  padding: 8px 14px;
}

.btn-lg {
  font-size: 1rem;
  padding: 14px 26px;
}

.btn-primary {
  background: var(--btn-primary-bg);
  color: #fff;
  box-shadow: 0 6px 18px rgba(56, 159, 214, 0.35);
}

.btn-primary:hover {
  background: var(--btn-primary-hover-bg);
  box-shadow: 0 8px 22px rgba(56, 159, 214, 0.45);
}

.btn.is-pending,
.btn.is-pending:hover {
  cursor: not-allowed;
  opacity: 0.7;
  background: var(--btn-primary-bg);
  box-shadow: none;
  transform: none;
}

.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.06);
}

/* ---------------- header ---------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--header-line);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.site-header.scrolled {
  background: var(--header-bg-solid);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--header-hover-fg);
  text-decoration: none !important;
}

.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 7px;
}

.brand-icon.sm {
  width: 26px;
  height: 26px;
  border-radius: 6px;
}

.brand-name {
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
}

.site-nav {
  display: flex;
  gap: 26px;
}

.site-nav a {
  color: var(--header-fg);
  font-size: 0.94rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.site-nav a:hover {
  color: var(--header-hover-fg);
  text-decoration: none;
}

/* Active indicator for top-level nav links */
.site-nav > a,
.nav-dropdown-toggle {
  position: relative;
  padding: 6px 0;
}

.site-nav > a::after,
.nav-dropdown-toggle::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transform: scaleX(0);
  opacity: 0;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
}

.site-nav > a.is-active::after,
.nav-dropdown.is-active .nav-dropdown-toggle::after {
  transform: scaleX(1);
  opacity: 1;
}

.site-nav > a.is-active,
.nav-dropdown.is-active .nav-dropdown-toggle {
  color: var(--header-hover-fg);
  font-weight: 600;
}

/* Nav "Features" dropdown (desktop) */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-dropdown-toggle .caret {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transition: transform 0.15s ease;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: -14px;
  min-width: 172px;
  display: grid;
  background: var(--menu-bg);
  border: 1px solid var(--menu-line);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

/* hover bridge so the pointer can travel from toggle to menu */
.nav-dropdown-menu::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}

.nav-dropdown-menu a {
  padding: 10px 12px;
  border-radius: 7px;
  font-size: 0.92rem;
  white-space: nowrap;
  color: var(--header-fg);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-dropdown-menu a:hover {
  background: var(--hover-bg);
  color: var(--header-hover-fg);
}

.nav-dropdown-menu a.is-active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.nav-dropdown:hover .caret,
.nav-dropdown:focus-within .caret {
  transform: rotate(-135deg) translateY(-1px);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* theme toggle button */
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 9px;
  border: 1px solid var(--btn-toggle-line);
  background: var(--btn-toggle-bg);
  color: var(--btn-toggle-fg);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease,
    transform 0.1s ease;
}

.theme-toggle:hover {
  background: var(--btn-toggle-hover-bg);
}

.theme-toggle:active {
  transform: scale(0.94);
}

.theme-toggle svg {
  width: 19px;
  height: 19px;
  display: block;
}

/* default (dark theme) shows a moon (click → light) */
.theme-toggle .icon-sun {
  display: none;
}

/* light theme shows a sun (click → dark) */
:root[data-theme="light"] .theme-toggle .icon-moon {
  display: none;
}

:root[data-theme="light"] .theme-toggle .icon-sun {
  display: block;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-toggle .icon-moon {
    display: none;
  }

  :root:not([data-theme="dark"]) .theme-toggle .icon-sun {
    display: block;
  }
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--header-hover-fg);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------------- hero ---------------- */
.hero {
  position: relative;
  background: var(--navy-950);
  color: #fff;
  padding: calc(var(--header-h) + 84px) 0 96px;
  overflow: hidden;
  border-bottom: 1px solid var(--navy-line);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      900px 480px at 78% -10%,
      rgba(56, 159, 214, 0.28),
      transparent 60%
    ),
    radial-gradient(
      700px 420px at 8% 110%,
      rgba(43, 134, 189, 0.18),
      transparent 60%
    );
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.3rem);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.025em;
  color: var(--heading-bright);
}

.hero h1 .accent {
  color: var(--blue);
}

.hero .eyebrow {
  /* The hero remains dark in both themes, so it needs a fixed light accent. */
  color: #6cc4ef;
  background: rgba(108, 196, 239, 0.14);
  border-color: rgba(108, 196, 239, 0.32);
}

.hero .lead {
  margin-top: 22px;
  font-size: 1.06rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.88);
  max-width: 54ch;
}

.hero .lead a {
  color: #6cc4ef;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}


.hero-note {
  margin-top: 18px;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.72);
}

.hero-note a {
  color: rgba(255, 255, 255, 0.92);
  border-bottom: 1px dotted rgba(255, 255, 255, 0.55);
}

.hero-disclaimer {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.8rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.75);
}

.hero-disclaimer a,
.footer-disclaimer a {
  color: currentColor;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.45);
  text-underline-offset: 2px;
}

.hero-disclaimer a:hover,
.footer-disclaimer a:hover {
  color: #fff;
}

/* hero screenshot */
.hero-visual {
  position: relative;
}

.hero-shot {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--navy-line);
  box-shadow: var(--shadow-lg);
}

.dot,
.cp-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex: none;
}

.dot.r,
.cp-dot.r {
  background: #ff5f57;
}

.dot.y,
.cp-dot.y {
  background: #febc2e;
}

.dot.g,
.cp-dot.g {
  background: #28c840;
}

.ln {
  display: inline-block;
  width: 2ch;
  margin-right: 10px;
  color: rgba(255, 255, 255, 0.38);
  user-select: none;
}

.tag {
  color: #7fb8e8;
}

.attr {
  color: #9fb3d9;
}

.str {
  color: #96d3a0;
}

.str.hl {
  color: #ffd479;
  background: rgba(255, 212, 121, 0.12);
  border-radius: 3px;
}

.str.hl2 {
  color: #ffd479;
}

.js {
  color: #c8d4f2;
}

.kw {
  color: #c792ea;
}

.fn {
  color: #82d9ff;
}

.obj {
  color: #ffd479;
}

.cm {
  color: rgba(255, 255, 255, 0.52);
  font-style: italic;
}

/* ---------------- value cards (overview links) ---------------- */
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.value-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 26px 24px;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--line);
  text-decoration: none !important;
  transition: transform 0.15s ease, border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.value-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-border);
  box-shadow: var(--shadow);
}

.value-card:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.value-ico {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  border: 1px solid var(--accent-border);
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent);
}

.value-ico svg {
  display: block;
  width: 38px;
  height: 38px;
}

.value-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.value-card p {
  font-size: 0.92rem;
  color: var(--ink-3);
  line-height: 1.7;
}

.value-go {
  display: inline-block;
  margin-top: auto;
  padding-top: 20px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--accent);
}

.scope-more {
  margin-top: 28px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--ink-3);
}

/* ---------------- fd-row: alternating feature showcase rows ---------------- */

/*
 * Each fd-row is a full-width two-column strip:
 *   fd-media  — screenshot / video (wider side)
 *   fd-copy   — heading + description + bullet points (narrower side)
 * Even feature rows put the screenshot on the right automatically.
 */

.fd-row {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 64px;
  align-items: center;
  padding: 56px 0;
  border-bottom: 1px solid var(--line);
}

.fd-row:last-child {
  border-bottom: none;
}

/* Count feature rows only, so new rows automatically follow the pattern. */
.fd-row:nth-child(even of .fd-row) {
  grid-template-columns: 0.85fr 1.15fr;
}

.fd-row:nth-child(even of .fd-row) .fd-media { order: 2; }
.fd-row:nth-child(even of .fd-row) .fd-copy  { order: 1; }

/* ---- screenshot area ---- */
.fd-media {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.fd-shot-wrap {
  position: relative;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
  background: var(--bg-alt);
}

.fd-shot {
  display: block;
  width: 100%;
  height: auto;
}

.fd-shot-wrap figcaption {
  padding: 7px 12px 9px;
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--ink-3);
  text-align: left;
  border-top: 1px solid var(--line);
  background: var(--bg-alt);
}

/* The tall Structure panel is a compact preview; the dialog shows it larger. */
#ide-structure .fd-shot-wrap {
  width: min(100%, 320px, 32.94vh);
  width: min(100%, 320px, 32.94dvh);
  justify-self: center;
}

/* Multiple screenshots become a compact, selectable gallery. */
.fd-gallery {
  gap: 12px;
}

.fd-gallery-stage {
  display: grid;
  min-width: 0;
  background: var(--bg-alt);
}

.fd-gallery-stage > .fd-shot-wrap {
  grid-area: 1 / 1;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  align-self: stretch;
  opacity: 1;
  transition: opacity 0.22s ease;
}

/* Keep every caption in the shared grid's sizing calculation. Hidden
   slides cannot be seen or interacted with, but still reserve their space. */
.fd-gallery-stage > .fd-shot-wrap[hidden] {
  display: grid !important;
  visibility: hidden;
  pointer-events: none;
  opacity: 0;
}

.fd-gallery-viewport {
  position: relative;
  aspect-ratio: 16 / 9;
  min-width: 0;
  overflow: hidden;
  background: var(--code-bg);
}

.fd-gallery-stage > .fd-shot-wrap .fd-shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  background: var(--bg-alt);
}

.fd-gallery-stage > .fd-shot-wrap.fd-shot-missing {
  display: grid;
  aspect-ratio: auto;
  gap: 0;
}

.fd-gallery-stage > .fd-shot-wrap.fd-shot-missing::before {
  position: absolute;
  top: 24px;
  left: 24px;
}

.fd-gallery-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.fd-gallery-tab {
  appearance: none;
  position: relative;
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px 12px 8px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--ink-3);
  font: inherit;
  font-size: 0.76rem;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s ease, background-color 0.2s ease,
    color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.fd-gallery-tab:hover {
  border-color: var(--accent-border);
  color: var(--heading-fg);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.fd-gallery-tab[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--heading-fg);
  box-shadow: 0 0 0 1.5px var(--accent), 0 4px 14px rgba(56, 159, 214, 0.18);
  transform: translateY(-2px);
}

/* Active bottom indicator bar */
.fd-gallery-tab::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2.5px;
  background: var(--accent);
  opacity: 0;
  transform: scaleX(0.4);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.fd-gallery-tab[aria-pressed="true"]::before {
  opacity: 1;
  transform: scaleX(1);
}

.fd-gallery-tab:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.fd-gallery-thumb {
  display: block;
  width: 66px;
  height: 44px;
  border-radius: 5px;
  object-fit: cover;
  background: var(--code-bg);
  border: 1px solid var(--line);
  opacity: 0.72;
  filter: saturate(0.75);
  transition: opacity 0.2s ease, filter 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.fd-gallery-tab:hover .fd-gallery-thumb {
  opacity: 0.9;
  filter: saturate(0.95);
  border-color: var(--accent-border);
}

.fd-gallery-tab[aria-pressed="true"] .fd-gallery-thumb {
  opacity: 1;
  filter: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.fd-gallery-tab-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.fd-gallery-index {
  flex: 0 0 auto;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  transition: color 0.2s ease;
}

.fd-gallery-tab:hover .fd-gallery-index {
  color: var(--heading-fg);
}

.fd-gallery-tab[aria-pressed="true"] .fd-gallery-index {
  color: var(--accent);
}

.fd-gallery-label {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-weight: 500;
  transition: color 0.2s ease;
}

.fd-gallery-tab[aria-pressed="true"] .fd-gallery-label {
  font-weight: 600;
  color: var(--heading-fg);
}

/* Missing image state — shown via JS onerror */
.fd-shot-wrap.fd-shot-missing {
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px dashed var(--accent-border);
  background: var(--accent-soft);
}

.fd-shot-wrap.fd-shot-missing img {
  display: none;
}

.fd-shot-wrap.fd-shot-missing::before {
  content: "스크린샷 준비 중";
  font-size: 0.88rem;
  color: var(--ink-3);
}

.fd-shot-wrap.fd-shot-missing figcaption {
  display: none;
}

/* dark-section variant */
.fd-shot-wrap-dark {
  border-color: var(--navy-line);
  background: var(--navy-800);
}

.fd-shot-wrap-dark figcaption {
  border-top-color: var(--navy-line);
  background: var(--navy-700);
  color: rgba(255, 255, 255, 0.72);
}

/* ---- copy area ---- */
.fd-copy {
  display: flex;
  flex-direction: column;
}

.fd-num {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 10px;
  user-select: none;
}

.fd-copy h3 {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: var(--heading-fg);
  margin-bottom: 14px;
}

.fd-copy p {
  color: var(--ink-3);
  line-height: 1.8;
  font-size: 0.97rem;
}

.fd-copy p + p {
  margin-top: 10px;
}

.fd-points {
  list-style: none;
  display: grid;
  gap: 9px;
  margin-top: 20px;
  padding: 0;
}

.fd-points li {
  position: relative;
  padding-left: 22px;
  font-size: 0.88rem;
  color: var(--ink-3);
  line-height: 1.65;
  transition: color 0.15s ease;
}

.fd-points li:hover {
  color: var(--heading-fg);
}

.fd-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3em;
  width: 14px;
  height: 14px;
  background-color: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3.5 8.5 6.5 11.5 12.5 4.5'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3.5 8.5 6.5 11.5 12.5 4.5'/%3E%3C/svg%3E") no-repeat center / contain;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.fd-points li:hover::before {
  transform: scale(1.15);
}

/* Supplementary notices associated with feature copy (rather than features themselves). */
.fd-attention {
  list-style: none;
  position: relative;
  margin-top: 22px;
  padding: 15px 18px 15px 46px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-left: 3.5px solid var(--accent);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.fd-attention::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 17px;
  width: 17px;
  height: 17px;
  background-color: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='10' cy='10' r='8'/%3E%3Cline x1='10' y1='9' x2='10' y2='14'/%3E%3Ccircle cx='10' cy='6' r='1' fill='black' stroke='none'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='10' cy='10' r='8'/%3E%3Cline x1='10' y1='9' x2='10' y2='14'/%3E%3Ccircle cx='10' cy='6' r='1' fill='black' stroke='none'/%3E%3C/svg%3E") no-repeat center / contain;
}

.fd-attention li {
  color: var(--ink-2);
  font-size: 0.86rem;
  line-height: 1.7;
}

.fd-attention-title {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--heading-fg);
  margin-bottom: 4px;
}

.fd-attention a {
  color: var(--accent);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.fd-attention a:hover {
  color: var(--header-hover-fg);
}

.fd-footnote-ref {
  border-bottom: 1px dotted currentColor;
  white-space: nowrap;
}

.fd-footnote-ref sup {
  margin-left: 2px;
  color: var(--accent);
  font-size: 0.72em;
  font-weight: 700;
}

/* Legacy: keep .feature-story-grid if referenced elsewhere */
.feature-story-grid {
  margin-bottom: 56px;
}



/* code panel */
.code-panel {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--navy-800);
  border: 1px solid var(--navy-line);
  box-shadow: var(--shadow-lg);
}

.code-panel-head {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 16px;
  background: var(--navy-700);
  border-bottom: 1px solid var(--navy-line);
}

.cp-file {
  margin-left: 10px;
  font-family: var(--mono);
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.7);
}

.code-block {
  margin: 0;
  padding: 20px 18px;
  overflow-x: auto;
}

.code-block code {
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.85;
  background: none;
  border: 0;
  padding: 0;
  color: #c8d4f2;
  white-space: pre;
}

.code-note {
  padding: 14px 18px 18px;
  border-top: 1px solid var(--navy-line);
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
  background: rgba(11, 15, 30, 0.5);
}

.code-note code {
  color: #8fd0f5;
  background: rgba(143, 208, 245, 0.12);
  border-color: rgba(143, 208, 245, 0.25);
}

.note-good {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-right: 6px;
  border-radius: 50%;
  background: rgba(150, 211, 160, 0.2);
  color: #96d3a0;
  font-size: 0.72rem;
}

/* ---------------- media ---------------- */
.media-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.media-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.media-card figcaption {
  padding: 14px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  color: var(--ink-2);
}

.media-card video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-placeholder {
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background:
    linear-gradient(135deg, var(--navy-800), var(--navy-700));
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
}

.vp-play {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(56, 159, 214, 0.2);
  border: 1px solid rgba(56, 159, 214, 0.5);
  color: var(--blue);
  font-size: 1rem;
  padding-left: 4px;
}

/* ---------------- demo video ---------------- */
.demo-player {
  max-width: 960px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.demo-poster {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  aspect-ratio: 16 / 9;
  background: #000;
  color: #fff;
  cursor: pointer;
}

.demo-poster img,
.demo-player video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.demo-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.16);
  transition: background 0.18s ease;
}

.demo-poster:hover::after,
.demo-poster:focus-visible::after {
  background: rgba(0, 0, 0, 0.32);
}

.demo-poster:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
}

.demo-play,
.demo-poster-label {
  position: absolute;
  z-index: 1;
  left: 50%;
  transform: translateX(-50%);
}

.demo-play {
  top: calc(50% - 28px);
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  padding-left: 4px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  background: rgba(5, 21, 40, 0.78);
  font-size: 1.25rem;
}

.demo-poster-label {
  top: calc(50% + 48px);
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: rgba(5, 21, 40, 0.82);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.demo-player video {
  display: block;
  aspect-ratio: 16 / 9;
  background: #000;
}

.demo-options {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  color: var(--ink-2);
}

.demo-options label {
  font-size: 0.9rem;
  font-weight: 700;
}

.demo-quality {
  padding: 7px 30px 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 0.88rem;
}

.demo-options p {
  margin: 0 0 0 auto;
  font-size: 0.82rem;
  color: var(--ink-3);
}

/* ---------------- install steps ---------------- */
.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 20px;
  max-width: 760px;
  margin: 0 auto;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 22px 24px 22px 74px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 24px;
  top: 24px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
}

.steps h3 {
  font-size: 1.02rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.steps p {
  font-size: 0.92rem;
  color: var(--ink-3);
  line-height: 1.7;
}

.install-note {
  max-width: 760px;
  margin: 28px auto 0;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  font-size: 0.9rem;
  color: var(--ink-2);
}

/* ---------------- usage notes ---------------- */
.usage-facts {
  max-width: 980px;
  margin: 0 auto;
  background: linear-gradient(145deg, var(--accent-soft), transparent 65%), var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(24px, 3vw, 36px);
  min-width: 0;
}

.usage-facts h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.usage-facts ul {
  list-style: none;
  display: grid;
  gap: 20px;
}

.usage-facts li {
  font-size: 0.88rem;
  color: var(--ink-3);
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.usage-facts li + li {
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.usage-facts strong {
  color: var(--ink);
  font-size: 0.94rem;
}

.usage-facts a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------------- cta band ---------------- */
.cta-band {
  position: relative;
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(56, 159, 214, 0.25), transparent 70%),
    var(--navy-950);
  color: #fff;
  text-align: center;
  padding: 88px 0;
  border-top: 1px solid var(--navy-line);
}

.cta-band h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--heading-bright);
}

.cta-band .container {
  position: relative;
  z-index: 1;
}

.cta-band p {
  margin: 14px 0 30px;
  color: rgba(255, 255, 255, 0.85);
}

/* ---------------- footer ---------------- */
.site-footer {
  position: relative;
  background: #05080f;
  color: rgba(255, 255, 255, 0.75);
  padding: 64px 0 32px;
  border-top: 1px solid var(--navy-line);
}

:root[data-theme="light"] .site-footer {
  border-top: 1px solid var(--line);
  box-shadow: 0 -10px 28px rgba(16, 24, 58, 0.06);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .site-footer {
    border-top: 1px solid var(--line);
    box-shadow: 0 -10px 28px rgba(16, 24, 58, 0.06);
  }
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand {
  display: grid;
  gap: 12px;
  justify-items: start;
}

.footer-brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-desc {
  font-size: 0.92rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.88);
  max-width: 34ch;
}

.footer-disclaimer {
  display: block;
  max-width: 34ch;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.8rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.56);
}

.footer-col {
  display: grid;
  gap: 10px;
  justify-items: start;
  align-content: start;
}

.footer-col h4 {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  margin-bottom: 6px;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.92rem;
}

.footer-col a:hover {
  color: #fff;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer-link-icon {
  display: inline-grid;
  width: 1.1rem;
  height: 1.1rem;
  flex: 0 0 auto;
  place-items: center;
  color: var(--accent);
}

.footer-link-icon svg {
  width: 100%;
  height: 100%;
}

.footer-link-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.footer-link-icon-inswave {
  width: 1.25rem;
  height: 1.25rem;
  padding: 2px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.92);
}

.footer-legal {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 24px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.62);
}

/* ---------------- reveal animation ---------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .fd-gallery-tab {
    transition: none;
  }
}

/* ---------------- responsive ---------------- */
@media (max-width: 1020px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero-copy {
    max-width: 640px;
  }

  .media-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .values-grid {
    grid-template-columns: 1fr;
  }

  /* fd-row: collapse to single column on tablet */
  .fd-row,
  .fd-row:nth-child(even of .fd-row) {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 40px 0;
  }

  /* always: media goes first, copy below */
  .fd-row:nth-child(even of .fd-row) .fd-media { order: 1; }
  .fd-row:nth-child(even of .fd-row) .fd-copy  { order: 2; }

}

@media (max-width: 860px) {
  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--menu-bg);
    border-bottom: 1px solid var(--header-line);
    padding: 10px 24px 18px;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.18s ease, opacity 0.18s ease,
      visibility 0.18s;
  }

  .site-nav.open {
    transform: none;
    opacity: 1;
    visibility: visible;
  }

  .site-nav a {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 1rem;
  }

  .site-nav a:last-child {
    border-bottom: 0;
  }

  .site-nav > a::after,
  .nav-dropdown-toggle::after {
    display: none;
  }

  .site-nav a.is-active,
  .nav-dropdown.is-active .nav-dropdown-toggle {
    color: var(--accent);
    font-weight: 600;
  }

  /* Nav "Features" dropdown expands as an indented sub-list on mobile */
  .nav-dropdown-toggle {
    font-size: 1rem;
  }

  .nav-dropdown-toggle .caret {
    display: none;
  }

  .nav-dropdown-menu {
    position: static;
    min-width: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: transparent;
    border: 0;
    padding: 0 0 2px 16px;
    box-shadow: none;
  }

  .nav-dropdown-menu::before {
    display: none;
  }

  .nav-dropdown-menu a {
    padding: 9px 0;
    font-size: 0.94rem;
    color: var(--header-fg);
  }

  .nav-dropdown-menu a:hover {
    background: transparent;
    color: var(--header-hover-fg);
  }

  .nav-toggle {
    display: flex;
  }

  .section {
    padding: 72px 0;
  }
}

@media (max-width: 560px) {
  .media-grid {
    grid-template-columns: 1fr;
  }

  .demo-options {
    flex-wrap: wrap;
    gap: 8px 10px;
  }

  .demo-options p {
    flex-basis: 100%;
    margin-left: 0;
  }

  .hero {
    padding-top: calc(var(--header-h) + 56px);
  }

  .hero-br {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-legal {
    flex-direction: column;
  }
}

/* ---------------- Cloudflare Pages 404 ---------------- */
/* (not used — 404.html reuses the same stylesheet) */
.notfound {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--navy-950);
  color: #fff;
  text-align: center;
  padding: 24px;
}

.notfound h1 {
  font-size: 4rem;
  color: var(--blue);
}

.notfound p {
  margin: 12px 0 28px;
  color: rgba(255, 255, 255, 0.8);
}

/* Full-size screenshot layer, independent of the gallery layout. */
.fd-shot[role="button"] {
  cursor: zoom-in;
}

.fd-shot[role="button"]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -4px;
}

html.screenshot-preview-open {
  overflow: hidden;
}

.screenshot-preview {
  box-sizing: border-box;
  width: min(1440px, 96vw);
  max-width: 96vw;
  max-height: 94vh;
  max-height: 94dvh;
  margin: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-alt);
  color: var(--ink-3);
  box-shadow: var(--shadow-lg);
  overflow: auto;
}

.screenshot-preview::backdrop {
  background: rgba(0, 0, 0, 0.82);
}

.screenshot-preview[open] {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.screenshot-preview-close,
.screenshot-preview-step {
  align-self: flex-end;
  flex-shrink: 0;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  color: var(--heading-fg);
  font: inherit;
  cursor: pointer;
}

.screenshot-preview-close:focus-visible,
.screenshot-preview-step:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.screenshot-preview-viewport {
  position: relative;
  height: 68vh;
  height: 68dvh;
  flex-shrink: 0;
  overflow: hidden;
}

.screenshot-preview-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.screenshot-preview-caption {
  margin: 0;
  text-align: center;
  font-size: 0.85rem;
}

.screenshot-preview-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.screenshot-preview-toolbar > .screenshot-preview-close {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
}

.screenshot-preview-navigation {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.screenshot-preview-navigation[hidden] {
  display: none;
}

.screenshot-preview-counter {
  min-width: 5ch;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.screenshot-preview-step:hover {
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 480px) {
  .screenshot-preview-toolbar > .screenshot-preview-close {
    grid-column: 1 / -1;
  }

  .screenshot-preview-navigation {
    grid-row: 2;
  }
}
