/* Avilés Auto brand kit (ads/brand/aviles/brand.md): navy, sky blue, white; Rubik like their site. Premium and calm. */
@font-face {
  font-family: "Rubik";
  src: url("/fonts/rubik-latin-var.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --navy: #1f306b;       /* Avilés navy */
  --navy-dark: #172453;
  --sky: #1fa0da;        /* Avilés sky-blue slash */
  --sky-tint: #ecf6fc;
  --bg: #f7f8fa;
  --card: #ffffff;
  --ink: #141a2b;
  --muted: #5d6578;
  --line: #e1e5ec;
  --selected: #eef3fb;
  --wa: #1e7d4a;
  --error: #b42318;
  --radius: 14px;
  --font: "Rubik", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.5 var(--font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
.wrap { width: 100%; max-width: 480px; margin: 0 auto; padding: 0 16px; }

/* Header: navy band with the Avilés double bar */
.top { background: var(--navy); color: #fff; }
.top-inner {
  max-width: 480px; margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top)) 16px 14px;
  display: flex; align-items: center; gap: 12px;
}
.mark { width: 26px; height: 36px; flex: none; }
.brand { margin: 0; font-weight: 600; font-size: 19px; line-height: 1.2; letter-spacing: .1px; }
.who { margin: 2px 0 0; font-size: 13px; line-height: 1.35; color: rgba(255, 255, 255, .72); }

main.wrap { padding-top: 22px; padding-bottom: 8px; flex: 1; }

/* Progress */
.progress { margin-bottom: 22px; }
.bar { height: 3px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--navy); border-radius: 99px; transition: width .3s ease; }
.step { margin: 8px 0 0; font-size: 13px; color: var(--muted); letter-spacing: .2px; }

/* Type */
h1 { font-size: 25px; line-height: 1.22; margin: 0 0 8px; font-weight: 600; letter-spacing: -.3px; outline: none; color: var(--ink); }
.lead { margin: 14px 0 20px; color: #2b3245; }
.help { margin: 0 0 20px; color: var(--muted); }
.fine { font-size: 13px; line-height: 1.45; color: var(--muted); margin: 16px 0 0; }
.trust {
  display: flex; align-items: flex-start; gap: 8px;
  margin: 12px 0 0; padding: 0;
  font-size: 14px; color: var(--muted);
}
.trust::before {
  content: ""; flex: none; width: 16px; height: 16px; margin-top: 2px;
  background: no-repeat center/16px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l8 3v6c0 5-3.4 9.4-8 11-4.6-1.6-8-6-8-11V5z' fill='%231f306b'/%3E%3Cpath d='M8 12.2l2.7 2.7L16 9.6' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Featured car */
.car-hero { margin: 0 0 16px; border-radius: var(--radius); overflow: hidden; background: var(--line); aspect-ratio: 16 / 9; }
.car-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.car-meta { margin: 0; color: var(--muted); }

/* Car list */
.cars { display: grid; gap: 10px; margin-top: 18px; }
.car-opt {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 10px; text-align: left; font: inherit; color: inherit;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.car-opt img { width: 96px; height: 64px; object-fit: cover; border-radius: 9px; flex: none; background: var(--line); }
.car-opt .t { font-weight: 600; line-height: 1.3; font-size: 16px; }
.car-opt .m { font-size: 14px; color: var(--muted); }
.car-opt .icon { width: 96px; height: 64px; border-radius: 9px; flex: none; display: grid; place-items: center; background: var(--selected); color: var(--navy); }

/* Options */
.options { display: grid; gap: 10px; }
h1 + .options { margin-top: 20px; }
.options.two { grid-template-columns: 1fr 1fr; }
.opt {
  min-height: 56px; padding: 14px 16px; width: 100%;
  font: 500 17px/1.25 var(--font); color: var(--ink); text-align: left;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.options.two .opt { text-align: center; }
.car-opt[aria-pressed="true"], .opt[aria-pressed="true"] {
  border-color: var(--navy); background: var(--selected);
  box-shadow: inset 0 0 0 1px var(--navy);
}
@media (hover: hover) {
  .opt:hover, .car-opt:hover { border-color: #b9c3d6; }
}

/* Buttons */
.btn {
  display: block; width: 100%; min-height: 54px; padding: 15px 18px;
  font: 600 17px/1.2 var(--font); text-align: center; text-decoration: none; letter-spacing: .1px;
  border: 0; border-radius: var(--radius); cursor: pointer;
}
.btn.primary { background: var(--navy); color: #fff; }
.btn.primary:active { background: var(--navy-dark); }
.btn.primary[disabled] { opacity: .6; }
.btn.call { margin-top: 22px; }
.btn.secondary { background: var(--card); color: var(--navy); border: 1px solid #b9c3d6; margin-top: 12px; font-weight: 500; }
.btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }
[data-screen="listo"] .ref { margin-top: 18px; }
.btn.link { background: none; color: var(--navy); font-weight: 600; font-size: 16px; min-height: 48px; margin-top: 6px; text-decoration: underline; text-decoration-color: rgba(31, 48, 107, .3); text-underline-offset: 4px; }
.nav { margin-top: 16px; }
.btn.back { background: none; color: var(--muted); font-weight: 500; font-size: 16px; min-height: 44px; width: auto; padding: 10px 2px; }

/* Form */
.field { display: block; margin-bottom: 16px; }
.field span { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.field input {
  width: 100%; height: 52px; padding: 0 14px;
  font: 17px var(--font); color: var(--ink);
  background: var(--card); border: 1px solid #cdd3de; border-radius: 12px;
}
.field input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(31, 160, 218, .25); }
.field input[aria-invalid="true"] { border-color: var(--error); }
.consent { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 6px; font-size: 15px; line-height: 1.45; color: #2b3245; }
.consent input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--navy); }
.consent a, .foot a { color: var(--navy); }
.err { display: block; color: var(--error); font-size: 14px; margin-top: 4px; }
.err:empty { display: none; }
.form-err { margin-top: 12px; }
[data-submit] { margin-top: 16px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Done */
.done-mark svg { width: 52px; height: 52px; display: block; margin: 8px 0 16px; }
.ref { font-size: 15px; color: var(--muted); margin: 0; }
.ref strong { color: var(--ink); letter-spacing: .5px; }

/* Footer */
.foot { padding-top: 22px; padding-bottom: calc(24px + env(safe-area-inset-bottom)); font-size: 12px; line-height: 1.5; color: var(--muted); border-top: 1px solid var(--line); margin-top: 28px; }
.foot p { margin: 0 0 6px; }

/* Privacy page */
.doc h1 { font-size: 24px; }
.doc h2 { font-size: 17px; margin: 24px 0 6px; }
.doc p, .doc li { font-size: 16px; color: #2b3245; }
.doc ul { padding-left: 20px; }
