/* ==========================================================================
   THE BIG DAY — Build Your Quote
   Static clickable mockup. Design tokens first, then components.
   ========================================================================== */

:root {
  --brand: #7c3aed;
  --brand-dark: #6527c8;
  --brand-soft: #f1e9fd;

  --ink: #29394b;          /* headings */
  --ink-soft: #52616f;     /* body copy */
  --muted: #8a97a3;
  --line: #e6e9ec;
  --surface: #ffffff;
  --surface-alt: #f7f8f9;

  --grey-icon: #6f7a85;    /* unselected icon silhouette */
  --head-bg: rgba(255, 255, 255, .92);  /* sticky header wash */
  --icon-hole: #fff;       /* icon punch-outs match the tile background */
  --sel-body: #33404d;     /* selected icon body */
  --stepper: #34c26d;      /* the green -/+ buttons */

  --radius: 10px;
  --shadow: 0 10px 30px rgba(41, 57, 75, .09);
  --shadow-lg: 0 24px 60px rgba(41, 57, 75, .14);

  --font: "Poppins", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Playfair Display", "Iowan Old Style", Georgia, serif;

  --wrap: 1120px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink-soft);
  background: var(--surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { color: var(--ink); margin: 0 0 .5em; line-height: 1.2; }

a { color: var(--brand); }

.wrap { width: min(var(--wrap), calc(100% - 48px)); margin-inline: auto; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* --------------------------------------------------------------- header --- */

.site-head {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  background: var(--head-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo__mark {
  width: 40px; height: 40px; flex: none;
  border: 3px solid var(--brand); border-radius: 12px 12px 12px 4px;
  position: relative;
}
.logo__mark::after {
  content: ""; position: absolute; inset: 6px 6px auto auto;
  width: 12px; height: 12px; border: 3px solid var(--brand);
  border-radius: 6px 6px 6px 2px;
}
.logo__text { font-family: var(--font-display); font-size: 15px; letter-spacing: .04em; color: var(--ink); }
.logo__text b { display: block; font-size: 11px; letter-spacing: .22em; color: var(--muted); font-weight: 500; text-transform: uppercase; }

.nav { display: flex; gap: 26px; }
.nav a { color: var(--ink-soft); text-decoration: none; font-size: 14px; font-weight: 500; }
.nav a:hover, .nav a[aria-current] { color: var(--brand); }

/* ----------------------------------------------------------------- hero --- */

.hero { text-align: center; padding: 64px 0 40px; }

.hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 4.2vw, 46px);
  color: var(--brand);
  letter-spacing: .01em;
}

/* Stand-in for the reference site's hero photograph. */
.hero__frame {
  margin-top: 34px; height: clamp(260px, 42vw, 480px);
  border-radius: 14px; overflow: hidden; position: relative;
  background:
    radial-gradient(circle at 22% 30%, rgba(255, 214, 92, .95), transparent 46%),
    radial-gradient(circle at 78% 26%, rgba(224, 26, 60, .85), transparent 48%),
    radial-gradient(circle at 62% 78%, rgba(46, 160, 120, .8), transparent 46%),
    linear-gradient(135deg, #f2a03c, #c9265a 55%, #6a2b6d);
  display: grid; place-items: center;
}
.hero__frame::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .16) 1px, transparent 1px);
  background-size: 16px 16px;
}
.hero__frame span {
  position: relative; z-index: 1;
  font-family: var(--font-display); font-size: clamp(16px, 2vw, 22px);
  color: rgba(255, 255, 255, .95); letter-spacing: .18em; text-transform: uppercase;
  padding: 14px 26px; border: 1px solid rgba(255, 255, 255, .55); border-radius: 6px;
  backdrop-filter: blur(2px);
}

/* ------------------------------------------------------------ value cols --- */

.pillars {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 46px;
  padding: 70px 0; text-align: center;
}
.pillars h3 { font-family: var(--font-display); font-weight: 500; font-size: 21px; }
.pillars p { margin: 0; font-size: 14.5px; color: var(--ink-soft); }

/* ------------------------------------------------------------ calculator --- */

.calc { padding: 40px 0 90px; text-align: center; }
.calc__title { font-size: clamp(28px, 3.6vw, 42px); font-weight: 700; }
.calc__lede { margin: 0 0 8px; color: var(--ink-soft); }

.start { padding: 34px 0 10px; }

/* The running-total bubble. Left-aligned under the lede, exactly like the
   reference: it stretches into a pill while the number is changing. */
.total-bubble {
  width: 74px; height: 74px; margin: 26px 0 0 12%;
  display: grid; place-items: center;
  border-radius: 999px; background: var(--brand); color: #fff;
  font-size: 14px; font-weight: 600; letter-spacing: .01em;
  box-shadow: 0 8px 22px rgba(224, 26, 60, .32);
  transition: width .28s cubic-bezier(.34, 1.4, .64, 1), transform .28s ease;
  white-space: nowrap; padding-inline: 10px;
}
.total-bubble.is-pulsing { width: 118px; transform: translateX(-14px); }

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

.progress { max-width: 560px; margin: 8px auto 0; }
.progress__track { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.progress__fill { height: 100%; width: 0; background: var(--brand); border-radius: 4px; transition: width .35s ease; }
.progress__label { margin-top: 8px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* step -------------------------------------------------------------------- */

.step { padding-top: 34px; animation: stepIn .5s ease both; }
@keyframes stepIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.step__title { font-size: clamp(26px, 3.4vw, 44px); font-weight: 700; }
.step__subtitle { max-width: 640px; margin: 0 auto; color: var(--ink-soft); font-size: 15px; }

/* The bottom padding reserves room for the price/caption tooltips, which hang
   below each tile and would otherwise collide with the Next button. */
.tiles {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 18px 30px; padding: 46px 0 76px;
}

/* --------------------------------------------------------------- the tile --- */

.tile {
  position: relative;
  width: 156px; padding: 10px 0 0;
  background: none; border: 0; cursor: pointer;
  font: inherit; color: inherit; text-align: center;
}
.tile:focus-visible { outline: 2px solid var(--brand); outline-offset: 6px; border-radius: 8px; }

.tile__art {
  height: 104px; display: grid; place-items: center;
  position: relative;
  transition: transform .2s ease;
}
.tile:hover .tile__art { transform: translateY(-3px); }

.tile .ic { width: 84px; height: 84px; display: block; }
.tile .ic-body   { fill: var(--grey-icon); transition: fill .2s ease; }
.tile .ic-accent { fill: #9aa4ae; transition: fill .2s ease; }
.tile .ic-hole   { fill: var(--icon-hole); }
.tile .ic-stroke { fill: none; stroke: var(--grey-icon); stroke-width: 4; stroke-linecap: round; transition: stroke .2s ease; }
.tile .ic-stroke-inverse { fill: none; stroke: #fff; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }

.tile.is-selected .ic-body   { fill: var(--sel-body); }
.tile.is-selected .ic-accent { fill: var(--brand); }

/* Emoji tile art (template-authored icons): muted until selected, mirroring
   the grey→brand transition of the SVG glyphs. */
.tile .tile__emoji {
  font-size: 58px; line-height: 84px; display: block;
  filter: grayscale(.8); opacity: .72;
  transition: filter .2s ease, opacity .2s ease, transform .2s ease;
}
.tile.is-selected .tile__emoji { filter: none; opacity: 1; transform: scale(1.06); }
.tile.is-selected .ic-stroke { stroke: var(--brand); }

.tile__label {
  display: inline-block; padding: 4px 10px; border-radius: 6px;
  font-size: 13px; color: var(--ink); line-height: 1.35;
  transition: background .2s ease;
}
.tile:hover .tile__label,
.tile.is-selected .tile__label { background: var(--surface-alt); }

/* Red tick over the bottom-right of the artwork. */
.tile__check {
  position: absolute; right: 18px; bottom: -2px;
  width: 30px; height: 30px; opacity: 0; transform: scale(.4);
  transition: opacity .18s ease, transform .18s cubic-bezier(.34, 1.56, .64, 1);
  pointer-events: none;
}
.tile__check path { fill: none; stroke: var(--brand); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.tile.is-selected .tile__check { opacity: 1; transform: scale(1); }

/* Quantity badge, top-left — inverted against the theme, not hardcoded dark. */
.tile__badge {
  position: absolute; left: 6px; top: 0;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--ink); color: var(--surface);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 600;
  opacity: 0; transform: scale(.5); transition: all .18s ease;
}
.tile.is-selected .tile__badge { opacity: 1; transform: scale(1); }

/* Green -/+ steppers, floating above the tile. */
.tile__steppers {
  position: absolute; left: 50%; top: -14px; transform: translateX(-50%);
  display: flex; gap: 8px; opacity: 0; pointer-events: none; transition: opacity .18s ease;
}
.tile.is-selected .tile__steppers { opacity: 1; pointer-events: auto; }
.stepper {
  width: 26px; height: 26px; border-radius: 50%;
  border: 0; cursor: pointer;
  background: var(--stepper); color: #fff;
  font-size: 15px; font-weight: 700; line-height: 1;
  display: grid; place-items: center;
  box-shadow: 0 3px 8px rgba(52, 194, 109, .35);
}
.stepper:hover { filter: brightness(1.08); }
.stepper:disabled { opacity: .4; cursor: not-allowed; }

/* Numeric headcount field: big number + number input + quick-pick chips. */
.headcount { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 10px; }
.headcount__display { text-align: center; }
.headcount__num {
  font-size: 72px; font-weight: 800; line-height: 1;
  color: var(--ink); letter-spacing: -1px;
}
.headcount__unit { font-size: 12px; letter-spacing: 3px; color: var(--muted); margin-bottom: 10px; }
.headcount__row { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.headcount__step {
  width: 44px; height: 44px; border-radius: 12px; border: 0; cursor: pointer;
  background: var(--stepper); color: #fff; font-size: 22px; font-weight: 700;
  display: grid; place-items: center; box-shadow: 0 3px 8px rgba(52, 194, 109, .35);
}
.headcount__step:hover { filter: brightness(1.08); }
.headcount__input {
  width: 130px; text-align: center; font-size: 22px; font-weight: 700;
  padding: 10px 8px; border-radius: 12px; border: 2px solid var(--line);
  background: var(--surface); color: var(--ink);
}
.headcount__input:focus { outline: 0; border-color: var(--brand); }
.headcount__chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; }
.headcount__chip {
  padding: 8px 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft);
  font-size: 14px; font-weight: 600;
}
.headcount__chip:hover { border-color: var(--brand); }
.headcount__chip.is-active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* Slate tooltip with the unit price, hanging under the artwork. */
.tile__tip {
  position: absolute; left: 50%; top: 100%; transform: translate(-50%, 6px);
  background: #3c4b5a; color: #fff;
  padding: 9px 16px; border-radius: 6px;
  font-size: 12.5px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .18s ease;
  z-index: 3;
}
.tile__tip::before {
  content: ""; position: absolute; left: 50%; top: -5px; transform: translateX(-50%);
  border: 5px solid transparent; border-top: 0; border-bottom-color: #3c4b5a;
}
.tile__tip--caption { white-space: normal; width: 138px; line-height: 1.35; }

.tile:hover .tile__tip,
.tile.is-selected .tile__tip { opacity: 1; }

/* The hovered tile's tooltip always wins over a neighbour's. */
.tile:hover .tile__tip { z-index: 4; }

/* Yes/No branch tiles read a little larger. */
.tiles--branch .tile { width: 180px; }
.tiles--branch .ic { width: 92px; height: 92px; }

/* ------------------------------------------------------------------ nav --- */

.step__error {
  min-height: 22px; margin-top: 6px;
  color: var(--brand); font-size: 13.5px; font-weight: 500;
  opacity: 0; transition: opacity .2s ease;
}
.step__error.is-shown { opacity: 1; }

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 26px; border: 0; border-radius: 4px;
  background: var(--brand); color: #fff; cursor: pointer;
  font: 600 13px/1 var(--font); letter-spacing: .09em; text-transform: uppercase;
  box-shadow: 0 6px 18px rgba(224, 26, 60, .28);
  transition: background .18s ease, transform .18s ease;
  text-decoration: none;
}
.btn:hover { background: var(--brand-dark); transform: translateY(-1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

.btn--ghost {
  background: none; color: var(--brand); box-shadow: none;
  text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 500;
  padding: 10px 8px;
}
.btn--ghost:hover { background: none; color: var(--brand-dark); }

.step__nav { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-top: 22px; }

/* -------------------------------------------------------------- summary --- */

.summary { max-width: 900px; margin-inline: auto; text-align: left; }
.summary__head { text-align: center; margin-bottom: 34px; }
.summary__price { font-size: clamp(34px, 5vw, 56px); font-weight: 700; color: var(--brand); line-height: 1.1; }
.summary__deposit { color: var(--muted); font-size: 14px; margin-top: 6px; }

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px 32px; margin-bottom: 40px; }
.form-grid .field--wide { grid-column: 1 / -1; }

.field label { display: block; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
/* :not(checkbox) — a tick is a control, not a text field. The generic rule
   below stretches inputs to the full cell, which on a checkbox leaves the box
   at its intrinsic size and flings its label to the far edge. */
.field input:not([type="checkbox"]) {
  width: 100%; padding: 10px 2px; font: inherit; color: var(--ink);
  border: 0; border-bottom: 1px solid var(--line); background: none;
  transition: border-color .18s ease;
}
.field input:not([type="checkbox"]):focus { outline: none; border-bottom-color: var(--brand); }
.field input::placeholder { color: #b9c2ca; }

/* Consent tick + its sentence: normal sentence case, not the shouty
   letter-spaced treatment the field labels above get. */
.field label.optin {
  display: flex; align-items: center; gap: 8px;
  margin: 10px 0 0; font-size: 12.5px; font-weight: 400;
  letter-spacing: 0; text-transform: none; line-height: 1.45;
  color: var(--muted); cursor: pointer;
}
.field label.optin input { flex: none; margin: 0; accent-color: var(--brand); }

.summary table { width: 100%; border-collapse: collapse; font-size: 14px; }
.summary caption { text-align: left; font-size: 20px; font-weight: 700; color: var(--ink); padding-bottom: 12px; }
.summary th { text-align: left; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 10px 8px; border-bottom: 1px solid var(--line); }
.summary th:not(:first-child), .summary td:not(:first-child) { text-align: right; }
.summary td { padding: 11px 8px; border-bottom: 1px solid var(--line); }
/* --surface, not #fff: --ink is the TEXT colour of the active theme, so on a
   dark theme (fete, cinema) it resolves to a pale cream and white-on-it is
   unreadable. --surface is its natural inverse in every theme. */
.summary tr.group td {
  background: var(--ink); color: var(--surface); font-weight: 600;
  letter-spacing: .05em; font-size: 12px; text-transform: uppercase;
}
.summary tr.total td { font-size: 17px; font-weight: 700; color: var(--ink); border-bottom: 0; padding-top: 18px; }

.terms { margin-top: 42px; padding: 24px; border-radius: var(--radius); background: var(--surface-alt); }
.terms h4 { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.terms ul { margin: 0; padding-left: 18px; font-size: 13.5px; }
.terms li { margin-bottom: 6px; }

.accept { display: flex; align-items: center; gap: 10px; margin: 22px 0 26px; font-size: 14px; }
.accept input { width: 17px; height: 17px; accent-color: var(--brand); }

.summary__actions { text-align: center; }

/* Post-submit confirmation. */
.done-panel { text-align: center; padding: 60px 20px; }
.done-panel__tick {
  width: 74px; height: 74px; margin: 0 auto 22px;
  border-radius: 50%; background: var(--brand-soft);
  display: grid; place-items: center;
}
.done-panel__tick svg { width: 34px; height: 34px; fill: none; stroke: var(--brand); stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }

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

.site-foot {
  border-top: 1px solid var(--line); margin-top: 40px; padding: 34px 0;
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  font-size: 13px; color: var(--muted);
}
.site-foot a { color: var(--muted); text-decoration: none; display: block; margin-bottom: 6px; }
.site-foot a:hover { color: var(--brand); }
.site-foot__right { text-align: right; }
.site-foot__right p { margin: 0 0 6px; }
.site-foot__right .made { font-family: var(--font-display); color: var(--ink-soft); }

/* ======================================================== mockups gallery === */

.gallery-head { padding: 56px 0 10px; }
.gallery-head h1 { font-size: clamp(28px, 4vw, 42px); }
.gallery-head p { max-width: 760px; }

.legend {
  display: flex; flex-wrap: wrap; gap: 12px 26px;
  margin: 26px 0 10px; padding: 18px 22px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-alt);
  font-size: 13px;
}
.legend b { color: var(--ink); }

.mock {
  margin: 44px 0; border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface); box-shadow: var(--shadow); overflow: hidden;
}
.mock__bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 13px 20px; background: var(--ink); color: var(--surface);
}
.mock__num {
  width: 28px; height: 28px; flex: none; border-radius: 50%;
  background: var(--brand); display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
}
.mock__name { font-weight: 600; font-size: 14.5px; }
.mock__meta { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 20px;
  background: rgba(255, 255, 255, .12); color: #dfe4e9;
}
.chip--req { background: rgba(224, 26, 60, .22); color: #ffc2cd; }
.mock__body { padding: 20px 20px 34px; text-align: center; }
.mock__note {
  margin: 0 20px 20px; padding: 12px 16px; border-left: 3px solid var(--brand);
  background: var(--brand-soft); border-radius: 0 6px 6px 0;
  font-size: 13px; color: var(--ink); text-align: left;
}

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

@media (max-width: 860px) {
  .pillars { grid-template-columns: 1fr; gap: 34px; padding: 46px 0; }
  .form-grid { grid-template-columns: 1fr; }
  .total-bubble { margin-inline: auto; }
  .nav { display: none; }
  .summary { overflow-x: auto; }
}

@media (max-width: 520px) {
  .tile { width: 132px; }
  .tile .ic { width: 70px; height: 70px; }
  .site-foot { flex-direction: column; }
  .site-foot__right { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
