/* Public site: landing page and wizard. The generated pages carry their own
   styles inline, so nothing here leaks into them. */

:root {
  --bg: #f6f7f9;
  --panel: #fff;
  --ink: #14181f;
  --muted: #667085;
  --line: #e3e6ec;

  /* Brand red taken from the biegun.studio theme. White text on it measures
     4.90:1, which clears WCAG AA; the hover shade measures 6.34:1. */
  --brand: #E20B0B;
  --brand-dark: #C10909;
  --brand-soft: rgba(226, 11, 11, .09);

  --ok: #1a7f4b;
  --error: #b42318;
  --radius: 12px;

  --max: 1400px;
  /* Confirmation screens only — a centred column reads better there. */
  --max-narrow: 720px;

  --font-display: 'Archivo', 'Inter', system-ui, sans-serif;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

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

h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); line-height: 1.15; margin: 0 0 .4em; letter-spacing: -.02em; }
h2 { font-size: 1.35rem; margin: 0 0 .6em; }
h3 { font-size: 1.05rem; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
a { color: var(--brand); }

.lead { font-size: 1.1rem; color: var(--muted); max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.hint { color: var(--muted); font-size: .88rem; }
.optional { color: var(--muted); font-weight: 400; }

/* ------------------------------------------------------------------ chrome */

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; padding: 10px 16px;
  background: var(--ink); color: #fff; text-decoration: none; }
.skip-link:focus { left: 12px; top: 12px; }

.topbar { background: var(--panel); border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 78px; gap: 16px; }

/* On the landing page the header floats above the hero video instead of
   pushing it down, so the film starts at the very top of the viewport. */
.topbar.overlay { position: absolute; inset: 0 0 auto; background: transparent; border-bottom: 0; }

.brand { display: flex; align-items: center; gap: 14px; color: var(--ink); text-decoration: none; }
.brand-logo { display: block; width: auto; height: 30px; }
.brand-logo.light { display: none; }
.topbar.overlay .brand-logo.dark { display: none; }
.topbar.overlay .brand-logo.light { display: block; }

.brand-divider { width: 1px; height: 26px; background: var(--line); }
.topbar.overlay .brand-divider { background: rgba(255, 255, 255, .38); }

.brand-tag { font-family: var(--font-display); font-weight: 700; font-size: .95rem;
  letter-spacing: -.01em; white-space: nowrap; }
.brand-tag-short { display: none; }
.topbar.overlay .brand-tag { color: #fff; }

.topbar-back { display: inline-flex; align-items: center; gap: 8px; color: var(--muted);
  text-decoration: none; font-size: .92rem; font-weight: 500; white-space: nowrap; transition: .15s; }
.topbar-back:hover { color: var(--brand); }
.topbar-back-short { display: none; }
.topbar.overlay .topbar-back { color: rgba(255, 255, 255, .88); }
.topbar.overlay .topbar-back:hover { color: #fff; }

main { display: block; }
main.form-wrap { padding-top: 34px; padding-bottom: 60px; }

/* ------------------------------------------------------------------ progress */

.progress { background: var(--panel); border-bottom: 1px solid var(--line); }

/* The steps spread across the full width and share one rail. Each item owns an
   equal share, so the row stays even whatever the labels say. */
.progress ol { display: flex; list-style: none; margin: 0; padding: 20px 0 18px; gap: 0; }
.progress li { position: relative; flex: 1 1 0; display: flex; flex-direction: column;
  align-items: center; gap: 8px; color: var(--muted); font-size: .86rem; text-align: center; }

/* Rail drawn between the circles, never before the first or after the last. */
.progress li::before,
.progress li::after {
  content: ""; position: absolute; top: 13px; height: 2px; background: var(--line);
}
.progress li::before { left: 0; right: 50%; }
.progress li::after  { left: 50%; right: 0; }
.progress li:first-child::before,
.progress li:last-child::after { display: none; }

.progress li.done::before, .progress li.done::after,
.progress li.now::before { background: var(--brand); }

.progress-num { position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%;
  background: var(--panel); border: 2px solid var(--line); display: flex; align-items: center;
  justify-content: center; font-size: .8rem; font-weight: 700; }
.progress-label { line-height: 1.3; }

.progress li.now { color: var(--brand); font-weight: 600; }
.progress li.now .progress-num { background: var(--brand); border-color: var(--brand); color: #fff; }
.progress li.done { color: var(--ink); }
.progress li.done .progress-num { background: var(--brand); border-color: var(--brand); color: #fff; }

@media (max-width: 700px) {
  .progress ol { padding: 14px 0 12px; }
  .progress-label { display: none; }
  .progress li::before, .progress li::after { top: 12px; }
  .progress-num { width: 26px; height: 26px; }
}

/* ------------------------------------------------------------------ blocks */

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  margin-bottom: 22px;
}

.band { margin: 46px 0; }
.band.alt { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }

.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 20px; border: 1px solid; font-size: .95rem; }
.alert.ok { background: #eaf7ef; border-color: #b7e0c6; color: var(--ok); }
.alert.error { background: #fdeceb; border-color: #f3c2be; color: var(--error); }

/* ------------------------------------------------------------------ buttons */

.btn {
  display: inline-block; padding: 12px 22px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink); font: inherit; font-weight: 600; font-size: .96rem;
  text-decoration: none; cursor: pointer; transition: .15s;
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); }
.btn.tiny { padding: 6px 12px; font-size: .84rem; }
.btn.tiny.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.link-btn { background: none; border: 0; padding: 0; font: inherit; font-size: .84rem;
  color: var(--error); text-decoration: underline; cursor: pointer; }

.actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 24px; }
.actions.sticky { position: sticky; bottom: 0; background: var(--bg); padding: 16px 0; border-top: 1px solid var(--line); }

.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.cta-end { text-align: center; padding: 40px 0; }
.cta-end .cta-row { justify-content: center; }

/* ------------------------------------------------------------------ landing */

/* --- hero with background video --------------------------------------- */

/* The film is 1920x1080. It is cropped with object-fit rather than letterboxed,
   and the block keeps a floor height so a tall viewport never shows the seam.
   The src is attached by app.js — see the note there about mobile. */
.hero-video {
  position: relative;
  min-height: 640px;
  height: 78vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #0d1117;
  isolation: isolate;
}

.hero-video-media {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  z-index: -2;
  opacity: 0; transition: opacity .6s ease;
}
.hero-video-media.playing { opacity: 1; }

/* Two layers: a flat wash that keeps the whole film readable, and a gradient
   that deepens towards the copy in the bottom-left corner. */
.hero-video-cover {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, rgba(9, 12, 17, .92) 0%, rgba(9, 12, 17, .30) 55%, rgba(9, 12, 17, .45) 100%),
    rgba(9, 12, 17, .38);
}

.hero-video-inner { width: 100%; padding-top: 130px; padding-bottom: 120px; }

.hero-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 22px;
  opacity: .92;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.3rem, 5.2vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: -.025em;
  color: #fff;
  margin: 0 0 24px;
  max-width: 900px;
  text-wrap: balance;
}

.hero-lead {
  font-size: clamp(1rem, 1.25vw, 1.18rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, .9);
  max-width: 900px;
  margin-bottom: 20px;
}

/* --- the two starting cards ------------------------------------------- */

/* Deliberately pulled up so the cards straddle the bottom edge of the film:
   the top half sits on the video, the bottom half spills onto the page. */
.start-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  margin-top: -110px;
  margin-bottom: 40px;
  position: relative;
  z-index: 10;
}

.start-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 34px 32px 32px;
  box-shadow: 0 20px 48px rgba(9, 12, 17, .16);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  transition: transform .22s ease, box-shadow .22s ease;
}
.start-card:hover { transform: translateY(-4px); box-shadow: 0 26px 60px rgba(9, 12, 17, .2); }

.start-icon { display: block; }
.start-icon svg { width: 38px; height: 38px; stroke: var(--brand); fill: none; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round; }

.start-card h2 { font-size: 1.45rem; letter-spacing: -.015em; margin: 0; }
.start-card p { color: var(--muted); margin: 0; flex: 1 1 auto; }
.start-card .btn { margin-top: 8px; }

/* --- section furniture -------------------------------------------------- */

.band { padding: 84px 0; margin: 0; }
.band.alt { background: var(--panel); border: 0; border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line); border-radius: 0; padding: 84px 0; }

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  line-height: 1.12;
  letter-spacing: -.025em;
  margin: 0 0 18px;
  max-width: 22ch;
  text-wrap: balance;
}
.section-lead { color: var(--muted); font-size: 1.06rem; max-width: 78ch; margin: 0 0 46px; }

.center { text-align: center; }
.cta-row.center { justify-content: center; margin-top: 46px; }

/* --- how it works ------------------------------------------------------- */

.how-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }

.how-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 30px 26px;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.band.alt .how-card { background: var(--bg); }
.how-card:hover { transform: translateY(-6px); border-color: var(--brand);
  box-shadow: 0 18px 40px rgba(9, 12, 17, .1); }

.how-num {
  display: flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; margin-bottom: 20px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
  font-family: var(--font-display); font-weight: 800; font-size: 1.3rem;
  transition: background .22s ease, color .22s ease;
}
.how-card:hover .how-num { background: var(--brand); color: #fff; }

.how-card h3 { font-size: 1.22rem; letter-spacing: -.015em; margin: 0 0 10px; }
.how-card p { color: var(--muted); font-size: .96rem; margin: 0; }

/* --- theme showcase ----------------------------------------------------- */

.theme-showcase { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.showcase-card {
  display: flex; flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.band.alt .showcase-card { background: var(--bg); }
.showcase-card:hover { transform: translateY(-6px); border-color: var(--brand);
  box-shadow: 0 18px 40px rgba(9, 12, 17, .12); }

/* Same trick as the wizard picker: render at full page width, then scale
   down, so the tile shows real proportions rather than a squashed layout. */
.showcase-frame { position: relative; display: block; height: 230px; overflow: hidden;
  border-bottom: 1px solid var(--line); background: #fff; }
.showcase-frame iframe { position: absolute; top: 0; left: 0; width: 1280px; height: 1150px;
  border: 0; transform-origin: 0 0; pointer-events: none;
  opacity: 0; transition: opacity .25s; }
.showcase-frame.ready iframe { opacity: 1; }
.showcase-loading { position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; font-size: .82rem; color: var(--muted); }
.showcase-frame.ready .showcase-loading { display: none; }

.showcase-body { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 20px; flex: 1 1 auto; }
.showcase-name { font-weight: 700; font-size: 1.05rem; }
.showcase-tagline { color: var(--muted); font-size: .88rem; flex: 1 1 auto; }
.showcase-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.showcase-audience { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }

.theme-swatches { display: flex; gap: 5px; }
.theme-swatches span { width: 22px; height: 22px; border-radius: 5px; border: 1px solid rgba(0,0,0,.12); }

/* --- plans --------------------------------------------------------------- */

.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin: 0 0 30px; }

.plan {
  position: relative;
  padding: 32px 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: transform .22s ease, box-shadow .22s ease;
}
.band.alt .plan { background: var(--bg); }
.plan:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(9, 12, 17, .1); }

.plan.featured { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.plan-badge {
  position: absolute; top: -13px; left: 28px;
  background: var(--brand); color: #fff;
  font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 100px;
}

.plan h3 { font-size: 1.2rem; margin: 0 0 .3em; }
.plan-price { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem;
  color: var(--brand); margin: 0 0 .6em; letter-spacing: -.01em; }
.plan-note { color: var(--muted); font-size: .94rem; margin: 0; }
.plan-grid.compact .plan { padding: 20px; }
.plan-grid.compact .plan-price { font-size: 1.1rem; }

/* --- closing call to action ---------------------------------------------- */

.cta-end { background: var(--ink); color: #fff; padding: 90px 0; text-align: center; }
.cta-end h2 { font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.8rem, 3.4vw, 2.9rem); letter-spacing: -.025em; margin: 0 0 14px; }
.cta-end p { color: rgba(255, 255, 255, .72); max-width: 56ch; margin: 0 auto; }
.cta-end .btn.ghost { color: #fff; border-color: rgba(255, 255, 255, .32); }
.cta-end .btn.ghost:hover { color: #fff; border-color: #fff; background: rgba(255, 255, 255, .08); }

/* --- entrance animation --------------------------------------------------- */

.reveal { opacity: 0; transform: translateY(22px); }
.reveal.shown { opacity: 1; transform: none;
  transition: opacity .55s ease, transform .55s cubic-bezier(.22, .61, .36, 1); }
/* Staggered so a row of four does not pop in as one block. */
.reveal:nth-child(2).shown { transition-delay: .07s; }
.reveal:nth-child(3).shown { transition-delay: .14s; }
.reveal:nth-child(4).shown { transition-delay: .21s; }

/* ------------------------------------------------------------------ forms */

.field { display: block; margin-bottom: 20px; }
.field-label { display: block; font-weight: 600; font-size: .93rem; margin-bottom: 6px; }
fieldset.field { border: 0; padding: 0; margin-inline: 0; }
legend.field-label { padding: 0; }

input[type="text"], input[type="email"], input[type="password"], input[type="search"], select, textarea {
  width: 100%; padding: 11px 13px; font: inherit; font-size: .97rem;
  border: 1px solid var(--line); border-radius: 9px; background: var(--panel); color: var(--ink);
}
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible {
  outline: 3px solid rgba(226, 11, 11, .45); outline-offset: 1px;
}
textarea { resize: vertical; }
.field .hint { display: block; margin-top: 5px; }

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

/* Plan choices read as a row of cards once there is room for one. */
.option-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.option-row .option { margin-bottom: 0; }

/* Name, description and icon on one line; the icon select needs least room. */
.service-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr) minmax(190px, .8fr); gap: 16px; }
@media (max-width: 900px) { .service-row { grid-template-columns: 1fr; } }

/* Folded groups: wording rather than facts, so they start closed. */
.fold { border: 1px solid var(--line); border-radius: var(--radius); margin: 24px 0; background: var(--bg); }
.fold > summary { cursor: pointer; padding: 14px 18px; font-weight: 600; list-style: none; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::before { content: "+"; display: inline-block; width: 1.2em; color: var(--brand); font-weight: 700; }
.fold[open] > summary::before { content: "2"; }
.fold[open] > summary { border-bottom: 1px solid var(--line); }
.fold > *:not(summary) { padding-inline: 18px; }
.fold > *:not(summary):last-child { padding-bottom: 18px; }

/* Review text is the wide half; the signature needs a fraction of that. */
.review-row { display: grid; grid-template-columns: minmax(0, 3fr) minmax(160px, 1fr); gap: 16px; }
@media (max-width: 900px) { .review-row { grid-template-columns: 1fr; } }

.option { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin-bottom: 8px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--panel); cursor: pointer; }
.option:hover { border-color: var(--brand); }
.option input { margin-top: 4px; width: auto; }
.option span { display: block; }
.option .small { display: block; margin-top: 2px; }
.option.consent { align-items: flex-start; margin-top: 10px; }

.chosen { margin: 0 0 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .93rem; }
.chosen a { margin-left: 8px; font-size: .88rem; }

/* Honeypot: never shown to a person, so a filled value means a bot. */
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(320px, .7fr); gap: 26px; align-items: start; }

/* --- wide-container layout ---
   The card spans the full 1400px, so fields are arranged in columns rather
   than stretched. A single input 1400px wide reads as a layout bug. */

.form-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 26px; }
.form-cols > .full { grid-column: 1 / -1; }

/* Free-text areas are capped: a line of prose longer than about 90 characters
   is measurably harder to read, whatever the container allows. */
.card textarea, .field-prose input[type="text"] { max-width: 92ch; }

.card > h2 { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); }
.card > h2:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }

.wizard-done, .narrow { max-width: var(--max-narrow); margin-inline: auto; }

@media (max-width: 900px) {
  .form-cols, .triple { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------ palette */

/* Live palette. Every swatch is redrawn by app.js as the visitor types, and
   the derived colours follow the same arithmetic as Themes::withOverrides(),
   including the rule that dark/footer/bg_alt only move when the primary is
   actually overridden. */

.palette { margin-top: 26px; }
.palette-row + .palette-row { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.palette-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.palette-head h3 { margin: 0; font-size: 1rem; }
.palette-head .hint { margin: 0; }

.swatches { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 12px; }

.swatch { display: flex; flex-direction: column; gap: 6px; }
.swatch-chip { height: 54px; border-radius: 9px; border: 1px solid rgba(0, 0, 0, .12); }
.swatch-name { font-size: .8rem; font-weight: 600; line-height: 1.2; }
.swatch-hex { font-family: ui-monospace, Consolas, monospace; font-size: .74rem; color: var(--muted);
  text-transform: lowercase; }
.swatch.derived .swatch-name { font-weight: 500; color: var(--muted); }

/* Button sample: proves the computed label colour is actually readable. */
.swatch-button { display: flex; align-items: center; justify-content: center; height: 54px;
  border-radius: 9px; font-weight: 600; font-size: .86rem; }

.contrast-tag { font-family: ui-monospace, Consolas, monospace; font-size: .74rem; font-weight: 600; }
.contrast-tag.pass { color: var(--ok); }
.contrast-tag.warn { color: var(--error); }

.palette-row.defaults .swatch-chip { opacity: .85; }


/* ------------------------------------------------------------------ colours */

.color-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 20px; }
.color-row { display: flex; gap: 8px; align-items: center; }
input[type="color"].color-swatch { width: 44px; min-width: 44px; height: 40px; padding: 2px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--panel); cursor: pointer; }
.color-hex { font-family: ui-monospace, Consolas, monospace; text-transform: lowercase; }


/* ------------------------------------------------------------------ theme picker */

.theme-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }

.pick { position: relative; display: block; background: var(--panel); border: 2px solid var(--line);
  border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: .15s; }
.pick:hover { border-color: var(--muted); }
.pick.selected, .pick:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(226, 11, 11, .16); }
.pick > input { position: absolute; top: 14px; left: 14px; z-index: 3; width: 20px; height: 20px; }

/* The preview renders at full page width and is scaled down, so the layout
   proportions match what a visitor would actually get. */
.pick-frame { position: relative; display: block; height: 240px; overflow: hidden;
  border-bottom: 1px solid var(--line); background: #fff; }
/* Width, height and scale are set by app.js from the tile's measured size. */
.pick-frame iframe { position: absolute; top: 0; left: 0; width: 1280px; height: 900px; border: 0;
  transform-origin: 0 0; pointer-events: none; opacity: 0; transition: opacity .2s; }
.pick-frame.ready iframe { opacity: 1; }
.pick-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: .82rem; color: var(--muted); }
.pick-frame.ready .pick-loading { display: none; }

.pick-body { display: block; padding: 16px 18px 18px; }
.pick-name { display: block; font-weight: 700; }
.pick-tagline { display: block; color: var(--muted); font-size: .88rem; margin-bottom: 10px; }
.pick-open { position: absolute; right: 14px; bottom: 16px; font-size: .8rem; }

/* ------------------------------------------------------------------ photo slots */

.slot { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.slot:last-of-type { border-bottom: 0; }
.slot-thumb { width: 78px; min-width: 78px; height: 58px; border-radius: 7px; border: 1px solid var(--line);
  background: var(--bg); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.slot-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slot-empty { font-size: .74rem; color: var(--muted); }
.slot-body { flex: 1 1 auto; min-width: 0; font-size: .9rem; overflow-wrap: anywhere; }
.slot-body strong { display: block; }
.slot-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 6px; min-width: 0; }
.slot-form input[type="file"] { flex: 1 1 120px; min-width: 0; width: 100%; font-size: .8rem; padding: 4px; }
form.inline { display: inline; }

.badge { display: inline-block; padding: 1px 8px; border-radius: 100px; font-size: .74rem;
  background: var(--bg); border: 1px solid var(--line); color: var(--muted); }
.badge.own { background: #eaf7ef; border-color: #b7e0c6; color: var(--ok); }

/* ------------------------------------------------------------------ preview stage */

.preview-toolbar { display: flex; gap: 10px; align-items: center; justify-content: space-between;
  flex-wrap: wrap; margin-bottom: 12px; }
.viewport-switch { display: flex; gap: 6px; }

.preview-stage { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; margin-bottom: 22px; display: flex; justify-content: center; }
.preview-stage iframe { width: 100%; max-width: 100%; height: 640px; border: 1px solid var(--line);
  border-radius: 8px; background: #fff; transition: max-width .2s; }
.preview-stage[data-mode="tablet"] iframe { max-width: 780px; }
.preview-stage[data-mode="phone"] iframe { max-width: 390px; }

/* ------------------------------------------------------------------ done */

/* Named apart from the progress bar's .done step on purpose — a shared class
   there silently restyled every completed step. */
.wizard-done { text-align: center; max-width: 620px; margin: 20px auto; }
.wizard-done-mark { width: 68px; height: 68px; margin: 0 auto 20px; border-radius: 50%;
  background: #eaf7ef; display: flex; align-items: center; justify-content: center; }
.wizard-done-mark svg { width: 32px; height: 32px; stroke: var(--ok); fill: none; stroke-width: 2.4;
  stroke-linecap: round; stroke-linejoin: round; }
.wizard-done .lead { margin-inline: auto; }

.link-box { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap;
  padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.link-box code { font-size: .85rem; overflow-wrap: anywhere; }

/* ------------------------------------------------------------------ help strip */

/* The band between the page and the footer. Deliberately quiet: it must not
   compete with whatever call to action the page itself is making. */

.help-strip { background: var(--panel); border-top: 1px solid var(--line); padding: 64px 0; }
.help-strip .wrap { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
  gap: 40px; align-items: center; }

.help-kicker { font-family: var(--font-display); font-weight: 700; font-size: .78rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--brand); margin: 0 0 10px; }

.help-text h2 { font-size: clamp(1.5rem, 2.4vw, 2.1rem); letter-spacing: -.02em;
  margin: 0 0 14px; max-width: 24ch; }
.help-text p { color: var(--muted); margin: 0; max-width: 72ch; }

.help-actions { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.help-actions .btn { text-align: center; }
.help-note { color: var(--muted); font-size: .84rem; margin: 4px 0 0; }

@media (max-width: 900px) {
  .help-strip { padding: 48px 0; }
  .help-strip .wrap { grid-template-columns: 1fr; gap: 26px; }
}

/* ------------------------------------------------------------------ footer */

/* Rebuilt from the biegun.studio theme footer. Same shape and copy, written
   from scratch because the original is WordPress and leans on get_theme_mod. */

.site-footer { background: var(--brand); color: #fff; padding: 80px 0 40px; margin-top: 0; }
.site-footer a { color: #fff; }

.footer-container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

.footer-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 30px;
  margin-bottom: 56px;
}

.animated-text {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.6rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.02em;
  margin: 0;
  color: #fff;
}

/* The words stack in the same box and cross-fade, so the line never reflows. */
.text-rotator { position: relative; display: inline-block; min-width: 5.5em; vertical-align: bottom; }
.rotate-word { position: absolute; left: 0; opacity: 0; transform: translateY(20px);
  transition: opacity .5s ease-in-out, transform .5s ease-in-out; white-space: nowrap; }
.rotate-word.active { position: relative; opacity: 1; transform: translateY(0); }

.footer-hand-column img { display: block; width: 64px; height: auto; }

.footer-contact-column p { margin: 0; font-size: 1rem; line-height: 1.7; color: rgba(255, 255, 255, .94); }
.footer-contact-column a { text-decoration: underline; text-underline-offset: 3px; }

/* Logo on the left, the two menus grouped on the right. The link columns are
   sized to their own content (`auto`) instead of a fraction, so a long label
   like "Projektowanie stron internetowych" sets the width rather than wrapping
   inside a column that guessed too narrow. The logo takes whatever is left. */
.footer-bottom {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  align-items: start;
  gap: 34px 64px;
  margin-bottom: 44px;
}

/* Every column starts at the top so both headings share a line — except the
   logo, which sits on the baseline of the row as it does on biegun.studio. */
.footer-main-logo { align-self: end; }
.footer-main-logo img { display: block; width: 240px; max-width: 100%; height: auto; }

.footer-menu-column h4,
.footer-services-column h4 {
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 700;
  margin: 0 0 14px; color: #fff;
}

.footer-menu, .footer-services { list-style: none; padding: 0; margin: 0; }
.footer-menu li, .footer-services li { margin-bottom: 9px; line-height: 1.35; }
.footer-menu a, .footer-services a { text-decoration: none; font-size: .9rem; transition: opacity .3s ease; }
.footer-menu a:hover, .footer-services a:hover { opacity: .75; text-decoration: underline; }

.footer-copyright { padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .2); text-align: center; }
.footer-copyright p { margin: 0 0 .4em; font-size: .875rem; opacity: .8; }
.footer-note { max-width: 76ch; margin-inline: auto !important; font-size: .8rem !important; opacity: .68 !important; }

/* ------------------------------------------------------------------ responsive */

@media (max-width: 1200px) {
  .how-grid, .theme-showcase { grid-template-columns: repeat(2, 1fr); }
  .reveal:nth-child(3).shown, .reveal:nth-child(4).shown { transition-delay: 0s; }
}

@media (max-width: 900px) {
  .hero-video { height: auto; min-height: 0; }
  .hero-video-inner { padding-top: 120px; padding-bottom: 90px; }
  .hero-title { max-width: none; }
  .start-choice { grid-template-columns: 1fr; margin-top: -70px; }
  .plan-grid { grid-template-columns: 1fr; }
  .band, .band.alt { padding: 56px 0; }
  .footer-top, .footer-bottom { grid-template-columns: 1fr; align-items: start; }
  .footer-main-logo { align-self: start; order: -1; }
  .footer-hand-column { display: none; }
  .footer-top { margin-bottom: 40px; }
  .topbar .wrap { min-height: 66px; }
  .topbar-back-long { display: none; }
  .topbar-back-short { display: inline; }
  .brand-tag-long { display: none; }
  .brand-tag-short { display: inline; }
}

@media (max-width: 860px) {
  .choice, .pair, .split { grid-template-columns: 1fr; }
  .preview-stage iframe { height: 520px; }
}

@media (max-width: 640px) {
  .how-grid, .theme-showcase { grid-template-columns: 1fr; }
  .brand-logo { height: 24px; }
  .brand-tag { font-size: .85rem; }
  .cta-row.center { flex-direction: column; align-items: stretch; }
  .cta-row.center .btn { text-align: center; }
}

/* Respect the system setting: no entrance animation, no autoplaying film. */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  .reveal.shown { transition: none; }
  .start-card, .how-card, .showcase-card, .plan { transition: none; }
  .start-card:hover, .how-card:hover, .showcase-card:hover, .plan:hover { transform: none; }
  .rotate-word { transition: none; }
  .hero-video-media { transition: none; }
}
