/* ==========================================================================
   SPM Yamaha — Landing page Zero KM
   Identidade baseada em spmyamaha.com.br (azul #2846d2, navy #070633)
   ========================================================================== */

:root {
  --blue: #2846d2;
  --blue-hover: #1f37a8;
  --navy: #070633;
  --navy-2: #001e50;
  --text: #343434;
  --muted: #626262;
  --line: #dee2e6;
  --soft: #f4f5f9;
  --white: #fff;
  --error: #c8102e;
  --success: #1a7f45;
  --whatsapp: #25d366;

  --font-display: "Saira", "Arial Narrow", Arial, sans-serif;
  --font-body: "Roboto", Arial, Helvetica, sans-serif;

  --radius: 6px;
  --shadow: 0 18px 50px rgba(7, 6, 51, .35);
  --container: 1120px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--navy);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; height: auto; display: block; }

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

:focus-visible {
  outline: 3px solid #ffbf47;
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  background: var(--white);
  color: var(--navy);
  padding: 10px 16px;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

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

/* ---------- Header ---------- */

.site-header {
  background: var(--white);
  border-bottom: 4px solid var(--blue);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  min-height: 76px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.site-header a { display: inline-flex; }
.site-header .logo-spm { width: 150px; }
.site-header .logo-yamaha { width: 164px; }
.site-header .divider {
  width: 1px;
  height: 40px;
  background: var(--line);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  flex: 1;
  overflow: hidden;
  background:
    repeating-linear-gradient(115deg, rgba(255,255,255,.035) 0 2px, transparent 2px 38px),
    radial-gradient(ellipse at 20% 110%, rgba(40,70,210,.55), transparent 60%),
    linear-gradient(135deg, var(--navy) 0%, #0f1a7a 55%, var(--blue) 100%);
  color: var(--white);
  padding: 48px 0 56px;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: 56px;
  align-items: start;
}

.hero-copy { padding-top: 12px; }

.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  line-height: 1.08;
  text-transform: uppercase;
  letter-spacing: .01em;
  margin: 0;
  text-wrap: balance;
}
.hero h1 span { color: #9fb3ff; }

.hero-rule {
  width: 100px;
  height: 4px;
  background: var(--white);
  border: 0;
  margin: 26px 0 22px;
}

.hero-text {
  font-size: 1.1rem;
  line-height: 1.7;
  max-width: 460px;
  margin: 0;
  color: #e3e8ff;
}

.hero-bike {
  margin-top: 28px;
  width: min(100%, 420px);
  filter: drop-shadow(0 20px 30px rgba(0,0,0,.45));
}

/* ---------- Form card ---------- */

.form-card {
  background: var(--white);
  color: var(--text);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 28px 22px;
  border-top: 5px solid var(--blue);
}

.form-success h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--navy);
  margin: 0 0 4px;
}
/* Stepper */
.stepper {
  list-style: none;
  display: flex;
  gap: 8px;
  padding: 0;
  margin: 0 0 22px;
}
.stepper li {
  flex: 1;
  font-size: .8rem;
  font-weight: 500;
  color: var(--muted);
}
.stepper li::before {
  content: "";
  display: block;
  height: 5px;
  border-radius: 3px;
  background: var(--line);
  margin-bottom: 6px;
  transition: background .25s;
}
.stepper li.is-active,
.stepper li.is-done { color: var(--navy); }
.stepper li.is-active::before,
.stepper li.is-done::before { background: var(--blue); }

/* Fields */
.form-step { border: 0; padding: 0; margin: 0; min-width: 0; }
.form-step legend { padding: 0; }
.form-step:focus { outline: none; }

.field { margin-bottom: 14px; }

.field > label,
.field .label {
  display: block;
  font-size: .9rem;
  font-weight: 500;
  margin-bottom: 5px;
  color: var(--text);
}
.req { color: var(--error); }

.input,
.select {
  width: 100%;
  height: 46px;
  padding: 0 12px;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--white);
  border: 1px solid #b9bfca;
  border-radius: var(--radius);
  transition: border-color .15s, box-shadow .15s;
  appearance: none;
  -webkit-appearance: none;
}
.select {
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23343434' stroke-width='2' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}
.input:focus,
.select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(40,70,210,.2);
}
.field.has-error .input,
.field.has-error .select { border-color: var(--error); }
.field.has-error .input:focus,
.field.has-error .select:focus { box-shadow: 0 0 0 3px rgba(200,16,46,.18); }

.error-msg {
  display: none;
  color: var(--error);
  font-size: .82rem;
  margin-top: 4px;
}
.field.has-error .error-msg { display: block; }

/* Radio */
.radio-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.radio-option { position: relative; }
.radio-option input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.radio-option span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  border: 1px solid #b9bfca;
  border-radius: var(--radius);
  font-weight: 500;
  transition: all .15s;
}
.radio-option span::before {
  content: "";
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid #8a90a0;
  transition: all .15s;
}
.radio-option input:checked + span {
  border-color: var(--blue);
  background: rgba(40,70,210,.07);
  color: var(--navy);
}
.radio-option input:checked + span::before {
  border-color: var(--blue);
  background: radial-gradient(circle, var(--blue) 45%, transparent 50%);
}
.radio-option input:focus-visible + span {
  outline: 3px solid #ffbf47;
  outline-offset: 2px;
}
.field.has-error .radio-option span { border-color: var(--error); }

/* Checkbox (consent) */
.field > label.consent {
  display: flex;
  margin-bottom: 0;
  font-weight: 400;
  gap: 10px;
  align-items: flex-start;
  font-size: .85rem;
  line-height: 1.45;
  color: var(--muted);
}
.consent input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--blue);
  cursor: pointer;
}
.field.has-error .consent { color: var(--text); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 24px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue); color: var(--white); width: 100%; }
.btn-primary:hover { background: var(--blue-hover); }
.btn-primary[disabled] { opacity: .7; cursor: progress; }
.btn-ghost {
  background: transparent;
  color: var(--muted);
  height: 44px;
  padding: 0 8px;
  font-size: .9rem;
}
.btn-ghost:hover { color: var(--navy); }

.form-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  margin-top: 6px;
}

.spinner {
  width: 18px; height: 18px;
  border: 3px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: none;
}
.is-loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-note {
  font-size: .78rem;
  color: #7a7f8a;
  margin: 14px 0 0;
  text-align: center;
}

.form-alert {
  display: none;
  background: #fdecee;
  border: 1px solid #f3b9c2;
  color: #8a0c20;
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: .88rem;
  margin-bottom: 12px;
}
.form-alert.is-visible { display: block; }

/* Success */
.form-success { text-align: center; padding: 18px 0 6px; }
.form-success:focus { outline: none; }
.form-success .check {
  width: 64px; height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(26,127,69,.12);
  display: grid;
  place-items: center;
}
.form-success h2 { margin-bottom: 8px; }
.form-success p { color: var(--muted); margin: 0 0 8px; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy);
  color: #b8c0e6;
  font-size: .8rem;
  padding: 0 0 24px;
}
.site-footer .container {
  border-top: 1px solid rgba(255,255,255,.18);
  padding-top: 20px;
  text-align: center;
}
.site-footer p { margin: 0 0 6px; }
.site-footer nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 16px;
}
.site-footer a {
  color: #dfe5ff;
  text-decoration: none;
  padding: 4px 0;
}
.site-footer a:hover { text-decoration: underline; }

/* ---------- Legal pages ---------- */

.legal {
  flex: 1;
  background: var(--soft);
  padding: 40px 0 56px;
}
.legal .container { max-width: 860px; }
.legal article {
  background: var(--white);
  border-radius: var(--radius);
  border-top: 5px solid var(--blue);
  padding: 36px 40px;
  box-shadow: 0 4px 20px rgba(7,6,51,.06);
}
.legal h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  line-height: 1.15;
  text-transform: uppercase;
  color: var(--navy);
  margin: 0 0 6px;
  text-wrap: balance;
}
.legal .updated { color: var(--muted); font-size: .9rem; margin: 0 0 26px; }
.legal h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--navy);
  margin: 30px 0 10px;
}
.legal h3 { font-size: 1rem; margin: 20px 0 8px; color: var(--navy); }
.legal p, .legal li { line-height: 1.7; }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 4px; }
.table-wrap { overflow-x: auto; margin: 12px 0; }
.legal table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
  min-width: 520px;
}
.legal caption {
  text-align: left;
  font-weight: 500;
  color: var(--muted);
  padding-bottom: 6px;
}
.legal th, .legal td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border: 1px solid var(--line);
}
.legal th { background: var(--soft); color: var(--navy); }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  font-weight: 500;
  text-decoration: none;
}
.back-link:hover { text-decoration: underline; }

/* ---------- 404 ---------- */

.not-found {
  flex: 1;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--white);
  padding: 64px 0;
  background: linear-gradient(135deg, var(--navy) 0%, #0f1a7a 60%, var(--blue) 100%);
}
.not-found .code {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(5rem, 18vw, 9rem);
  line-height: 1;
  margin: 0;
  color: rgba(255,255,255,.2);
}
.not-found h1 {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  margin: 0 0 12px;
}
.not-found p { color: #dfe5ff; margin: 0 0 28px; }
.not-found .btn { background: var(--white); color: var(--navy); }

/* ---------- Cookie banner ---------- */

.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 90;
  max-width: 720px;
  margin: 0 auto;
  background: var(--white);
  color: var(--text);
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0,0,0,.3);
  border-left: 5px solid var(--blue);
  padding: 18px 20px;
  display: flex;
  gap: 18px;
  align-items: center;
  font-size: .88rem;
  line-height: 1.5;
  animation: slideUp .3s ease-out;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 0; flex: 1; }
.cookie-banner a { font-weight: 500; }
.cookie-actions { display: flex; gap: 8px; flex: none; }
.cookie-actions .btn {
  height: 42px;
  padding: 0 18px;
  font-size: .9rem;
}
.cookie-actions .btn-outline {
  background: transparent;
  color: var(--navy);
  border: 1px solid #b9bfca;
}
.cookie-actions .btn-outline:hover { border-color: var(--navy); }
.cookie-actions .btn-primary { width: auto; }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Responsive ---------- */

@media (max-width: 940px) {
  .hero .container { grid-template-columns: 1fr; gap: 32px; }
  .hero-copy { text-align: center; padding-top: 0; }
  .hero-rule { margin-left: auto; margin-right: auto; }
  .hero-text { margin: 0 auto; }
  .hero-bike { display: none; }
  .form-card { max-width: 520px; width: 100%; margin: 0 auto; }
}

@media (max-width: 640px) {
  .site-header .container { gap: 20px; min-height: 64px; }
  .site-header .logo-spm { width: 114px; }
  .site-header .logo-yamaha { width: 124px; }
  .site-header .divider { height: 32px; }
  .hero { padding: 30px 0 40px; }
  .hero-text { font-size: 1rem; }
  .form-card { padding: 22px 18px 18px; }
  .legal { padding: 20px 0 40px; }
  .legal article { padding: 24px 18px; }
  .cookie-banner { flex-direction: column; align-items: stretch; gap: 12px; left: 8px; right: 8px; bottom: 8px; }
  .cookie-actions .btn { flex: 1; }
}

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

.site-footer.plain .container { border-top: 0; padding-top: 24px; }
