/* Layout: centered hero over a full Library window; then feature blocks in the Codex pattern
   (heading + short copy, then a wide gradient panel with a cropped UI and one floating card). */
:root {
  --bg: #f7f8fa;
  --ink: #1f2125;
  --muted: #5d626c;
  --line: rgba(31, 33, 37, 0.11);
  --accent: #2f6bff;
  --on-accent: #ffffff;
  --dot: #4f8cff;
  /* gradient panels */
  --panel: #e3eafb;
  --g1: rgba(79, 140, 255, 0.55);
  --g2: rgba(150, 182, 255, 0.7);
  --g3: rgba(38, 40, 44, 0.14);
  /* app UI inside panels (macOS light) */
  --win: #ffffff;
  --win-side: #f2f3f5;
  --win-bar: #ececee;
  --win-line: rgba(0, 0, 0, 0.09);
  --ui-ink: rgba(0, 0, 0, 0.85);
  --ui-muted: rgba(0, 0, 0, 0.5);
  --well: rgba(0, 0, 0, 0.045);
  --hl: rgba(47, 107, 255, 0.24);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Apple SD Gothic Neo", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111215; --ink: #f2f3f5; --muted: #9ba0aa; --line: rgba(255, 255, 255, 0.1);
    --accent: #4f8cff; --on-accent: #0c1424; --dot: #4f8cff;
    --panel: #151a24; --g1: rgba(47, 107, 255, 0.5); --g2: rgba(79, 140, 255, 0.22); --g3: rgba(255, 255, 255, 0.05);
    --win: #232529; --win-side: #1c1e21; --win-bar: #2a2c30; --win-line: rgba(255, 255, 255, 0.09);
    --ui-ink: rgba(255, 255, 255, 0.88); --ui-muted: rgba(255, 255, 255, 0.52); --well: rgba(255, 255, 255, 0.05); --hl: rgba(79, 140, 255, 0.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111215; --ink: #f2f3f5; --muted: #9ba0aa; --line: rgba(255, 255, 255, 0.1);
  --accent: #4f8cff; --on-accent: #0c1424; --dot: #4f8cff;
  --panel: #151a24; --g1: rgba(47, 107, 255, 0.5); --g2: rgba(79, 140, 255, 0.22); --g3: rgba(255, 255, 255, 0.05);
  --win: #232529; --win-side: #1c1e21; --win-bar: #2a2c30; --win-line: rgba(255, 255, 255, 0.09);
  --ui-ink: rgba(255, 255, 255, 0.88); --ui-muted: rgba(255, 255, 255, 0.52); --well: rgba(255, 255, 255, 0.05); --hl: rgba(79, 140, 255, 0.35);
  color-scheme: dark;
}

body { background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
:root:lang(ko) body { word-break: keep-all; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.wrap {
  max-width: 1120px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.brand svg { width: 26px; height: 26px; color: var(--ink); }
.wordmark { font-weight: 600; font-size: 20px; letter-spacing: -0.04em; }
.nav { display: flex; align-items: center; gap: 22px; font-size: 14px; color: var(--muted); }
.nav a { text-decoration: none; }
.nav a:hover { color: var(--ink); }
.lang { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.lang a { font-size: 13px; color: var(--muted); padding: 4px 10px; }
.lang a[aria-current="page"] { background: var(--ink); color: var(--bg); font-weight: 600; }
@media (max-width: 720px) { .nav .sec { display: none; } }

/* Hero */
.hero { text-align: center; padding-block: 64px 48px; display: grid; justify-items: center; }
.icon { width: 88px; height: 88px; margin-bottom: 28px; filter: drop-shadow(0 10px 24px rgba(20, 30, 60, 0.22)); }
.icon .dot { animation: drop 460ms cubic-bezier(.3, 1.45, .5, 1) 300ms both; transform-box: fill-box; transform-origin: center; }
@keyframes drop { from { transform: translateY(-280%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .icon .dot { animation: none; } }
h1 { font-size: clamp(36px, 6vw, 68px); line-height: 1.06; letter-spacing: -0.035em; font-weight: 700; margin: 0 0 20px; }
h1 .line { display: block; }
:root:lang(ko) h1 { letter-spacing: -0.025em; line-height: 1.16; }
h1 .dotmark { color: var(--dot); }
.lede { font-size: 19px; color: var(--muted); max-width: 32em; margin: 0 0 32px; text-wrap: balance; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  background: var(--ink); color: var(--bg); font-weight: 600; font-size: 16px; padding: 14px 24px; border-radius: 999px;
}
.btn:hover { opacity: 0.88; }
.btn svg { width: 18px; height: 18px; }
.meta { margin: 16px 0 0; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.meta a { color: var(--muted); }

/* Gradient panel that frames each UI crop */
.panel {
  position: relative; overflow: hidden; border-radius: 28px; aspect-ratio: 16 / 9; width: 100%;
  background-color: var(--panel);
  background-image:
    radial-gradient(55% 75% at 12% 0%, var(--g1), transparent 70%),
    radial-gradient(55% 80% at 100% 100%, var(--g2), transparent 70%),
    radial-gradient(35% 55% at 88% 6%, var(--g3), transparent 70%);
  font-size: clamp(11px, 1.35vw, 15px); line-height: 1.35; color: var(--ui-ink); text-align: left;
}
.panel.tall { aspect-ratio: 16 / 9.6; }
.win {
  position: absolute; background: var(--win); border-radius: 14px; overflow: hidden;
  box-shadow: 0 0 0 1px var(--win-line), 0 30px 60px -20px rgba(15, 25, 60, 0.35);
}
.float {
  position: absolute; background: var(--win); border-radius: 16px; padding: 1.1em 1.25em;
  box-shadow: 0 0 0 1px var(--win-line), 0 24px 50px -12px rgba(15, 25, 60, 0.4);
}
.bar { display: flex; align-items: center; gap: 0.5em; height: 2.6em; padding: 0 1em; background: var(--win-bar); border-bottom: 1px solid var(--win-line); }
.lights { display: flex; gap: 0.45em; }
.lights i { width: 0.8em; height: 0.8em; border-radius: 50%; background: #ff5f57; }
.lights i:nth-child(2) { background: #febc2e; }
.lights i:nth-child(3) { background: #28c840; }
.muted { color: var(--ui-muted); }
.mono { font-family: var(--mono); }
.kbd { display: inline-grid; place-items: center; min-width: 2.2em; height: 2.2em; padding: 0 0.5em; border-radius: 0.45em; background: var(--well); box-shadow: inset 0 -2px 0 var(--win-line); font-family: var(--mono); font-weight: 500; font-size: 1.15em; }
:root[data-theme="dark"] .ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Real screenshots inside the panels. Region captures keep a sliver of desktop at the window corners,
   so the image gets the window's own corner radius. */
.shot { position: absolute; display: block; max-width: none; height: auto; border-radius: 1.3% / 2.3%;
  box-shadow: 0 0 0 1px var(--win-line), 0 30px 60px -20px rgba(15, 25, 60, 0.4); }
.shot.lone { border-radius: 2.4% / 2%; }
.hero-shot { left: 6%; top: 8%; width: 96%; }

/* Sections */
section { padding-block: 96px 24px; }
.sec-head { text-align: center; display: grid; justify-items: center; margin-bottom: 56px; }
h2 { font-size: clamp(30px, 4vw, 46px); line-height: 1.1; letter-spacing: -0.03em; margin: 0 0 14px; text-wrap: balance; }
.sec-head p { color: var(--muted); max-width: 36em; margin: 0; font-size: 18px; }

/* Feature rows alternate image | text and text | image. */
.feats { display: grid; gap: 96px; }
.feat { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px; align-items: center; }
.feat:nth-child(even) { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.feat:nth-child(even) .media { order: 2; }
.feat .copy { display: grid; gap: 16px; padding-inline: 24px; }
.feat h3 { font-size: clamp(24px, 2.6vw, 32px); line-height: 1.2; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
.feat p { margin: 0; color: var(--muted); font-size: 17px; }
.feat p kbd { font-family: var(--mono); font-size: 0.9em; color: var(--ink); }
.media { aspect-ratio: 6 / 5; }
.f-keys { left: 6%; top: 7%; display: grid; gap: 0.7em; justify-items: start; font-size: clamp(11px, 1.2vw, 14px); }
.f-keys .keys { display: flex; gap: 0.35em; }
.s-textedit { left: 30%; top: 5%; width: 78%; }
.s-popup { left: 7%; top: 33%; width: 42%; box-shadow: 0 0 0 1px var(--win-line), 0 34px 70px -14px rgba(15, 25, 60, 0.5); }
.s-filter { left: -16%; top: 6%; width: 150%; }
.s-fmt { left: -62%; top: 5%; width: 172%; }
.s-edit { left: -16%; top: 6%; width: 150%; }

/* Files + privacy */
.split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 56px; align-items: center; }
.panel.square { aspect-ratio: 5 / 4; }
.finder { left: 7%; top: 12%; right: -6%; bottom: 14%; display: grid; grid-template-rows: auto 1fr; }
.cols { display: grid; grid-template-columns: 1fr 1.35fr 0.9fr; font-size: 0.92em; min-height: 0; }
.cols > div { border-right: 1px solid var(--win-line); padding: 0.5em; display: grid; gap: 0.1em; align-content: start; min-width: 0; }
.cols .f { padding: 0.3em 0.5em; border-radius: 0.35em; display: flex; gap: 0.45em; align-items: center; }
.cols .f.sel { background: var(--hl); }
.cols svg { width: 1.05em; height: 1.05em; flex: none; }
.f-json { left: 14%; bottom: 6%; width: 60%; font-family: var(--mono); font-size: 0.82em; line-height: 1.55; white-space: pre; padding: 1em 1.2em; overflow: hidden; }
.j-k { color: var(--accent); }
.checks { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 20px; }
.checks li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; }
.checks svg { width: 20px; height: 20px; margin-top: 2px; color: var(--accent); }
.checks b { display: block; }
.checks span { color: var(--muted); font-size: 15px; }
.split h2 { text-align: left; }

/* Permissions + install */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; }
table { border-collapse: collapse; width: 100%; min-width: 620px; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 16px 20px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
th { font-size: 12px; font-weight: 600; color: var(--muted); }
td:first-child { font-weight: 600; white-space: nowrap; }
td .where { font-size: 13px; color: var(--muted); margin-top: 4px; }
td code, .steps code, .note code { font-family: var(--mono); font-size: 0.88em; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.steps li { counter-increment: s; display: grid; gap: 6px; align-content: start; }
.steps li::before { content: counter(s); font-family: var(--mono); font-size: 13px; font-weight: 600; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--bg); margin-bottom: 6px; }
.steps span { color: var(--muted); font-size: 15px; }
.note { margin: 40px auto 0; display: grid; gap: 8px; color: var(--muted); font-size: 15px; max-width: 46em; text-align: center; }
.note b { color: var(--ink); }

.closing { text-align: center; padding-block: 120px 96px; display: grid; justify-items: center; }
.closing svg.icon { width: 64px; height: 64px; margin-bottom: 20px; }

footer { border-top: 1px solid var(--line); padding-block: 28px 44px; font-size: 14px; color: var(--muted); }
footer .row2 { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: center; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--ink); text-decoration: underline; }

@media (max-width: 880px) {
  .feat, .feat:nth-child(even), .split { grid-template-columns: 1fr; }
  .feat:nth-child(even) .media { order: 0; }
  .feat { gap: 8px; }
  .feat .copy { padding-inline: 4px; }
  .split { gap: 32px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .hero { padding-block: 32px 32px; }
  section { padding-block: 72px 16px; }
  .feats { gap: 64px; }
  .panel, .panel.tall, .panel.square { border-radius: 20px; font-size: 12px; }
  .panel.tall { aspect-ratio: 4 / 3; }
  .hero-shot { left: 5%; width: 150%; }
  .media { aspect-ratio: 1 / 1; }
  .s-textedit { left: 18%; width: 100%; }
  .s-popup { left: 5%; top: 30%; width: 58%; }
  .f-keys { display: none; }
  .finder { right: -45%; }
  .f-json { left: 8%; width: 84%; }
  .steps { grid-template-columns: 1fr; }
}
