/* ===========================================================
   Maya Ellison — Leadership Coach
   Digilife Software · STARTER package demo ($650)
   Single-page site. No external fonts, no external images.
   =========================================================== */

:root {
  --bg: var(--color-bg);
  --bg-alt: var(--color-bg-alt);
  --ink: var(--color-text);
  --muted: var(--color-text-muted);
  --accent: var(--color-primary);
  --accent-hover: var(--color-primary-hover);
  --accent-soft: var(--color-primary-soft);
  --border: var(--color-border);
  --radius: var(--radius-lg);
  --maxw: 1080px;
  --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;
}

h1,
h2,
h3 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
}
h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.4rem);
}
h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 1.1em;
}

a {
  color: var(--accent);
}

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

.section {
  padding: 88px 0;
}

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

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

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

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

/* ---------- Demo ribbon ---------- */
.ribbon {
  background: var(--ink);
  color: #f2f0e9;
  font-size: 0.82rem;
  text-align: center;
  padding: 9px 16px;
}
.ribbon a {
  color: #b9d4c0;
  font-weight: 600;
}

/* ---------- Header ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 250, 247, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
}

.brand {
  font-family: var(--font-head);
  font-size: 1.22rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.brand span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}
.nav-links a:hover {
  color: var(--accent);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-size: 0.97rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
}
.btn--primary {
  background: var(--accent);
  color: #fff;
}
.btn--primary:hover {
  background: var(--accent-hover);
}
.btn--ghost {
  border-color: var(--border);
  color: var(--ink);
  background: transparent;
}
.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Hero ---------- */
.hero {
  padding: 92px 0 72px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}
.hero p.lede {
  margin-bottom: 30px;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.portrait {
  aspect-ratio: 4 / 5;
  border-radius: 14px;
  background: linear-gradient(155deg, #dfe7e0 0%, #c3d3c7 55%, #a9bfae 100%);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.portrait::after {
  content: "";
  position: absolute;
  inset: auto -20% -35% -20%;
  height: 60%;
  background: radial-gradient(
    ellipse at center,
    rgba(255, 255, 255, 0.55),
    transparent 70%
  );
}
.portrait-initials {
  font-family: var(--font-head);
  font-size: 4.4rem;
  color: #43614b;
  opacity: 0.55;
  letter-spacing: 0.04em;
}

/* ---------- Trust strip ---------- */
.trust {
  border-block: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 26px 0;
}
.trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 44px;
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}
.stat {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  text-align: center;
}
.stat-num {
  font-family: var(--font-head);
  font-size: 2.1rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}
.stat-label {
  font-size: 0.9rem;
  color: var(--muted);
}

/* ---------- Cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  margin-top: 44px;
}
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
}
.card-icon {
  width: 42px;
  height: 42px;
  border-radius: 9px;
  background: var(--accent-soft);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}
.card p {
  color: var(--muted);
  font-size: 0.97rem;
  margin: 0;
}

/* ---------- Quotes ---------- */
.quotes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
  margin-top: 44px;
}
.quote {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 30px;
}
.quote blockquote {
  margin: 0 0 18px;
  font-family: var(--font-head);
  font-size: 1.1rem;
  line-height: 1.55;
}
.quote figcaption {
  font-size: 0.9rem;
  color: var(--muted);
}
.quote figcaption strong {
  color: var(--ink);
  display: block;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: start;
}
.field {
  margin-bottom: 18px;
}
.field label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 7px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  font: inherit;
  font-size: 0.97rem;
  color: var(--ink);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.field textarea {
  min-height: 130px;
  resize: vertical;
}
.form-note {
  font-size: 0.86rem;
  color: var(--muted);
  margin: 14px 0 0;
}
.contact-list {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
}
.contact-list li {
  padding: 14px 0;
  border-top: 1px solid var(--border);
  font-size: 0.97rem;
  color: var(--muted);
}
.contact-list strong {
  display: block;
  color: var(--ink);
}

/* ---------- Footer ---------- */
.site-foot {
  background: var(--ink);
  color: #cfd4cc;
  padding: 44px 0 30px;
  font-size: 0.92rem;
}
.foot-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 40px;
  justify-content: space-between;
  align-items: center;
}
.site-foot a {
  color: #b9d4c0;
}
.foot-legal {
  margin: 26px 0 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.84rem;
  color: #98a096;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .portrait {
    max-width: 340px;
  }
  .cards,
  .stats {
    grid-template-columns: 1fr;
  }
  .quotes {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
  .section {
    padding: 64px 0;
  }
}

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


/* ============================================================
   Motion support — added with the motion system
   ============================================================ */

.hero,
.hero--sub,
.section--deep {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.hero > .wrap,
.hero--sub > .wrap {
  position: relative;
  z-index: 1;
}

/* Image slot keeps the gradient as a fallback until a photo is added */
.portrait.media img,
.media img {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.portrait .portrait-initials {
  position: relative;
  z-index: 0;
}

/* Cards sit above hero decoration */
.card,
.post,
.case,
.stat,
.quote,
.figure-panel {
  position: relative;
  z-index: 1;
}

/* Signature: soft aurora + hand-drawn underline on the headline */
.hero h1 {
  position: relative;
  display: inline-block;
}
.hero h1::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 10px;
  background: radial-gradient(ellipse at 50% 0%, var(--accent) 0%, transparent 72%);
  opacity: 0.32;
  transform: scaleX(0);
  transform-origin: 0 50%;
  animation: draw-underline 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.45s forwards;
}
@keyframes draw-underline { to { transform: scaleX(1); } }

.card-icon { transition: transform 0.5s cubic-bezier(0.22,1,0.36,1), background-color 0.3s ease; }
.card:hover .card-icon { transform: rotate(-8deg) scale(1.12); background: #d8e4da; }

.stat { transition: transform 0.45s cubic-bezier(0.22,1,0.36,1), border-color 0.3s ease; }
.stat:hover { transform: translateY(-6px); border-color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .hero h1::after { animation: none; transform: scaleX(1); }
}


/* ---------- Theme-aware surfaces (was hardcoded white) ---------- */
.card,
.stat,
.quote,
.post,
.case,
.field input,
.field select,
.field textarea,
.slot,
.section--alt .card {
  background: var(--color-surface);
  color: var(--color-text);
}
.figure-panel {
  background: var(--color-surface-2);
}
.btn--primary {
  color: var(--color-on-primary);
}
.btn--light {
  background: var(--color-surface);
}
.site-head {
  background: color-mix(in srgb, var(--color-bg) 92%, transparent);
}
.bar-track {
  background: var(--color-border);
}
.portrait,
.media {
  border-color: var(--color-border);
}


/* ---------- Decorative surfaces follow the active theme ---------- */
.portrait {
  background:
    linear-gradient(155deg,
      color-mix(in srgb, var(--color-primary) 16%, var(--color-bg-alt)) 0%,
      color-mix(in srgb, var(--color-primary) 30%, var(--color-bg-alt)) 55%,
      color-mix(in srgb, var(--color-primary) 46%, var(--color-bg-alt)) 100%);
}
.portrait-initials {
  color: color-mix(in srgb, var(--color-primary) 70%, var(--color-text));
}
.magnet-cover {
  background: linear-gradient(150deg,
    var(--brand-primary) 0%,
    color-mix(in srgb, var(--brand-primary) 62%, black) 100%);
  color: color-mix(in srgb, var(--color-tertiary) 32%, white);
}
.magnet-cover .kicker { color: var(--brand-tertiary); }
.magnet-cover .byline { color: color-mix(in srgb, var(--brand-tertiary) 55%, white); }

.card:hover .card-icon {
  background: color-mix(in srgb, var(--color-primary) 22%, var(--color-surface));
}
.card-icon svg { stroke: var(--color-primary); }

.ribbon a,
.site-foot a:hover { color: var(--color-tertiary); }
.brand span,
.brand em { color: var(--color-primary); }

/* Always-dark bands keep readable text in either mode */
.section--deep h2,
.section--deep h3,
.site-foot h4 { color: #fff; }

/* Form controls need a 3:1 boundary under WCAG 1.4.11 */
.field input,
.field select,
.field textarea,
.form-inline input,
.slot {
  border-color: var(--color-border-strong);
}

/* ============================================================
   FIX — always-dark bands (ribbon / footer / deep sections)
   ------------------------------------------------------------
   These bands must stay dark in BOTH themes. Deriving them from
   --ink was the bug: --ink maps to --color-text, which flips to
   near-white in dark mode, leaving light text on a light band.
   --color-inverse is dark in both modes; --color-text-inverse is
   light in both. Verified by _shared/tools/check-contrast.py.
   ============================================================ */
.ribbon,
.site-foot,
.section--deep {
  background: var(--color-inverse);
  color: var(--color-text-inverse);
}
.ribbon strong,
.site-foot strong,
.section--deep h2,
.section--deep h3,
.site-foot h4 {
  color: #ffffff;
}
.section--deep .lede,
.site-foot p,
.site-foot li,
.site-foot a,
.stat-band .stat-label {
  color: color-mix(in srgb, var(--color-text-inverse) 82%, var(--color-inverse));
}
.foot-legal {
  color: color-mix(in srgb, var(--color-text-inverse) 62%, var(--color-inverse));
}
.stat-band .stat-num {
  color: #ffffff;
}
.section--deep .stat,
.stat-band .stat {
  background: transparent;
  border-color: color-mix(in srgb, var(--color-text-inverse) 24%, transparent);
}
.ribbon a,
.site-foot a:hover {
  color: var(--color-tertiary);
}
.skip {
  background: var(--color-primary);
  color: var(--color-on-primary);
}
