/* DriveBit public site (Step 6.7a). Plain CSS, no build. Served by Cloudflare Pages at the root domain; the CSP in
   `_headers` allows only this site's own files, so there is no inline style anywhere.

   Colours: copied by value from the app (`frontend/src/app/globals.css`, light `@theme` and the
   `prefers-color-scheme: dark` block). `tests/test_site.py` fails if a value here differs from the app's token of the
   same name, so every pair used below is one the app's `design-contrast.test.ts` already holds to its thresholds:
   `ink` / `ink-secondary` on `surface` and `surface-elevated`, `brand` as link text on both, `on-fill` on `brand`,
   `hero-ink` on `hero`, `focus` against the page. */
:root {
  color-scheme: light dark;

  --color-surface: oklch(96.2% 0.003 245);
  --color-surface-elevated: oklch(100% 0 0);
  --color-ink: oklch(21.6% 0.006 56.043);
  --color-ink-secondary: oklch(37.4% 0.01 67.558);
  --color-on-fill: oklch(100% 0 0);
  --color-brand: oklch(40.8% 0.11 240.79);
  --color-brand-hover: oklch(39.1% 0.09 240.876);
  --color-brand-pressed: oklch(29.3% 0.066 243.157);
  --color-hero: var(--color-brand);
  --color-hero-ink: var(--color-on-fill);
  --color-accent: oklch(50% 0.134 242.749);
  --color-focus: var(--color-accent);
  --color-edge: oklch(92.3% 0.003 48.717);
  --color-edge-control: oklch(52% 0.012 60);

  --elevation-card: 0 1px 2px oklch(21.6% 0.006 56.043 / 0.06), 0 2px 6px oklch(21.6% 0.006 56.043 / 0.05);

  /* The app's stacks: Rubik for headings, Heebo for everything else, the system's faces while they load. */
  --font-sans: "Heebo", system-ui, -apple-system, "Segoe UI", "Noto Sans Hebrew", Arial, sans-serif;
  --font-display: "Rubik", "Heebo", system-ui, -apple-system, "Segoe UI", "Noto Sans Hebrew", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-surface: oklch(18% 0.012 245);
    --color-surface-elevated: oklch(22% 0.014 245);
    --color-ink: oklch(91% 0.006 80);
    --color-ink-secondary: oklch(80% 0.01 245);
    --color-on-fill: oklch(17% 0.012 245);
    --color-brand: oklch(80.5% 0.1 237);
    --color-brand-hover: oklch(82% 0.08 237);
    --color-brand-pressed: oklch(88% 0.055 237);
    --color-hero: oklch(31% 0.07 240);
    --color-hero-ink: var(--color-ink);
    --color-accent: oklch(75% 0.12 240);
    --color-edge: oklch(31% 0.014 245);
    --color-edge-control: oklch(64% 0.016 245);

    --elevation-card: 0 1px 2px oklch(0% 0 0 / 0.5), 0 2px 6px oklch(0% 0 0 / 0.3);
  }
}

/* Fonts (6.7a, round 3): the app's two faces, Rubik (headings) and Heebo (text), self-hosted from `/fonts/`
   (fontsource 5.3.0 variable files, OFL licences beside them; the version is in each file name because `_headers`
   caches `/fonts/*` for a year). Hebrew and Latin only. The `unicode-range` lines are copied from fontsource, so a
   visitor downloads only the files whose characters the page uses. Never a font from a CDN. `font-display: swap`:
   the system font shows at once and the face replaces it. */
@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url("/fonts/rubik-hebrew-wght-normal-5.3.0.woff2") format("woff2-variations");
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}

@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url("/fonts/rubik-latin-wght-normal-5.3.0.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Heebo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/heebo-hebrew-wght-normal-5.3.0.woff2") format("woff2-variations");
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}

@font-face {
  font-family: "Heebo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/heebo-latin-wght-normal-5.3.0.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  overflow-wrap: anywhere;
}

/* The app's type roles: display, title, section, body, small. */
h1 {
  font-size: 2rem;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.5rem;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.125rem;
  line-height: 1.4;
  font-weight: 700;
}

a {
  color: var(--color-brand);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: 0.25rem;
}

svg {
  flex-shrink: 0;
}

/* Layout: one column on a phone, the cards two per row from 48rem. Logical properties only (RTL). */
.wrap {
  width: 100%;
  max-width: 56rem;
  margin-inline: auto;
  padding-inline: 1rem;
}

.site-header {
  padding-block: 1rem;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background: var(--color-hero);
  color: var(--color-hero-ink);
}

.mark svg {
  width: 70%;
  height: 70%;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.125rem;
  line-height: 1.4;
  font-weight: 800;
}

.brand-sub {
  font-size: 0.875rem;
  line-height: 1.43;
  font-weight: 500;
  color: var(--color-ink-secondary);
}

.hero {
  padding-block: 2rem 2.5rem;
}

.lead {
  margin-block-start: 1rem;
  max-width: 36rem;
  font-size: 1.125rem;
  line-height: 1.5;
  color: var(--color-ink-secondary);
}

.cta-note {
  margin-block-start: 1.5rem;
  font-weight: 700;
  color: var(--color-ink);
}

/* Option A of the call to action (a `wa.me` link, not used yet): `<a class="button" href="https://wa.me/...">`. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding-inline: 1.25rem;
  margin-block-start: 1.5rem;
  border-radius: 0.75rem;
  background: var(--color-brand);
  color: var(--color-on-fill);
  font-weight: 700;
  text-decoration: none;
  transition: background-color 150ms ease-out;
}

.button:hover {
  background: var(--color-brand-hover);
}

.button:active {
  background: var(--color-brand-pressed);
}

.section {
  padding-block: 1.5rem 2rem;
}

.section h2 {
  margin-block-end: 1rem;
}

.cards {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  border: 1px solid var(--color-edge);
  border-radius: 1rem;
  background: var(--color-surface-elevated);
  box-shadow: var(--elevation-card);
}

.card svg {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--color-brand);
}

.card p {
  color: var(--color-ink-secondary);
}

.closing {
  padding-block: 1.5rem 3rem;
}

.closing p {
  margin-block-start: 0.5rem;
  color: var(--color-ink-secondary);
}

.site-footer {
  padding-block: 1.5rem;
  border-block-start: 1px solid var(--color-edge);
  font-size: 0.875rem;
  line-height: 1.43;
  font-weight: 500;
  color: var(--color-ink-secondary);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1rem;
  margin-block-start: 0.25rem;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

/* The legal pages: headings and paragraphs in a readable column. */
.legal {
  padding-block: 1.5rem 3rem;
}

.legal h2 {
  margin-block: 1.75rem 0.25rem;
  font-size: 1.25rem;
  line-height: 1.3;
}

.legal p {
  max-width: 40rem;
  margin-block-start: 0.5rem;
  color: var(--color-ink-secondary);
}

.not-found {
  padding-block: 3rem;
}

.not-found p {
  margin-block: 0.75rem 1.5rem;
  color: var(--color-ink-secondary);
}

.not-found a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-weight: 700;
}

@media (min-width: 48rem) {
  h1 {
    font-size: 2.5rem;
  }

  .hero {
    padding-block: 3.5rem 3rem;
  }

  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }
}

/* The same net as the app: with reduced motion nothing moves or fades. */
@media (prefers-reduced-motion: reduce) {
  *,
  ::before,
  ::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
