/* ============================================================= */
/*  Smart Drifty — base.css                                       */
/*  Design tokens, reset, typography, buttons, shared utilities   */
/* ============================================================= */

:root {
  /* --- Colours (sampled from the visualisation) --- */
  --bg-page: #E1E1E1;
  --bg-soft: #E8E8E6;
  --cream: #FCF6E4;
  --cream-2: #F7EFD7;
  --charcoal: #4D4D4E;
  --charcoal-dark: #3F3F40;
  --brand-blue: #6C7E9B;
  --brand-blue-dark: #5A6C89;
  --card-light: #FFFFFF;
  --card-light-border: #D8D8D8;

  /* --- Text --- */
  --text-heading: #3C3C3E;
  --text-body: #6A6A6C;
  --text-muted: #8A8A8C;
  --text-on-dark: #F4F1E8;
  --text-on-dark-soft: #C8C7C0;

  /* --- Footer / dark --- */
  --footer-bg: #484848;

  /* --- Decorative lines --- */
  --line: #C4C4C2;
  --line-dot: #B7B7B5;

  /* --- Typography --- */
  --font-heading: 'Baloo 2', 'Poppins', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-hand: 'Caveat', 'Inter', cursive;

  --fs-h1: clamp(2.05rem, 1.2rem + 3vw, 3.2rem);
  --fs-h2: clamp(1.55rem, 1.1rem + 1.5vw, 2.1rem);
  --fs-h3: 1.25rem;
  --fs-body: 1rem;
  --fs-small: 0.875rem;

  /* --- Radius / shadow --- */
  --radius-pill: 999px;
  --radius-card: 28px;
  --radius-sm: 14px;
  --shadow-soft: 0 12px 30px rgba(40, 40, 45, 0.10);
  --shadow-card: 0 8px 22px rgba(40, 40, 45, 0.07);
  --shadow-pop: 0 24px 60px rgba(30, 30, 35, 0.22);

  /* --- Spacing --- */
  --space-section: clamp(2.25rem, 1.5rem + 1.9vw, 3.9rem);
  --container: 1300px;
  --gutter: clamp(1.1rem, 0.5rem + 2vw, 2.5rem);

  /* --- Motion --- */
  --dur: 280ms;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --header-h: 78px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

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

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--text-body);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--text-heading);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.01em;
}

img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
input, textarea, button { font: inherit; color: inherit; }

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

/* --- Layout helpers --- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.accent { color: var(--brand-blue); }

.section-title {
  font-size: var(--fs-h2);
  font-weight: 700;
  color: var(--text-heading);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-blue);
  margin-bottom: 0.8rem;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1;
  padding: 0.85em 1.5em;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  transition: transform var(--dur) var(--ease),
              background var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease),
              color var(--dur) var(--ease);
  white-space: nowrap;
}
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn-lg { padding: 1.05em 1.8em; font-size: 1.02rem; }
.btn-block { width: 100%; }

.btn-primary {
  background: var(--brand-blue);
  color: #fff;
  box-shadow: 0 10px 22px rgba(108, 126, 155, 0.30);
}
.btn-primary:hover {
  background: var(--brand-blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(108, 126, 155, 0.38);
}
.btn-primary:active { transform: translateY(0); }

.btn-cream {
  background: var(--cream);
  color: var(--text-heading);
  box-shadow: var(--shadow-card);
}
.btn-cream:hover {
  background: var(--cream-2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}
.btn-cream:active { transform: translateY(0); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 42px; height: 42px;
  border: none;
  background: transparent;
  border-radius: 50%;
  color: var(--text-heading);
}
.icon-btn svg { width: 22px; height: 22px; }

/* --- Brand logo --- */
.brand { display: inline-flex; align-items: center; gap: 0.6rem; }
.brand-logo { height: 38px; width: auto; display: block; }
.brand-mark { width: 40px; height: 40px; flex: none; }
.brand-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--text-heading);
  letter-spacing: -0.01em;
}

/* Logo mark fills — driven by custom properties so themes inherit
   cleanly across the <use> instance-tree boundary (cross-browser safe) */
.lm-charcoal { fill: var(--lm-charcoal, var(--charcoal)); }
.lm-blue { fill: var(--lm-blue, var(--brand-blue)); }
.lm-cream { fill: var(--lm-cream, var(--cream)); }

/* Mark on dark surfaces -> left figure becomes light */
.brand-on-dark .brand-name { color: var(--text-on-dark); }
.brand-on-dark { --lm-charcoal: var(--text-on-dark); }

/* --- Trust line --- */
.trust-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-small);
  color: var(--text-muted);
  margin-top: 1.4rem;
}
.trust-line .ti { width: 16px; height: 16px; color: var(--brand-blue); }
.trust-line .dot { color: var(--line-dot); }
.trust-line.on-dark { color: var(--text-on-dark-soft); }
.trust-line.on-dark .ti { color: var(--cream); }

/* --- Scroll reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* utility */
[hidden] { display: none !important; }
.no-scroll { overflow: hidden; }
