/* ==========================================================================
   BeforeAfter Studio — shared styles
   Static CSS only. No external fonts, no frameworks.
   ========================================================================== */

:root {
  color-scheme: light;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
    "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", "DejaVu Sans", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 1180px;
  --prose: 760px;

  --bg: #f4f2ed;
  --bg-2: #ece9e2;
  --card: #ffffff;
  --card-2: #fbfaf7;
  --card-3: #f1eee7;

  --ink: #15171b;
  --ink-2: #4b4f57;
  --ink-3: #787d86;
  --line: #e4e0d8;
  --line-2: #d3cec3;

  --accent: #cc4a1f;
  --accent-2: #e2662f;
  --accent-ink: #ffffff;
  --accent-soft: #fbeae2;
  --accent-soft-ink: #9c300d;

  --teal: #0f6f64;
  --teal-soft: #e4f2ef;

  --good: #16794a;
  --good-soft: #e7f6ed;
  --warn: #9a6a10;
  --warn-soft: #fdf4e0;
  --bad: #b42318;
  --bad-soft: #fdeceb;

  --dark: #101216;
  --dark-2: #181b21;

  --r-xs: 8px;
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  --shadow-xs: 0 1px 2px rgba(20, 22, 28, 0.06);
  --shadow-sm: 0 1px 3px rgba(20, 22, 28, 0.07), 0 8px 20px -14px rgba(20, 22, 28, 0.28);
  --shadow: 0 2px 4px rgba(20, 22, 28, 0.05), 0 24px 48px -28px rgba(20, 22, 28, 0.35);
  --focus: 0 0 0 3px rgba(204, 74, 31, 0.28);

  --step--1: 0.8125rem;
  --step-0: 0.9375rem;
  --step-1: 1.0625rem;
  --step-2: 1.25rem;
  --step-3: 1.5rem;
  --step-4: clamp(1.75rem, 1.2rem + 2vw, 2.5rem);
  --step-5: clamp(2.35rem, 1.35rem + 3.6vw, 3.9rem);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 86px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.62;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 460px at 8% -10%, rgba(204, 74, 31, 0.10), transparent 62%),
    radial-gradient(820px 420px at 96% 0%, rgba(15, 111, 100, 0.09), transparent 58%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

body.has-modal { overflow: hidden; }

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  font-weight: 780;
  line-height: 1.15;
  letter-spacing: -0.022em;
  color: var(--ink);
  text-wrap: balance;
}

h1 { font-size: var(--step-5); letter-spacing: -0.035em; }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); letter-spacing: -0.018em; }
h4 { font-size: var(--step-1); }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-soft-ink); }

img { max-width: 100%; }

code, pre { font-family: var(--font-mono); font-size: 0.9em; }

hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }

::selection { background: rgba(204, 74, 31, 0.2); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  background: var(--ink);
  color: #fff;
  font-weight: 600;
}
.skip-link:focus { left: 12px; color: #fff; }

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

.muted { color: var(--ink-3); }
.small { font-size: var(--step--1); }
.tiny { font-size: 0.75rem; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.hide { display: none !important; }

[hidden] { display: none !important; }

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   Type accents
   -------------------------------------------------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-soft-ink);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.eyebrow--dark { color: #f4bda8; }
.eyebrow--dark::before { background: #f4bda8; }

.lede {
  font-size: clamp(1rem, 0.94rem + 0.35vw, 1.16rem);
  color: var(--ink-2);
  max-width: 34em;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  --btn-bg: var(--card);
  --btn-ink: var(--ink);
  --btn-border: var(--line-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid var(--btn-border);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-ink);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
  box-shadow: var(--shadow-xs);
}

.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); color: var(--btn-ink); }
.btn:active { transform: translateY(0); }

.btn-primary {
  --btn-bg: var(--accent);
  --btn-ink: #fff;
  --btn-border: var(--accent);
  box-shadow: 0 8px 18px -12px rgba(204, 74, 31, 0.75);
}
.btn-primary:hover { --btn-bg: var(--accent-2); --btn-border: var(--accent-2); }

.btn-dark {
  --btn-bg: var(--ink);
  --btn-ink: #fff;
  --btn-border: var(--ink);
}
.btn-dark:hover { --btn-bg: #2a2d33; }

.btn-ghost {
  --btn-bg: transparent;
  --btn-ink: var(--ink);
  --btn-border: transparent;
  box-shadow: none;
}
.btn-ghost:hover { --btn-bg: rgba(21, 23, 27, 0.05); box-shadow: none; }

.btn-outline {
  --btn-bg: transparent;
  --btn-ink: var(--ink);
  --btn-border: var(--line-2);
  box-shadow: none;
}

.btn-light {
  --btn-bg: rgba(255, 255, 255, 0.1);
  --btn-ink: #fff;
  --btn-border: rgba(255, 255, 255, 0.24);
  box-shadow: none;
}
.btn-light:hover { --btn-bg: rgba(255, 255, 255, 0.18); }

.btn-sm { padding: 8px 14px; font-size: 0.8125rem; }
.btn-lg { padding: 15px 26px; font-size: 1rem; }
.btn-block { width: 100%; }

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-icon { gap: 10px; }

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(244, 242, 237, 0.86);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid rgba(211, 206, 195, 0.7);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 26px;
  height: 70px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 760;
  letter-spacing: -0.02em;
  font-size: 1.02rem;
}

.brand:hover { color: var(--ink); }

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  flex: none;
  display: block;
}

.brand small {
  display: block;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-top: 1px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 0.875rem;
  font-weight: 550;
  text-decoration: none;
}
.nav a:hover { background: rgba(21, 23, 27, 0.05); color: var(--ink); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 6px;
}

.header-free {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
}

.header-free.is-pro {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  letter-spacing: 0.08em;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  padding: clamp(42px, 6vw, 78px) 0 clamp(30px, 4vw, 52px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
}

.hero h1 { margin-bottom: 18px; }

.hero h1 em {
  font-style: normal;
  color: var(--accent);
  position: relative;
  white-space: nowrap;
}

.hero h1 em::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.05em;
  height: 0.1em;
  border-radius: 4px;
  background: rgba(204, 74, 31, 0.22);
}

.hero .lede { margin-bottom: 24px; }

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.8125rem;
  color: var(--ink-2);
}

.hero-points li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hero-points svg { flex: none; color: var(--teal); }

.hero-visual { position: relative; }

.hero-card {
  position: relative;
  background: var(--dark);
  border-radius: var(--r-xl);
  padding: 12px;
  box-shadow: 0 40px 70px -46px rgba(20, 22, 28, 0.7), 0 2px 0 rgba(255, 255, 255, 0.5) inset;
  transform: rotate(0.6deg);
}

.hero-card canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
}

.float-tag {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.7);
  white-space: nowrap;
}

.float-tag .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.tag-png { top: -14px; right: 22px; }
.tag-video { bottom: -14px; left: 26px; }
.tag-video .dot { background: var(--teal); }

.hero-caption {
  margin: 24px 4px 0;
  font-size: 0.75rem;
  color: var(--ink-3);
  text-align: center;
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section { padding: clamp(38px, 5vw, 66px) 0; }
.section--tight { padding: clamp(26px, 3.4vw, 42px) 0; }

.section-head { max-width: 640px; margin-bottom: 28px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { margin-bottom: 10px; }
.section-head p { color: var(--ink-2); }

.section-head--row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  max-width: none;
}

/* --------------------------------------------------------------------------
   Editor
   -------------------------------------------------------------------------- */

.editor-section { padding-top: clamp(20px, 3vw, 34px); }

.editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: 26px;
  align-items: start;
}

.preview-col {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 14px;
  min-width: 0;
}

.preview-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 12px;
  box-shadow: var(--shadow-sm);
}

.preview-frame {
  position: relative;
  display: flex;
  justify-content: center;
  background: #0b0c10;
  border-radius: 14px;
  overflow: hidden;
  min-height: 220px;
}

#previewCanvas {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  border-radius: 14px;
  cursor: default;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
#previewCanvas.is-dragging { cursor: grabbing; }
.preview-frame.split #previewCanvas { cursor: ew-resize; }
.preview-frame.split #previewCanvas.is-dragging { cursor: grabbing; }

.preview-frame:not(.is-tall) #previewCanvas { width: 100%; }
.preview-frame.is-tall #previewCanvas {
  width: auto;
  height: min(58vh, 560px);
  max-width: 100%;
  cursor: default;
}
.preview-frame.is-tall.split #previewCanvas { cursor: ew-resize; }
.preview-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
  background:
    radial-gradient(120% 90% at 50% 10%, rgba(204, 74, 31, 0.14), transparent 60%),
    rgba(11, 12, 16, 0.55);
  color: #fff;
}

.preview-empty svg { opacity: 0.7; }

.preview-empty h3 {
  margin: 0;
  color: #fff;
  font-size: 1.05rem;
}

.preview-empty p {
  margin: 0;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.66);
  max-width: 24em;
}

.preview-empty .btn { margin-top: 4px; }

.preview-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 11px 6px 2px;
  font-size: 0.75rem;
  color: var(--ink-3);
}

.preview-bar .dims {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--card-3);
  color: var(--ink-2);
}

.preview-bar .spacer { margin-left: auto; }

.rec-overlay {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(10, 11, 14, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px);
  color: #fff;
}

.rec-overlay .rec-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.75rem;
  font-weight: 600;
}

.rec-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff5a3c;
  animation: pulse 1.1s infinite ease-in-out;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.82); }
}

.rec-track {
  height: 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
}

.rec-bar {
  height: 100%;
  width: 0;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent-2), #ffb08a);
  transition: width 0.16s linear;
}

.side-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.55);
  border: 1px dashed var(--line-2);
  font-size: 0.75rem;
  color: var(--ink-2);
}
.side-note svg { flex: none; color: var(--teal); margin-top: 1px; }

/* --------------------------------------------------------------------------
   Control panels
   -------------------------------------------------------------------------- */

.controls { display: grid; gap: 14px; min-width: 0; }

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px 18px 20px;
  box-shadow: var(--shadow-xs);
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.panel-num {
  width: 24px;
  height: 24px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

.panel-head h3 {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.panel-head .panel-note {
  margin-left: auto;
  font-size: 0.6875rem;
  color: var(--ink-3);
}

.panel-head .pro-chip {
  margin-left: auto;
}

.pro-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Dropzones ---------------------------------------------------------------- */

.dz-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.dz {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 132px;
  padding: 14px 12px;
  border: 1.5px dashed var(--line-2);
  border-radius: var(--r);
  background: var(--card-2);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease;
  overflow: hidden;
}

.dz:hover { border-color: var(--accent); background: #fff; }
.dz.is-dragover { border-color: var(--accent); background: var(--accent-soft); }
.dz.has-image { border-style: solid; border-color: var(--line); }

.dz input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.dz-label {
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.dz.has-image .dz-label { color: var(--accent-soft-ink); }

.dz-thumb {
  width: 100%;
  height: 64px;
  object-fit: cover;
  border-radius: 7px;
  display: none;
  background: var(--card-3);
}

.dz.has-image .dz-thumb { display: block; }

.dz.has-image .dz-icon { display: none; }

.dz-icon { color: var(--ink-3); }

.dz-name {
  max-width: 100%;
  font-size: 0.6875rem;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dz-hint { font-size: 0.75rem; font-weight: 600; color: var(--ink-2); }
.dz.has-image .dz-hint { display: none; }

.dz-clear {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  display: none;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(16, 18, 22, 0.72);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

.dz.has-image .dz-clear { display: grid; }

.dz-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  font-size: 0.6875rem;
  color: var(--ink-3);
}

/* Fields ------------------------------------------------------------------- */

.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field:last-child { margin-bottom: 0; }

.field > label {
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.field .hint { font-weight: 500; color: var(--ink-3); font-size: 0.6875rem; }

.input,
.select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1.3;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.input:focus,
.select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--focus);
}

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%234b4f57' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Segmented control -------------------------------------------------------- */

.seg {
  display: grid;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--card-3);
  border: 1px solid var(--line);
}

.seg--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.seg--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.seg--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.seg button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 4px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-2);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.14s ease, box-shadow 0.14s ease, color 0.14s ease;
}

.seg button small {
  font-size: 0.5625rem;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}

.seg button:hover { color: var(--ink); background: rgba(255, 255, 255, 0.55); }

.seg button.is-active {
  background: #fff;
  color: var(--ink);
  border-color: var(--line-2);
  box-shadow: var(--shadow-xs);
}

.seg button.is-active small { color: var(--accent-soft-ink); }

.seg-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--ink-2);
  margin: 12px 0 6px;
}
.seg-label:first-child { margin-top: 0; }

/* Range + swatches --------------------------------------------------------- */

.range-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 22px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 3px;
  background: var(--line-2);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 17px;
  height: 17px;
  margin-top: -6px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

input[type="range"]:hover::-webkit-slider-thumb { border-color: var(--accent); }
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: var(--focus); }

input[type="range"]::-moz-range-track {
  height: 5px;
  border-radius: 3px;
  background: var(--line-2);
}
input[type="range"]::-moz-range-thumb {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--ink);
}

.value {
  min-width: 42px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--ink-2);
}

.swatches {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
}

.swatch {
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.18);
  cursor: pointer;
  position: relative;
}

.swatch.is-active { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink); }

.swatch--light { border-color: var(--line-2); }

.color-input {
  width: 34px;
  height: 24px;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

/* Export block ------------------------------------------------------------- */

.export-note {
  font-size: 0.75rem;
  color: var(--ink-3);
  margin: 0 0 12px;
}

.export-buttons { display: grid; gap: 8px; }

.export-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.export-row .btn { padding: 11px 12px; font-size: 0.8125rem; }

.btn-file {
  flex-direction: column;
  gap: 2px;
  border-radius: 12px;
}

.btn-file span {
  font-size: 0.625rem;
  font-weight: 500;
  color: var(--ink-3);
}

.btn-primary.btn-file span { color: rgba(255, 255, 255, 0.78); }

.count {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.count-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.75rem;
  color: var(--ink-2);
  margin-bottom: 7px;
}

.count-line strong { color: var(--ink); font-weight: 700; }

.count-track {
  height: 5px;
  border-radius: 3px;
  background: var(--card-3);
  overflow: hidden;
}

.count-bar {
  height: 100%;
  width: 0;
  border-radius: 3px;
  background: var(--accent);
  transition: width 0.25s ease;
}

.count-bar.is-pro { background: var(--teal); }

body.is-pro .count-line a[data-open-pro],
body.is-pro .pro-inline a[data-open-pro] { display: none; }

.pro-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 0.75rem;
  color: var(--ink-3);
}

.pro-inline a { font-weight: 650; }

.quality-row { margin-top: 10px; }

.export-options { margin-top: 12px; }
.export-options .field { margin-bottom: 0; }

/* Logo row ----------------------------------------------------------------- */

.logo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.logo-name {
  flex: 1;
  min-width: 90px;
  font-size: 0.75rem;
  color: var(--ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Audience strip
   -------------------------------------------------------------------------- */

.audience {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.audience li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  font-size: 0.8125rem;
  color: var(--ink-2);
}

.audience li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.7;
}

/* --------------------------------------------------------------------------
   Features / steps
   -------------------------------------------------------------------------- */

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.feature {
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
}

.feature-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent-soft-ink);
}

.feature h3 { font-size: 1rem; margin-bottom: 6px; }
.feature p { font-size: 0.875rem; color: var(--ink-2); }

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 24px 22px 22px;
  border-radius: var(--r-lg);
  background: var(--dark);
  color: #fff;
  overflow: hidden;
}

.step::before {
  counter-increment: step;
  content: "0" counter(step);
  position: absolute;
  top: 12px;
  right: 18px;
  font-family: var(--font-mono);
  font-size: 2.6rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.12);
  line-height: 1;
}

.step h3 { color: #fff; font-size: 1.0625rem; margin-bottom: 6px; }
.step p { color: rgba(255, 255, 255, 0.66); font-size: 0.875rem; }
.step .step-tag {
  display: inline-block;
  margin-bottom: 12px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f4bda8;
}

/* --------------------------------------------------------------------------
   Pricing
   -------------------------------------------------------------------------- */

.pricing-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  margin-bottom: 28px;
}

.billing-toggle {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--card-3);
  border: 1px solid var(--line);
}

.billing-toggle button {
  padding: 7px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 650;
  cursor: pointer;
}

.billing-toggle button.is-active {
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}

.billing-toggle button span {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--teal);
  margin-left: 4px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 18px;
  align-items: stretch;
  max-width: 940px;
  margin: 0 auto;
}

.plan {
  display: flex;
  flex-direction: column;
  padding: 26px;
  border-radius: var(--r-xl);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
}

.plan h3 { font-size: 1.125rem; margin-bottom: 4px; }
.plan .plan-sub { font-size: 0.8125rem; color: var(--ink-3); margin-bottom: 18px; }

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 4px;
}

.plan-price .amount {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
}

.plan-price .per { font-size: 0.875rem; color: var(--ink-3); font-weight: 600; }

.plan-save {
  font-size: 0.75rem;
  color: var(--teal);
  font-weight: 650;
  margin-bottom: 18px;
  min-height: 1.2em;
}

.plan-list {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: grid;
  gap: 9px;
  font-size: 0.875rem;
  color: var(--ink-2);
}

.plan-list li {
  display: flex;
  gap: 9px;
  align-items: flex-start;
}

.plan-list svg { flex: none; margin-top: 3px; color: var(--teal); }
.plan-list .off { color: var(--ink-3); }
.plan-list .off svg { color: var(--line-2); }

.plan .btn { margin-top: auto; }

.plan--pro {
  background: var(--dark);
  border-color: var(--dark);
  color: #fff;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.plan--pro::after {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  top: -160px;
  right: -100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(204, 74, 31, 0.5), transparent 65%);
  pointer-events: none;
}

.plan--pro h3 { color: #fff; }
.plan--pro .plan-sub { color: rgba(255, 255, 255, 0.62); }
.plan--pro .per { color: rgba(255, 255, 255, 0.6); }
.plan--pro .plan-list { color: rgba(255, 255, 255, 0.82); }
.plan--pro .plan-list svg { color: #7fd1c2; }
.plan--pro .plan-save { color: #9ad8cb; }

.plan-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
}

.pricing-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  margin-top: 18px;
  font-size: 0.75rem;
  color: var(--ink-3);
}

.pricing-foot span { display: inline-flex; align-items: center; gap: 6px; }

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */

.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 10px; }

.faq details {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--card);
  padding: 0 18px;
  box-shadow: var(--shadow-xs);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  font-size: 0.9375rem;
  font-weight: 650;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  flex: none;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: transform 0.18s ease, background-color 0.18s ease;
}

.faq details[open] summary::after {
  content: "−";
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.faq details p {
  padding: 0 0 18px;
  margin: 0;
  font-size: 0.875rem;
  color: var(--ink-2);
  max-width: 68ch;
}

/* --------------------------------------------------------------------------
   CTA band + footer
   -------------------------------------------------------------------------- */

.cta-band {
  position: relative;
  overflow: hidden;
  padding: clamp(34px, 5vw, 56px);
  border-radius: var(--r-xl);
  background: linear-gradient(135deg, #17191f, #0c0d11 62%);
  color: #fff;
  text-align: center;
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(420px 220px at 12% 0%, rgba(204, 74, 31, 0.4), transparent 70%),
    radial-gradient(420px 240px at 88% 100%, rgba(15, 111, 100, 0.35), transparent 70%);
  pointer-events: none;
}

.cta-band > * { position: relative; }
.cta-band h2 { color: #fff; margin-bottom: 10px; }
.cta-band p { color: rgba(255, 255, 255, 0.68); max-width: 40em; margin: 0 auto 22px; }

.site-footer {
  margin-top: clamp(40px, 6vw, 70px);
  padding: 34px 0 44px;
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
  color: var(--ink-3);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.footer-brand p { margin: 12px 0 0; max-width: 26em; }

.footer-col h3,
.footer-col h4 {
  margin: 0 0 10px;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.footer-col a { color: var(--ink-2); text-decoration: none; }
.footer-col a:hover { color: var(--accent); }

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 0.75rem;
  color: var(--ink-3);
}

/* --------------------------------------------------------------------------
   Legal / prose pages
   -------------------------------------------------------------------------- */

.page-head {
  padding: clamp(36px, 5vw, 64px) 0 8px;
}

.page-head h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); margin-bottom: 10px; }
.page-head p { color: var(--ink-2); max-width: 46em; }

.prose {
  max-width: var(--prose);
  padding-bottom: 20px;
}

.prose h2 {
  font-size: 1.375rem;
  margin: 38px 0 10px;
  letter-spacing: -0.02em;
}

.prose h3 { font-size: 1.0625rem; margin: 24px 0 8px; }
.prose p, .prose li { color: var(--ink-2); font-size: 0.9375rem; }
.prose ul, .prose ol { padding-left: 1.15em; margin: 0 0 16px; }
.prose li { margin-bottom: 7px; }
.prose a { font-weight: 550; }
.prose strong { color: var(--ink); }

.note-box {
  margin: 22px 0;
  padding: 16px 18px;
  border-radius: var(--r);
  background: var(--accent-soft);
  border: 1px solid #f3cdbc;
  color: #7d2b0d;
  font-size: 0.875rem;
}

.note-box strong { color: #6b240a; }

.updated {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--card-3);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 26px;
  align-items: start;
  padding-bottom: 10px;
}

.contact-card {
  padding: 24px;
  border-radius: var(--r-lg);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
}

.contact-card h2,
.contact-card h3 { font-size: 1rem; letter-spacing: -0.01em; }
.contact-card p { font-size: 0.875rem; color: var(--ink-2); }

.contact-email {
  display: inline-block;
  margin: 6px 0 14px;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
  overflow-wrap: anywhere;
}

/* --------------------------------------------------------------------------
   Modal
   -------------------------------------------------------------------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 18px;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 13, 16, 0.62);
  backdrop-filter: blur(3px);
}

.modal__panel {
  position: relative;
  width: min(480px, 100%);
  max-height: min(92vh, 780px);
  overflow-y: auto;
  padding: 26px;
  border-radius: var(--r-xl);
  background: var(--card);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.55);
  animation: modal-in 0.2s ease-out;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  color: var(--ink-2);
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
}

.modal__panel h3 { font-size: 1.4rem; margin-bottom: 6px; }
.modal__panel .modal-sub { font-size: 0.875rem; color: var(--ink-3); margin-bottom: 16px; }

.modal-list {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--ink-2);
}

.modal-list li { display: flex; gap: 8px; align-items: flex-start; }
.modal-list svg { flex: none; margin-top: 3px; color: var(--teal); }

.modal-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 14px;
}

.modal-price .amount { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.modal-price .per { font-size: 0.8125rem; color: var(--ink-3); font-weight: 600; }
.modal-price .save { font-size: 0.75rem; color: var(--teal); font-weight: 650; margin-left: auto; }

.modal .btn + .btn { margin-top: 8px; }

.modal-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0 14px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.modal-divider::before,
.modal-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.license-row { display: flex; gap: 8px; }

.license-row .input { flex: 1; min-width: 0; font-family: var(--font-mono); font-size: 0.8125rem; }
.license-row .btn { flex: none; border-radius: var(--r-sm); }

.license-status {
  min-height: 1.2em;
  margin: 10px 0 0;
  font-size: 0.75rem;
  color: var(--ink-3);
}

.license-status.is-good { color: var(--good); }
.license-status.is-bad { color: var(--bad); }
.license-status.is-info { color: var(--ink-2); }

/* --------------------------------------------------------------------------
   Toast
   -------------------------------------------------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 130;
  max-width: min(560px, calc(100vw - 32px));
  padding: 11px 18px;
  border-radius: 999px;
  background: rgba(16, 18, 22, 0.94);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 550;
  line-height: 1.35;
  text-align: center;
  box-shadow: 0 16px 34px -18px rgba(0, 0, 0, 0.8);
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast--good { background: #12603c; }
.toast--bad { background: #8f2117; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: 34px; }
  .editor-grid { grid-template-columns: minmax(0, 1fr); }
  .preview-col { position: static; }
  .preview-frame.is-tall #previewCanvas { height: min(62vh, 620px); }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 880px) {
  .nav { display: none; }
  .header-inner { gap: 12px; }
  .header-actions { margin-left: auto; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-visual { max-width: 460px; margin: 6px auto 0; width: 100%; }
  .hero-card { transform: none; }
  .tag-png { top: -12px; right: 8px; }
  .tag-video { bottom: -12px; left: 8px; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 520px; }
  .steps { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .header-free { display: none; }
  .header-actions .btn { padding: 9px 14px; font-size: 0.8125rem; }
  .hero { padding-top: 30px; }
  .hero h1 em { white-space: normal; }
  .features { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 22px; }
  .footer-brand { grid-column: 1 / -1; }
  .panel { padding: 16px 14px 18px; }
  .seg button { font-size: 0.6875rem; }
  .seg button small { font-size: 0.5rem; }
  .preview-frame.is-tall #previewCanvas { height: min(54vh, 460px); }
  .preview-bar { font-size: 0.6875rem; padding-top: 9px; row-gap: 5px; }
  .preview-bar #previewHint { order: 3; flex: 1 0 100%; }
  .preview-bar .spacer { order: 2; }
  .export-row { grid-template-columns: 1fr; }
  .modal__panel { padding: 22px 18px; }
  .section-head--row { flex-direction: column; align-items: flex-start; }
  .cta-band { padding: 28px 18px; }
}

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

/* Reduced motion ----------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
