/* ============================================================
   Brother's Driving School Inc. — brothersdriving.ca
   Palette: night asphalt / paper / Ontario centre-line yellow
   Type: Archivo (display) + Public Sans (body)
   Signature: the dashed yellow road line
   ============================================================ */

:root {
  --asphalt: #141d2b;
  --asphalt-2: #1c2839;
  --asphalt-3: #26344a;
  --paper: #fafaf8;
  --card: #ffffff;
  --ink: #26303d;
  --muted: #66707c;
  --line: #e5e3dc;
  --yellow: #f5b301;
  --yellow-deep: #cf9700;
  --green: #1e7a46;
  --green-soft: #e7f3ec;
  --red: #b3402f;
  --red-soft: #f9ece9;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 29, 43, .06), 0 8px 24px rgba(20, 29, 43, .07);
  --display: "Archivo", system-ui, sans-serif;
  --body: "Public Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3, .display {
  font-family: var(--display);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
}
h1 { font-weight: 900; font-size: clamp(2.1rem, 5.2vw, 3.6rem); font-stretch: 112%; }
h2 { font-weight: 800; font-size: clamp(1.5rem, 3vw, 2.1rem); font-stretch: 108%; }
h3 { font-weight: 700; font-size: 1.12rem; }
p { margin: 0 0 1em; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 22px; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Signature: the road line ---------- */
.roadline {
  height: 4px;
  background: repeating-linear-gradient(90deg, var(--yellow) 0 22px, transparent 22px 36px);
  border: 0;
}
.roadline-sm {
  display: inline-block;
  width: 72px;
  height: 4px;
  margin-bottom: 14px;
  background: repeating-linear-gradient(90deg, var(--yellow) 0 14px, transparent 14px 23px);
}

/* ---------- Accessibility ---------- */
.skip {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--yellow); color: var(--asphalt); padding: 10px 16px; font-weight: 700;
}
.skip:focus { left: 0; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--display); font-weight: 700; font-size: .98rem;
  padding: 13px 24px; border-radius: 10px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer; transition: transform .12s ease, background .15s, color .15s, border-color .15s;
}
.btn:active { transform: translateY(1px); }
.btn-yellow { background: var(--yellow); color: var(--asphalt); }
.btn-yellow:hover { background: var(--yellow-deep); }
.btn-dark { background: var(--asphalt); color: #fff; }
.btn-dark:hover { background: var(--asphalt-3); }
.btn-ghost { border-color: rgba(255,255,255,.35); color: #fff; background: transparent; }
.btn-ghost:hover { border-color: var(--yellow); color: var(--yellow); }
.btn-outline { border-color: var(--asphalt); color: var(--asphalt); background: transparent; }
.btn-outline:hover { background: var(--asphalt); color: #fff; }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-sm { padding: 8px 14px; font-size: .88rem; border-radius: 8px; }

/* ---------- Header ---------- */
.site-header {
  background: var(--asphalt); color: #fff;
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.header-inner { display: flex; align-items: center; gap: 26px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-text { font-family: var(--display); line-height: 1.05; display: flex; flex-direction: column; }
.brand-text strong { font-weight: 900; font-size: 1.06rem; letter-spacing: .01em; }
.brand-text span { font-weight: 500; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; opacity: .75; }
.site-nav { display: flex; align-items: center; gap: 20px; flex: 1; }
.site-nav a { color: rgba(255,255,255,.85); text-decoration: none; font-weight: 500; font-size: .95rem; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--yellow); }
.nav-spacer { flex: 1; }
.nav-muted { opacity: .7; font-size: .88rem; }
.btn-nav { padding: 9px 18px; font-size: .9rem; }
.btn-nav:hover { color: var(--asphalt); }
.lang-toggle { display: inline-flex; align-items: center; gap: 5px; font-size: .85rem; }
.lang-toggle i { font-style: normal; opacity: .4; }
.lang-toggle a { opacity: .6; letter-spacing: .05em; }
.lang-toggle a.on { opacity: 1; color: var(--yellow); font-weight: 700; }
.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero { background: var(--asphalt); color: #fff; overflow: hidden; position: relative; }
.hero-inner { padding: 74px 22px 60px; position: relative; }
.eyebrow {
  font-family: var(--display); text-transform: uppercase; letter-spacing: .16em;
  font-size: .78rem; font-weight: 600; color: var(--yellow); margin-bottom: 18px;
}
.hero h1 { max-width: 15ch; color: #fff; }
.hero h1 .hl { position: relative; white-space: nowrap; }
.hero h1 .hl::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 5px;
  background: repeating-linear-gradient(90deg, var(--yellow) 0 24px, transparent 24px 40px);
  animation: dash 18s linear infinite;
}
@keyframes dash { to { background-position: 400px 0; } }
@media (prefers-reduced-motion: reduce) {
  .hero h1 .hl::after { animation: none; }
  html { scroll-behavior: auto; }
}
.hero .lead { max-width: 54ch; font-size: 1.13rem; color: rgba(255,255,255,.82); margin: 22px 0 30px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-road { position: absolute; inset: auto 0 0 0; }

.hero-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: rgba(255,255,255,.1); border-top: 1px solid rgba(255,255,255,.1);
}
.hero-stats > div { background: var(--asphalt-2); padding: 22px 26px; }
.hero-stats b {
  display: block; font-family: var(--display); font-weight: 900; font-size: 1.6rem;
  color: var(--yellow); font-stretch: 110%;
}
.flow { display: flex; align-items: center; gap: 7px; }
.flip { display: inline-block; transform: scaleX(-1); }
.flow .arr { color: var(--yellow); font-size: 1.15rem; }
.hero-stats small { color: rgba(255,255,255,.65); font-size: .85rem; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-tight { padding: 48px 0; }
.section-head { max-width: 60ch; margin-bottom: 38px; }
.section-head p { color: var(--muted); }

.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; }
.card p { color: var(--muted); font-size: .95rem; margin-bottom: 0; }
.card .ic {
  width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center;
  background: var(--asphalt); margin-bottom: 16px;
}
.card .ic svg { width: 22px; height: 22px; stroke: var(--yellow); }

/* Steps (road to a licence) */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step { position: relative; padding: 26px 26px 26px 26px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.step::before {
  counter-increment: step; content: "G" counter(step);
  display: inline-grid; place-items: center;
  width: 52px; height: 52px; border-radius: 50%;
  border: 3px solid var(--asphalt); background: #fff;
  font-family: var(--display); font-weight: 900; font-size: 1.15rem;
  margin-bottom: 16px;
}
.step:nth-child(1)::before { content: "G1"; font-size: 1rem; }
.step:nth-child(2)::before { content: "G2"; font-size: 1rem; border-color: var(--yellow-deep); }
.step:nth-child(3)::before { content: "G"; border-color: var(--green); }
.step p { color: var(--muted); font-size: .95rem; margin: 0; }

/* Reviews */
.reviews { background: var(--asphalt); color: #fff; }
.reviews .section-head p { color: rgba(255,255,255,.65); }
.review {
  background: var(--asphalt-2); border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius); padding: 24px;
}
.review .stars { color: var(--yellow); letter-spacing: 3px; font-size: .95rem; }
.review p { color: rgba(255,255,255,.85); font-size: .97rem; margin: 12px 0 14px; }
.review footer { color: rgba(255,255,255,.55); font-size: .85rem; }

/* CTA band */
.band { background: var(--yellow); }
.band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 26px; padding-top: 46px; padding-bottom: 46px; flex-wrap: wrap; }
.band h2 { margin: 0 0 6px; color: var(--asphalt); }
.band p { margin: 0; color: rgba(20,29,43,.75); }

/* ---------- Packages ---------- */
.pk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: stretch; }
.pk {
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow); position: relative;
}
.pk.popular { border: 2px solid var(--yellow); }
.pk .flag {
  position: absolute; top: -13px; left: 24px;
  background: var(--yellow); color: var(--asphalt);
  font-family: var(--display); font-weight: 700; font-size: .75rem;
  padding: 4px 12px; border-radius: 99px; text-transform: uppercase; letter-spacing: .06em;
}
.pk h3 { font-size: 1.25rem; margin-bottom: 2px; }
.pk .tagline { color: var(--muted); font-size: .92rem; min-height: 2.6em; }
.pk .price { font-family: var(--display); font-weight: 900; font-size: 2.1rem; font-stretch: 110%; margin: 10px 0 2px; }
.pk .price small { font-size: .85rem; font-weight: 500; color: var(--muted); font-stretch: 100%; }
.pk .meta { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 16px; }
.pk .meta span {
  font-size: .78rem; font-weight: 600; padding: 4px 10px; border-radius: 99px;
  background: var(--paper); border: 1px solid var(--line); color: var(--ink);
}
.pk ul { margin: 0 0 22px; padding: 0; list-style: none; flex: 1; }
.pk li { padding: 7px 0 7px 26px; position: relative; font-size: .93rem; border-top: 1px dashed var(--line); }
.pk li:first-child { border-top: 0; }
.pk li::before { content: "✓"; position: absolute; left: 2px; color: var(--green); font-weight: 700; }

.note-box { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--yellow); border-radius: 10px; padding: 22px 26px; }
.note-box h3 { margin-bottom: 10px; }
.note-box p { margin: 6px 0; color: var(--muted); font-size: .95rem; }

/* ---------- Forms ---------- */
.form-card { max-width: 480px; margin: 0 auto; }
.form-wide { max-width: 620px; }
label { display: block; font-weight: 600; font-size: .9rem; margin: 16px 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date],
select, textarea {
  width: 100%; font: inherit; color: var(--ink);
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 9px; background: #fff;
}
input:focus, select:focus, textarea:focus { border-color: var(--asphalt); outline: none; box-shadow: 0 0 0 3px rgba(245,179,1,.25); }
textarea { min-height: 130px; resize: vertical; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 48px; }
.pw-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; cursor: pointer; padding: 8px; color: var(--muted);
  border-radius: 8px; line-height: 0;
}
.pw-eye:hover { color: var(--ink); }
.pw-eye svg { width: 20px; height: 20px; display: block; }
.pw-eye .eye-closed { display: none; }
.pw-eye.on .eye-open { display: none; }
.pw-eye.on .eye-closed { display: block; }

.form-foot { margin-top: 22px; }
.form-links { margin-top: 18px; font-size: .92rem; color: var(--muted); text-align: center; }
.auth-page { padding: 64px 0 80px; }
.auth-page .section-head { text-align: center; margin: 0 auto 30px; }

.flash { padding: 14px 18px; border-radius: 10px; margin: 18px 0; font-size: .95rem; font-weight: 500; }
.flash-success { background: var(--green-soft); color: var(--green); border: 1px solid #bcdcc9; }
.flash-error { background: var(--red-soft); color: var(--red); border: 1px solid #ecc7bf; }
.flash-info { background: #eef2f7; color: var(--asphalt); border: 1px solid #d5dde8; }

/* ---------- Portal ---------- */
.portal-shell { display: grid; grid-template-columns: 230px 1fr; gap: 34px; padding: 44px 0 80px; align-items: start; }
.portal-nav { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 4px; }
.portal-nav a {
  padding: 11px 15px; border-radius: 9px; text-decoration: none;
  font-weight: 500; font-size: .95rem; color: var(--ink);
}
.portal-nav a:hover { background: #fff; }
.portal-nav a[aria-current] { background: var(--asphalt); color: #fff; font-weight: 600; }
.portal-nav .who { font-size: .85rem; color: var(--muted); padding: 0 15px 12px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.portal-main h1 { font-size: clamp(1.7rem, 3vw, 2.2rem); }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 26px 0; }
.stat-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.stat-card h3 { font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 10px; }
.stat-card .big { font-family: var(--display); font-weight: 800; font-size: 1.35rem; }
.stat-card p { color: var(--muted); font-size: .88rem; margin: 6px 0 0; }

.badge { display: inline-block; padding: 3px 11px; border-radius: 99px; font-size: .78rem; font-weight: 700; }
.badge-requested { background: #fdf3d7; color: #8a6d00; }
.badge-confirmed { background: var(--green-soft); color: var(--green); }
.badge-completed { background: #e8ecf2; color: var(--asphalt); }
.badge-cancelled { background: var(--red-soft); color: var(--red); }
.badge-pending { background: #fdf3d7; color: #8a6d00; }
.badge-active { background: var(--green-soft); color: var(--green); }
.badge-unpaid { background: var(--red-soft); color: var(--red); }
.badge-paid { background: var(--green-soft); color: var(--green); }
.badge-refunded { background: #e8ecf2; color: var(--asphalt); }

table.data { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
table.data th, table.data td { text-align: left; padding: 13px 16px; font-size: .93rem; }
table.data th { background: var(--asphalt); color: #fff; font-family: var(--display); font-weight: 600; font-size: .82rem; letter-spacing: .05em; text-transform: uppercase; }
table.data tr + tr td { border-top: 1px solid var(--line); }
table.data td .sub { display: block; color: var(--muted); font-size: .84rem; }

/* Progress = road lanes */
.lane { margin: 26px 0; }
.lane-label { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.lane-label b { font-family: var(--display); font-weight: 700; }
.lane-label span { color: var(--muted); font-size: .9rem; }
.lane-track {
  position: relative; height: 34px; border-radius: 8px; overflow: hidden;
  background: var(--asphalt);
}
.lane-track::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 3px; margin-top: -1.5px;
  background: repeating-linear-gradient(90deg, rgba(245,179,1,.9) 0 16px, transparent 16px 28px);
}
.lane-fill {
  position: absolute; inset: 0 auto 0 0; background: var(--green);
  border-right: 3px solid #fff;
  transition: width .6s ease;
}
.lane-car {
  position: absolute; top: 50%; transform: translate(-50%, -50%) scaleX(-1);
  z-index: 2; font-size: 18px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.4));
}
.lane-done .lane-fill { background: var(--green); }

.cert-box { display: flex; gap: 16px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; margin-top: 30px; box-shadow: var(--shadow); }
.cert-box.done { border-color: var(--green); background: var(--green-soft); }
.cert-box svg { width: 34px; height: 34px; flex: none; stroke: var(--asphalt); }
.cert-box.done svg { stroke: var(--green); }
.cert-box p { margin: 0; font-size: .95rem; }

/* ---------- About / contact ---------- */
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
.info-list { display: flex; flex-direction: column; gap: 10px; font-size: .96rem; }
.info-list b { font-family: var(--display); }
.hours-table { width: 100%; border-collapse: collapse; }
.hours-table td { padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: .95rem; }
.hours-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.map-embed { border: 0; width: 100%; height: 320px; border-radius: var(--radius); box-shadow: var(--shadow); }
.instructor-card { display: flex; gap: 18px; align-items: center; }
.headshot {
  width: 84px; height: 84px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--yellow); flex: none;
}

/* ---------- Footer ---------- */
.site-footer { background: var(--asphalt); color: rgba(255,255,255,.8); margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 30px; padding: 52px 22px 30px; }
.footer-grid h3 { color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 14px; }
.footer-grid a, .footer-grid span { display: block; color: rgba(255,255,255,.7); text-decoration: none; font-size: .92rem; padding: 3px 0; }
.footer-grid a:hover { color: var(--yellow); }
.brand-footer { margin-bottom: 14px; }
.footer-tag { font-size: .9rem; color: rgba(255,255,255,.6); max-width: 30ch; }
.footer-social a { display: inline; }
.footer-legal { padding-top: 18px; padding-bottom: 26px; border-top: 1px solid rgba(255,255,255,.1); font-size: .84rem; color: rgba(255,255,255,.5); }

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .pk-grid, .grid-3, .steps { grid-template-columns: 1fr; }
  .about-grid, .grid-2 { grid-template-columns: 1fr; }
  .portal-shell { grid-template-columns: 1fr; }
  .portal-nav { position: static; flex-direction: row; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
  .portal-nav .who { display: none; }
  .stat-row { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .nav-toggle {
    display: inline-flex; flex-direction: column; gap: 5px; margin-left: auto;
    background: none; border: 0; padding: 8px; cursor: pointer;
  }
  .nav-toggle span { width: 24px; height: 2.5px; background: #fff; border-radius: 2px; transition: transform .2s, opacity .2s; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
  .site-nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    background: var(--asphalt); flex-direction: column; align-items: stretch;
    padding: 14px 22px 24px; gap: 4px; border-bottom: 1px solid rgba(255,255,255,.1);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 11px 4px; }
  .nav-spacer { display: none; }
  .lang-toggle { padding: 11px 4px; }
  .btn-nav { text-align: center; margin-top: 8px; }
  .hero-stats { grid-template-columns: 1fr; }
  .hero-inner { padding-top: 54px; }
  .band .wrap { flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
}
