/* =========================================================
   PROJECT PULSE — Stylesheet
   A flagship project of the Tyler Nicholas Foundation
   Colours taken from the PULSE logo (Seychelles flag palette)
   ========================================================= */

:root {
  /* Brand */
  --red: #D3111C;
  --red-deep: #A90E17;
  --blue: #0B4EA2;
  --yellow: #F7C948;
  --green: #0A8A43;
  --tnf-green: #8CC63F;

  /* Neutrals */
  --ink: #14213D;
  --ink-soft: #4A5670;
  --muted: #6B7690;
  --line: #E3E7EE;
  --mist: #F5F7FA;
  --paper: #FFFFFF;

  /* Type */
  --font-head: "Lexend", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;

  /* Layout */
  --container: 1180px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section: clamp(4rem, 9vw, 7rem);
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --header-h: 76px;

  --shadow: 0 1px 2px rgba(20, 33, 61, .06), 0 8px 24px rgba(20, 33, 61, .06);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--red); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; margin: 0; color: var(--ink); }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; }

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

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 300;
  background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 1rem; color: #fff; }

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

/* ---------- Type scale ---------- */
.h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 700; letter-spacing: -.02em; }
.h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 700; letter-spacing: -.015em; margin-bottom: 1.25rem; }
.h3 { font-size: clamp(1.35rem, 2.2vw, 1.65rem); font-weight: 600; letter-spacing: -.01em; margin-bottom: 1rem; }
.lead { font-size: clamp(1.2rem, 2vw, 1.4rem); line-height: 1.5; color: var(--ink); font-family: var(--font-head); font-weight: 400; }
.kicker {
  font-family: var(--font-head); font-weight: 600; font-size: 1rem;
  color: var(--red); margin-bottom: .6rem;
}
.prose { max-width: 68ch; color: var(--ink-soft); }
.prose strong { color: var(--ink); }
.note {
  font-size: 1rem; color: var(--ink-soft);
  border-left: 3px solid var(--yellow); padding: .2rem 0 .2rem 1rem;
}

/* ---------- Ribbon (flag stripes) ---------- */
.ribbon { display: flex; height: 4px; }
.ribbon i { flex: 1; }
.ribbon i:nth-child(1) { background: var(--blue); }
.ribbon i:nth-child(2) { background: var(--yellow); }
.ribbon i:nth-child(3) { background: var(--red); }
.ribbon i:nth-child(4) { background: var(--green); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .75rem 1.5rem;
  font-family: var(--font-head); font-weight: 500; font-size: 1rem; line-height: 1.2;
  border-radius: 999px; border: 2px solid transparent; cursor: pointer;
  text-decoration: none; transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--sm { min-height: 42px; padding: .55rem 1.15rem; font-size: .95rem; }
.btn--red { background: var(--red); color: #fff; }
.btn--red:hover { background: var(--red-deep); color: #fff; }
.btn--blue { background: var(--blue); color: #fff; }
.btn--blue:hover { background: #083c7d; color: #fff; }
.btn--green { background: var(--green); color: #fff; }
.btn--green:hover { background: #076a33; color: #fff; }
.btn--outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--outline:hover { background: var(--ink); color: #fff; }
.btn--ghost { color: var(--ink-soft); background: transparent; border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn--white { background: #fff; color: var(--red); }
.btn--white:hover { background: var(--ink); color: #fff; }
.btn--line { border-color: rgba(255,255,255,.7); color: #fff; background: transparent; }
.btn--line:hover { background: #fff; color: var(--red); border-color: #fff; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.btn-row--center { justify-content: center; }

/* =========================================================
   LOADING SCREEN
   ========================================================= */
.loader {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center;
  background: var(--paper);
  transition: opacity .6s var(--ease), visibility .6s var(--ease);
}
.loader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.loader__inner { width: min(520px, 86vw); text-align: center; }
.loader__mark {
  width: 132px; margin: 0 auto -6px;
  animation: beat 1.1s var(--ease) infinite;
  transform-origin: 50% 60%;
}
.loader__ecg { width: 100%; height: 64px; overflow: visible; }
.loader__ecg path {
  fill: none; stroke: var(--red); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 900; stroke-dashoffset: 900;
  animation: trace 1.6s var(--ease) infinite;
  filter: drop-shadow(0 0 4px rgba(211, 17, 28, .35));
}
.loader__word {
  font-family: var(--font-head); font-size: 1.9rem; margin: .4rem 0 .1rem; line-height: 1.1;
}
.loader__word span { font-weight: 400; color: var(--ink); }
.loader__word strong { font-weight: 800; color: var(--red); letter-spacing: .02em; }
.loader__tag { color: var(--muted); font-size: 1rem; margin: 0; }
.loader__ribbon { position: absolute; left: 0; right: 0; bottom: 0; display: flex; height: 6px; background: var(--mist); }
.loader__ribbon i { flex: 1; transform: scaleX(0); transform-origin: left; animation: grow calc(var(--load-time, 6000ms) / 4) linear forwards; }
.loader__ribbon i:nth-child(1) { background: var(--blue); }
.loader__ribbon i:nth-child(2) { background: var(--yellow); animation-delay: calc(var(--load-time, 6000ms) / 4); }
.loader__ribbon i:nth-child(3) { background: var(--red); animation-delay: calc(var(--load-time, 6000ms) / 2); }
.loader__ribbon i:nth-child(4) { background: var(--green); animation-delay: calc(var(--load-time, 6000ms) * .75); }

body.is-loading { overflow: hidden; }

@keyframes trace {
  0% { stroke-dashoffset: 900; opacity: 1; }
  70% { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}
@keyframes beat {
  0%, 100% { transform: scale(1); }
  14% { transform: scale(1.08); }
  28% { transform: scale(1); }
  42% { transform: scale(1.05); }
  70% { transform: scale(1); }
}
@keyframes grow { to { transform: scaleX(1); } }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  padding-top: env(safe-area-inset-top, 0px);
  transition: box-shadow .25s var(--ease);
}
.site-header.is-scrolled { box-shadow: 0 6px 20px rgba(20, 33, 61, .08); }
.site-header__bar {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: var(--header-h);
}
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--ink); }
.brand img { width: 48px; }
.brand__text { display: flex; flex-direction: column; line-height: 1; font-family: var(--font-head); }
.brand__project { font-size: .9rem; font-weight: 400; color: var(--ink); }
.brand__pulse { font-size: 1.45rem; font-weight: 800; color: var(--red); letter-spacing: .02em; }
.brand:hover { color: var(--ink); }

.nav { display: flex; align-items: center; gap: .25rem; margin-left: auto; }
.nav__link {
  position: relative; padding: .55rem .9rem;
  font-family: var(--font-head); font-weight: 500; font-size: 1rem;
  color: var(--ink); text-decoration: none; border-radius: 999px;
}
.nav__link:hover { color: var(--red); }
.nav__link.is-active { color: var(--red); }
.nav__link.is-active::after {
  content: ""; position: absolute; left: .9rem; right: .9rem; bottom: .2rem;
  height: 2px; background: var(--red); border-radius: 2px;
}
.nav__cta { margin-left: .5rem; }

.header-tnf {
  display: flex; align-items: center; padding-left: 1.25rem;
  border-left: 1px solid var(--line);
}
.header-tnf img { width: 86px; }

.menu-toggle {
  display: none; margin-left: auto;
  width: 46px; height: 46px; border: 0; border-radius: 12px;
  background: var(--mist); cursor: pointer; padding: 12px;
  flex-direction: column; justify-content: space-between;
}
.menu-toggle span { display: block; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s var(--ease), opacity .2s; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* =========================================================
   HERO
   ========================================================= */
.hero { padding-bottom: clamp(3rem, 7vw, 5rem); border-bottom: 1px solid var(--line); }
.hero__banner { padding-top: clamp(1rem, 3vw, 2rem); }
.hero__banner img { width: 100%; border-radius: var(--radius-lg); }
.hero__body {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 5vw, 4rem);
  align-items: end; margin-top: clamp(1.5rem, 4vw, 3rem);
}
.hero__title {
  font-size: clamp(2.6rem, 6.4vw, 5rem); font-weight: 800;
  letter-spacing: -.035em; line-height: 1.02; color: var(--ink);
}
.hero__lead { font-family: var(--font-head); font-size: clamp(1.15rem, 1.8vw, 1.35rem); line-height: 1.5; color: var(--ink-soft); margin: 0; }
.hero__aside .btn-row { margin-top: 1.5rem; }
.hero__tnf {
  display: inline-flex; align-items: center; gap: .9rem; margin-top: 2rem;
  text-decoration: none; color: var(--ink-soft); font-size: .98rem; line-height: 1.35;
}
.hero__tnf img { width: 64px; }
.hero__tnf strong { color: var(--ink); font-weight: 600; }
.hero__tnf:hover strong { color: var(--green); }

/* =========================================================
   SECTIONS
   ========================================================= */
.section { padding: var(--section) 0; }
.section--mist { background: var(--mist); }
.section--ink { background: var(--ink); color: #fff; }
.section--ink .h2, .section--ink h3 { color: #fff; }

.section-head { max-width: 640px; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head .h2 { margin-bottom: .6rem; }
.section-head__sub { color: var(--ink-soft); margin: 0; }

/* Intro split */
.split { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(2rem, 6vw, 5rem); }
.split__head .h2 { position: sticky; top: calc(var(--header-h) + 2rem); }
.pullquote {
  font-family: var(--font-head); font-size: clamp(1.2rem, 2vw, 1.45rem); line-height: 1.45;
  color: var(--ink); margin-top: 2rem; padding-top: 1.5rem; border-top: 2px solid var(--red);
}

/* Problem / solution */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); }
.duo__col { background: var(--paper); border-radius: var(--radius-lg); padding: clamp(1.75rem, 4vw, 3rem); position: relative; overflow: hidden; }
.tick { position: absolute; left: 0; top: 0; bottom: 0; width: 6px; }
.tick--blue { background: var(--blue); }
.tick--red { background: var(--red); }
.duo__col .h2 { font-size: clamp(1.6rem, 2.8vw, 2.1rem); }

/* Features */
.features {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
.feature {
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  position: relative;
}
.feature::before {
  content: ""; position: absolute; left: -1px; top: -1px; width: 48px; height: 4px;
  background: var(--accent);
}
.feature__icon {
  width: 40px; height: 40px; margin-bottom: 1.1rem;
  fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.feature h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: .5rem; }
.feature p { color: var(--ink-soft); margin: 0; font-size: 1.05rem; }

/* Steps */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; position: relative; }
.steps::before {
  content: ""; position: absolute; left: 0; right: 0; top: 27px; height: 2px;
  background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 14px);
}
.step { position: relative; }
.step__num {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--red); color: var(--red);
  font-family: var(--font-head); font-weight: 700; font-size: 1.05rem;
  margin-bottom: 1.25rem; position: relative;
}
.step:last-child .step__num { background: var(--red); color: #fff; }
.step h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: .5rem; }
.step p { color: var(--ink-soft); margin: 0; font-size: 1.05rem; }

/* OpenEMIS */
.emis { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.mock {
  margin: 0; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden;
}
.mock__top {
  display: flex; align-items: center; gap: 1rem; padding: .85rem 1.1rem;
  background: var(--mist); border-bottom: 1px solid var(--line);
}
.mock__dots { display: flex; gap: 6px; }
.mock__dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.mock__title { font-family: var(--font-head); font-size: .9rem; font-weight: 500; color: var(--ink-soft); }
.mock__body { display: grid; grid-template-columns: 150px 1fr; min-height: 330px; }
.mock__side { list-style: none; border-right: 1px solid var(--line); padding: .75rem .5rem; }
.mock__side li {
  display: flex; align-items: center; gap: .45rem;
  font-family: var(--font-head); font-size: .92rem; color: var(--muted);
  padding: .6rem .75rem; border-radius: var(--radius-sm);
}
.mock__side li.is-active {
  background: rgba(211, 17, 28, .08); color: var(--red); font-weight: 600;
  box-shadow: inset 3px 0 0 var(--red);
}
.mock__side img { width: 18px; }
.mock__panel { padding: 1.25rem 1.4rem; }
.mock__hello { font-family: var(--font-head); font-weight: 600; font-size: 1.1rem; margin-bottom: .75rem; }
.mock__moods { display: flex; gap: .5rem; margin-bottom: 1.1rem; flex-wrap: wrap; }
.mock__moods span {
  font-size: .85rem; padding: .3rem .8rem; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink-soft);
}
.mock__moods span:first-child { border-color: var(--green); color: var(--green); }
.mock__menu { list-style: none; display: grid; gap: .45rem; }
.mock__menu li {
  display: flex; align-items: center; gap: .7rem;
  padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 10px;
  font-family: var(--font-head); font-size: .92rem; color: var(--ink);
}
.mock__menu span { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }
.mock figcaption {
  font-size: .85rem; color: var(--muted); text-align: center;
  padding: .6rem; border-top: 1px solid var(--line);
}

/* Trust */
.trust__head { max-width: 720px; margin-bottom: clamp(2rem, 4vw, 3rem); }
.trust__lead { font-family: var(--font-head); font-size: clamp(1.15rem, 2vw, 1.35rem); color: rgba(255,255,255,.82); line-height: 1.5; margin: 0; }
.trust__list { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: rgba(255,255,255,.12); border-radius: var(--radius-lg); overflow: hidden; }
.trust__list li { background: var(--ink); padding: clamp(1.5rem, 3vw, 2.25rem); }
.trust__list h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: .5rem; }
.trust__list p { color: rgba(255,255,255,.75); margin: 0; }
.trust__statement {
  margin: clamp(2rem, 4vw, 3rem) 0 0;
  font-family: var(--font-head); font-weight: 600; font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  line-height: 1.35; max-width: 760px;
  padding-left: 1.25rem; border-left: 4px solid var(--yellow);
}

/* Surveys */
.survey__intro { max-width: 760px; }
.pulse-form {
  margin-top: 2.5rem; max-width: 760px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden;
}
.pulse-form iframe { display: block; width: 100%; border: 0; }
.pulse-form iframe.pulse-form__frame--viewport { height: min(85vh, 1100px); min-height: 600px; }
.pulse-form__bar {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: .8rem 1.2rem; background: var(--mist); border-bottom: 1px solid var(--line);
  font-family: var(--font-head); font-size: .95rem;
}
.pulse-form__close {
  border: 0; background: none; color: var(--ink-soft); cursor: pointer;
  font-family: var(--font-head); font-size: .95rem; padding: .3rem .5rem; border-radius: 6px;
}
.pulse-form__close:hover { color: var(--red); }
.pulse-form__empty { padding: 2rem 1.5rem; color: var(--ink-soft); margin: 0; }
.pulse-form__loading { padding: 2rem 1.5rem; color: var(--muted); }

/* =========================================================
   ABOUT
   ========================================================= */
.about { border-top: 1px solid var(--line); }
.about__hero {
  display: grid; grid-template-columns: 200px 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center;
  padding-bottom: clamp(2.5rem, 5vw, 4rem); margin-bottom: clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--line);
}
.about__hero img { width: 200px; }
.about__hero .h1 { margin-bottom: 1rem; }
.about__hero .lead { max-width: 40ch; color: var(--ink-soft); margin: 0; }

.about__grid { display: grid; grid-template-columns: 230px 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.about__toc {
  position: sticky; top: calc(var(--header-h) + 1.5rem);
  display: flex; flex-direction: column; gap: .15rem;
  border-left: 2px solid var(--line);
}
.about__toc-title { font-family: var(--font-head); font-weight: 600; font-size: .95rem; color: var(--ink); margin: 0 0 .6rem 1rem; }
.about__toc a {
  font-size: .98rem; color: var(--ink-soft); text-decoration: none;
  padding: .3rem 0 .3rem 1rem; margin-left: -2px; border-left: 2px solid transparent;
}
.about__toc a:hover { color: var(--ink); }
.about__toc a.is-active { color: var(--red); border-left-color: var(--red); font-weight: 600; }

.block { padding-bottom: clamp(2.5rem, 5vw, 3.5rem); margin-bottom: clamp(2.5rem, 5vw, 3.5rem); border-bottom: 1px solid var(--line); }
.block:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }

.mv { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.mv__item { padding: clamp(1.5rem, 3vw, 2.25rem); border-radius: var(--radius-lg); color: #fff; }
.mv__item .h3 { color: #fff; margin-bottom: .75rem; }
.mv__item p { margin: 0; font-family: var(--font-head); font-weight: 300; font-size: 1.15rem; line-height: 1.55; }
.mv__item--red { background: var(--red); }
.mv__item--blue { background: var(--blue); }

.checklist { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: .9rem 2rem; }
.checklist li { position: relative; padding-left: 2rem; color: var(--ink-soft); }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .32em; width: 18px; height: 18px; border-radius: 50%;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat;
}

.audience { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.audience__item { padding: 1.5rem; background: var(--mist); border-radius: var(--radius); }
.audience__item h4 { font-size: 1.1rem; font-weight: 600; margin-bottom: .4rem; }
.audience__item p { margin: 0; color: var(--ink-soft); font-size: 1.02rem; }

.tags { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0 1.5rem; }
.tags li {
  font-family: var(--font-head); font-size: .92rem; font-weight: 500;
  padding: .4rem .95rem; border-radius: 999px;
  background: rgba(11, 78, 162, .08); color: var(--blue);
}

.timeline { list-style: none; counter-reset: stage; display: grid; gap: .6rem; max-width: 560px; }
.timeline li {
  counter-increment: stage;
  display: flex; align-items: center; gap: 1rem;
  padding: .85rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius);
  font-family: var(--font-head); font-size: 1rem;
}
.timeline li::before {
  content: counter(stage); flex: none;
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--mist); color: var(--ink-soft); font-weight: 600; font-size: .9rem;
}
.timeline li span { flex: 1; }
.timeline li em {
  font-style: normal; font-size: .82rem; font-weight: 600;
  color: var(--green); background: rgba(10, 138, 67, .1); padding: .2rem .6rem; border-radius: 999px;
}
.timeline li.is-current { border-color: rgba(10, 138, 67, .4); }
.timeline li.is-current::before { background: var(--green); color: #fff; }

.tnf {
  display: grid; grid-template-columns: 200px 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start;
  background: var(--mist); border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 4vw, 3rem); border-bottom: 0;
  border-top: 4px solid var(--tnf-green);
}
.tnf__logo { width: 200px; }
.tnf .btn { margin-top: .5rem; }

/* =========================================================
   CTA
   ========================================================= */
.cta {
  position: relative; overflow: hidden;
  background: var(--red); color: #fff; text-align: center;
  padding: clamp(4.5rem, 10vw, 7.5rem) 0 clamp(7rem, 13vw, 9.5rem);
}
.cta__ecg {
  position: absolute; left: 0; right: 0; bottom: 1.5rem; width: 100%; height: 90px;
  opacity: .18; pointer-events: none;
}
.cta__ecg path { fill: none; stroke: #fff; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.cta__inner { position: relative; max-width: 820px; }
.cta .h1 { color: #fff; margin-bottom: 1.25rem; }
.cta__text { color: rgba(255,255,255,.9); font-size: clamp(1.1rem, 1.8vw, 1.25rem); max-width: 62ch; margin-left: auto; margin-right: auto; }
.cta__text strong { color: #fff; }

/* Help notice */
.help-note { background: #FFF8E6; border-top: 1px solid #F3E2AE; border-bottom: 1px solid #F3E2AE; }
.help-note__inner { display: flex; gap: 1rem; align-items: flex-start; padding-top: 1.25rem; padding-bottom: 1.25rem; }
.help-note svg { width: 24px; height: 24px; flex: none; margin-top: .15rem; fill: none; stroke: #9A6B00; stroke-width: 2; stroke-linecap: round; }
.help-note p { margin: 0; font-size: 1.02rem; color: #4D3A06; }
.help-note a { color: #4D3A06; font-weight: 700; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer { background: var(--paper); border-top: 1px solid var(--line); }
.footer__grid {
  display: grid; grid-template-columns: 1.2fr 1.5fr 1fr; gap: 2rem; align-items: center;
  padding-top: clamp(2.5rem, 5vw, 3.5rem); padding-bottom: 2rem;
}
.brand--footer img { width: 56px; }
.footer__tag { margin: .75rem 0 0; color: var(--muted); font-size: .98rem; }
.footer__nav { display: flex; flex-direction: column; gap: .6rem; }
.footer__links { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; }
.footer__nav .footer__links--legal a { color: var(--muted); font-size: .92rem; }
.footer__nav a { color: var(--ink); text-decoration: none; font-family: var(--font-head); font-size: .98rem; }
.footer__nav a:hover { color: var(--red); }
.footer__tnf { justify-self: end; display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; text-decoration: none; color: var(--muted); font-size: .9rem; }
.footer__tnf img { width: 150px; }
.footer__legal { border-top: 1px solid var(--line); padding-top: 1.25rem; padding-bottom: 1.5rem; }
.footer__legal p { margin: 0; color: var(--muted); font-size: .92rem; }

/* Back to top */
.to-top {
  position: fixed; right: 1.25rem; bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px)); z-index: 90;
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: var(--red); box-shadow: 0 6px 18px rgba(211, 17, 28, .35);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top svg { width: 22px; fill: none; stroke: #fff; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.to-top:hover { background: var(--red-deep); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1100px) {
  .header-tnf { display: none; }
}

@media (max-width: 960px) {
  .hero__body, .split, .duo, .emis { grid-template-columns: 1fr; }
  .split__head .h2 { position: static; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 2rem 1.25rem; }
  .steps::before { display: none; }
  .about__grid { grid-template-columns: 1fr; }
  .about__toc { display: none; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__tnf { grid-column: 1 / -1; justify-self: start; align-items: flex-start; }
}

@media (max-width: 860px) {
  .menu-toggle { display: flex; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: .25rem;
    background: var(--paper); padding: 1rem var(--gutter) 1.5rem;
    border-bottom: 1px solid var(--line); box-shadow: 0 16px 30px rgba(20, 33, 61, .1);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav__link { padding: .85rem .5rem; font-size: 1.1rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav__link.is-active::after { display: none; }
  .nav__cta { margin: 1rem 0 0; }
}

@media (max-width: 640px) {
  body { font-size: 1.0625rem; }
  .hero__banner { padding-left: 0; padding-right: 0; padding-top: 0; }
  .hero__banner img { border-radius: 0; }
  .features, .steps, .trust__list, .mv, .checklist, .audience { grid-template-columns: 1fr; }
  .mock__body { grid-template-columns: 1fr; }
  .mock__side { display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); gap: .25rem; }
  .mock__side li { white-space: nowrap; }
  .mock__side li.is-active { box-shadow: inset 0 -3px 0 var(--red); }
  .about__hero, .tnf { grid-template-columns: 1fr; }
  .about__hero img { width: 150px; }
  .tnf__logo { width: 170px; }
  .footer__grid { grid-template-columns: 1fr; }
  .btn-row .btn { flex: 1 1 100%; }
  .pulse-form { margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1); border-radius: 0; border-left: 0; border-right: 0; }
}


/* =========================================================
   V2 ADDITIONS: About page, Meet Tyler, Test page callout
   ========================================================= */

/* Header nav: test page button */
.nav__cta--test { background: var(--blue); }
.nav__cta--test:hover { background: #083c7d; }

/* About page header */
.page-hero { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2.5rem, 5vw, 3.5rem); border-bottom: 1px solid var(--line); }
.page-hero__grid { display: grid; grid-template-columns: 1fr 220px; gap: clamp(1.5rem, 5vw, 4rem); align-items: center; }
.page-hero__crumb { font-family: var(--font-head); font-size: .95rem; color: var(--muted); margin-bottom: .75rem; }
.page-hero__crumb a { color: var(--muted); text-decoration: none; }
.page-hero__crumb a:hover { color: var(--red); }
.page-hero .h1 { margin-bottom: 1rem; }
.page-hero .lead { max-width: 44ch; color: var(--ink-soft); margin: 0; }
.page-hero__logo { width: 220px; justify-self: end; }

/* Protected photo (no right-click save, no drag, no hover title) */
.photo {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  aspect-ratio: 4 / 5; background-color: var(--mist);
  background-size: cover; background-position: center top; background-repeat: no-repeat;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.photo::after { content: ""; position: absolute; inset: 0; } /* transparent shield over the image */

/* Meet Tyler (About page) */
.tyler { display: grid; grid-template-columns: minmax(260px, 400px) 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.tyler__media { position: sticky; top: calc(var(--header-h) + 2rem); }
.tyler__media .photo { box-shadow: var(--shadow); }
.tyler__stripe { display: flex; height: 6px; margin-top: 1rem; border-radius: 6px; overflow: hidden; }
.tyler__stripe i { flex: 1; }
.tyler__stripe i:nth-child(1) { background: var(--blue); }
.tyler__stripe i:nth-child(2) { background: var(--yellow); }
.tyler__stripe i:nth-child(3) { background: var(--red); }
.tyler__stripe i:nth-child(4) { background: var(--green); }
.tyler__name { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -.03em; margin-bottom: .4rem; }
.tyler__role { font-family: var(--font-head); color: var(--red); font-weight: 500; font-size: 1.1rem; margin-bottom: 1.75rem; }
.tyler__facts { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 2rem 0; }
.tyler__facts li { background: var(--paper); padding: 1.1rem 1.2rem; }
.tyler__facts strong { display: block; font-family: var(--font-head); font-size: 1.02rem; color: var(--ink); margin-bottom: .2rem; }
.tyler__facts span { font-size: .98rem; color: var(--ink-soft); line-height: 1.45; display: block; }

/* Meet Tyler teaser (Home page) */
.founder { display: grid; grid-template-columns: 180px 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; max-width: 920px; }
.founder .photo { aspect-ratio: 1 / 1; border-radius: 50%; border: 5px solid var(--paper); box-shadow: 0 0 0 2px var(--red); }
.founder .h2 { margin-bottom: .75rem; }
.founder p { color: var(--ink-soft); max-width: 60ch; }
.founder .btn-row { margin-top: 1rem; }

/* Test page callout */
.testdrive {
  display: grid; grid-template-columns: 1fr auto; gap: 1.5rem 3rem; align-items: center;
  background: var(--blue); color: #fff; border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 4vw, 2.75rem); position: relative; overflow: hidden;
}
.testdrive::before {
  content: ""; position: absolute; right: -40px; top: -40px; width: 220px; height: 220px; border-radius: 50%;
  border: 30px solid rgba(247, 201, 72, .22);
}
.testdrive h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; margin-bottom: .5rem; }
.testdrive p { margin: 0; color: rgba(255,255,255,.85); max-width: 56ch; }
.testdrive .btn { position: relative; }
.btn--yellow { background: var(--yellow); color: var(--ink); }
.btn--yellow:hover { background: #fff; color: var(--blue); }

/* Home: link to the full About page */
.more-link { margin-top: 2rem; }

@media (max-width: 960px) {
  .tyler { grid-template-columns: 1fr; }
  .tyler__media { position: static; max-width: 380px; }
  .tyler__facts { grid-template-columns: 1fr; }
  .testdrive { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .page-hero__grid { grid-template-columns: 1fr; }
  .page-hero__logo { width: 140px; justify-self: start; order: -1; }
  .founder { grid-template-columns: 1fr; }
  .founder .photo { width: 150px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .loader__ecg path { stroke-dashoffset: 0; }
  .loader__ribbon i { transform: none; }
}

/* Print */
@media print {
  .loader, .site-header, .to-top, .cta .btn-row, .pulse-form, .btn { display: none !important; }
  .section--ink, .cta, .mv__item { background: #fff !important; color: #000 !important; }
}
.section--tight { padding: clamp(2rem, 4vw, 3rem) 0; }
.section--rule { border-top: 1px solid var(--line); }
