/* Mewilauto prototype. Palette from paleta.json (Portuguese licence plate: asphalt, EU blue, plate yellow). */
@font-face { font-family: 'Archivo'; src: url('/assets/fonts/archivo-var.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Plex Mono'; src: url('/assets/fonts/ibm-plex-mono-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }

:root {
  --fundo: #15181B;
  --fundo-2: #1D2125;
  --superficie: #EEF0F2;
  --texto: #F4F5F6;
  --texto-escuro: #15181B;
  --muted: #A9B0B7;
  --muted-escuro: #4A525A;
  --primaria: #1E44B8;
  --primaria-escura: #17358F;
  --acento: #F2C230;
  --linha: #2E343A;
  --r: 6px;
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 48px; --s6: 72px; --s7: 112px;
  --wrap: 1240px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body { margin: 0; background: var(--fundo); color: var(--texto); font: 400 1.0625rem/1.6 'Archivo', system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-weight: 800; line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 var(--s2); text-wrap: balance; font-stretch: 100%; }
h1 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.5rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; margin-bottom: 6px; }
p { margin: 0 0 var(--s2); text-wrap: pretty; }
.mono { font-family: 'Plex Mono', ui-monospace, monospace; font-weight: 500; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--acento); color: var(--texto-escuro); padding: 10px 14px; border-radius: var(--r); font-weight: 700; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--acento); outline-offset: 3px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 22px; border: 0; border-radius: var(--r); font: 700 1rem/1 'Archivo', sans-serif; text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform .16s var(--ease), background-color .2s var(--ease), box-shadow .2s var(--ease); }
.btn:active { transform: scale(.96); }
.btn--yellow { background: var(--acento); color: var(--texto-escuro); }
.btn--yellow:hover { background: #FFD24A; }
.btn--blue { background: var(--primaria); color: #fff; }
.btn--blue:hover { background: var(--primaria-escura); }
.btn--plate { background: var(--texto); color: var(--texto-escuro); box-shadow: inset 10px 0 0 var(--primaria); padding-left: 30px; }
.btn--plate:hover { background: #fff; }

/* Header */
.top { position: sticky; top: 0; z-index: 40; background: rgba(21, 24, 27, .96); border-bottom: 1px solid var(--linha); }
.top__row { display: flex; align-items: center; gap: var(--s4); min-height: 72px; }
.brand { display: inline-flex; flex: none; border-radius: var(--r); }
.brand__plate { width: 168px; height: 40px; }
.nav { margin-left: auto; }
.nav__list { display: flex; gap: var(--s4); list-style: none; margin: 0; padding: 0; }
.nav__list a { position: relative; text-decoration: none; font-weight: 600; color: var(--muted); padding: 8px 0; transition: color .2s; }
.nav__list a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px; background: var(--acento); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
.nav__list a:hover, .nav__list a[aria-current] { color: var(--texto); }
.nav__list a:hover::after, .nav__list a[aria-current]::after, .nav__list a:focus-visible::after { transform: scaleX(1); }
.top__tel { min-height: 42px; }
.menu-btn { display: none; }

/* Hero */
.hero { position: relative; background: var(--fundo); }
.hero__media img { width: 100%; height: min(74vh, 720px); min-height: 440px; object-fit: cover; object-position: 50% 45%; }
.hero__console-wrap { position: relative; margin-top: -150px; z-index: 2; }
.console { background: var(--fundo-2); border: 1px solid var(--linha); border-radius: var(--r); padding: var(--s4) var(--s4) var(--s3); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .7); }
.console__head { max-width: 64ch; }
.console__head p { color: var(--muted); margin-bottom: var(--s3); }
.console h1 { margin-bottom: var(--s1); }
.console__fields { display: grid; grid-template-columns: 1.5fr 1fr 1fr auto; gap: var(--s2); align-items: end; }
.console .field label, .seg__legend { color: var(--muted); }
.console select { background-color: var(--fundo); color: var(--texto); border-color: var(--linha); }
.console__go { min-height: 52px; }

/* Segmented control */
.seg { border: 0; margin: 0; padding: 0; min-width: 0; }
.seg__legend { display: block; font-size: .875rem; font-weight: 600; margin-bottom: 6px; padding: 0; }
.seg__row { display: flex; background: var(--fundo); border: 1px solid var(--linha); border-radius: var(--r); padding: 3px; }
.seg__opt { flex: 1; position: relative; }
.seg__opt input { position: absolute; opacity: 0; inset: 0; }
.seg__opt span { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 12px; border-radius: 4px; font-weight: 600; color: var(--muted); cursor: pointer; transition: background-color .2s, color .2s; }
.seg__opt input:checked + span { background: var(--texto); color: var(--texto-escuro); }
.seg__opt input:focus-visible + span { outline: 3px solid var(--acento); outline-offset: 2px; }
.seg__opt span:hover { color: var(--texto); }
.form .seg__row { background: #fff; border-color: #C9CED3; }
.form .seg__legend { color: var(--texto-escuro); font-size: 1rem; }
.form .seg__opt span { color: var(--muted-escuro); }
.form .seg__opt input:checked + span { background: var(--texto-escuro); color: #fff; }

/* Fields */
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-size: .875rem; font-weight: 600; }
.opt { font-weight: 400; color: var(--muted-escuro); }
input, select, textarea { width: 100%; min-height: 48px; padding: 11px 14px; font: inherit; font-size: 1rem; color: var(--texto-escuro); background: #fff; border: 1px solid #B9C0C7; border-radius: var(--r); transition: border-color .2s, box-shadow .2s; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primaria); box-shadow: 0 0 0 3px rgba(30, 68, 184, .25); }
input::placeholder, textarea::placeholder { color: #6B737B; }
[aria-invalid='true'] { border-color: #B3261E; }
.err { color: #B3261E; font-size: .875rem; margin: 0; }

/* Types carousel */
.types { padding: var(--s7) 0 var(--s6); }
.types__head { display: flex; align-items: end; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s4); }
.types__head h2 { margin: 0; max-width: 20ch; }
.carousel__ctrl { display: flex; gap: var(--s1); }
.arrow { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--linha); background: transparent; color: var(--texto); font-size: 1.2rem; cursor: pointer; transition: background-color .2s, border-color .2s, transform .16s; }
.arrow:hover { background: var(--fundo-2); border-color: var(--muted); }
.arrow:active { transform: scale(.96); }
.arrow:disabled { opacity: .35; cursor: default; }
.types__track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((min(100vw - 40px, var(--wrap)) - 2 * var(--s3)) / 3); gap: var(--s3); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-inline: max(20px, (100vw - var(--wrap)) / 2); scroll-padding-inline: max(20px, (100vw - var(--wrap)) / 2); }
.types__track::-webkit-scrollbar { display: none; }
.type { scroll-snap-align: start; text-decoration: none; display: grid; background: var(--fundo-2); border-radius: var(--r); overflow: hidden; border: 1px solid var(--linha); transition: border-color .25s, transform .25s var(--ease); }
.type__img { aspect-ratio: 4 / 3; overflow: hidden; }
.type__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.type__body { display: grid; gap: 6px; padding: var(--s3); }
.type__name { font-weight: 800; font-size: 1.3rem; letter-spacing: -0.01em; }
.type__line { color: var(--muted); }
.type__go { color: var(--acento); font-weight: 700; margin-top: var(--s1); }
.type:hover { border-color: var(--acento); }
.type:hover .type__img img { transform: scale(1.04); }

/* Deal (blue) */
.deal { background: var(--primaria); padding: var(--s7) 0; }
.deal__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s6); align-items: center; }
.deal__fig { margin: 0; border-radius: var(--r); overflow: hidden; }
.deal__fig img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 40% 50%; }
.steps { list-style: none; margin: var(--s3) 0 var(--s4); padding: 0; display: grid; gap: var(--s3); }
.steps li { display: grid; grid-template-columns: 52px 1fr; gap: var(--s2); align-items: start; }
.steps__n { display: grid; place-items: center; width: 44px; height: 52px; background: var(--texto); color: var(--texto-escuro); border-radius: 4px; font-size: 1.4rem; border: 2px solid var(--acento); }
.steps p { color: #DCE3F7; margin: 0; }

/* Sell (photo band) */
.sell { position: relative; display: grid; min-height: 560px; align-items: end; overflow: hidden; }
.sell__media { position: absolute; inset: 0; }
.sell__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.sell__box { position: relative; background: var(--fundo); padding: var(--s5); margin-bottom: var(--s5); max-width: 560px; margin-left: max(20px, (100vw - var(--wrap)) / 2); border-radius: 0 var(--r) var(--r) 0; }
.sell__box p { color: var(--muted); }

/* Reach (light plate surface) */
.reach { background: var(--superficie); color: var(--texto-escuro); padding: var(--s7) 0; }
.reach__grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: var(--s6); align-items: stretch; }
.reach h2 { margin-bottom: var(--s2); }
.reach--page h2 { font-size: 1rem; text-transform: none; letter-spacing: 0; color: var(--muted-escuro); margin: var(--s4) 0 var(--s1); }
.reach--page h2:first-child { margin-top: 0; }
.reach__tel { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.8rem); margin-bottom: var(--s1); }
.reach__tel a { text-decoration: none; }
.reach__tel a:hover { color: var(--primaria); }
.reach address { font-style: normal; margin-bottom: var(--s4); }
.map { position: relative; display: grid; place-items: center; align-content: center; gap: var(--s2); min-height: 340px; border-radius: var(--r); background: var(--fundo) url('/assets/img/stand-suv-720.webp') center / cover; overflow: hidden; padding: var(--s3); text-align: center; }
.map::before { content: ''; position: absolute; inset: 0; background: rgba(21, 24, 27, .62); }
.map > * { position: relative; }
.map--tall { min-height: 460px; }
.map__btn { font: 700 1rem 'Archivo', sans-serif; background: var(--acento); color: var(--texto-escuro); border: 0; border-radius: var(--r); min-height: 48px; padding: 12px 20px; cursor: pointer; transition: transform .16s; }
.map__btn:active { transform: scale(.96); }
.map__note { color: var(--texto); font-size: .875rem; margin: 0; max-width: 36ch; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map.is-loaded::before { display: none; }

/* Page heads */
.pagehead { padding: var(--s6) 0; }
.pagehead p { color: var(--muted); max-width: 60ch; font-size: 1.125rem; }
.pagehead--blue { background: var(--primaria); }
.pagehead--blue p { color: #DCE3F7; }
.pagehead--done { padding: var(--s7) 0; }
.pagehead--done .btn { margin-top: var(--s2); }
.pagehead--photo { position: relative; padding: 0; display: grid; min-height: 420px; align-items: end; }
.pagehead__media { position: absolute; inset: 0; }
.pagehead__media img { width: 100%; height: 100%; object-fit: cover; }
.pagehead__box { position: relative; background: var(--fundo); padding: var(--s4); margin-bottom: calc(-1 * var(--s5)); max-width: 720px; margin-left: max(20px, (100vw - var(--wrap)) / 2); border-radius: var(--r) var(--r) 0 0; }
.pagehead__box p { margin: 0; }
.proto-note { font-size: .95rem; opacity: .85; }

/* Forms */
.finder { background: var(--superficie); color: var(--texto-escuro); padding: calc(var(--s5) + var(--s5)) 0 var(--s7); }
.form { display: grid; gap: var(--s3); max-width: 920px; }
.form__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); }
.form > .btn { justify-self: start; }
.form__note, .form__alt { margin: 0; color: var(--muted-escuro); font-size: .95rem; }
.form__note a, .form__alt a, .link { color: var(--primaria); }
.pick { border: 0; margin: 0; padding: 0; min-width: 0; }
.pick__legend { font-size: 1.25rem; font-weight: 800; margin-bottom: var(--s2); padding: 0; }
.pick__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); }
.pick__card { position: relative; display: grid; background: #fff; border: 2px solid #D3D8DD; border-radius: var(--r); overflow: hidden; cursor: pointer; transition: border-color .2s, box-shadow .2s, transform .16s; }
.pick__card input { position: absolute; opacity: 0; }
.pick__img { aspect-ratio: 16 / 10; overflow: hidden; }
.pick__img img { width: 100%; height: 100%; object-fit: cover; }
.pick__txt { display: grid; gap: 4px; padding: var(--s2); }
.pick__txt span { color: var(--muted-escuro); font-size: .95rem; }
.pick__tick { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--acento); color: var(--texto-escuro); font-weight: 800; opacity: 0; transform: scale(.6); transition: opacity .2s, transform .2s var(--ease); }
.pick__card:hover { border-color: #9AA3AC; }
.pick__card:has(input:checked) { border-color: var(--primaria); box-shadow: 0 0 0 3px rgba(30, 68, 184, .18); }
.pick__card:has(input:checked) .pick__tick { opacity: 1; transform: none; }
.pick__card:has(input:focus-visible) { outline: 3px solid var(--acento); outline-offset: 3px; }
.finder .field label { color: var(--texto-escuro); }

/* Legal */
.legal { background: var(--superficie); color: var(--texto-escuro); padding: var(--s6) 0 var(--s7); }
.legal__body { max-width: 760px; }
.legal h2 { font-size: 1.3rem; margin-top: var(--s4); }
.legal a { color: var(--primaria); }

/* Footer */
.foot { background: #0F1113; padding: var(--s6) 0 var(--s4); color: var(--muted); }
.foot__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--s5); }
.foot__lead { margin-top: var(--s2); max-width: 34ch; }
.foot__h { font-size: 1rem; color: var(--texto); margin-bottom: var(--s2); letter-spacing: 0; }
.foot a { color: var(--texto); text-decoration-color: rgba(244, 245, 246, .35); text-underline-offset: 3px; }
.foot a:hover { text-decoration-color: var(--acento); }
.foot__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s2); border-top: 1px solid var(--linha); margin-top: var(--s5); padding-top: var(--s3); font-size: .9rem; }
.foot__legal p { margin: 0; }

/* Motion (only with JS and no reduced-motion preference) */
@media (prefers-reduced-motion: no-preference) {
  .js-motion .reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s ease-out, transform .55s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
  .js-motion .reveal.is-in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* Responsive */
@media (max-width: 1000px) {
  .console__fields { grid-template-columns: 1fr 1fr; }
  .console .seg { grid-column: 1 / -1; }
  .console__go { grid-column: 1 / -1; }
  .deal__grid, .reach__grid { grid-template-columns: 1fr; gap: var(--s5); }
  .deal__fig img { aspect-ratio: 16 / 10; }
  .foot__grid { grid-template-columns: 1fr 1fr; }
  .types__track { grid-auto-columns: 46%; }
}
@media (max-width: 760px) {
  body { font-size: 1rem; }
  .top__row { min-height: 64px; gap: var(--s2); }
  .brand__plate { width: 144px; height: 34px; }
  .top__tel { display: none; }
  .menu-btn { display: grid; place-items: center; margin-left: auto; width: 48px; height: 48px; background: transparent; border: 1px solid var(--linha); border-radius: var(--r); color: var(--texto); cursor: pointer; }
  .menu-btn__bars, .menu-btn__bars::before, .menu-btn__bars::after { display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s var(--ease); }
  .menu-btn__bars { position: relative; }
  .menu-btn__bars::before, .menu-btn__bars::after { content: ''; position: absolute; left: 0; }
  .menu-btn__bars::before { top: -6px; }
  .menu-btn__bars::after { top: 6px; }
  .menu-btn[aria-expanded='true'] .menu-btn__bars { background: transparent; }
  .menu-btn[aria-expanded='true'] .menu-btn__bars::before { transform: translateY(6px) rotate(45deg); }
  .menu-btn[aria-expanded='true'] .menu-btn__bars::after { transform: translateY(-6px) rotate(-45deg); }
  .nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--fundo); border-bottom: 1px solid var(--linha); display: none; }
  .nav.is-open { display: block; }
  .nav__list { flex-direction: column; gap: 0; padding: var(--s1) 20px var(--s3); }
  .nav__list a { display: block; padding: 14px 0; font-size: 1.15rem; color: var(--texto); }
  .hero__media img { height: 52vh; min-height: 340px; object-position: 50% 50%; }
  .hero__console-wrap { margin-top: -64px; width: calc(100% - 24px); }
  .console { padding: var(--s3) var(--s2) var(--s2); }
  .console__fields { grid-template-columns: 1fr; }
  .types { padding: var(--s6) 0 var(--s5); }
  .types__track { grid-auto-columns: 82%; gap: var(--s2); }
  .deal, .reach { padding: var(--s6) 0; }
  .sell { min-height: 520px; }
  .sell__box { margin: 0 12px 12px; padding: var(--s3); }
  .pagehead--photo { min-height: 320px; }
  .pagehead__box { margin-inline: 12px; padding: var(--s3); }
  .form__cols, .pick__grid { grid-template-columns: 1fr; }
  .pick__grid { grid-auto-flow: column; grid-auto-columns: 78%; grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .pick__card { scroll-snap-align: start; }
  .foot__grid { grid-template-columns: 1fr; gap: var(--s4); }
  .map--tall { min-height: 340px; }
}

/* R2 fixes */
.nw { white-space: nowrap; }
.console__head { max-width: 900px; }
.console h1 { font-size: clamp(1.9rem, 1.2rem + 2.2vw, 3rem); }
.hero__media img { height: min(60vh, 580px); min-height: 400px; }
.hero__console-wrap { margin-top: -120px; }
@media (max-width: 760px) {
  .hero__media img { height: 46vh; min-height: 300px; }
  .hero__console-wrap { margin-top: -56px; }
}
.type__name { line-height: 1.2; }
.map { background: var(--fundo-2); border: 1px solid #C9CED3; }
.sell__media img { object-position: 50% 55%; }
.sell__media img { object-position: 70% 85%; }
.map::before { display: none; }
/* make-interfaces-feel-better: image outlines on dark surfaces, press feedback on cards */
.type__img, .deal__fig { outline: 1px solid oklch(1 0 0 / .1); outline-offset: -1px; }
.pick__img { outline: 1px solid oklch(0 0 0 / .1); outline-offset: -1px; }
.pick__card:active { transform: scale(.98); }
.carousel__ctrl[hidden] { display: none; }
