* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

body,
button,
a {
  -webkit-font-smoothing: antialiased;
}

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

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  background: var(--fg);
  color: var(--surface);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.preview-page {
  --bg: oklch(97.55% 0.0045 258.3);
  --surface: oklch(100% 0 89.9);
  --fg: oklch(17.79% 0.0064 271);
  --muted: oklch(51.63% 0.0203 264.4);
  --border: oklch(89.38% 0.0118 264.5);
  --accent: oklch(55.07% 0.2449 285.8);
  --action: oklch(60.39% 0.2154 260.5);
  --success: oklch(70.73% 0.1656 155.9);
  --focus: oklch(60.39% 0.2154 260.5);
  --display: "Archivo Black", system-ui, sans-serif;
  --body: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --radius: 18px;
  --stage-radius: 22px;
  --max: 1320px;
  min-width: 320px;
  overflow-x: clip;
}

.variant-creator {
  --bg: oklch(95.67% 0.0052 247.9);
  --surface: oklch(100% 0 89.9);
  --fg: oklch(14.4% 0.003 270);
  --muted: oklch(49% 0.018 261);
  --border: oklch(82% 0.012 256);
  --accent: oklch(56.53% 0.2525 286.2);
  --action: oklch(56.62% 0.2379 264.3);
  --success: oklch(73.74% 0.1715 153.1);
  --display: "Barlow Condensed", Impact, sans-serif;
  --body: "Manrope", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --radius: 5px;
  --stage-radius: 6px;
}

.variant-night {
  --bg: oklch(14% 0.0069 269.7);
  --surface: oklch(20.08% 0.0124 270.7);
  --fg: oklch(97.95% 0.0054 275);
  --muted: oklch(72% 0.018 270);
  --border: oklch(31% 0.018 270);
  --accent: oklch(62.42% 0.2169 288.7);
  --action: oklch(64.31% 0.1905 262.7);
  --success: oklch(77.3% 0.1754 155.5);
  --focus: oklch(77.3% 0.1754 155.5);
  --display: "Syne", system-ui, sans-serif;
  --body: "Source Sans 3", system-ui, sans-serif;
  --mono: "Source Code Pro", ui-monospace, monospace;
  --radius: 14px;
  --stage-radius: 18px;
}

.variant-contact {
  --bg: oklch(96.68% 0.0058 264.5);
  --surface: oklch(100% 0 89.9);
  --fg: oklch(19.09% 0.0131 264.2);
  --muted: oklch(49% 0.025 263);
  --border: oklch(80% 0.017 264);
  --accent: oklch(53.29% 0.2305 286);
  --action: oklch(57.61% 0.2286 262.3);
  --success: oklch(69.55% 0.1542 158.4);
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Work Sans", system-ui, sans-serif;
  --mono: "DM Mono", ui-monospace, monospace;
  --radius: 0;
  --stage-radius: 0;
}

.shell {
  width: min(calc(100% - 40px), var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  border-bottom: 1px solid color-mix(in oklch, var(--border) 86%, transparent);
  background: color-mix(in oklch, var(--bg) 92%, transparent);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 72px;
  gap: 26px;
}

.wordmark {
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: -0.04em;
}

.wordmark span {
  color: inherit;
}

.desktop-nav {
  display: flex;
  justify-content: center;
  gap: 28px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.desktop-nav a,
.header-cta {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.desktop-nav a:hover {
  color: var(--fg);
}

.header-cta {
  justify-content: center;
  padding: 0 18px;
  border: 1px solid var(--fg);
  border-radius: 999px;
  background: var(--fg);
  color: var(--surface);
  font-weight: 750;
  cursor: pointer;
  box-shadow: 0 8px 18px color-mix(in oklch, var(--fg) 14%, transparent);
}

.hero {
  padding: clamp(44px, 6vw, 88px) 0 clamp(72px, 8vw, 118px);
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: center;
  gap: 28px;
}

.hero-copy {
  grid-column: span 5;
  position: relative;
  z-index: 2;
}

.eyebrow,
.media-label,
.caption-rail,
.template-category,
.template-format,
.step-index,
.section-label,
.result-status,
.mode-rail > span,
.microcopy {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.eyebrow {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.hero h1 {
  max-width: 720px;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(54px, 5vw, 74px);
  font-weight: 800;
  line-height: 0.88;
  letter-spacing: -0.065em;
}

.headline-line {
  display: block;
}

.hero-support {
  max-width: 590px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.6;
}

.hero-secondary {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  border-bottom: 1px solid var(--fg);
  font-size: 14px;
  font-weight: 750;
}

.hero-secondary span {
  color: var(--accent);
  font-size: 18px;
}

.microcopy {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.cta-cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
  margin-top: 30px;
}

.store-link {
  display: inline-grid;
  min-width: 168px;
  min-height: 56px;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid var(--fg);
  border-radius: 10px;
  background: var(--fg);
  color: var(--surface);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 12px 26px color-mix(in oklch, var(--fg) 16%, transparent);
}

.store-link:hover {
  transform: translateY(-1px);
}

.store-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 800;
}

.store-copy {
  display: grid;
  gap: 1px;
}

.store-copy small {
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.store-copy strong {
  font-size: 14px;
  line-height: 1.1;
}

.qr-placeholder {
  display: grid;
  width: 112px;
  min-height: 56px;
  place-items: center;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.35;
  text-align: center;
  text-transform: uppercase;
}

.link-note {
  min-height: 22px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.hero-media {
  grid-column: span 7;
  min-width: 0;
}

.compare-stage {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--border);
  border-radius: var(--stage-radius);
  background: var(--surface);
  box-shadow: 0 30px 90px color-mix(in oklch, var(--fg) 12%, transparent);
  isolation: isolate;
  touch-action: none;
}

.compare-image,
.compare-result {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compare-result-wrap {
  position: absolute;
  z-index: 2;
  inset: 0;
  overflow: hidden;
  clip-path: inset(0 calc(100% - var(--split, 40%)) 0 0);
}

.compare-handle-line {
  position: absolute;
  z-index: 4;
  top: 0;
  bottom: 0;
  left: var(--split, 40%);
  width: 2px;
  background: var(--surface);
  box-shadow: 0 0 0 1px color-mix(in oklch, var(--fg) 28%, transparent);
  transform: translateX(-50%);
  pointer-events: none;
}

.compare-handle {
  position: absolute;
  z-index: 5;
  top: 50%;
  left: var(--split, 40%);
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--accent);
  color: oklch(100% 0 0);
  box-shadow: 0 10px 28px oklch(15% 0.02 270 / 0.35);
  transform: translate(-50%, -50%);
  cursor: ew-resize;
}

.compare-handle::before {
  content: "↔";
  font-size: 19px;
  font-weight: 900;
}

.media-label {
  position: absolute;
  z-index: 6;
  top: 16px;
  padding: 8px 10px;
  border-radius: 6px;
  background: oklch(16% 0.01 270 / 0.82);
  color: oklch(100% 0 0);
  font-size: 10px;
  line-height: 1;
  backdrop-filter: blur(7px);
}

.media-label-original {
  left: 16px;
}

.media-label-result {
  right: 16px;
}

.caption-rail {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  padding: 13px 2px 0;
  color: var(--muted);
  font-size: 10px;
}

.caption-rail strong {
  color: var(--fg);
  font-weight: 600;
}

.content-section {
  padding: clamp(72px, 9vw, 128px) 0;
  border-top: 1px solid var(--border);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 440px);
  align-items: end;
  gap: 32px;
  margin-bottom: 42px;
}

.section-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(42px, 5.5vw, 78px);
  line-height: 0.96;
  letter-spacing: -0.052em;
}

.section-label {
  display: block;
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.template-shelf {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 210px));
  justify-content: center;
  gap: 14px;
  padding: 4px;
}

.template-card {
  position: relative;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.template-card:hover {
  transform: translateY(-3px);
}

.template-card[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}

.template-media {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 4.8;
}

.template-media::after {
  content: "Use template";
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 7px 9px;
  border-radius: 7px;
  background: oklch(16% 0.01 270 / 0.84);
  color: oklch(100% 0 0);
  font-size: 10px;
  font-weight: 700;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.template-card:hover .template-media::after,
.template-card:focus-visible .template-media::after {
  opacity: 1;
  transform: translateY(0);
}

.template-card[aria-pressed="true"] .template-media::after {
  content: "Selected";
  opacity: 1;
  transform: translateY(0);
}

.template-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.template-meta {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 10px;
  padding: 12px 13px 13px;
}

.template-title {
  display: block;
  font-size: 15px;
  font-weight: 760;
}

.template-category {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.template-format {
  color: var(--muted);
  font-size: 8px;
}

.result-flow-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  align-items: stretch;
  gap: clamp(38px, 7vw, 100px);
}

.flow-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.profile-ready {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 13px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.profile-ready img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
}

.profile-ready > span:nth-child(2) {
  display: grid;
}

.profile-ready small {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.profile-ready strong {
  font-size: 15px;
}

.ready-dot {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--success);
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ready-dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.workflow-steps {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.workflow-step {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 18px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
}

.workflow-step:last-child {
  border-bottom: 1px solid var(--border);
}

.step-index {
  color: var(--muted);
  font-size: 11px;
}

.workflow-step h3 {
  margin: 0 0 7px;
  font-size: 22px;
  letter-spacing: -0.025em;
}

.workflow-step p {
  margin: 0;
  color: var(--muted);
}

.mode-rail {
  display: grid;
  gap: 12px;
  margin-top: auto;
  padding-top: 24px;
}

.mode-rail > span {
  color: var(--muted);
  font-size: 9px;
}

.mode-rail > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mode-chip {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}

.mode-chip.is-active {
  border-color: var(--fg);
  background: var(--fg);
  color: var(--surface);
}

.result-device-proof {
  display: grid;
  align-content: start;
}

.result-status {
  display: flex;
  width: min(100%, 390px);
  align-items: center;
  justify-content: space-between;
  margin: 0 auto 12px;
  color: var(--muted);
  font-size: 9px;
}

.result-status strong {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--success);
}

.result-status strong::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.device {
  width: min(100%, 390px);
  margin-inline: auto;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 38px;
  background: var(--fg);
  box-shadow: 0 34px 84px color-mix(in oklch, var(--fg) 22%, transparent);
}

.device-screen {
  position: relative;
  overflow: hidden;
  aspect-ratio: 9 / 16;
  border-radius: 29px;
  background: var(--surface);
}

.device-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.device-topbar,
.device-toolbar {
  position: absolute;
  z-index: 2;
  right: 14px;
  left: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  background: oklch(15% 0.015 270 / 0.82);
  color: oklch(100% 0 0);
  font-size: 12px;
  backdrop-filter: blur(8px);
}

.device-topbar {
  top: 14px;
}

.device-toolbar {
  bottom: 14px;
}

.device-toolbar span:last-child {
  color: var(--success);
  font-weight: 750;
}

.workflow-active-label {
  margin: 16px auto 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.proof-section {
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.trust-break {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 540px);
  gap: 40px;
  padding: clamp(70px, 8vw, 106px) 0;
}

.trust-break h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(34px, 4vw, 56px);
  letter-spacing: -0.045em;
}

.trust-break p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.proof-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.proof-strip span {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.mobile-install {
  position: fixed;
  z-index: 90;
  right: 12px;
  bottom: 12px;
  left: 12px;
  display: none;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px 8px 16px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--fg);
  color: var(--surface);
  box-shadow: 0 18px 50px oklch(10% 0.01 270 / 0.32);
  transform: translateY(140%);
  transition: transform 240ms ease;
}

.mobile-install.is-visible {
  transform: translateY(0);
}

.mobile-install strong {
  font-size: 14px;
}

.mobile-install button {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--surface);
  border-radius: 10px;
  background: var(--surface);
  color: var(--fg);
  font-weight: 750;
}

.flying-output {
  position: fixed;
  z-index: 999;
  margin: 0;
  pointer-events: none;
  object-fit: cover;
  transform-origin: top left;
  box-shadow: 0 24px 80px oklch(10% 0.02 270 / 0.38);
}

@media (max-width: 900px) {
  .shell,
  .launcher {
    width: min(calc(100% - 28px), var(--max, 1320px));
  }

  .desktop-nav,
  .header-cta {
    display: none;
  }

  .header-inner {
    grid-template-columns: 1fr;
    min-height: 62px;
  }

  .hero {
    padding-top: 34px;
  }

  .hero-grid,
  .section-head,
  .result-flow-layout,
  .trust-break,
  .launcher-header {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .hero-media,
  .variant-creator .hero-copy,
  .variant-creator .hero-media,
  .variant-contact .hero-copy,
  .variant-contact .hero-media {
    grid-column: 1;
    order: initial;
  }

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

  .variant-creator .hero-copy {
    padding: 26px 0 30px;
  }

  .variant-contact .hero-copy {
    padding-bottom: 0;
  }

  .hero-media {
    margin-top: 14px;
  }

  .template-shelf {
    grid-template-columns: repeat(4, minmax(176px, 210px));
    justify-content: start;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 4px 4px 18px;
  }

  .template-card {
    scroll-snap-align: start;
  }

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

  .launcher-header {
    align-items: start;
  }
}

@media (max-width: 620px) {
  html {
    scroll-padding-top: 68px;
  }

  .preview-page {
    padding-bottom: 78px;
  }

  .hero {
    min-height: calc(100svh - 62px);
    padding-bottom: 62px;
  }

  .hero h1,
  .variant-creator .hero h1,
  .variant-contact .hero h1 {
    font-size: clamp(54px, 17vw, 78px);
    line-height: 0.86;
  }

  .hero-support {
    margin-top: 20px;
    font-size: 16px;
  }

  .cta-cluster {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 22px;
  }

  .store-link {
    min-width: 0;
    min-height: 52px;
    grid-template-columns: 24px 1fr;
    padding: 7px 10px;
  }

  .store-icon {
    width: 24px;
    height: 24px;
  }

  .store-copy strong {
    font-size: 12px;
  }

  .qr-placeholder {
    display: none;
  }

  .compare-stage,
  .variant-contact .compare-stage {
    aspect-ratio: 4 / 5;
  }

  .variant-studio .hero-media,
  .variant-night .hero-media {
    padding: 7px;
    border-radius: 20px;
  }

  .section-head {
    align-items: start;
    margin-bottom: 28px;
  }

  .section-head h2,
  .trust-break h2 {
    font-size: clamp(40px, 13vw, 60px);
  }

  .result-flow-layout {
    gap: 44px;
  }

  .device {
    width: min(88%, 340px);
  }

  .trust-break {
    gap: 18px;
  }

  .mobile-install {
    display: flex;
  }

  .caption-rail {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .launcher {
    padding-top: 32px;
  }

  .launcher-header h1 {
    font-size: clamp(52px, 16vw, 76px);
  }

  .variant-thumb {
    grid-template-columns: 0.8fr 1.2fr;
    min-height: 260px;
    padding: 15px;
  }

  .variant-thumb-media {
    min-height: 220px;
  }

  .variant-card-meta {
    grid-template-columns: 1fr auto;
    padding: 17px;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
