/* QRCanvas — design system
   Palette and type follow the pdf.eneawork.it family: cream paper, violet brand,
   Fraunces display, Space Grotesk body. */

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("./fonts/fraunces-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("./fonts/space-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

:root {
  --paper: #f7f2e8;
  --paper-2: #fbf8f1;
  --cream: #efe8dc;
  --ink: #191722;
  --ink-70: rgba(25, 23, 34, 0.7);
  --ink-55: rgba(25, 23, 34, 0.62);
  --brand: #6b4ef0;
  --brand-deep: #5236d6;
  --brand-soft: #e7e1ff;
  --mint: #d9f0c7;
  --lemon: #f8d24a;
  --coral: #ffb4a2;
  --sky: #cfe0ff;
  --line: rgba(25, 23, 34, 0.12);
  --line-soft: rgba(25, 23, 34, 0.08);
  --font-display: "Fraunces", ui-serif, Georgia, serif;
  --font-body: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --shadow-soft: 0 24px 60px -38px rgba(25, 23, 34, 0.55);
  --shadow-lift: 0 30px 80px -40px rgba(25, 23, 34, 0.6);
  --radius-lg: 26px;
  --radius-xl: 36px;
  --wrap: 80rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(60rem 30rem at 100% -5%, rgba(107, 78, 240, 0.09), transparent 60%),
    radial-gradient(40rem 24rem at -10% 20%, rgba(248, 210, 74, 0.16), transparent 55%),
    var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--brand);
  color: #fff;
}

:focus-visible {
  outline: 3px solid rgba(107, 78, 240, 0.45);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.02;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 1rem;
}

/* ---------- shared ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-deep);
}

.eyebrow::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: currentColor;
}

.lede {
  color: var(--ink-70);
  font-size: clamp(1rem, 1.25vw, 1.13rem);
  line-height: 1.65;
  text-wrap: pretty;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0 1.35rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  touch-action: manipulation;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.btn svg {
  width: 1rem;
  height: 1rem;
  flex: none;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 14px 30px -18px rgba(82, 54, 214, 0.9);
}

.btn-primary:hover {
  background: var(--brand-deep);
  transform: translateY(-1px);
  box-shadow: 0 18px 36px -18px rgba(82, 54, 214, 0.95);
}

.btn-ghost {
  border-color: rgba(25, 23, 34, 0.18);
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: rgba(25, 23, 34, 0.4);
  background: #fff;
  transform: translateY(-1px);
}

.btn-lg {
  min-height: 3.4rem;
  padding-inline: 1.6rem;
  font-size: 1rem;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
  box-shadow: none;
}

.section {
  padding-block: clamp(4.5rem, 9vw, 7.5rem);
}

.section-head {
  max-width: 46rem;
  margin-bottom: clamp(2rem, 4vw, 3.2rem);
}

.section-head h2 {
  margin-top: 0.8rem;
  font-size: clamp(2.2rem, 4.6vw, 3.6rem);
}

.section-head .lede {
  margin-top: 1rem;
  max-width: 38rem;
}

/* ---------- nav ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 242, 232, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.site-nav.is-stuck {
  border-color: var(--line-soft);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 4.35rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 1.05rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.65rem;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 14px -8px rgba(82, 54, 214, 0.9);
}

.brand-mark svg {
  width: 1.1rem;
  height: 1.1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-left: 0.5rem;
  font-size: 0.9rem;
  color: var(--ink-70);
}

.nav-links a {
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

.lang-link {
  display: inline-grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid rgba(25, 23, 34, 0.16);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: background 0.15s ease;
}

.lang-link:hover {
  background: #fff;
}

.nav-cta {
  min-height: 2.55rem;
  padding-inline: 1.05rem;
  font-size: 0.86rem;
}

/* ---------- hero ---------- */

.hero {
  padding-block: clamp(2.5rem, 5vw, 4.5rem) clamp(3rem, 6vw, 5rem);
  overflow: clip;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  align-items: center;
  gap: clamp(2.5rem, 6vw, 5rem);
}

.hero h1 {
  margin-top: 1.1rem;
  font-size: clamp(3rem, 6.6vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.hero h1 .hl {
  color: var(--brand);
  font-style: italic;
  font-variation-settings: "SOFT" 40, "WONK" 1;
}

.hero .lede {
  margin-top: 1.35rem;
  max-width: 34rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.9rem;
}

.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  margin: 1.7rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.82rem;
  color: var(--ink-55);
}

.trust li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.trust svg {
  width: 0.95rem;
  height: 0.95rem;
  color: var(--brand-deep);
}

.hero-art {
  position: relative;
  padding: 1.5rem 0.75rem 1.75rem 0.75rem;
}

.art-card {
  position: relative;
  transform: rotate(-1.4deg);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 0.9rem;
  box-shadow: var(--shadow-lift);
}

.art-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.45rem 0.9rem;
  font-size: 0.68rem;
  color: var(--ink-55);
}

.art-dots {
  display: flex;
  gap: 0.25rem;
}

.art-dots span {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--line);
}

.art-dots span:nth-child(1) { background: var(--coral); }
.art-dots span:nth-child(2) { background: var(--lemon); }
.art-dots span:nth-child(3) { background: var(--mint); }

.art-url {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.64rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.art-pill {
  margin-left: auto;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-weight: 600;
  font-size: 0.6rem;
  white-space: nowrap;
}

.art-frame {
  position: relative;
  display: grid;
  place-items: center;
  padding: clamp(1.2rem, 3vw, 2rem);
  border-radius: 20px;
  background:
    linear-gradient(90deg, rgba(25, 23, 34, 0.045) 1px, transparent 1px),
    linear-gradient(rgba(25, 23, 34, 0.045) 1px, transparent 1px),
    var(--paper-2);
  background-size: 26px 26px;
  overflow: hidden;
}

.hero-qr {
  width: min(100%, 17.5rem);
  padding: 0.9rem;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 20px 40px -28px rgba(25, 23, 34, 0.45);
}

.hero-qr svg {
  width: 100%;
  height: auto;
}

.scanline {
  position: absolute;
  inset-inline: 12%;
  top: 12%;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
  opacity: 0.8;
  animation: scan 4.5s ease-in-out infinite;
}

@keyframes scan {
  0%, 100% { transform: translateY(0); opacity: 0.15; }
  50% { transform: translateY(13.5rem); opacity: 0.85; }
}

.crop {
  position: absolute;
  width: 0.85rem;
  height: 0.85rem;
  border: 1.5px solid var(--brand);
  opacity: 0.55;
}

.crop-tl { top: 0.85rem; left: 0.85rem; border-right: 0; border-bottom: 0; }
.crop-tr { top: 0.85rem; right: 0.85rem; border-left: 0; border-bottom: 0; }
.crop-bl { bottom: 0.85rem; left: 0.85rem; border-right: 0; border-top: 0; }
.crop-br { bottom: 0.85rem; right: 0.85rem; border-left: 0; border-top: 0; }

.art-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 0.55rem 0.3rem;
  font-size: 0.72rem;
  color: var(--ink-55);
}

.art-caption strong {
  font-weight: 600;
  color: var(--ink);
}

.art-swatches {
  display: flex;
  gap: 0.3rem;
}

.art-swatches span {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
}

.art-swatches span:nth-child(1) { background: var(--brand); }
.art-swatches span:nth-child(2) { background: var(--lemon); }
.art-swatches span:nth-child(3) { background: var(--mint); }
.art-swatches span:nth-child(4) { background: var(--coral); }

.badge-you {
  position: absolute;
  top: 0.1rem;
  right: 0;
  z-index: 2;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 600;
  transform: rotate(3deg);
  box-shadow: 0 10px 24px -14px rgba(82, 54, 214, 0.9);
}

.float-pill {
  position: absolute;
  left: -0.4rem;
  bottom: 0.4rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  box-shadow: var(--shadow-soft);
}

.float-pill svg {
  width: 0.9rem;
  height: 0.9rem;
  color: var(--brand);
}

/* ---------- studio ---------- */

.studio-section {
  padding-block: clamp(3.5rem, 7vw, 6rem);
  border-block: 1px solid var(--line-soft);
  background:
    radial-gradient(48rem 26rem at 85% 0%, rgba(107, 78, 240, 0.07), transparent 60%),
    rgba(255, 255, 255, 0.35);
  scroll-margin-top: 5rem;
}

.studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
}

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 70px -55px rgba(25, 23, 34, 0.7);
  padding: clamp(1.25rem, 3vw, 1.9rem);
  min-width: 0;
}

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.panel-head h3 {
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.panel-head span {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-55);
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.25rem;
  padding: 0.25rem;
  border-radius: 999px;
  background: var(--cream);
}

.type-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.type-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  min-height: 3.1rem;
  padding: 0.45rem 0.15rem;
  border: 1px solid rgba(25, 23, 34, 0.14);
  border-radius: 11px;
  background: var(--paper-2);
  color: var(--ink-70);
  font-size: 0.62rem;
  font-weight: 500;
  line-height: 1.1;
  touch-action: manipulation;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease,
    transform 0.15s ease;
}

.type-btn svg {
  width: 1.05rem;
  height: 1.05rem;
}

.type-btn:hover {
  border-color: var(--brand);
  color: var(--ink);
  transform: translateY(-1px);
}

.type-btn.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 6px 16px -10px rgba(82, 54, 214, 0.9);
}

.content-fields {
  margin-top: 1.1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.form-grid .field {
  margin-top: 0;
}

.field-full {
  grid-column: 1 / -1;
}

.input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.utility-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1rem;
  margin-top: 0.9rem;
}

.utility-row .text-btn {
  padding: 0;
}

.scan-result {
  flex-basis: 100%;
  font-size: 0.75rem;
  line-height: 1.45;
}

.scan-result.is-ok {
  color: #1f6b3a;
}

.scan-result.is-fail {
  color: #a2321f;
}

.tabs input,
.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tabs label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.4rem;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink-70);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.tabs label svg {
  width: 0.95rem;
  height: 0.95rem;
}

.tabs input:checked + label {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 4px 12px -8px rgba(25, 23, 34, 0.5);
}

.tabs input:focus-visible + label,
.segmented input:focus-visible + label {
  outline: 3px solid rgba(107, 78, 240, 0.45);
  outline-offset: 2px;
}

.field {
  margin-top: 1.15rem;
}

.field > label,
.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.field > label.checkline {
  justify-content: flex-start;
  width: fit-content;
  margin-bottom: 0;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0;
}

.field-hint {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--ink-55);
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid rgba(25, 23, 34, 0.16);
  border-radius: 13px;
  background: var(--paper-2);
  padding: 0.72rem 0.85rem;
  font-size: 0.9rem;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.input,
.select {
  height: 2.85rem;
}

.textarea {
  min-height: 6rem;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(107, 78, 240, 0.15);
}

.wifi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.wifi-grid .field {
  margin-top: 0.9rem;
}

.checkline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--ink-70);
  cursor: pointer;
}

.checkline input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--brand);
}

.divider {
  height: 1px;
  margin: 1.4rem 0 0.2rem;
  background: var(--line-soft);
}

.section-label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 1.35rem 0 0.7rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-55);
}

.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line-soft);
}

.presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.preset {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.2rem;
  padding: 0 0.7rem;
  border: 1px solid rgba(25, 23, 34, 0.14);
  border-radius: 999px;
  background: #fff;
  font-size: 0.74rem;
  font-weight: 500;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.preset:hover {
  border-color: var(--brand);
  transform: translateY(-1px);
}

.preset i {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
}

.segmented {
  display: flex;
  gap: 0.25rem;
  padding: 0.25rem;
  border-radius: 13px;
  background: var(--cream);
}

.segmented label {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.45rem 0.3rem;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1.15;
  text-align: center;
  overflow-wrap: anywhere;
  color: var(--ink-55);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.segmented label svg {
  width: 1.2rem;
  height: 1.2rem;
}

.segmented input:checked + label {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 4px 12px -8px rgba(25, 23, 34, 0.5);
}

.control-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1.05rem;
}

.control-row > div {
  min-width: 0;
}

.color-field {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  height: 2.85rem;
  padding: 0.3rem;
  border: 1px solid rgba(25, 23, 34, 0.16);
  border-radius: 13px;
  background: var(--paper-2);
}

.color-field input[type="color"] {
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: none;
  cursor: pointer;
}

.color-field input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color-field input[type="color"]::-webkit-color-swatch {
  border: 1px solid rgba(25, 23, 34, 0.12);
  border-radius: 9px;
}

.color-field span {
  font-size: 0.78rem;
  font-weight: 500;
}

.color-field input:disabled {
  opacity: 0.35;
}

.logo-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.file-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.45rem;
  padding: 0 0.9rem;
  border: 1px dashed rgba(25, 23, 34, 0.28);
  border-radius: 11px;
  background: var(--paper-2);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.file-btn:hover {
  border-color: var(--brand);
  background: #fff;
}

.file-btn svg {
  width: 0.95rem;
  height: 0.95rem;
}

#logoName {
  max-width: 11rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.72rem;
  color: var(--ink-55);
}

.text-btn {
  border: 0;
  background: none;
  padding: 0.2rem 0.3rem;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--brand-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.range-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 0.35rem;
}

.range-row input[type="range"] {
  flex: 1;
  min-width: 0;
  width: 100%;
  accent-color: var(--brand);
}

.range-row output {
  min-width: 1.4rem;
  text-align: right;
  font-size: 0.8rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.export-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
  margin-top: 0.9rem;
}

.export-row .select {
  width: auto;
  min-width: 7.5rem;
}

.download-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.download-row .btn {
  padding-inline: 0.7rem;
  font-size: 0.82rem;
}

.studio-error,
.studio-note {
  margin-top: 0.9rem;
  font-size: 0.78rem;
  line-height: 1.5;
}

.studio-error {
  color: #a2321f;
  font-weight: 500;
}

.studio-note {
  color: var(--ink-55);
}

/* preview */

.preview-col {
  position: sticky;
  top: 5.5rem;
}

.preview-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1rem, 2.4vw, 1.4rem);
  box-shadow: var(--shadow-lift);
}

.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0 0.2rem 0.9rem;
}

.preview-head strong {
  font-size: 0.82rem;
  font-weight: 600;
}

#qrMeta {
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink-55);
}

.preview-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 19rem;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  border-radius: 18px;
  background-color: var(--paper-2);
  background-image:
    linear-gradient(90deg, rgba(25, 23, 34, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(25, 23, 34, 0.05) 1px, transparent 1px);
  background-size: 26px 26px;
  overflow: hidden;
}

.preview-stage svg {
  width: min(100%, 20rem);
  height: auto;
  filter: drop-shadow(0 18px 30px rgba(25, 23, 34, 0.12));
}

.preview-empty {
  display: grid;
  place-items: center;
  width: min(100%, 18rem);
  aspect-ratio: 1;
  border: 1.5px dashed rgba(25, 23, 34, 0.2);
  border-radius: 16px;
  font-size: 0.8rem;
  color: var(--ink-55);
  text-align: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.5);
}

.preview-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding-top: 0.9rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--paper-2);
  font-size: 0.68rem;
  color: var(--ink-70);
}

.chip svg {
  width: 0.8rem;
  height: 0.8rem;
  color: var(--brand-deep);
}

.preview-hint {
  display: flex;
  gap: 0.55rem;
  margin-top: 0.85rem;
  padding: 0 0.35rem;
  font-size: 0.76rem;
  line-height: 1.5;
  color: var(--ink-55);
}

.preview-hint svg {
  width: 1rem;
  height: 1rem;
  flex: none;
  margin-top: 0.1rem;
  color: var(--brand-deep);
}

/* ---------- features ---------- */

.features {
  padding-block: clamp(4rem, 8vw, 7rem);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.feature {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper-2);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.feature:hover {
  transform: translateY(-3px);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 0.9rem;
  background: var(--brand-soft);
  color: var(--ink);
}

.feature:nth-child(2) .feature-icon { background: var(--mint); }
.feature:nth-child(3) .feature-icon { background: var(--lemon); }
.feature:nth-child(4) .feature-icon { background: var(--sky); }
.feature:nth-child(5) .feature-icon { background: var(--coral); }
.feature:nth-child(6) .feature-icon { background: #e5dcff; }

.feature-icon svg {
  width: 1.35rem;
  height: 1.35rem;
}

.feature h3 {
  margin-top: 1.1rem;
  font-size: 1.32rem;
  line-height: 1.12;
}

.feature p {
  margin-top: 0.55rem;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--ink-70);
}

/* ---------- guides ---------- */

.guides {
  border-top: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.28);
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.guide-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper-2);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.guide-card:hover {
  transform: translateY(-3px);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.guide-icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.85rem;
  background: var(--brand-soft);
}

.guide-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.guide-icon-mint { background: var(--mint); }
.guide-icon-sky { background: var(--sky); }
.guide-icon-lemon { background: var(--lemon); }
.guide-icon-coral { background: var(--coral); }
.guide-icon-violet { background: var(--brand-soft); }
.guide-icon-cream { background: var(--cream); }

.guide-card h3 {
  margin-top: 1rem;
  font-size: 1.28rem;
}

.guide-card p {
  margin-top: 0.5rem;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--ink-70);
}

.guide-more {
  margin-top: auto;
  padding-top: 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand-deep);
}

@media (max-width: 960px) {
  .guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .guide-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- editorial ---------- */

.editorial {
  padding-block: clamp(3.5rem, 7vw, 6rem);
  border-top: 1px solid var(--line-soft);
}

.editorial-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.editorial h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  max-width: 24ch;
}

.editorial-copy p {
  font-size: 0.97rem;
  line-height: 1.7;
  color: var(--ink-70);
}

.editorial-copy p + p {
  margin-top: 1rem;
}

.editorial-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.25rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--brand-deep);
  border-bottom: 1px solid rgba(82, 54, 214, 0.35);
  padding-bottom: 0.15rem;
}

.editorial-link svg {
  width: 0.9rem;
  height: 0.9rem;
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 1.6rem;
}

.stat {
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper-2);
}

.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.stat span {
  font-size: 0.74rem;
  color: var(--ink-55);
}

/* ---------- how ---------- */

.how {
  padding-block: clamp(4rem, 8vw, 7rem);
  border-top: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.32);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
  counter-reset: step;
}

.step {
  position: relative;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}

.step::before {
  counter-increment: step;
  content: "0" counter(step);
  display: block;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--brand);
  letter-spacing: 0.05em;
}

.step h3 {
  margin-top: 0.5rem;
  font-size: 1.4rem;
}

.step p {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ink-70);
}

.privacy-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-top: clamp(2rem, 4vw, 3rem);
  padding: 1.4rem 1.6rem;
  border: 1px solid rgba(25, 23, 34, 0.1);
  border-radius: 22px;
  background: linear-gradient(120deg, #efe8dc, #f6f1e7 60%, #e9e1ff);
}

.privacy-card svg {
  width: 1.6rem;
  height: 1.6rem;
  flex: none;
  color: var(--brand-deep);
  margin-top: 0.15rem;
}

.privacy-card strong {
  display: block;
  font-size: 0.95rem;
}

.privacy-card p {
  margin-top: 0.2rem;
  font-size: 0.84rem;
  color: var(--ink-70);
}

.privacy-card a {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- faq ---------- */

.faq {
  padding-block: clamp(4rem, 8vw, 7rem);
  border-top: 1px solid var(--line-soft);
}

.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.faq h2 {
  margin-top: 0.8rem;
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
}

.faq-intro p {
  margin-top: 1rem;
  max-width: 24rem;
  font-size: 0.92rem;
  color: var(--ink-70);
}

.faq-intro a {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.faq-list {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper-2);
  padding-inline: 1.4rem;
}

.faq-list details {
  border-bottom: 1px solid var(--line-soft);
}

.faq-list details:last-child {
  border-bottom: 0;
}

.faq-list summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 0;
  list-style: none;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.4;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary span:first-child {
  flex: 1;
}

.faq-plus {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  flex: none;
  border: 1px solid rgba(25, 23, 34, 0.18);
  border-radius: 50%;
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.faq-plus svg {
  width: 0.85rem;
  height: 0.85rem;
}

details[open] .faq-plus {
  transform: rotate(45deg);
  border-color: var(--brand);
  color: var(--brand);
}

.faq-list details p {
  padding: 0 2.7rem 1.2rem 0;
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--ink-70);
}

/* ---------- cta ---------- */

.cta-section {
  padding-block: clamp(3rem, 6vw, 5rem);
}

.cta-card {
  position: relative;
  overflow: hidden;
  padding: clamp(3rem, 7vw, 5.5rem) clamp(1.5rem, 5vw, 4rem);
  border-radius: var(--radius-xl);
  background: var(--brand);
  color: #fff;
  text-align: center;
}

.cta-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.13) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.13) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: 0.35;
  pointer-events: none;
}

.cta-glow {
  position: absolute;
  top: -6rem;
  right: -3rem;
  width: 18rem;
  height: 18rem;
  border-radius: 50%;
  background: rgba(248, 210, 74, 0.35);
  filter: blur(60px);
  pointer-events: none;
}

.cta-inner {
  position: relative;
}

.cta-card .eyebrow {
  color: rgba(255, 255, 255, 0.92);
}

.cta-card h2 {
  margin-top: 1rem;
  font-size: clamp(2.3rem, 5.4vw, 4.3rem);
  letter-spacing: -0.045em;
}

.cta-card p {
  margin: 1rem auto 0;
  max-width: 34rem;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.92);
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
  margin-top: 1.9rem;
}

.cta-card .btn-primary {
  background: #fff;
  color: var(--ink);
  box-shadow: none;
}

.cta-card .btn-primary:hover {
  background: var(--paper-2);
}

.cta-card .btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.cta-card .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.7);
}

.cta-note {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.5rem;
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.9);
}

.cta-note svg {
  width: 0.9rem;
  height: 0.9rem;
}

/* ---------- footer ---------- */

.site-footer {
  padding-top: 3.5rem;
  border-top: 1px solid var(--line-soft);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2.1fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 3rem;
}

.footer-brand p {
  margin-top: 0.9rem;
  max-width: 20rem;
  font-size: 0.84rem;
  line-height: 1.6;
  color: var(--ink-55);
}

.footer-local {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  font-size: 0.72rem;
  color: var(--ink-55);
}

.footer-local svg {
  width: 0.85rem;
  height: 0.85rem;
  color: var(--brand-deep);
}

.footer-col h3 {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-70);
}

.footer-col ul {
  display: grid;
  gap: 0.55rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.84rem;
  color: var(--ink-55);
}

.footer-col a:hover {
  color: var(--ink);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.2rem;
  border-top: 1px solid var(--line-soft);
  font-size: 0.72rem;
  color: var(--ink-70);
}

.footer-bottom a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- landing pages ---------- */

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  padding-top: 1.6rem;
  font-size: 0.76rem;
  color: var(--ink-55);
}

.breadcrumb a:hover {
  color: var(--ink);
}

.landing-hero {
  padding-block: clamp(1.6rem, 4vw, 3.2rem) clamp(3rem, 7vw, 5rem);
}

.landing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
}

.landing-copy h1 {
  margin-top: 0.9rem;
  font-size: clamp(2.7rem, 5.8vw, 4.8rem);
}

.landing-copy .lede {
  margin-top: 1.2rem;
  max-width: 34rem;
}

.landing-art {
  position: relative;
  width: 100%;
  max-width: 24rem;
  justify-self: end;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: #fff;
  box-shadow: var(--shadow-lift);
}

.landing-qr {
  display: grid;
  place-items: center;
  padding: 1rem;
  border-radius: 20px;
  background:
    linear-gradient(90deg, rgba(25, 23, 34, 0.045) 1px, transparent 1px),
    linear-gradient(rgba(25, 23, 34, 0.045) 1px, transparent 1px),
    var(--paper-2);
  background-size: 26px 26px;
}

.landing-qr svg {
  width: min(100%, 18rem);
  height: auto;
  filter: drop-shadow(0 16px 26px rgba(25, 23, 34, 0.12));
}

.landing-art-label {
  position: absolute;
  top: -0.7rem;
  right: 1.4rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transform: rotate(3deg);
}

.landing-art-note {
  padding: 0.75rem 0.35rem 0.1rem;
  font-size: 0.72rem;
  color: var(--ink-55);
  text-align: center;
}

.landing-section {
  padding-block: clamp(3.5rem, 7vw, 6rem);
  border-top: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.28);
}

.landing-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.landing-prose h2 {
  margin-top: 0.8rem;
  font-size: clamp(2rem, 4vw, 3rem);
}

.landing-prose p {
  margin-top: 1rem;
  font-size: 0.97rem;
  line-height: 1.7;
  color: var(--ink-70);
}

.landing-list {
  display: grid;
  gap: 0.7rem;
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
}

.landing-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--ink-70);
}

.landing-list svg {
  width: 1rem;
  height: 1rem;
  flex: none;
  margin-top: 0.2rem;
  color: var(--brand-deep);
}

.how-card {
  position: sticky;
  top: 5.5rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.how-card h2 {
  margin-top: 0.7rem;
  font-size: 1.65rem;
}

.how-card .btn {
  margin-top: 1.2rem;
  width: 100%;
}

.step-list {
  counter-reset: step;
  display: grid;
  gap: 1rem;
  margin: 1.2rem 0 0;
  padding: 0;
  list-style: none;
}

.step-list li {
  position: relative;
  padding-left: 2.2rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--ink-70);
}

.step-list li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.1rem;
  display: grid;
  place-items: center;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-size: 0.7rem;
  font-weight: 600;
}

.step-list strong {
  display: block;
  font-size: 0.92rem;
  color: var(--ink);
}

@media (max-width: 960px) {
  .landing-grid,
  .landing-split {
    grid-template-columns: minmax(0, 1fr);
  }

  .landing-art {
    justify-self: start;
    max-width: 22rem;
  }

  .how-card {
    position: static;
  }
}

@media (max-width: 640px) {
  .landing-copy h1 {
    font-size: clamp(2.4rem, 12vw, 3.4rem);
  }

  .landing-art {
    max-width: 100%;
  }
}

/* ---------- responsive ---------- */

@media (max-width: 1100px) {
  .nav-links {
    gap: 1.1rem;
  }

  .footer-grid {
    grid-template-columns: 1.6fr 1fr 1fr;
  }

  .footer-col:last-child {
    grid-column: 2 / -1;
  }
}

@media (max-width: 960px) {
  .nav-links {
    display: none;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .editorial-grid,
  .faq-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .studio-grid {
    display: flex;
    flex-direction: column;
  }

  .hero-art {
    order: 2;
    max-width: 30rem;
    margin-inline: auto;
    width: 100%;
  }

  .preview-col {
    order: -1;
    position: static;
    padding-block: 0.45rem;
    background: var(--paper);
  }

  .preview-card {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0.9rem;
  }

  .preview-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    padding: 0;
  }

  .preview-stage {
    width: 8.5rem;
    min-height: 0;
    padding: 0.3rem;
    border-radius: 14px;
  }

  .preview-stage svg {
    width: 100%;
    filter: none;
  }

  .preview-empty {
    width: 8rem;
    font-size: 0.65rem;
  }

  .preview-foot,
  .preview-hint {
    display: none;
  }

  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .step {
    padding-block: 1.25rem;
  }

  .step:first-child {
    border-top: 0;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-col:last-child {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .wrap {
    width: min(100% - 1.6rem, var(--wrap));
  }

  .nav-inner {
    height: 3.9rem;
  }

  .nav-cta {
    display: none;
  }

  .hero {
    padding-top: 1.75rem;
  }

  .hero h1 {
    font-size: clamp(2.7rem, 13vw, 3.8rem);
  }

  .hero-cta .btn {
    flex: 1 1 auto;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .feature {
    padding: 1.25rem;
  }

  .faq-list {
    padding-inline: 1.1rem;
  }

  .download-row {
    grid-template-columns: 1fr;
  }

  .download-row .btn {
    min-height: 2.9rem;
  }

  .export-row {
    grid-template-columns: 1fr;
  }

  .export-row .select {
    width: 100%;
  }

  .preview-stage {
    padding: 1.25rem;
  }

  .cta-card {
    border-radius: 26px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }

  .footer-col:last-child {
    grid-column: auto;
  }

  .float-pill {
    left: 0;
  }
}

@media (max-width: 420px) {
  .control-row,
  .wifi-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .type-grid {
    gap: 0.3rem;
  }

  .type-btn {
    font-size: 0.58rem;
    min-height: 2.9rem;
  }

  .tabs label {
    font-size: 0.76rem;
  }
}

/* ---------- mobile refinements ---------- */

@media (max-width: 640px) {
  .input,
  .select,
  .textarea {
    font-size: 1rem;
  }

  .input,
  .select {
    height: 3.15rem;
  }

  .textarea {
    min-height: 7rem;
  }

  .preset {
    min-height: 2.75rem;
    padding-inline: 0.8rem;
  }

  .segmented label {
    min-height: 3rem;
    justify-content: center;
    font-size: 0.72rem;
  }

  .color-field {
    height: 3.25rem;
  }

  .color-field input[type="color"] {
    width: 2.75rem;
    height: 2.75rem;
  }

  .file-btn {
    min-height: 2.85rem;
  }

  .range-row input[type="range"] {
    height: 2.75rem;
  }

  .logo-row .text-btn {
    min-height: 2.75rem;
    padding-inline: 0.4rem;
  }

  .checkline {
    min-height: 2.75rem;
    font-size: 0.86rem;
  }

  .lang-link {
    width: 2.75rem;
    height: 2.75rem;
  }

  .brand {
    min-height: 2.75rem;
  }

  .type-btn {
    font-size: 0.63rem;
  }

  .panel-head > span {
    display: none;
  }

  .download-row .btn {
    min-height: 3.15rem;
  }

  .utility-row {
    gap: 0.2rem 1.1rem;
  }

  .utility-row .text-btn {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0 0.2rem;
  }

  .art-caption {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
  }

  .float-pill {
    position: static;
    margin: 1rem auto 0;
    width: fit-content;
  }

  .hero-art {
    padding-bottom: 0.5rem;
  }

  .footer-col ul {
    gap: 0;
  }

  .footer-col li a {
    display: inline-flex;
    align-items: center;
    min-height: 2.4rem;
  }

  .landing-art {
    padding: 0.9rem;
  }

  .landing-qr svg {
    width: min(100%, 15rem);
  }

  .how-card {
    padding: 1.25rem;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
  }
}

@media (max-width: 520px) {
  .control-row,
  .wifi-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .type-grid {
    gap: 0.25rem;
  }

  .type-btn {
    min-height: 3.2rem;
    font-size: 0.62rem;
  }

  .hero-cta {
    flex-direction: column;
  }

  .hero-cta .btn {
    width: 100%;
  }

  .preview-card {
    padding: 0.55rem 0.7rem;
  }

  .preview-head strong {
    font-size: 0.72rem;
  }

  .download-row .btn {
    font-size: 0.86rem;
  }
}

/* Landscape phones: keep the preview compact, above the form. */
@media (max-height: 560px) and (max-width: 960px) {
  .preview-stage {
    width: 5rem;
  }

  .preview-empty {
    width: 5rem;
    font-size: 0.6rem;
  }

  .preview-card {
    padding-block: 0.55rem;
  }
}

/* Touch devices of any width: keep iOS from zooming and targets tappable. */
@media (pointer: coarse) {
  .input,
  .select,
  .textarea {
    font-size: 1rem;
  }

  .input,
  .select {
    height: 3.15rem;
  }

  .preset {
    min-height: 2.75rem;
  }

  .segmented label {
    min-height: 3rem;
  }

  .file-btn {
    min-height: 2.85rem;
  }

  .utility-row .text-btn {
    min-height: 2.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .scanline {
    display: none;
  }
}

