/* ------------------------------------------------------------------
   Wrenchly website — shared styles for every page.
   Colors come from wrenchly-app/src/theme/colors.ts (dark palette).
   Wireframe-like: small body type, thin lines, lots of space, and the
   occasional large Bricolage title for contrast.
   ------------------------------------------------------------------ */
/* Bricolage Grotesque, self-hosted (variable 500–600, latin + latin-ext)
   so no visitor data goes to Google Fonts. */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url("fonts/bricolage-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url("fonts/bricolage-latin.woff2") format("woff2");
  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;
}

:root {
  --page:      #0A0A0A;
  --card:      #1A1A1A;
  --input:     #242424;
  --border:    #1F1F1F;
  --divider:   #2C2C2C;
  --headings:  #F5F5F5;
  --body:      #D0D0D0;
  --muted:     #A6A6A6;
  --accent:    #00F5D0;
  --kenteken:  #FFCC00;
  --gutter:    clamp(1rem, 4vw, 2rem);
  --max:       68rem;
  --narrow:    40rem;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--page);
  color: var(--muted);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  font-size: .9375rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: "Bricolage Grotesque", -apple-system, sans-serif;
  color: var(--headings);
  margin: 0;
  font-weight: 600;
  letter-spacing: -.02em;
}
h1 { font-size: clamp(2rem, 4.5vw + .75rem, 3.75rem); line-height: 1; letter-spacing: -.035em; }
h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); line-height: 1.05; letter-spacing: -.03em; }
h3 { font-size: 1rem; line-height: 1.3; font-family: inherit; letter-spacing: 0; }
h1 em, h2 em { font-style: normal; color: var(--accent); }

p { margin: 0; }
a { color: var(--headings); text-underline-offset: .2em; text-decoration-color: var(--divider); }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: .2em; border-radius: 4px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: var(--narrow); }

/* ---------- Header ---------- */
.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.25rem;
}
.site-header img { height: 1.5rem; width: auto; display: block; }
.site-header nav { display: flex; align-items: center; gap: 1.5rem; font-size: .875rem; }
.site-header nav a { color: var(--body); text-decoration: none; }
.site-header nav a:hover, .site-header nav a[aria-current] { color: var(--headings); }
/* Pages without a hero photo: header sits in the flow */
.plain .site-header { position: static; border-bottom: 1px solid var(--border); }

/* ---------- Buttons ---------- */
.btn-store {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--headings);
  color: #000;
  border-radius: 999px;
  padding: .7rem 1.25rem;
  font-weight: 600;
  font-size: .875rem;
  text-decoration: none;
  white-space: nowrap;
}
.btn-store svg { width: 1.1rem; height: 1.1rem; }
.btn-store[aria-disabled="true"] { cursor: default; }
.btn-store.small { padding: .45rem .9rem; font-size: .8125rem; }
.btn-note { font-size: .8125rem; color: var(--muted); margin-top: .75rem; }

/* ---------- Hero (home) ---------- */
.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding-top: clamp(7rem, 16vw, 10rem);
}
/* Land Rover photo, fading into the page from halfway down */
.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: min(52rem, 100%);
  background: url("LaRo-BG.jpg") center 70% / cover no-repeat;
  opacity: .82;
  -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent 92%);
          mask-image: linear-gradient(to bottom, #000 45%, transparent 92%);
}
/* Darken the top so the header and title stay readable */
.hero::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 16rem;
  background: linear-gradient(to bottom, rgba(10,10,10,.6), transparent);
}
.hero > * { position: relative; z-index: 1; }
.hero .intro {
  max-width: 28rem;
  margin: 1.25rem auto 1.75rem;
  color: var(--body);
}

/* ---------- Phone mockup ----------
   Everything inside the phone is sized in em, so the whole device scales
   from one font-size. Content mirrors the app's Vehicle Dashboard. */
.phone-stage {
  margin-top: clamp(1.5rem, 4vw, 2.25rem);
  height: clamp(24rem, 62vw, 34rem);   /* cuts the phone off; the mask fades it out */
  padding-top: .5rem;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
}
.phone {
  font-size: clamp(11px, 3.2vw, 15px);
  width: 21em;
  margin: 0 auto;
  border-radius: 3.2em;
  padding: .6em;
  background: #1c1c1e;
  box-shadow: 0 0 0 1px #3a3a3c inset, 0 40px 80px rgba(0,0,0,.6);
  text-align: left;
}
.screen {
  position: relative;
  border-radius: 2.6em;
  background: var(--page);
  overflow: hidden;
  min-height: 42em;
  color: var(--body);
}
.v-hero {
  position: relative;
  height: 17em;
  padding: .9em 1em 0;
  background: url("xc90-snow.jpg") 62% 40% / cover no-repeat;
}
.v-hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(10,10,10,.35) 0%, rgba(10,10,10,.15) 35%, rgba(10,10,10,.85) 75%, var(--page) 100%);
}
.v-hero > * { position: relative; }
.island { position: absolute; top: .75em; left: 50%; transform: translateX(-50%); width: 6.6em; height: 1.9em; background: #000; border-radius: 1em; }
.v-nav { display: flex; align-items: center; gap: .5em; margin-top: 2.4em; }
.v-btn { width: 2.6em; height: 2.6em; border-radius: 50%; background: rgba(60,60,60,.7); display: grid; place-items: center; color: #fff; }
.v-btn svg { width: 1.2em; height: 1.2em; }
.v-btn.plus { background: var(--accent); color: #000; }
.v-nav .spacer { flex: 1; }
.v-title { font-family: "Bricolage Grotesque", sans-serif; font-size: 1.9em; font-weight: 600; color: #fff; letter-spacing: -.01em; margin-top: 2.6em; line-height: 1.1; }
.plate {
  display: inline-block;
  background: var(--kenteken); color: #000; font-weight: 600;
  font-size: .85em; padding: .15em .45em; border-radius: .3em; letter-spacing: .02em;
}
.v-hero .plate { margin-top: .4em; font-size: 1em; }
.v-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5em; padding: .9em 1em 0; }
.v-stats span { display: block; font-size: .8em; color: var(--muted); }
.v-stats b { font-family: "Bricolage Grotesque", sans-serif; font-size: 1.35em; font-weight: 600; color: #fff; white-space: nowrap; }
.v-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .55em; padding: 1.2em 1em 0; }
.v-card { background: var(--card); border-radius: 1.1em; padding: .9em 1em; }
.v-card span { display: block; font-size: .8em; color: var(--muted); margin-bottom: .2em; }
.v-card b { font-family: "Bricolage Grotesque", sans-serif; font-size: 1.15em; font-weight: 600; color: #fff; }
.pill-ok { display: inline-block; background: #00312A; color: var(--accent); font-weight: 600; font-size: .9em; padding: .25em .7em; border-radius: 999px; }
.v-list { margin: .55em 1em 0; }
.v-list h4 { margin: 0 0 .6em; font-family: "Bricolage Grotesque", sans-serif; font-size: 1.2em; font-weight: 600; color: #fff; }
.v-row { padding: .7em 0; border-top: 1px solid var(--divider); }
.v-row:first-of-type { border-top: 0; padding-top: 0; }
.v-row b { display: block; font-weight: 400; color: #fff; }
.v-row span { font-size: .85em; color: var(--muted); }

/* ---------- Sections (centered) ---------- */
.section { padding-block: clamp(4rem, 10vw, 7rem); text-align: center; }
.section h2 { max-width: 36rem; margin: 0 auto; }
.section .lead { max-width: 30rem; margin: 1rem auto 0; color: var(--body); }
.section .after { margin-top: 2rem; }

/* Rounded cards, as in the app: surface/card, radius 20, no outline */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 3rem;
  text-align: left;
}
.card {
  background: var(--card);
  border-radius: 1.25rem;
  padding: 1.5rem;
}
.card h3 { margin: 1rem 0 .35rem; }
.icon {
  width: 2.5rem; height: 2.5rem;
  border-radius: .75rem;
  background: var(--input);
  color: var(--accent);
  display: grid; place-items: center;
}
.icon svg { width: 1.25rem; height: 1.25rem; }

/* Feature: a panel with a small piece of the app, text underneath */
.feature h3 { margin: 1.25rem 0 .35rem; }
.feature p { max-width: 22rem; }
.panel {
  position: relative;
  height: 17rem;
  border-radius: 1.25rem;
  background: radial-gradient(120% 90% at 50% 0%, #161616 0%, #111 100%);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  overflow: hidden;
  padding: 1.25rem;
}
.snip {
  width: min(100%, 15.5rem);
  background: var(--card);
  border-radius: 1rem;
  padding: 1rem 1.1rem;
  font-size: .8125rem;
  box-shadow: 0 0 0 1px #262626 inset, 0 24px 48px rgba(0,0,0,.55);
}
.snip h4 { margin: 0 0 .75rem; font-family: "Bricolage Grotesque", sans-serif; font-size: 1rem; font-weight: 600; color: var(--headings); }
.snip .r { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-top: 1px solid var(--divider); }
.snip .r:first-of-type { border-top: 0; padding-top: 0; }
.snip .r span { color: var(--muted); }
.snip .r b { font-weight: 400; color: var(--headings); text-align: right; }
.snip .r small { display: block; color: var(--muted); font-size: .75rem; }
.snip .badge { display: inline-flex; align-items: center; gap: .35rem; font-size: .75rem; color: var(--accent); margin-bottom: .75rem; }
.snip .badge::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }

/* Invoice paper with a scan line */
.paper {
  width: 7.5rem;
  aspect-ratio: 1 / 1.38;
  background: #ECECEC;
  border-radius: .4rem;
  padding: .75rem .7rem;
  color: #222;
  font-size: .5rem;
  transform: rotate(-5deg);
  box-shadow: 0 24px 48px rgba(0,0,0,.6);
  position: relative;
  overflow: hidden;
}
.paper b { display: block; font-size: .6rem; margin-bottom: .1rem; }
.paper i { display: block; height: .25rem; background: #CFCFCF; border-radius: 2px; margin: .4rem 0; }
.paper i:nth-child(3n) { width: 70%; }
.paper i:nth-child(4n) { width: 85%; }
.paper .tot { position: absolute; left: .7rem; right: .7rem; bottom: .7rem; display: flex; justify-content: space-between; font-weight: 700; font-size: .6rem; border-top: 1px solid #BDBDBD; padding-top: .35rem; }
.paper::after {
  content: ""; position: absolute; left: 0; right: 0; top: 46%; height: 2px;
  background: var(--accent);
  box-shadow: 0 0 14px 3px rgba(0,245,208,.55);
}

/* Closing CTA */
.closing h2 { margin-bottom: 1.75rem; }

/* ---------- Page heads (pricing, about, legal) ---------- */
.page-head { padding-block: clamp(4rem, 10vw, 6.5rem) clamp(2rem, 5vw, 3rem); text-align: center; }
.page-head .lead { max-width: 32rem; margin: 1.25rem auto 0; color: var(--body); }
.page-head .narrow { margin: 0 auto; }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; max-width: 48rem; margin: 0 auto; }
.plan { padding: 2rem; background: var(--card); border-radius: 1.25rem; }
.plan .price { font-family: "Bricolage Grotesque", sans-serif; font-size: 3rem; line-height: 1; color: var(--headings); font-weight: 600; letter-spacing: -.03em; margin: 1.25rem 0 .25rem; }
.plan .tag { display: inline-block; font-size: .6875rem; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: .1rem .55rem; margin-left: .5rem; vertical-align: middle; }
.plan ul { list-style: none; padding: 0; margin: 1.5rem 0 2rem; }
.plan li { padding: .5rem 0; border-top: 1px solid var(--divider); display: flex; gap: .6rem; }
.plan li::before { content: "✓"; color: var(--accent); }
.plan.later { background: transparent; box-shadow: inset 0 0 0 1px var(--divider); }
.plan.later li::before { content: "–"; color: var(--muted); }

/* Legal / long text */
.prose { padding-bottom: clamp(4rem, 10vw, 6rem); }
.prose section { padding-top: 2.25rem; margin-top: 2.25rem; border-top: 1px solid var(--border); }
.prose h2 { font-size: 1.375rem; letter-spacing: -.01em; margin-bottom: 1rem; }
.prose h3 { margin: 1.5rem 0 .4rem; }
.prose p + p { margin-top: .9rem; }
.prose p, .prose li { color: var(--body); }
.prose ul { padding-left: 1.1rem; }
.prose li { margin: .5rem 0; }
.prose strong { color: var(--headings); font-weight: 600; }
.date { font-size: .8125rem; color: var(--muted); margin-top: 1rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding-block: 2.5rem 3rem; font-size: .8125rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem 2rem; }
.site-footer img { height: 1.25rem; width: auto; display: block; margin-bottom: .75rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: flex-start; }
.site-footer nav a { color: var(--muted); text-decoration: none; }
.site-footer nav a:hover { color: var(--headings); }

/* ---------- Small screens ---------- */
@media (max-width: 720px) {
  .site-header nav .hide-sm { display: none; }
  .cards { grid-template-columns: 1fr; }
  .panel { height: 15rem; }
  .plans { grid-template-columns: 1fr; }
}

/* ---------- Scroll reveal (after unclerudy.app) ----------
   Elements fade in, rise a little and go from blurred to sharp when they
   enter the viewport. --d staggers siblings. Only with JS (html.js) and
   only when the visitor hasn't asked for reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    filter: blur(8px);
    transform: translateY(16px);
    transition: opacity .7s ease, filter .7s ease, transform .7s cubic-bezier(.2,.7,.2,1);
    transition-delay: var(--d, 0ms);
  }
  /* App snippets inside the panels pop up slightly smaller first */
  .js [data-reveal="pop"] { transform: translateY(12px) scale(.94); }
  .js [data-reveal].is-in { opacity: 1; filter: none; transform: none; }
}

/* Small fixes for the app snippets */
.pill-ok { white-space: nowrap; }
.snip .badge + .r, .snip h4 + .r { border-top: 0; padding-top: 0; }

/* Feature text: a bit of air on the right so columns don't run into each other */
.cards:has(.feature) { column-gap: 1.75rem; }
.feature h3, .feature p { padding-right: 1.25rem; }

/* Grid items may shrink below the mini phone's width */
.cards > * { min-width: 0; }

.snip { width: min(100%, 17.5rem); }
.snip .r b + b { white-space: nowrap; }
@media (max-width: 720px) { .panel { height: 16rem; } }
