/* tractolive.ro — one stylesheet, no framework, no font to fetch.
 *
 * The app's own visual language (ios/Tracto/DesignSystem/Theme.swift): amber, the colour of a
 * recovery vehicle, for what matters; large type and high contrast, because the person reading may
 * be standing beside a car at night. The system's own typeface, so the page reads like the phone it
 * is opened on. Amber is a background and a mark, never the colour of small text on white: there it
 * would not be legible, so text that must stand out is the deeper --accent-ink. */

:root {
  color-scheme: light dark;
  --canvas: #fbfaf8;
  --surface: #ffffff;
  --surface-soft: #f5f2ed;
  --ink: #1c1c1e;
  --ink-soft: #55555b;
  --hairline: #e5e0d8;
  --accent: #ed9421;
  --accent-deep: #c7700d;
  --accent-ink: #8a4b00;
  --accent-wash: #fdf0de;
  --on-accent: #1c1c1e;
  --band: #1c1c1e;
  --band-surface: #262628;
  --band-ink: #f5f5f7;
  --band-soft: #bdbdc2;
  --shadow: 0 1px 2px rgb(28 28 30 / 6%), 0 10px 30px rgb(28 28 30 / 9%);
  --radius-card: 20px;
  --radius-control: 14px;
  --wrap: 1140px;
  --gutter: 20px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;

  --map-ground: #eef0e9;
  --map-park: #d8e6cf;
  --map-water: #cfe1f1;
  --map-street: #ffffff;
  --map-road: #fff6e6;
  --map-road-edge: #e3ddd1;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #111113;
    --surface: #1c1c1e;
    --surface-soft: #18181a;
    --ink: #f5f5f7;
    --ink-soft: #a9a9af;
    --hairline: #2e2e32;
    --accent: #f2a33a;
    --accent-deep: #e08a1e;
    --accent-ink: #f7b85c;
    --accent-wash: #2b2014;
    --band: #19160f;
    --band-surface: #24201a;
    --band-soft: #b4aea5;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 10px 30px rgb(0 0 0 / 35%);

    --map-ground: #22252b;
    --map-park: #22302a;
    --map-water: #1b2b3b;
    --map-street: #343840;
    --map-road: #4a4235;
    --map-road-edge: #2a2d33;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* clip, not hidden: hidden would make the body a scroll container and unstick the header. */
  overflow-x: clip;
}

h1, h2, h3, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

main:focus { outline: none; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.narrow { max-width: 820px; }

.skip {
  position: absolute;
  left: 12px;
  top: -64px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: var(--radius-control);
  background: var(--ink);
  color: var(--canvas);
  font-weight: 700;
  text-decoration: none;
}

.skip:focus { top: 12px; }

.icon {
  width: 24px;
  height: 24px;
  flex: none;
}

/* --- the mark ---------------------------------------------------------------------------- */

.mark { display: block; }
.mark-ground { fill: var(--accent); }
.mark-shadow { fill: #000; opacity: .14; }
.mark-truck { fill: #fff; }
.mark-window { fill: var(--accent-deep); }
.mark-wheel { fill: #2b2b2d; }
.mark-hook { fill: none; stroke: #fff; stroke-width: 18; }

/* --- buttons ----------------------------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 22px;
  border-radius: var(--radius-control);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  text-decoration: none;
  transition: background-color .15s ease;
}

.button:hover { background: var(--accent-deep); }

.button-small {
  min-height: 44px;
  padding: 8px 16px;
  font-size: .95rem;
}

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 196px;
  min-height: 60px;
  padding: 10px 20px 10px 16px;
  border-radius: var(--radius-control);
  background: var(--ink);
  color: var(--canvas);
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}

a.store:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.store .icon {
  width: 28px;
  height: 28px;
}

.store-words {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.store-small { font-size: .8rem; }

.store-name {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -.01em;
}

.store.is-soon {
  background: transparent;
  color: var(--ink-soft);
  border: 2px dashed var(--hairline);
}

/* On a phone the two buttons share one row where they fit, and stack where they do not (inside the
 * download card); a store's name never breaks. */
@media (max-width: 479px) {
  .stores { gap: 10px; }
  .store {
    flex: 1 1 150px;
    min-width: 0;
    gap: 8px;
    padding: 8px 10px;
  }
  .store-small,
  .store-name { white-space: nowrap; }
  .store .icon {
    width: 22px;
    height: 22px;
  }
  .store-small { font-size: .7rem; }
  .store-name { font-size: 1.02rem; }
}

/* --- the top ----------------------------------------------------------------------------- */

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--canvas) 92%, transparent);
  border-bottom: 1px solid var(--hairline);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
}

.top-row {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-right: auto;
}

.brand .mark {
  width: 36px;
  height: 36px;
}

.brand-name {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -.02em;
}

.sections {
  display: none;
  gap: 4px;
}

.sections a {
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--ink-soft);
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
}

.sections a:hover {
  color: var(--ink);
  background: var(--surface-soft);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.languages {
  display: inline-flex;
  padding: 3px;
  border-radius: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--hairline);
}

.languages a {
  min-width: 44px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  color: var(--ink-soft);
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-decoration: none;
}

.languages a[aria-current] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgb(0 0 0 / 12%);
}

@media (max-width: 479px) {
  .top-actions .button-small { display: none; }
}

@media (min-width: 960px) {
  .sections { display: flex; }
  .brand { margin-right: 12px; }
  .sections { margin-right: auto; }
}

/* --- the hero ---------------------------------------------------------------------------- */

.hero {
  position: relative;
  /* Sideways only: the phone's shadow may fall below the hero. */
  overflow-x: clip;
  padding-block: 48px 64px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -30% auto auto;
  width: 820px;
  height: 820px;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 30%, transparent), transparent);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  color: var(--accent-ink);
  font-size: .9rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1 {
  margin-top: 14px;
  font-size: clamp(2.3rem, 1.5rem + 3.6vw, 4.1rem);
  line-height: 1.04;
  letter-spacing: -.03em;
  font-weight: 800;
  text-wrap: balance;
}

.lead {
  margin-top: 20px;
  max-width: 34em;
  color: var(--ink-soft);
  font-size: clamp(1.1rem, 1rem + .5vw, 1.3rem);
  line-height: 1.55;
}

.hero-note {
  margin-top: 16px;
  color: var(--ink-soft);
  font-size: .95rem;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

@media (min-width: 900px) {
  .hero { padding-block: 72px 96px; }
  .hero-grid { grid-template-columns: 1.15fr .85fr; }
}

/* --- a county's page: the hero without the phone, and the facts about the county --------- */

@media (min-width: 900px) {
  .hero-county .hero-grid { grid-template-columns: 1fr; }
}

.hero-county h1 { font-size: clamp(2.1rem, 1.4rem + 3vw, 3.5rem); }

.county-facts {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 1.1rem;
}

/* --- the phone --------------------------------------------------------------------------- */

.phone {
  position: relative;
  width: min(300px, 80vw);
  aspect-ratio: 300 / 612;
  padding: 11px;
  border-radius: 48px;
  background: #0d0d0e;
  box-shadow: 0 0 0 2px #3a3a3e inset, 0 30px 60px rgb(28 28 30 / 22%), 0 8px 20px rgb(28 28 30 / 12%);
  transform: rotate(2deg);
}

@media (prefers-color-scheme: dark) {
  /* A black phone on a near-black page needs its edge drawn. */
  .phone { box-shadow: 0 0 0 2px #3a3a3e inset, 0 0 0 1px rgb(255 255 255 / 14%), 0 30px 60px rgb(0 0 0 / 50%); }
}

.phone::before {
  content: "";
  position: absolute;
  top: 22px;
  left: 50%;
  z-index: 2;
  width: 86px;
  height: 25px;
  border-radius: 14px;
  background: #0d0d0e;
  transform: translateX(-50%);
}

.phone-screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 38px;
  background: var(--map-ground);
}

.map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.map-ground { fill: var(--map-ground); }
.map-park { fill: var(--map-park); }
.map-water { fill: var(--map-water); }

.map-street path {
  fill: none;
  stroke: var(--map-street);
  stroke-width: 7;
  stroke-linecap: round;
}

.map-road path {
  fill: none;
  stroke: var(--map-road);
  stroke-width: 13;
  stroke-linecap: round;
  paint-order: stroke;
}

.map-route {
  fill: none;
  stroke: var(--accent);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.map-pin { fill: var(--ink); }
.map-pin-dot { fill: var(--canvas); }

.map-pulse {
  fill: var(--accent);
  opacity: .35;
  transform-box: fill-box;
  transform-origin: center;
}

.map-truck {
  fill: var(--accent);
  stroke: #fff;
  stroke-width: 3;
}

@media (prefers-reduced-motion: no-preference) {
  .map-pulse { animation: pulse 2.4s ease-out infinite; }
}

@keyframes pulse {
  from { transform: scale(.6); opacity: .5; }
  to { transform: scale(2.4); opacity: 0; }
}

.phone-card {
  position: absolute;
  inset: auto 10px 10px;
  padding: 16px 16px 14px;
  border-radius: 26px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgb(0 0 0 / 16%);
}

.phone-status {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -.01em;
}

.phone-steps {
  margin-top: 10px;
  display: grid;
  gap: 6px;
  font-size: .8rem;
  line-height: 1.3;
  color: var(--ink-soft);
}

.phone-steps li {
  position: relative;
  padding-left: 22px;
}

.phone-steps li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--hairline);
}

.phone-steps .is-done::before {
  border-color: var(--accent);
  background: var(--accent);
}

.phone-steps .is-current {
  color: var(--ink);
  font-weight: 700;
}

.phone-steps .is-current::before {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent);
}

.phone-driver {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--hairline);
  font-size: .85rem;
}

.phone-avatar .mark {
  width: 30px;
  height: 30px;
}

.phone-driver-name {
  flex: 1;
  font-weight: 700;
}

.phone-call {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
}

/* --- sections ---------------------------------------------------------------------------- */

.section { padding-block: clamp(64px, 9vw, 112px); }

.section-soft { background: var(--surface-soft); }

.section-head {
  max-width: 760px;
  margin-bottom: 40px;
}

h2 {
  font-size: clamp(1.85rem, 1.3rem + 2.2vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -.025em;
  font-weight: 800;
  text-wrap: balance;
}

h3 {
  font-size: 1.15rem;
  line-height: 1.3;
  letter-spacing: -.01em;
  font-weight: 750;
}

.section-lead {
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 1.15rem;
}

/* How it works: four numbered steps. */

.steps {
  counter-reset: step;
  display: grid;
  gap: 16px;
}

.step {
  counter-increment: step;
  padding: 26px 24px;
  border-radius: var(--radius-card);
  background: var(--surface);
  border: 1px solid var(--hairline);
}

.step::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 800;
}

.step p,
.point p {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 1rem;
}

@media (min-width: 640px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1040px) {
  .steps { grid-template-columns: repeat(4, 1fr); }
}

.emergency {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  color: var(--ink-soft);
  font-size: .98rem;
  font-weight: 600;
}

.emergency .icon { color: #d23a2f; }

/* The price: a dark band. */

.band {
  background: var(--band);
  color: var(--band-ink);
}

.band .section-lead,
.band .point p { color: var(--band-soft); }

.points {
  display: grid;
  gap: 16px;
}

.point {
  padding: 26px 24px;
  border-radius: var(--radius-card);
}

.band .point { background: var(--band-surface); }

.point-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: var(--accent);
  color: var(--on-accent);
}

@media (min-width: 900px) {
  .band .points { grid-template-columns: repeat(3, 1fr); }
}

/* For drivers. */

.drivers {
  display: grid;
  gap: 40px;
}

.drivers-intro .button { margin-top: 28px; }

.points-cards .point {
  background: var(--surface);
  border: 1px solid var(--hairline);
}

.points-cards .point-icon {
  background: var(--accent-wash);
  color: var(--accent-ink);
}

@media (min-width: 640px) {
  .points-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1040px) {
  .drivers {
    grid-template-columns: .8fr 1.2fr;
    align-items: start;
  }
  .drivers-intro {
    position: sticky;
    top: 110px;
  }
}

/* Questions. */

.faq {
  margin-top: 32px;
  border-top: 1px solid var(--hairline);
}

.faq details { border-bottom: 1px solid var(--hairline); }

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
  padding-block: 18px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--hairline);
  color: var(--accent-ink);
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1;
  transition: transform .2s ease;
}

.faq details[open] summary::after { transform: rotate(45deg); }

.faq details p {
  max-width: 44em;
  padding-bottom: 22px;
  color: var(--ink-soft);
}

/* Get the app. */

.download {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 32px;
  align-items: center;
  padding: clamp(32px, 6vw, 64px);
  border-radius: 32px;
  background: linear-gradient(135deg, #f3a53f, #e0820f);
  color: #1c1c1e;
}

.download .section-lead,
.download-note { color: #3a2a12; }

.download .store {
  background: #1c1c1e;
  color: #fff;
}

.download .store.is-soon {
  background: rgb(255 255 255 / 22%);
  color: #2a1d0b;
  border-color: rgb(28 28 30 / 30%);
}

.download-note {
  margin-top: 18px;
  font-size: .95rem;
  font-weight: 600;
}

.download-mark {
  display: none;
  justify-self: center;
}

.download-mark .mark {
  width: 220px;
  height: 220px;
  border-radius: 50px;
  box-shadow: 0 20px 50px rgb(80 40 0 / 35%);
  transform: rotate(-6deg);
}

.download-mark .mark-ground { fill: #fff3e0; }
.download-mark .mark-truck { fill: #e0820f; }
.download-mark .mark-window { fill: #fff3e0; }
.download-mark .mark-hook { stroke: #e0820f; }

@media (min-width: 820px) {
  .download { grid-template-columns: 1fr auto; }
  .download-mark { display: block; }
}

/* A page that does not exist. */

.missing { padding-block: 120px; }
.missing .button { margin-top: 28px; }

/* --- the foot ---------------------------------------------------------------------------- */

.foot {
  padding-block: 40px 48px;
  border-top: 1px solid var(--hairline);
  color: var(--ink-soft);
  font-size: .95rem;
}

.foot-row {
  display: grid;
  gap: 24px;
}

.foot-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 34em;
}

.foot-brand .mark {
  width: 40px;
  height: 40px;
  flex: none;
}

.foot-side {
  display: flex;
  align-items: center;
  gap: 18px;
}

@media (min-width: 760px) {
  .foot-row {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}
