@import url("fonts.css");

/* ==========================================================================
   The Plug - marketing site

   Every colour, radius, duration and easing below is copied verbatim from
   packages/plug_ui/lib/src/plug_theme.dart, so the site and the app are the
   same design system rather than a lookalike of it.

   The page is dark only. PlugColors.light exists and the app honours it, but
   the brand's identity is gilt on obsidian, the photography is graded dark,
   and a light variant of this page would be a different brand wearing the
   same logo. That is a deliberate commitment, not an omission.
   ========================================================================== */

:root {
  /* PlugColors.dark */
  --canvas: #0c0d0f;
  --surface: #141619;
  --surface-high: #1b1e22;
  --ink: #f2f2ef;
  --ink-muted: #9ca2ac;
  --ink-faint: #6a707a;
  --line: rgba(255, 255, 255, 0.12);
  --line-soft: rgba(255, 255, 255, 0.06);
  --accent: #d8b45f;
  --accent-ink: #14100a;
  --accent-soft: rgba(216, 180, 95, 0.12);

  /* PlugColors.gilt */
  --gilt: linear-gradient(135deg, #f0d998 0%, #d8b45f 50%, #b08d3e 100%);

  /* PlugTheme radii. Pills are interactive, 20 is a card, 32 is a sheet. */
  --r-pill: 999px;
  --r-input: 14px;
  --r-card: 20px;
  --r-sheet: 32px;

  /* PlugTheme motion. Fast out, long settle. */
  --quick: 220ms;
  --base: 380ms;
  --slow: 640ms;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --shell: 1240px;
  --gutter: clamp(20px, 5vw, 64px);

  color-scheme: dark;
}

/* --------------------------------------------------------------- reset */

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

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

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3 {
  font-family: Outfit, "Plus Jakarta Sans", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }

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

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

.skip {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 100;
  background: var(--surface-high);
  color: var(--ink);
  padding: 12px 20px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
}
.skip:focus { left: 20px; }

/* ---------------------------------------------------------------- grain
   Fixed and pointer-events:none so it never repaints on scroll. */

.grain {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
}

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

/* The mark is drawn once as a <symbol> and pulled in with <use>. CSS
   selectors do not cross into a use element's shadow tree, so `.mark path`
   matched nothing and the knot rendered as a filled blob. Stroke and fill are
   inherited SVG properties, so setting them on the <svg> itself does reach
   the referenced geometry. */
.mark {
  display: block;
  overflow: visible;
  fill: none;
  stroke: var(--accent);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* The mark draws itself on arrival: the brand assembling rather than simply
   appearing. stroke-dasharray inherits too, so the three strands draw as one
   gesture. Runs once, then stops. */
.mark--draw {
  stroke-dasharray: 240;
  stroke-dashoffset: 240;
  animation: draw 1500ms var(--ease) 120ms forwards;
}

@keyframes draw { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  .mark--draw { animation: none; stroke-dashoffset: 0; }
}

/* -------------------------------------------------------------- nav bar */

.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 72px;
  display: flex;
  align-items: center;
  background: rgba(12, 13, 15, 0.72);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid transparent;
  transition: border-color var(--quick) var(--ease), background var(--quick) var(--ease);
}
.nav[data-stuck="true"] {
  border-bottom-color: var(--line-soft);
  background: rgba(12, 13, 15, 0.9);
}

@media (prefers-reduced-transparency: reduce) {
  .nav { background: var(--canvas); backdrop-filter: none; -webkit-backdrop-filter: none; }
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: 32px;
  width: 100%;
}

.lockup {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  flex: none;
}
.lockup__word {
  font-family: Outfit, sans-serif;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
  list-style: none;
  margin-block: 0;
  padding: 0;
}
.nav__links a {
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-muted);
  white-space: nowrap;
  transition: color var(--quick) var(--ease);
}
.nav__links a:hover { color: var(--ink); }

/* Below 900px the links collapse and the nav keeps only brand plus CTA,
   which is the one thing a phone visitor needs. */
@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__inner { justify-content: space-between; }
  .btn--nav { margin-left: auto; }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  white-space: nowrap;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  padding: 0 26px;
  height: 52px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--quick) var(--ease), box-shadow var(--quick) var(--ease),
    background var(--quick) var(--ease), border-color var(--quick) var(--ease);
}

.btn--primary {
  background: var(--gilt);
  color: var(--accent-ink);
  box-shadow: 0 10px 30px rgba(216, 180, 95, 0.16);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(216, 180, 95, 0.24); }
.btn--primary:active { transform: scale(0.98); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--accent); background: var(--accent-soft); }
.btn--ghost:active { transform: scale(0.98); }

.btn--nav { height: 44px; padding: 0 20px; font-size: 14px; flex: none; }

@media (prefers-reduced-motion: reduce) {
  .btn:hover, .btn:active { transform: none; }
}

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

.hero {
  position: relative;
  padding-top: clamp(40px, 7vh, 72px);
  padding-bottom: clamp(56px, 9vh, 104px);
  min-height: calc(100dvh - 72px);
  display: flex;
  align-items: center;
}

/* Warmth pooled behind the headline, not a decorative blob: it lifts the
   type off the canvas the way the streetlight does in the photograph. */
.hero::before {
  content: "";
  position: absolute;
  left: -10%;
  top: 0;
  width: 70%;
  height: 80%;
  background: radial-gradient(closest-side, rgba(216, 180, 95, 0.1), transparent 70%);
  pointer-events: none;
}

.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  width: 100%;
}

.eyebrow {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(40px, 6.4vw, 74px);
  margin-bottom: 22px;
}
.hero h1 em {
  font-style: italic;
  /* Descender reserve: "your" drops a y at this size. */
  line-height: 1.1;
  padding-bottom: 2px;
  display: inline-block;
}

.hero__sub {
  font-size: clamp(16.5px, 1.5vw, 19px);
  color: var(--ink-muted);
  max-width: 30rem;
  margin-bottom: 34px;
}

.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }

.hero__art {
  position: relative;
  border-radius: var(--r-sheet);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.55);
}
.hero__art img { width: 100%; height: 100%; object-fit: cover; }
.hero__art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 13, 15, 0) 40%, rgba(12, 13, 15, 0.75) 100%);
}

.hero__seal {
  position: absolute;
  right: 22px;
  bottom: 22px;
  z-index: 1;
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: var(--r-pill);
  background: rgba(12, 13, 15, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

@media (max-width: 900px) {
  .hero { min-height: 0; padding-bottom: 56px; }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__art { order: -1; aspect-ratio: 16 / 11; }
  .hero__seal { width: 60px; height: 60px; }
}

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

.section { padding-block: clamp(72px, 11vh, 132px); }
.section--hair { border-top: 1px solid var(--line-soft); }

.section__head { max-width: 34rem; margin-bottom: clamp(40px, 6vh, 64px); }
.section__head h2 { font-size: clamp(30px, 4vw, 46px); margin-bottom: 16px; }
.section__head p { color: var(--ink-muted); font-size: 17px; }

/* ------------------------------------------------- the price, explained */

.price { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 5vw, 80px); align-items: center; }

.bidstage {
  position: relative;
  border-radius: var(--r-sheet);
  background: linear-gradient(160deg, var(--surface) 0%, var(--canvas) 100%);
  border: 1px solid var(--line);
  padding: clamp(24px, 3vw, 40px);
}
.bidstage svg { width: 100%; height: auto; display: block; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 26px; }
.steps li { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; }
.steps b {
  font-family: Outfit, sans-serif;
  font-size: 15px;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(216, 180, 95, 0.3);
}
.steps h3 { font-size: 18px; margin-bottom: 4px; }
.steps p { color: var(--ink-muted); font-size: 15.5px; }

@media (max-width: 900px) {
  .price { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------- bento */

.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(210px, auto);
  gap: 16px;
}
.tile {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-card);
  border: 1px solid var(--line);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: var(--surface);
  transition: border-color var(--base) var(--ease), transform var(--base) var(--ease);
}
.tile:hover { border-color: rgba(216, 180, 95, 0.42); transform: translateY(-3px); }
.tile h3 { font-size: 21px; margin-bottom: 8px; }
.tile p { color: var(--ink-muted); font-size: 15px; max-width: 26rem; }

/* Four items, four cells: a wide lead tile and three that share the row
   beneath it. No blank cell anywhere in the grid. */
.tile--lead { grid-column: span 2; grid-row: span 2; justify-content: space-between; }
.tile--lead h3 { font-size: clamp(26px, 3vw, 34px); }

.tile--photo { background-image: var(--photo); background-size: cover; background-position: center; }
.tile--photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 13, 15, 0.25) 0%, rgba(12, 13, 15, 0.92) 78%);
}
.tile--photo > * { position: relative; }

.tile--gilt { background: linear-gradient(150deg, rgba(216, 180, 95, 0.16), rgba(216, 180, 95, 0.03) 60%), var(--surface); }
.tile--rule { background: var(--surface-high); }

.tile__num {
  font-family: Outfit, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .tile--lead { grid-column: span 1; grid-row: span 1; }
  .tile { min-height: 200px; }
}

/* --------------------------------------------------------------- driver */

.driver {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  gap: 0;
  border-radius: var(--r-sheet);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}
.driver__art { position: relative; min-height: 440px; background: var(--surface-high); }
.driver__art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.driver__body { padding: clamp(32px, 4vw, 56px); display: flex; flex-direction: column; justify-content: center; }
.driver__body h2 { font-size: clamp(28px, 3.4vw, 40px); margin-bottom: 16px; }
.driver__body > p { color: var(--ink-muted); margin-bottom: 30px; max-width: 30rem; }

.facts { display: grid; gap: 0; margin-bottom: 32px; }
.facts div { padding: 16px 0; border-top: 1px solid var(--line-soft); }
.facts div:first-child { border-top: 0; padding-top: 0; }
.facts dt { font-size: 15px; font-weight: 700; margin-bottom: 3px; }
.facts dd { margin: 0; font-size: 14.5px; color: var(--ink-muted); }

@media (max-width: 900px) {
  .driver { grid-template-columns: 1fr; }
  .driver__art { min-height: 280px; }
}

/* --------------------------------------------------------------- safety */

.safety { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 16px; align-items: start; }
.guard {
  border-radius: var(--r-card);
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 28px;
}
.guard:first-child { background: linear-gradient(150deg, rgba(216, 180, 95, 0.12), transparent 65%), var(--surface); }
.guard h3 { font-size: 19px; margin-bottom: 10px; }
.guard p { color: var(--ink-muted); font-size: 15px; }

@media (max-width: 900px) { .safety { grid-template-columns: 1fr; } }

/* ----------------------------------------------------------------- band */

.band {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-sheet);
  border: 1px solid var(--line);
  background: linear-gradient(150deg, var(--surface-high), var(--canvas));
  padding: clamp(44px, 7vw, 88px) clamp(24px, 5vw, 72px);
  text-align: center;
}
.band::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -40%;
  width: 620px;
  height: 620px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(216, 180, 95, 0.14), transparent 70%);
  pointer-events: none;
}
.band > * { position: relative; }
.band h2 { font-size: clamp(30px, 4.4vw, 50px); margin-bottom: 16px; }
.band p { color: var(--ink-muted); max-width: 30rem; margin-inline: auto; margin-bottom: 32px; }
.band__cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* --------------------------------------------------------------- footer */

.footer { border-top: 1px solid var(--line-soft); padding-block: 64px 40px; }
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 48px;
}
.footer h4 {
  font-family: Outfit, sans-serif;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 16px;
  font-weight: 700;
}
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.footer a { text-decoration: none; font-size: 14.5px; color: var(--ink-muted); transition: color var(--quick) var(--ease); }
.footer a:hover { color: var(--accent); }
.footer__blurb { color: var(--ink-muted); font-size: 14.5px; max-width: 22rem; margin-top: 16px; }
.footer__base {
  border-top: 1px solid var(--line-soft);
  padding-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  justify-content: space-between;
  color: var(--ink-faint);
  font-size: 13.5px;
}

@media (max-width: 900px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer__brand { grid-column: span 2; }
}

/* ------------------------------------------------------- scroll reveals
   Driven by IntersectionObserver, never a scroll listener. */

.rise {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease);
}
.rise.is-in { opacity: 1; transform: none; }
.rise[data-delay="1"] { transition-delay: 90ms; }
.rise[data-delay="2"] { transition-delay: 180ms; }
.rise[data-delay="3"] { transition-delay: 270ms; }

@media (prefers-reduced-motion: reduce) {
  .rise { opacity: 1; transform: none; transition: none; }
}

/* ============================================================== sub page
   Shared by the account-deletion page. Same tokens, narrower measure.
   ========================================================================== */

.page { padding-block: clamp(48px, 8vh, 88px) clamp(72px, 10vh, 120px); }
.page__inner { max-width: 44rem; }
.page h1 { font-size: clamp(34px, 5vw, 54px); margin-bottom: 18px; }
.page__lede { color: var(--ink-muted); font-size: 18px; margin-bottom: 44px; }
.page h2 { font-size: 24px; margin: 44px 0 14px; }
.page p { color: var(--ink-muted); margin-bottom: 14px; }
.page strong { color: var(--ink); }

.route {
  border-radius: var(--r-card);
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 28px;
  margin-bottom: 16px;
}
.route h3 { font-size: 18px; margin-bottom: 10px; }
.route ol { margin: 0 0 18px; padding-left: 20px; color: var(--ink-muted); display: grid; gap: 8px; }
.route--primary { background: linear-gradient(150deg, rgba(216, 180, 95, 0.12), transparent 60%), var(--surface); }

.ledger { display: grid; gap: 0; margin: 20px 0 8px; }
.ledger div { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line-soft); align-items: baseline; }
.ledger div:first-child { border-top: 0; }
.ledger dt { font-size: 15px; color: var(--ink); }
.ledger dd { margin: 0; font-size: 13px; color: var(--ink-faint); white-space: nowrap; }

@media (max-width: 620px) {
  .ledger div { grid-template-columns: 1fr; gap: 4px; }
}

/* ------------------------------------------------------- bid sequence
   The offer goes up, three wires draw outward, three replies land at
   different moments, and one is chosen. The staggering is the point: it
   shows that a driver answers you, rather than a price being handed down.

   Nothing runs until the diagram is on screen (motion.js adds .bid-run),
   so a visitor never scrolls down to an animation that already finished. */

#bidsvg .bid-offer,
#bidsvg .bid-reply,
#bidsvg .bid-chosen { opacity: 0; }

#bidsvg .bid-wire {
  stroke-dasharray: 120;
  stroke-dashoffset: 120;
}

#bidsvg .bid-halo { opacity: 0; }

.bid-run .bid-offer { animation: bidFade 500ms var(--ease) forwards; }

.bid-run .bid-wire { animation: bidWire 620ms var(--ease) forwards; }
.bid-run .bid-wire:nth-of-type(1) { animation-delay: 420ms; }
.bid-run .bid-wire:nth-of-type(2) { animation-delay: 560ms; }
.bid-run .bid-wire:nth-of-type(3) { animation-delay: 700ms; }

.bid-run .bid-reply { animation: bidLand 560ms var(--ease) forwards; }
.bid-run .bid-reply:nth-of-type(1) { animation-delay: 760ms; }
.bid-run .bid-reply:nth-of-type(2) { animation-delay: 900ms; }
.bid-run .bid-reply:nth-of-type(3) { animation-delay: 1040ms; }

.bid-run .bid-halo { animation: bidFade 420ms var(--ease) 1500ms forwards; }
.bid-run .bid-chosen { animation: bidLand 620ms var(--ease) 1620ms forwards; }

@keyframes bidFade { to { opacity: 1; } }
@keyframes bidWire { to { stroke-dashoffset: 0; } }
@keyframes bidLand {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* Transforms on SVG groups need an origin that is not the page corner. */
#bidsvg .bid-reply,
#bidsvg .bid-chosen { transform-box: fill-box; transform-origin: center; }

/* Reduced motion, no JS, or an old browser: show the finished diagram. */
.bid-done .bid-offer,
.bid-done .bid-reply,
.bid-done .bid-chosen,
.bid-done .bid-halo { opacity: 1; }
.bid-done .bid-wire { stroke-dashoffset: 0; }

@media (prefers-reduced-motion: reduce) {
  #bidsvg .bid-offer,
  #bidsvg .bid-reply,
  #bidsvg .bid-chosen,
  #bidsvg .bid-halo { opacity: 1; animation: none; }
  #bidsvg .bid-wire { stroke-dashoffset: 0; animation: none; }
}

/* ---------------------------------------------------------------- legal
   Privacy and terms are generated from the same Firestore documents the app
   renders, so the two never drift. The stored markup arrives with inline
   `font-family: Times` from the console editor; those style attributes are
   stripped at build time and the type is set here instead. The words are
   untouched. */

.legal h2 { font-size: 23px; margin: 40px 0 12px; }
.legal h3 { font-size: 18px; margin: 28px 0 8px; }
.legal p, .legal li { color: var(--ink-muted); margin-bottom: 12px; line-height: 1.65; }
.legal strong { color: var(--ink); }
.legal ul, .legal ol { padding-left: 22px; margin-bottom: 18px; }
.legal a { color: var(--accent); }
.legal br { display: none; }
