/* Doorlane — company site stylesheet.
 *
 * Shared by every page EXCEPT privacy-policy.html, which is deliberately
 * self-contained because it also renders inside the app's Settings WebView,
 * where nothing but the page itself may be reachable.
 *
 * Design language matches the app: "Transit Ribbon" — saturated route colour,
 * pill geometry, tinted fills with soft elevation rather than hairline rules.
 */

:root {
  --crimson: #c2184b;
  --crimson-deep: #8c0033;
  --crimson-wash: #ffdce4;
  --cobalt: #1a50be;
  --cobalt-wash: #dbe6ff;
  --green: #0a6c4c;
  --green-wash: #b7f0d8;

  --ink: #141726;
  --ink-soft: #4e5468;
  --line: #cbcfdc;
  --paper: #f4f5f9;
  --surface: #ffffff;
  --surface-alt: #f1f2f8;

  --r-pill: 999px;
  --r-card: 20px;
  --r-field: 16px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 72px;

  --measure: 68ch;
  --shell: 1120px;

  --font-display: "Outfit", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.62;
  -webkit-text-size-adjust: 100%;
}

img {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.16;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-3);
}

h1 {
  font-size: clamp(2.1rem, 6vw, 3.4rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 700;
}

h3 {
  font-size: 1.16rem;
  font-weight: 600;
}

p {
  margin: 0 0 var(--space-4);
  max-width: var(--measure);
}

a {
  color: var(--crimson);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--crimson-deep);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--cobalt);
  outline-offset: 3px;
  border-radius: var(--space-1);
}

code,
.mono {
  font-family: "SFMono-Regular", "Consolas", "Liberation Mono", monospace;
  font-size: 0.92em;
  background: var(--surface-alt);
  padding: 2px 7px;
  border-radius: var(--space-2);
}

.shell {
  width: min(var(--shell), calc(100% - 2 * var(--space-5)));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: var(--space-3) var(--space-4);
  border-radius: 0 0 var(--r-field) 0;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
  color: #fff;
}

/* ---------------------------------------------------------- utility bar */
/* Identity above the fold on every page. The legal name, phone and email
 * here are byte-identical to the footer and to about.html. */
.utility {
  background: var(--ink);
  color: #e7e9f2;
  font-size: 0.83rem;
}

.utility .shell {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  align-items: center;
  padding: var(--space-2) 0;
}

.utility a {
  color: #e7e9f2;
  text-decoration: none;
}

.utility a:hover {
  color: #fff;
  text-decoration: underline;
}

.utility strong {
  font-weight: 600;
}

/* ------------------------------------------------------------------ nav */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header .shell {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-5);
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) 0;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.24rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.wordmark svg {
  display: block;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.94rem;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--r-pill);
}

.site-nav a:hover {
  background: var(--surface-alt);
  color: var(--ink);
}

.site-nav a[aria-current="page"] {
  background: var(--crimson-wash);
  color: var(--crimson-deep);
}

/* ---------------------------------------------------------------- hero */
.hero {
  padding: var(--space-8) 0 var(--space-7);
}

.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--cobalt-wash);
  color: #00214d;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--r-pill);
  margin-bottom: var(--space-4);
}

.hero .lede {
  font-size: 1.14rem;
  color: var(--ink-soft);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--crimson);
  color: #fff;
}

.btn-primary:hover {
  background: var(--crimson-deep);
  color: #fff;
}

.btn-ghost {
  border-color: var(--line);
  color: var(--ink);
  background: var(--surface);
}

.btn-ghost:hover {
  border-color: var(--ink-soft);
  color: var(--ink);
}

/* -------------------------------------------------------------- blocks */
section {
  padding: var(--space-7) 0;
}

section > .shell > h2 + p {
  color: var(--ink-soft);
  margin-bottom: var(--space-5);
}

.card {
  background: var(--surface);
  border-radius: var(--r-card);
  padding: var(--space-5);
  box-shadow: 0 2px 10px rgba(20, 23, 38, 0.07);
}

.grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.card h3 {
  margin-top: var(--space-3);
}

.card p {
  color: var(--ink-soft);
  margin-bottom: 0;
  font-size: 0.97rem;
}

.icon-badge {
  width: 46px;
  height: 46px;
  border-radius: var(--r-pill);
  background: var(--crimson-wash);
  color: var(--crimson-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-badge.cobalt {
  background: var(--cobalt-wash);
  color: #00214d;
}

.icon-badge.green {
  background: var(--green-wash);
  color: #00281a;
}

/* facts strip */
.facts {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  background: var(--surface);
  border-radius: var(--r-card);
  padding: var(--space-5);
  box-shadow: 0 2px 10px rgba(20, 23, 38, 0.07);
}

.facts dt {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--crimson);
  margin-bottom: var(--space-1);
}

.facts dd {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
}

/* products */
.product-card {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
  align-items: flex-start;
  background: var(--surface);
  border-radius: var(--r-card);
  padding: var(--space-5);
  box-shadow: 0 2px 10px rgba(20, 23, 38, 0.07);
}

.product-card .body {
  flex: 1 1 320px;
}

.product-card h3 {
  margin-bottom: var(--space-1);
}

.pkg {
  display: inline-block;
  margin: var(--space-2) 0 var(--space-3);
}

/* details table */
.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: 0 2px 10px rgba(20, 23, 38, 0.07);
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 480px;
  font-size: 0.96rem;
}

th,
td {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: 0;
}

th {
  width: 34%;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
}

/* callouts */
.note {
  background: var(--cobalt-wash);
  color: #00214d;
  border-radius: var(--r-card);
  padding: var(--space-5);
}

.note p:last-child {
  margin-bottom: 0;
}

.note.privacy {
  background: var(--green-wash);
  color: #00281a;
}

/* faq */
details {
  background: var(--surface);
  border-radius: var(--r-field);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-3);
  box-shadow: 0 2px 8px rgba(20, 23, 38, 0.06);
}

summary {
  cursor: pointer;
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 1.02rem;
}

details[open] summary {
  margin-bottom: var(--space-3);
}

details p:last-child {
  margin-bottom: 0;
  color: var(--ink-soft);
}

/* contact band */
.band {
  background: var(--ink);
  color: #e7e9f2;
  border-radius: var(--r-card);
  padding: var(--space-6);
}

.band h2 {
  color: #fff;
}

.band a {
  color: #ffb3c6;
}

.band p {
  color: #c7cbdb;
}

/* store badge */
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--ink);
  color: #fff;
  border-radius: var(--r-field);
  padding: var(--space-3) var(--space-5);
  text-decoration: none;
  min-height: 56px;
}

.store-badge:hover {
  background: #000;
  color: #fff;
}

.store-badge .small {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
}

.store-badge .big {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.08rem;
}

/* footer */
.site-footer {
  background: var(--ink);
  color: #c7cbdb;
  padding: var(--space-7) 0 var(--space-5);
  font-size: 0.93rem;
}

.site-footer a {
  color: #e7e9f2;
}

.footer-grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: var(--space-5);
}

.site-footer h3 {
  color: #fff;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin-bottom: var(--space-2);
}

.legal-line {
  border-top: 1px solid #2a2f42;
  padding-top: var(--space-4);
  font-size: 0.86rem;
}

.legal-line p {
  margin-bottom: var(--space-2);
  max-width: none;
}

.offline-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--green-wash);
  color: #00281a;
  border-radius: var(--r-pill);
  padding: var(--space-2) var(--space-4);
  font-size: 0.82rem;
  font-weight: 700;
}

/* --------------------------------------------------------- dark scheme */
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eef0f8;
    --ink-soft: #b6bcce;
    --line: #394050;
    --paper: #0f1320;
    --surface: #171c2c;
    --surface-alt: #1f2536;
    --crimson: #ff9bb4;
    --crimson-deep: #ffc2d1;
    --crimson-wash: #5c0022;
    --cobalt: #afc7ff;
    --cobalt-wash: #0b2f6b;
    --green: #68dcae;
    --green-wash: #00402c;
  }

  .utility {
    background: #090c16;
  }

  .hero .eyebrow,
  .icon-badge.cobalt,
  .note {
    color: #dbe5ff;
  }

  .icon-badge,
  .facts dt {
    color: #ffd9e2;
  }

  .facts dt {
    color: var(--crimson);
  }

  .icon-badge.green,
  .note.privacy,
  .offline-chip {
    color: #8cf8c8;
  }

  .card,
  .facts,
  .product-card,
  .table-wrap,
  details {
    box-shadow: none;
    border: 1px solid var(--line);
  }

  .band,
  .site-footer {
    background: #090c16;
  }

  .store-badge {
    background: var(--surface-alt);
    border: 1px solid var(--line);
  }

  .legal-line {
    border-top-color: #2a3145;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
