:root {
  --navy: #071d35;
  --navy-2: #0d3159;
  --blue: #087ee6;
  --aqua: #35d5df;
  --aqua-soft: #e8fbfd;
  --ink: #0a213c;
  --muted: #65788b;
  --line: #d9e5ed;
  --paper: #ffffff;
  --bg: #eef5f8;
  --danger: #b42318;
  --green: #13a561;
  --shadow: 0 18px 50px rgba(4, 32, 58, 0.13);
}

* { box-sizing: border-box; }

html { color-scheme: light; scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 100% 0%, rgba(53, 213, 223, 0.17), transparent 26rem),
    linear-gradient(180deg, #f7fbfd 0%, var(--bg) 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.45;
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
}

button, input, textarea { font: inherit; }
button, label { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }

.skip-link {
  position: fixed;
  top: 0;
  left: 1rem;
  z-index: 100;
  padding: .75rem 1rem;
  transform: translateY(-120%);
  background: var(--navy);
  color: white;
  border-radius: 0 0 .75rem .75rem;
}
.skip-link:focus { transform: translateY(0); }

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

.app-shell { width: min(100%, 640px); margin: 0 auto; }

.preview-ribbon {
  padding: .5rem .8rem;
  background: #fff4cc;
  color: #694c00;
  text-align: center;
  font-size: .72rem;
  font-weight: 800;
}

.app-header {
  min-height: 78px;
  padding: max(.75rem, env(safe-area-inset-top)) 1rem .75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .55rem;
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid rgba(7,29,53,.08);
  backdrop-filter: blur(16px);
}

.brand { min-width: 0; display: inline-flex; align-items: center; gap: .55rem; color: var(--navy); text-decoration: none; }
.brand img { width: 52px; height: 52px; object-fit: contain; }
.brand span { display: flex; flex-direction: column; line-height: 1; }
.brand strong { font-size: 1.06rem; letter-spacing: .08em; }
.brand small { margin-top: .32rem; color: #587087; font-size: .72rem; letter-spacing: .2em; font-weight: 800; }

.header-contacts { flex: 0 0 auto; display: flex; align-items: center; gap: .38rem; }
.header-contact {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  text-decoration: none;
  box-shadow: 0 7px 18px rgba(4, 32, 58, .13);
}
.header-call {
  background: var(--navy);
}
.header-whatsapp { background: #20b75f; }
.header-viber { background: #7360f2; }
.header-contact svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.header-whatsapp svg { fill: currentColor; stroke: none; }

main { padding: 1rem 1rem 2rem; }

.install-card, .repeat-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .75rem;
  padding: .85rem;
  margin-bottom: 1rem;
  border: 1px solid #b9e9ee;
  border-radius: 17px;
  background: var(--aqua-soft);
}
.install-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--navy); color: white; }
.install-icon svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.install-card div:nth-child(2), .repeat-card div { min-width: 0; display: flex; flex-direction: column; }
.install-card strong, .repeat-card strong { font-size: .92rem; }
.install-card span, .repeat-card small { color: #48677a; font-size: .77rem; line-height: 1.35; }
.install-card button, .repeat-card button {
  min-height: 42px;
  padding: .5rem .72rem;
  border: 0;
  border-radius: 12px;
  background: var(--blue);
  color: white;
  font-size: .82rem;
  font-weight: 800;
}

.repeat-card { background: #fff; border-color: #bed2df; box-shadow: 0 10px 28px rgba(4,32,58,.08); }
.repeat-card span { color: var(--blue); font-size: .68rem; font-weight: 900; letter-spacing: .1em; }
.repeat-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.repeat-card small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.intro { padding: .4rem .15rem .85rem; }
.eyebrow { margin: 0 0 .45rem; display: flex; align-items: center; gap: .5rem; color: var(--blue); font-size: .76rem; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow span { width: 24px; height: 3px; border-radius: 999px; background: var(--aqua); }
.intro h1 { margin: 0; font-size: clamp(1.75rem, 7vw, 2.4rem); line-height: 1.08; letter-spacing: -.035em; }
.intro > p:last-child { margin: .65rem 0 0; color: var(--muted); font-size: .94rem; }

.progress {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 0;
  margin: .8rem 0 1rem;
}
.progress li { position: relative; display: flex; flex-direction: column; align-items: center; gap: .32rem; color: #8c9daa; }
.progress li::before { content: ""; position: absolute; top: 16px; right: 50%; width: 100%; height: 2px; background: #d6e1e7; z-index: -1; }
.progress li:first-child::before { display: none; }
.progress span { width: 34px; height: 34px; display: grid; place-items: center; border: 2px solid #ccd9e1; border-radius: 50%; background: var(--bg); font-size: .82rem; font-weight: 900; }
.progress small { font-size: .72rem; font-weight: 800; }
.progress li.is-active, .progress li.is-complete { color: var(--navy); }
.progress li.is-active span { border-color: var(--blue); background: var(--blue); color: #fff; box-shadow: 0 0 0 5px rgba(8,126,230,.11); }
.progress li.is-complete span { border-color: var(--aqua); background: var(--aqua); color: var(--navy); }
.progress li.is-complete::before, .progress li.is-active::before { background: var(--aqua); }

#order-form, .success-card {
  border: 1px solid rgba(9,48,84,.1);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.step { padding: 1.25rem; }
.step[hidden] { display: none; }
.step-heading { margin-bottom: 1rem; }
.step-heading > span { display: block; margin-bottom: .25rem; color: var(--blue); font-size: .68rem; font-weight: 900; letter-spacing: .12em; }
.step-heading h2 { margin: 0; color: var(--navy); font-size: 1.35rem; line-height: 1.2; }

fieldset { min-width: 0; }
.choice-fieldset { padding: 0; margin: 0 0 1.15rem; border: 0; }
.choice-fieldset legend { width: 100%; margin-bottom: .65rem; color: var(--navy); font-size: .93rem; font-weight: 800; }

.quantity-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .65rem; }
.quantity-choice { position: relative; min-height: 168px; padding: .48rem .28rem .6rem; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 2px solid var(--line); border-radius: 18px; background: #fbfdfe; cursor: pointer; overflow: hidden; transition: border-color .15s ease, background .15s ease, transform .15s ease; }
.quantity-choice:active { transform: scale(.98); }
.quantity-choice input, .chip-grid input, .timing-grid input { position: absolute; opacity: 0; pointer-events: none; }
.quantity-choice img { width: min(100%, 102px); height: 51px; margin: -.1rem 0 .15rem; object-fit: contain; }
.quantity-choice.quantity-small img { width: min(100%, 88px); }
.quantity-choice.quantity-medium img { width: min(100%, 96px); }
.quantity-choice .quantity-value { display: flex; align-items: baseline; gap: .2rem; }
.quantity-choice strong { color: var(--navy); font-size: 1.72rem; line-height: 1; }
.quantity-choice small { color: var(--navy); font-size: .82rem; font-style: normal; font-weight: 800; }
.quantity-choice em { margin-top: .26rem; color: var(--muted); font-size: .68rem; font-style: normal; }
.quantity-choice b { margin-top: .24rem; color: #446279; font-size: .62rem; line-height: 1.18; text-align: center; }
.quantity-choice:has(input:checked) { border-color: var(--blue); background: #eef7ff; box-shadow: 0 0 0 4px rgba(8,126,230,.09); }
.quantity-choice:has(input:checked)::after { content: "✓"; position: absolute; top: .38rem; right: .42rem; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--blue); color: #fff; font-size: .72rem; font-weight: 900; }
.vehicle-note { margin: .7rem 0 0; padding: .7rem .75rem; border-radius: 13px; background: #f0f7fb; color: #587083; font-size: .7rem; line-height: 1.4; }
.vehicle-note strong { color: var(--navy); }
.chip-grid { display: flex; flex-wrap: wrap; gap: .55rem; }
.chip-grid label { position: relative; }
.chip-grid span { min-height: 44px; display: inline-flex; align-items: center; padding: .55rem .75rem; border: 1.5px solid var(--line); border-radius: 13px; color: #38556b; background: white; font-size: .82rem; font-weight: 800; cursor: pointer; }
.chip-grid label:has(input:checked) span { border-color: var(--blue); background: var(--blue); color: white; }

.timing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .55rem; }
.timing-grid label { position: relative; }
.timing-grid span { min-height: 72px; display: flex; flex-direction: column; justify-content: center; padding: .65rem; border: 1.5px solid var(--line); border-radius: 15px; background: #fbfdfe; cursor: pointer; }
.timing-grid strong { font-size: .84rem; }
.timing-grid small { margin-top: .12rem; color: var(--muted); font-size: .66rem; }
.timing-grid label:has(input:checked) span { border-color: var(--blue); background: #eef7ff; box-shadow: 0 0 0 3px rgba(8,126,230,.08); }

.field { margin-bottom: 1rem; }
.field label { display: block; margin-bottom: .42rem; color: var(--navy); font-size: .88rem; font-weight: 800; }
.field label span { color: var(--muted); font-weight: 500; }
.field input, .field textarea {
  width: 100%;
  min-height: 52px;
  padding: .8rem .9rem;
  border: 1.5px solid #c6d7e2;
  border-radius: 14px;
  outline: none;
  color: var(--ink);
  background: #fff;
  font-size: 1rem;
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(8,126,230,.1); }
.field input::placeholder, .field textarea::placeholder { color: #9aa9b5; }

.order-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; padding: .75rem; margin-bottom: 1rem; border-radius: 15px; background: var(--aqua-soft); }
.summary-item { display: flex; flex-direction: column; }
.summary-item span { color: #587083; font-size: .68rem; font-weight: 700; }
.summary-item strong { margin-top: .12rem; font-size: .83rem; }
.summary-item.summary-wide { grid-column: 1 / -1; }

.remember-row, .consent-row { display: flex; gap: .7rem; align-items: flex-start; margin: .85rem 0; color: #365166; cursor: pointer; }
.remember-row input, .consent-row input { width: 20px; height: 20px; flex: 0 0 auto; margin: .1rem 0 0; accent-color: var(--blue); }
.remember-row span { display: flex; flex-direction: column; }
.remember-row strong { color: var(--navy); font-size: .86rem; }
.remember-row small, .consent-row span { color: var(--muted); font-size: .76rem; }

.website-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.step-error { min-height: 1.2em; margin: .2rem 0 .65rem; color: var(--danger); font-size: .78rem; font-weight: 700; }
.step-actions { display: grid; grid-template-columns: auto 1fr; gap: .65rem; }

.primary-button, .secondary-button, .whatsapp-button {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  border-radius: 15px;
  font-weight: 900;
  text-decoration: none;
}
.primary-button { width: 100%; padding: .8rem 1.1rem; border: 0; background: linear-gradient(135deg, var(--blue), #0864c2); color: white; box-shadow: 0 10px 22px rgba(8,126,230,.22); }
.primary-button:disabled { opacity: .65; cursor: wait; }
.primary-button svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.secondary-button { padding: .8rem 1rem; border: 1.5px solid #c8d7e0; background: white; color: var(--navy); }
.submit-button { font-size: .96rem; }
.submit-note { margin: .75rem 0 0; text-align: center; color: var(--muted); font-size: .72rem; }

.success-card { padding: 2rem 1.25rem; text-align: center; }
.success-icon { width: 64px; height: 64px; display: grid; place-items: center; margin: 0 auto 1rem; border-radius: 50%; background: #dcfce9; color: #087842; font-size: 2rem; font-weight: 900; }
.success-card .eyebrow { justify-content: center; }
.success-card h2 { margin: .35rem 0 .6rem; font-size: 1.6rem; line-height: 1.15; }
.success-card > p:not(.eyebrow) { color: var(--muted); }
.order-code { display: block; margin: .8rem 0 1rem; color: var(--navy); }
.whatsapp-button { width: 100%; margin-top: .65rem; padding: .8rem 1rem; background: #18aa5a; color: white; }
.whatsapp-button svg { width: 23px; fill: currentColor; }

.service-area { margin: 1rem 0 0; text-align: center; color: var(--muted); font-size: .74rem; }
.service-area a { color: var(--navy); font-weight: 800; }

.quick-actions {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .35rem;
  padding: .5rem max(.55rem, env(safe-area-inset-right)) calc(.5rem + env(safe-area-inset-bottom)) max(.55rem, env(safe-area-inset-left));
  background: rgba(5, 24, 44, .96);
  box-shadow: 0 -10px 30px rgba(0,0,0,.16);
  backdrop-filter: blur(16px);
}
.quick-actions a { min-width: 0; min-height: 56px; display: flex; align-items: center; justify-content: center; gap: .42rem; border-radius: 15px; color: white; text-decoration: none; }
.quick-actions svg { width: 21px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.quick-actions span { display: flex; flex-direction: column; line-height: 1.1; }
.quick-actions small { opacity: .76; font-size: .58rem; }
.quick-actions strong { margin-top: .14rem; font-size: .75rem; }
.quick-actions .quick-call { background: rgba(255,255,255,.07); }
.quick-actions .quick-whatsapp { background: #24c46b; color: #052e1a; }
.quick-actions .quick-whatsapp svg { fill: currentColor; stroke: none; }
.quick-actions .quick-viber { background: #7360f2; color: white; }

.install-dialog { width: min(calc(100% - 2rem), 420px); padding: 1.5rem; border: 0; border-radius: 24px; color: var(--ink); box-shadow: 0 24px 80px rgba(0,0,0,.3); text-align: center; }
.install-dialog::backdrop { background: rgba(3,18,34,.68); backdrop-filter: blur(3px); }
.install-dialog img { width: 92px; height: 92px; object-fit: contain; }
.install-dialog h2 { margin: .5rem 0 .75rem; }
.install-dialog ol { padding-left: 1.25rem; text-align: left; color: #425e73; }
.install-dialog li + li { margin-top: .5rem; }
.dialog-close { position: absolute; top: .6rem; right: .75rem; width: 40px; height: 40px; border: 0; background: transparent; color: var(--muted); font-size: 1.8rem; }

@media (min-width: 700px) {
  body { padding-top: 2rem; }
  .app-shell { border-radius: 28px; background: rgba(255,255,255,.35); box-shadow: 0 30px 100px rgba(4,32,58,.14); overflow: hidden; }
  main { padding: 1.25rem 1.5rem 2.5rem; }
  .quick-actions { left: 50%; right: auto; width: 640px; transform: translateX(-50%); border-radius: 18px 18px 0 0; }
}

@media (max-width: 390px) {
  .app-header { padding-left: .72rem; padding-right: .72rem; }
  .brand { gap: .4rem; }
  .brand img { width: 43px; height: 43px; }
  .brand strong { font-size: .82rem; }
  .brand small { font-size: .57rem; letter-spacing: .16em; }
  .header-contact { width: 38px; height: 38px; border-radius: 12px; }
  .header-contact svg { width: 19px; }
  .install-card { grid-template-columns: auto 1fr; }
  .install-card button { grid-column: 1 / -1; width: 100%; }
  .quantity-grid { gap: .45rem; }
  .quantity-choice { min-height: 158px; }
  .quantity-choice img { height: 45px; }
  .quantity-choice b { font-size: .57rem; }
  .timing-grid { grid-template-columns: 1fr; }
  .timing-grid span { min-height: 58px; }
  .quick-actions a { gap: .3rem; }
  .quick-actions svg { width: 19px; }
  .quick-actions strong { font-size: .7rem; }
}

@media (max-width: 340px) {
  .brand span { display: none; }
  .quantity-choice { min-height: 151px; }
  .quick-actions small { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
