/* The settings page's Liquid dark theme: frosted glass over a slow chili-red flow (liquid.js). */
:root {
  color-scheme: dark;
  --bg: #0b0b0f;
  --surface: linear-gradient(160deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.045) 40%, rgba(255, 255, 255, 0.035));
  --surface-2: rgba(255, 255, 255, 0.07);
  --surface-3: rgba(255, 255, 255, 0.16);
  --inset: rgba(0, 0, 0, 0.28);
  --border: rgba(255, 255, 255, 0.12);
  --text: #ffffff;
  --muted: #a1a1aa;
  --faint: rgba(161, 161, 170, 0.6);
  --accent: #ff4d2e;
  --accent-soft: rgba(255, 77, 46, 0.2);
  --accent-soft-fg: #ffb09e;
  --glow: 0 8px 24px -8px rgba(255, 77, 46, 0.8);
  --glow-big: 0 14px 40px -10px rgba(255, 77, 46, 0.9);
  --blur: blur(28px) saturate(170%);
  --shadow-card: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 30px 60px -30px rgba(0, 0, 0, 0.8);
  --rim: linear-gradient(135deg, rgba(255, 255, 255, 0.5), transparent 35%, transparent 70%, rgba(255, 255, 255, 0.16));
  --h-fill: linear-gradient(100deg, #fff 30%, #ffd9cf 60%, #ff8a6b 95%);
  --del: #ff8a84;
  --del-bg: rgba(248, 81, 73, 0.12);
  --del-sign: rgba(248, 81, 73, 0.22);
  --add: #7ee2a8;
  --add-bg: rgba(46, 160, 67, 0.14);
  --add-sign: rgba(63, 185, 80, 0.24);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
  --wrap: 1120px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  color: var(--text);
  font: 400 18px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}
code { font: 0.88em var(--mono); background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 0.1em 0.35em; }
h1, h2 { margin: 0; font-weight: 750; letter-spacing: -0.03em; }
h2 {
  font-size: clamp(28px, 3.6vw, 40px); line-height: 1.08;
  background: var(--h-fill); -webkit-background-clip: text; background-clip: text; color: transparent;
}
p { margin: 0; }
::selection { background: var(--accent-soft); }

.wrap { width: min(100% - 48px, var(--wrap)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- liquid backdrop ---------- */
#liquid {
  position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1;
  opacity: 0; transition: opacity 1.2s var(--ease); pointer-events: none;
}
#liquid.ready { opacity: 1; }
#liquid.fallback { opacity: 1; background: radial-gradient(60% 50% at 15% 85%, var(--accent-soft), transparent 70%), var(--bg); }

/* ---------- glass surfaces ---------- */
.glass {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow: var(--shadow-card);
}
/* Specular rim: brighter on the top-left edge, like light catching curved glass. */
.glass::before {
  content: "";
  position: absolute; inset: -1px; border-radius: inherit; padding: 1px;
  background: var(--rim);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
}

/* ---------- top bar ---------- */
.top { display: flex; align-items: center; justify-content: space-between; padding: 24px 0; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.brand img { filter: drop-shadow(0 6px 14px rgba(255, 77, 46, 0.55)); transition: transform 0.5s var(--ease); }
.brand:hover img { transform: rotate(-8deg) scale(1.06); }
.brand-for { color: var(--muted); font-weight: 500; }
.top-link {
  font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none;
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  transition: color 0.2s, background 0.2s;
}
.top-link:hover { color: var(--text); background: var(--surface-3); }

/* ---------- hero: the headline is a diff ---------- */
.hero { padding: 56px 0 72px; }
.diff-title {
  display: grid;
  font-size: clamp(44px, 9vw, 112px);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.045em;
  border-radius: 24px;
  overflow: hidden;
}
.diff-line { display: grid; grid-template-columns: 1.1em 1fr; align-items: center; }
.diff-line .sign { align-self: stretch; display: grid; place-items: center; font-size: 0.5em; font-weight: 500; }
.diff-line .text { padding: 0.16em 0.3em 0.2em 0.25em; }
.del { background: var(--del-bg); color: #ffd6d2; }
.del .sign { background: var(--del-sign); color: var(--del); }
.del .text { text-decoration: line-through; text-decoration-thickness: 0.07em; text-decoration-color: var(--del); opacity: 0.75; }
.add { background: var(--add-bg); border-top: 1px solid var(--border); }
.add .sign { background: var(--add-sign); color: var(--add); }
.add .text { background: linear-gradient(100deg, #fff 30%, #d9ffe7 65%, #7ee2a8 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }

.lede { margin-top: 32px; max-width: 34ch; font-size: clamp(20px, 2.2vw, 25px); line-height: 1.4; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 24px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface-2); color: var(--text);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  font: 600 16px var(--sans); text-decoration: none;
  transition: background 0.2s, transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.btn:hover { background: var(--surface-3); transform: translateY(-2px); }
.btn:active { transform: scale(0.97); transition-duration: 0.1s; }
.btn-primary { border-color: transparent; background: linear-gradient(180deg, #ff6a45, var(--accent)); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), var(--glow); }
.btn-primary:hover { background: linear-gradient(180deg, #ff7a58, var(--accent)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), var(--glow-big); }
/* A light sweep crosses the main button on hover. */
.btn-primary::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  transform: translateX(-120%);
  pointer-events: none;
}
.btn-primary:hover::after { transform: translateX(120%); transition: transform 0.8s var(--ease); }
.btn-big { min-height: 62px; padding: 0 34px; font-size: 19px; }

/* ---------- live demo ---------- */
.demo { padding: 24px 0 96px; }
.demo-head { max-width: 60ch; margin-bottom: 28px; }
.demo-head p { margin-top: 12px; color: var(--muted); }
.demo-head a { color: var(--accent-soft-fg); }

.demo-box {
  display: grid;
  grid-template-columns: 340px 1fr;
  border-radius: 24px;
  overflow: hidden;
}
.demo-box > * { min-width: 0; }
.panel { padding: 22px; border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 16px; background: rgba(255, 255, 255, 0.025); }
.panel-count { font-size: 16px; color: var(--muted); }
.panel-count b { font-size: 34px; color: var(--text); font-weight: 750; margin-right: 4px; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.meter { height: 6px; border-radius: 6px; background: var(--inset); overflow: hidden; }
.meter span {
  display: block; height: 100%; width: 0; border-radius: inherit;
  background: linear-gradient(90deg, #ff6a45, var(--accent));
  box-shadow: 0 0 12px rgba(255, 77, 46, 0.8);
  transition: width 0.6s var(--ease);
}

.tabs { display: flex; padding: 4px; gap: 4px; background: var(--inset); border: 1px solid var(--border); border-radius: 999px; }
.tab {
  flex: 1; min-width: 0; min-height: 36px; border: 0; border-radius: 999px; background: transparent;
  font: 600 15px var(--sans); color: var(--muted); cursor: pointer;
  transition: background 0.3s var(--ease), color 0.2s, box-shadow 0.3s var(--ease);
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { background: var(--accent); color: #fff; box-shadow: var(--glow); }

.rows { display: flex; flex-direction: column; gap: 4px; }
.row {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  width: 100%; padding: 10px; border: 0; border-radius: 14px; background: transparent;
  text-align: left; font: inherit; color: inherit; cursor: pointer;
  transition: background 0.2s;
}
.row:hover { background: var(--surface-2); }
.switch {
  position: relative; width: 40px; height: 24px; flex: none;
  border: 1px solid var(--border); border-radius: 999px; background: var(--inset);
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); transition: transform 0.35s var(--ease);
}
.row.is-on .switch { background: var(--accent); border-color: transparent; box-shadow: var(--glow); }
.row.is-on .switch::after { transform: translateX(16px); }
.row-text { display: flex; flex-direction: column; line-height: 1.25; }
.row-label { font-weight: 650; font-size: 16px; }
.row-sub { font-size: 13px; color: var(--muted); }
.row-count {
  font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
  background: var(--surface-2); color: var(--text); white-space: nowrap;
  transition: background 0.3s, color 0.3s;
}
.row.is-on .row-count { background: var(--accent-soft); color: var(--accent-soft-fg); }
.row-count.is-zero { color: var(--muted); font-weight: 500; }

.try { display: flex; flex-direction: column; gap: 6px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border); font-size: 14px; color: var(--muted); }
.try input {
  width: 100%; min-height: 42px; padding: 0 14px; border: 1px solid var(--border); border-radius: 12px;
  font: 14px var(--mono); color: var(--text); background: var(--inset);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.try input::placeholder { color: var(--faint); }
.try input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.files { list-style: none; margin: 0; padding: 14px; font: 14px/1.4 var(--mono); }
.file {
  display: flex; min-width: 0; padding: 9px 12px; margin-bottom: 4px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
  max-height: 60px; overflow: hidden;
  transition: max-height 0.45s var(--ease), opacity 0.3s ease, transform 0.45s var(--ease), padding 0.45s var(--ease), margin 0.45s var(--ease), border-color 0.3s;
}
.file-dir { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 0 1 auto; min-width: 0; }
.file-name { flex: 0 0 auto; font-weight: 600; }
.file.is-hidden { max-height: 0; opacity: 0; transform: translateX(24px) scale(0.98); padding-block: 0; margin-bottom: 0; border-color: transparent; }

/* ---------- features ---------- */
.features { display: flex; flex-direction: column; gap: 104px; padding: 40px 0 112px; }
.feature { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: center; }
.feature:nth-child(even) .feature-text { order: 2; }
.feature-text p { margin-top: 16px; color: var(--muted); max-width: 40ch; font-size: 19px; }
.shot { padding: 8px; border-radius: 24px; transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease); }
.shot img { border-radius: 16px; }
.shot:hover { transform: translateY(-6px); box-shadow: var(--shadow-card), 0 30px 60px -20px rgba(255, 77, 46, 0.35); }

/* ---------- promise and closing call ---------- */
.promise { padding: 72px 0; border-top: 1px solid var(--border); }
.promise p { margin-top: 16px; max-width: 52ch; font-size: clamp(20px, 2.2vw, 24px); line-height: 1.45; color: var(--muted); }

.cta {
  margin-bottom: 72px; padding: 72px 48px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 28px;
  border-radius: 28px;
}
.cta h2 { font-size: clamp(36px, 5.5vw, 64px); font-weight: 800; letter-spacing: -0.04em; }
.cta-note { color: var(--muted); font-size: 16px; max-width: 60ch; }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 28px 0 40px; border-top: 1px solid var(--border); font-size: 14px; color: var(--muted); }
.foot a:hover { color: var(--text); }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* Hero: the old count is struck out, then the new line lands, then the rest rises in. */
  .hero .diff-title { animation: rise 0.9s var(--ease) both; }
  .del .text { animation: strike 0.7s 0.4s both cubic-bezier(.6,0,.2,1); }
  .add { animation: land 0.7s 1s both var(--ease); }
  .hero .lede { animation: rise 0.9s 1.25s var(--ease) both; }
  .hero .actions { animation: rise 0.9s 1.4s var(--ease) both; }
  .top { animation: fade 1s 0.1s both; }
  @keyframes strike { from { text-decoration-color: transparent; opacity: 1; } to { text-decoration-color: var(--del); opacity: 0.75; } }
  @keyframes land { from { opacity: 0; transform: translateY(-14px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
  @keyframes rise { from { opacity: 0; transform: translateY(24px); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
  @keyframes fade { from { opacity: 0; } }

  /* Sections rise in as they scroll into view; reveal.js adds .in. */
  .js .reveal { opacity: 0; transform: translateY(40px) scale(0.985); filter: blur(10px); transition: opacity 0.9s var(--ease), transform 1s var(--ease), filter 0.9s var(--ease); }
  .js .reveal.in { opacity: 1; transform: none; filter: none; }

  /* The main button breathes gently so the eye finds it. */
  .btn-primary { animation: breathe 3.2s 2.4s ease-in-out infinite; }
  .btn-primary:hover { animation: none; }
  @keyframes breathe { 50% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), var(--glow-big); } }
}

/* ---------- AI prompt ---------- */
.ai { padding: 0 0 112px; }
.ai-text > p { margin-top: 16px; color: var(--muted); max-width: 44ch; font-size: 19px; }
.steps { list-style: none; counter-reset: step; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.steps li { counter-increment: step; position: relative; padding-left: 48px; color: var(--muted); font-size: 17px; line-height: 1.45; }
.steps li b { display: block; color: var(--text); font-weight: 650; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(145deg, #ff6a45, #d8260d); color: #fff; font-size: 15px; font-weight: 700;
  box-shadow: var(--glow);
}

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  .demo-box { grid-template-columns: minmax(0, 1fr); }
  .panel { border-right: 0; border-bottom: 1px solid var(--border); }
  .feature { grid-template-columns: 1fr; gap: 24px; }
  .feature:nth-child(even) .feature-text { order: 0; }
  .features { gap: 72px; }
  .cta { padding: 48px 24px; }
  .ai { padding-bottom: 72px; }
  .steps { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 520px) {
  body { font-size: 17px; }
  .hero { padding: 24px 0 48px; }
  .files { font-size: 12.5px; }
}

/* ---------- privacy policy ---------- */
.legal { max-width: 68ch; padding: 40px 0 96px; }
.legal h1 { font-size: clamp(36px, 5vw, 56px); letter-spacing: -0.04em; background: var(--h-fill); -webkit-background-clip: text; background-clip: text; color: transparent; }
.legal h2 { font-size: 24px; margin-top: 40px; }
.legal p { margin-top: 12px; color: var(--muted); }
.legal a { color: var(--accent-soft-fg); }
.legal .legal-date { font-size: 15px; }
