/* ADR360 landing. Brand: orange and black, same values as the app theme
   (adr-management-system: apps/driver-mobile/lib/theme/theme.dart).
   Light: dark orange on white. Dark: light orange on black. */

:root {
  --orange: #C2410C;          /* kBrandOrangeDark */
  --black: #0A0A0A;           /* kBrandBlack */
  --bg: #FFFFFF;
  --surface: #FBF1EC;
  --text: #1C1A19;
  --muted: #4F4540;
  --line: #D8C2B8;
  --accent: var(--orange);
  --plate: var(--orange);
  --plate-ink: var(--black);
  --tape-a: var(--black);
  --tape-b: var(--orange);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A0A0A;
    --surface: #171412;
    --text: #F5EDE8;
    --muted: #B9ABA3;
    --line: #3A302B;
    --accent: #FF9A52;        /* kBrandOrangeLight */
    --plate: #FF9A52;
    --tape-a: #0A0A0A;
    --tape-b: #FF9A52;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0A0A0A;
  --surface: #171412;
  --text: #F5EDE8;
  --muted: #B9ABA3;
  --line: #3A302B;
  --accent: #FF9A52;
  --plate: #FF9A52;
  --tape-a: #0A0A0A;
  --tape-b: #FF9A52;
  color-scheme: dark;
}

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

html, body { margin: 0; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background-color .2s ease, color .2s ease;
}

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

/* Hazard tape at the top and bottom edges */
.tape {
  height: 10px;
  flex: none;
  background: repeating-linear-gradient(-45deg, var(--tape-b) 0 14px, var(--tape-a) 14px 28px);
  border-bottom: 1px solid var(--line);
}
.tape-bottom { border-bottom: 0; border-top: 1px solid var(--line); }

/* Top bar */
.bar {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  font-family: "DIN Alternate", "DIN Condensed", Bahnschrift, "Roboto Condensed", "Arial Narrow", sans-serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: .04em;
  color: var(--text);
  text-decoration: none;
}
.wordmark span { color: var(--accent); }

.theme-toggle {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun { display: none; }
  :root:not([data-theme="light"]) .icon-moon { display: block; }
}
:root[data-theme="dark"] .icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: block; }

/* Hero */
.hero {
  flex: 1;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 24px 56px;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 64px;
  align-items: center;
}

/* The orange ADR plate: hazard number on top, UN number below */
.plate {
  justify-self: center;
  width: min(100%, 380px);
  aspect-ratio: 4 / 3;
  display: grid;
  grid-template-rows: 1fr 1fr;
  background: var(--plate);
  color: var(--plate-ink);
  border: 14px solid var(--plate-ink);
  border-radius: 10px;
  /* thin outer ring keeps the black border visible on the dark background */
  box-shadow: 0 0 0 3px var(--plate), 0 30px 60px -30px rgba(0, 0, 0, .55);
  font-family: "DIN Alternate", "DIN Condensed", Bahnschrift, "Roboto Condensed", "Arial Narrow", sans-serif;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .06em;
  transform: rotate(-3deg);
}
.plate span {
  display: grid;
  place-items: center;
  font-size: clamp(56px, 9vw, 104px);
}
.plate-top { border-bottom: 10px solid var(--plate-ink); }

/* Copy */
.eyebrow {
  margin: 0 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.6s ease-in-out infinite;
}

h1 {
  margin: 0 0 20px;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.04;
  letter-spacing: -.02em;
  font-weight: 800;
}
h1 em { font-style: normal; color: var(--accent); }

.lede {
  margin: 0 0 32px;
  max-width: 34em;
  font-size: 19px;
  color: var(--muted);
}
.lede strong { color: var(--text); }

/* Progress bar with moving hazard stripes */
.progress { max-width: 520px; margin-bottom: 32px; }
.progress-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}
.progress-track {
  height: 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  overflow: hidden;
}
.progress-fill {
  width: 72%;
  height: 100%;
  border-radius: 999px;
  background: repeating-linear-gradient(-45deg, var(--accent) 0 10px, var(--black) 10px 20px);
  background-size: 28.28px 28.28px;
  animation: stripes 1.2s linear infinite;
}

.features {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  display: grid;
  gap: 10px;
}
.features li {
  position: relative;
  padding-left: 26px;
  color: var(--muted);
}
.features li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .5em;
  width: 10px;
  height: 10px;
  background: var(--accent);
  transform: rotate(45deg);
}
.features strong { color: var(--text); }

.contact { margin: 0; color: var(--muted); }
.contact a { font-weight: 600; }

/* Footer */
.foot {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  font-size: 14px;
  color: var(--muted);
}

@keyframes pulse { 50% { opacity: .35; } }
@keyframes stripes { to { background-position: 28.28px 0; } }

@media (prefers-reduced-motion: reduce) {
  .dot, .progress-fill { animation: none; }
  body { transition: none; }
}

/* Phones and narrow tablets: stack, smaller plate */
@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 16px 16px 48px;
  }
  .bar, .foot { padding-left: 16px; padding-right: 16px; }
  .plate { width: min(72%, 280px); border-width: 10px; }
  .plate-top { border-bottom-width: 8px; }
  .lede { font-size: 17px; }
}
