/* ===========================================================
   Digilife Software — Offer landing page
   Target: independent consultants & business coaches, US
   Rule: clean, light, human. NOT the terminal aesthetic.
   Reads theme.css tokens only — never a raw colour.
   =========================================================== */

:root {
  --bg: var(--color-bg);
  --bg-alt: var(--color-bg-alt);
  --surface: var(--color-surface);
  --ink: var(--color-text);
  --muted: var(--color-text-muted);
  --subtle: var(--color-text-subtle);
  --accent: var(--color-primary);
  --accent-hover: var(--color-primary-hover);
  --accent-soft: var(--color-primary-soft);
  --on-accent: var(--color-on-primary);
  --border: var(--color-border);
  --deep: var(--color-inverse);
  --on-deep: var(--color-text-inverse);
  --radius: var(--radius-lg);
  --maxw: 1120px;
  --font-head: var(--font-display);
  --font-body: var(--font-sans);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.15rem, 5.4vw, 3.5rem);
}
h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.35rem);
}
h3 {
  font-size: 1.18rem;
}

p {
  margin: 0 0 1.1em;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: var(--space-section) 0;
}

.section--alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--border);
}

.eyebrow {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.lede {
  font-size: 1.13rem;
  color: var(--muted);
  max-width: 64ch;
}

.micro {
  font-size: 0.88rem;
  color: var(--muted);
  max-width: 60ch;
}

.micro--center {
  margin: 22px auto 0;
  text-align: center;
}

/* ---------- Skip link ---------- */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--on-accent);
  padding: 12px 20px;
  z-index: 200;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip:focus {
  left: 8px;
  top: 8px;
}

:where(a, button, summary):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: 0.97rem;
  font-weight: 600;
  padding: 13px 26px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s var(--ease-out), border-color 0.18s var(--ease-out),
    transform 0.18s var(--ease-out);
}

.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
}
.btn--primary:hover {
  background: var(--accent-hover);
}

.btn--ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--border-strong, var(--color-border-strong));
}
.btn--ghost:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.btn--light {
  background: var(--color-surface);
  color: var(--color-primary);
}
.btn--light:hover {
  background: var(--color-surface-2);
}

.btn--sm {
  padding: 9px 18px;
  font-size: 0.9rem;
}
.btn--lg {
  padding: 16px 34px;
  font-size: 1.05rem;
}
.btn--block {
  display: flex;
  width: 100%;
}

/* ---------- Header ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--color-surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
  min-height: 64px;
}

.brand {
  font-family: var(--font-head);
  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}
.brand span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 24px;
}
.nav-links a {
  font-size: 0.92rem;
  color: var(--muted);
  text-decoration: none;
}
.nav-links a:hover {
  color: var(--accent);
}

.head-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}
.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 76px 0 64px;
  background: var(--bg);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 54px;
  align-items: center;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0 16px;
}

/* ---------- Load-time comparison panel ---------- */
.figure-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px 20px;
  box-shadow: var(--shadow-md);
}

.figure-title {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 20px;
}

.bar-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin-bottom: 18px;
}

.bar-label {
  font-size: 0.86rem;
  color: var(--muted);
}

.bar-track {
  display: block;
  height: 9px;
  border-radius: var(--radius-full);
  background: var(--color-bg-alt);
  overflow: hidden;
}

.bar-fill {
  display: block;
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--accent);
}
.bar-fill--bad {
  background: var(--color-tertiary);
}
.bar-fill--mid {
  background: var(--color-secondary);
}

.bar-value {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
}

.figure-note {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* ---------- Trust strip ---------- */
.trust {
  background: var(--surface);
  border-block: 1px solid var(--border);
  padding: 16px 0;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 34px;
  font-size: 0.87rem;
  color: var(--muted);
}
.trust-row li {
  position: relative;
  padding-left: 20px;
}
.trust-row li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 11px;
  height: 6px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

/* ---------- Score cards ---------- */
.scores {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin: 40px 0 30px;
}

.score {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 26px;
  text-align: center;
}

.score--good {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.score-cap {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}

.metric-num {
  font-family: var(--font-head);
  font-size: clamp(3rem, 8vw, 4.4rem);
  font-weight: 700;
  line-height: 1;
  margin: 0;
  color: var(--accent);
}
/* The "typical site" number. Tertiary is 3.97:1 on white — below the 4.5:1
   body-text threshold but above the 3:1 large-text one, and this glyph is
   4.4rem bold. Do not reuse this colour for anything smaller. */
.score--bad .metric-num {
  color: var(--color-tertiary);
}

.score-sub {
  font-size: 0.86rem;
  color: var(--muted);
  margin: 8px 0 18px;
}

.score-why {
  display: grid;
  gap: 7px;
  text-align: left;
  font-size: 0.9rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.score-why li {
  padding-left: 16px;
  position: relative;
}
.score-why li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-border-strong);
}

/* ---------- Callout ---------- */
.callout {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px;
  margin: 0 0 40px;
}
.callout p {
  margin: 0;
  color: var(--ink);
  max-width: 74ch;
}

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  border-top: 1px solid var(--border);
  padding-top: 34px;
}

.stat {
  text-align: center;
}

.stat-num {
  font-family: var(--font-head);
  font-size: clamp(1.9rem, 4.4vw, 2.7rem);
  font-weight: 700;
  line-height: 1.05;
  color: var(--accent);
}

.stat-label {
  font-size: 0.86rem;
  color: var(--muted);
  margin-top: 6px;
  max-width: 24ch;
  margin-inline: auto;
}

/* ---------- Cards (the three examples) ---------- */
.cards {
  display: grid;
  gap: 22px;
  margin-top: 40px;
}
.cards--3 {
  grid-template-columns: repeat(3, 1fr);
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
}

.card--featured {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.card-tag {
  font-family: var(--font-ui);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
}

.card p {
  color: var(--muted);
  font-size: 0.96rem;
}

.card-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 20px;
}
.card-list li {
  font-size: 0.79rem;
  color: var(--muted);
  background: var(--color-bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 3px 11px;
}

.card-link {
  margin-top: auto;
  font-weight: 600;
  font-size: 0.94rem;
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  align-self: flex-start;
  padding-bottom: 2px;
}
.card-link::after {
  content: " →";
}

/* ---------- Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
  counter-reset: step;
}

.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
}

.step-num {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 14px;
}

.step p {
  color: var(--muted);
  font-size: 0.96rem;
}

.step-time {
  font-family: var(--font-ui);
  font-size: 0.79rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* ---------- Pricing tiers ---------- */
.tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin: 40px 0 44px;
  align-items: start;
}

.tier {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
}

.tier--featured {
  border-color: var(--accent);
  border-width: 2px;
  box-shadow: var(--shadow-lg);
}

.tier-flag {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--font-ui);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-accent);
  background: var(--accent);
  border-radius: var(--radius-full);
  padding: 4px 13px;
  margin: 0 0 14px;
}

.tier h3 {
  font-size: 1.32rem;
  margin-bottom: 4px;
}

.tier-price {
  font-family: var(--font-head);
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
  margin: 6px 0 4px;
}
.tier-price span {
  font-size: 1.3rem;
  vertical-align: super;
  color: var(--muted);
  margin-right: 2px;
}

.tier-for {
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 20px;
}

.tier-list {
  display: grid;
  gap: 9px;
  font-size: 0.94rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-bottom: 24px;
}
.tier-list li {
  position: relative;
  padding-left: 22px;
}
.tier-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 11px;
  height: 6px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

.tier .btn {
  margin-top: auto;
}

/* ---------- Terms ---------- */
.terms {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 28px;
  margin-bottom: 34px;
}
.terms h3 {
  margin-bottom: 18px;
}

.terms-list {
  display: grid;
  gap: 11px;
  font-size: 0.96rem;
  color: var(--muted);
}
.terms-list li {
  position: relative;
  padding-left: 22px;
}
.terms-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.58em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
}
.terms-list strong {
  color: var(--ink);
}

/* ---------- Care plan ---------- */
.care {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 34px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 30px;
}

.care-copy p {
  color: var(--muted);
  font-size: 0.98rem;
}

.care-plans {
  display: grid;
  gap: 14px;
  align-content: start;
}

.care-plan {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  background: var(--color-bg-alt);
}

.care-name {
  font-family: var(--font-ui);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 4px;
}

.care-price {
  font-family: var(--font-head);
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
  margin: 0 0 8px;
}
.care-price span {
  font-family: var(--font-ui);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--muted);
}

.care-detail {
  font-size: 0.89rem;
  color: var(--muted);
  margin: 0;
}

/* ---------- Who you are hiring ---------- */
.who-grid {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 52px;
  align-items: start;
}

.portrait {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--accent-soft);
  border: 1px solid var(--border);
}

.portrait-initials {
  position: absolute;
  font-family: var(--font-head);
  font-size: 3.4rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent);
  opacity: 0.42;
}

.portrait img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.who-facts {
  display: grid;
  gap: 14px;
  border-top: 1px solid var(--border);
  padding-top: 22px;
  margin: 26px 0 20px;
}
.who-facts li {
  display: grid;
  gap: 2px;
  font-size: 0.97rem;
  color: var(--muted);
}
.who-facts strong {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.who-grid p {
  color: var(--muted);
}

/* ---------- FAQ ---------- */
.faq {
  max-width: 78ch;
  margin-top: 36px;
  border-top: 1px solid var(--border);
}

.qa {
  border-bottom: 1px solid var(--border);
}

.qa summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  list-style: none;
  cursor: pointer;
  padding: 20px 0;
  font-family: var(--font-head);
  font-size: 1.06rem;
  font-weight: 600;
  color: var(--ink);
}
.qa summary::-webkit-details-marker {
  display: none;
}
.qa summary::after {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg) translateY(-3px);
  transition: transform 0.2s var(--ease-out);
}
.qa[open] summary::after {
  transform: rotate(-135deg) translateY(-3px);
}
.qa summary:hover {
  color: var(--accent);
}

.qa p {
  color: var(--muted);
  font-size: 0.99rem;
  max-width: 70ch;
  margin: 0 0 20px;
}

/* ---------- Final CTA ---------- */
.section--deep {
  background: var(--deep);
  color: var(--on-deep);
  border: 0;
}

.cta-wrap {
  text-align: center;
  max-width: 720px;
}

.section--deep h2 {
  color: var(--on-deep);
}

.cta-lede {
  font-size: 1.1rem;
  color: var(--on-deep);
  opacity: 0.86;
  margin: 0 auto 30px;
  max-width: 58ch;
}

.cta-note {
  font-size: 0.9rem;
  color: var(--on-deep);
  opacity: 0.82;
  margin: 22px 0 0;
}
.cta-note a {
  color: var(--on-deep);
}

/* ---------- Footer ---------- */
.site-foot {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 34px 0 40px;
  font-size: 0.9rem;
  color: var(--muted);
}

.foot-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.foot-row a {
  margin: 0 4px;
}

.foot-legal {
  font-size: 0.83rem;
  color: var(--muted);
  max-width: 78ch;
  margin: 18px 0 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 940px) {
  .hero-grid,
  .who-grid,
  .care {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .cards--3,
  .steps,
  .tiers {
    grid-template-columns: 1fr 1fr;
  }
  .nav-links {
    display: none;
  }
  .portrait {
    max-width: 320px;
  }
}

@media (max-width: 660px) {
  body {
    font-size: 16px;
  }
  .section {
    padding: var(--space-section-sm) 0;
  }
  .hero {
    padding: 48px 0 44px;
  }
  .cards--3,
  .steps,
  .tiers,
  .scores,
  .stats {
    grid-template-columns: 1fr;
  }
  .hero-cta .btn {
    width: 100%;
  }
  .trust-row {
    justify-content: flex-start;
  }
  .brand {
    font-size: 0.98rem;
  }
}

/* Colour transitions only after first paint */
.theme-ready body,
.theme-ready .site-head,
.theme-ready .card,
.theme-ready .tier,
.theme-ready .score {
  transition: background-color 0.25s var(--ease-out), border-color 0.25s var(--ease-out),
    color 0.25s var(--ease-out);
}

@media print {
  .site-head,
  .theme-toggle,
  .m-orbs {
    display: none;
  }
}
