/* ============================================================
   Responsible Gaming Corporation — responsiblegaming.ca
   ============================================================ */

/* --- Design tokens ---------------------------------------- */
:root {
  /* Brand */
  --ink:        #0B1A2E;   /* deep navy — primary dark */
  --ink-2:      #12263F;   /* raised dark surface */
  --ink-3:      #1C3550;   /* hairlines on dark */
  --accent:     #1B8A6B;   /* jade */
  --accent-2:   #3FBF98;   /* jade, light — for dark bgs */
  --accent-ink: #10634C;   /* jade, pressed */

  /* Neutrals */
  --paper:      #FBFAF8;   /* warm off-white page */
  --paper-2:    #F4F2EE;   /* alternating band */
  --white:      #FFFFFF;
  --text:       #17253A;
  --text-mute:  #5A6B80;
  --text-faint: #8494A6;
  --line:       #E3E0D9;

  /* Type */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  --font-display: "Instrument Serif", "Iowan Old Style", "Palatino Linotype",
                  Georgia, "Times New Roman", serif;

  /* Rhythm */
  --wrap:       1180px;
  --gutter:     clamp(20px, 5vw, 48px);
  --section-y:  clamp(76px, 9vw, 132px);
  --radius:     14px;
  --radius-lg:  22px;

  --shadow-sm:  0 1px 2px rgba(11, 26, 46, .06),
                0 4px 14px rgba(11, 26, 46, .05);
  --shadow-md:  0 2px 4px rgba(11, 26, 46, .05),
                0 16px 44px rgba(11, 26, 46, .10);

  --ease: cubic-bezier(.22, .68, .26, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

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

img, svg { display: block; max-width: 100%; }
a { color: inherit; }

/* An author `display` beats the UA stylesheet's [hidden] rule, so restate it —
   otherwise `el.hidden = true` silently does nothing to any flex/grid element. */
[hidden] { display: none !important; }

h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.15; }
p  { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; }
li { list-style: none; }

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

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--ink);
  color: #fff;
  border-radius: 0 0 8px 8px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: top .2s var(--ease);
}
.skip:focus { top: 0; }

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

/* --- Shared type patterns --------------------------------- */
.eyebrow {
  margin-bottom: 18px;
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.eyebrow-light { color: var(--accent-2); }

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 3.7vw, 3rem);
  line-height: 1.1;
  letter-spacing: -.01em;
  text-wrap: balance;
}

.section-lede {
  margin-top: 22px;
  max-width: 62ch;
  color: var(--text-mute);
  font-size: 1.075rem;
}

.lede {
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--text);
}

/* --- Buttons ---------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: 14px 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: inherit;
  font-size: .96rem;
  font-weight: 500;
  letter-spacing: .01em;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease),
              border-color .2s var(--ease), transform .2s var(--ease),
              box-shadow .2s var(--ease);
}
.btn-sm { padding: 9px 18px; font-size: .9rem; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 2px rgba(11,26,46,.14), 0 8px 22px rgba(27,138,107,.24);
}
.btn-primary:hover {
  background: var(--accent-ink);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(11,26,46,.16), 0 12px 28px rgba(27,138,107,.3);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  border-color: rgba(255,255,255,.28);
  color: #fff;
}
.btn-ghost:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.5);
}

/* --- Header ----------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background .3s var(--ease), box-shadow .3s var(--ease),
              border-color .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(251, 250, 248, .86);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom-color: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 78px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  transition: color .3s var(--ease);
}
.site-header.is-scrolled .brand { color: var(--ink); }

.brand-mark { width: 34px; height: 34px; flex: none; color: var(--accent-2); }
.site-header.is-scrolled .brand-mark { color: var(--accent); }

.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: .04em;
}
.brand-sub {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .11em;
  text-transform: uppercase;
  opacity: .62;
}

.nav { display: flex; align-items: center; gap: 34px; }
.nav-list { display: flex; align-items: center; gap: 30px; }

.nav-list a {
  position: relative;
  color: rgba(255,255,255,.82);
  font-size: .95rem;
  font-weight: 500;
  text-decoration: none;
  padding-block: 6px;
  transition: color .2s var(--ease);
}
.site-header.is-scrolled .nav-list a { color: var(--text-mute); }

.nav-list a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .28s var(--ease);
}
.nav-list a:hover { color: #fff; }
.site-header.is-scrolled .nav-list a:hover { color: var(--ink); }
.nav-list a:hover::after,
.nav-list a.is-active::after { transform: scaleX(1); }
.nav-list a.is-active { color: #fff; }
.site-header.is-scrolled .nav-list a.is-active { color: var(--accent); }

/* Mobile toggle */
.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  padding: 0;
  background: none;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 18px; height: 1.6px;
  margin: 3.6px auto;
  background: #fff;
  border-radius: 2px;
  transition: transform .25s var(--ease), opacity .2s var(--ease);
}
.site-header.is-scrolled .nav-toggle { border-color: var(--line); }
.site-header.is-scrolled .nav-toggle span { background: var(--ink); }

/* --- Hero ------------------------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  background: var(--ink);
  color: #fff;
  overflow: hidden;
  padding-top: clamp(140px, 17vw, 190px);
  padding-bottom: clamp(76px, 10vw, 120px);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 55% at 78% 8%,  rgba(63,191,152,.22), transparent 62%),
    radial-gradient(52% 60% at 8%  92%, rgba(38,110,170,.24), transparent 66%),
    linear-gradient(168deg, #0D2038 0%, #0B1A2E 52%, #091524 100%);
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(72% 68% at 50% 26%, #000 12%, transparent 78%);
  mask-image: radial-gradient(72% 68% at 50% 26%, #000 12%, transparent 78%);
}

.hero-inner { position: relative; }

.hero-title {
  max-width: 20ch;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.7rem, 6.6vw, 4.9rem);
  line-height: 1.02;
  letter-spacing: -.018em;
  text-wrap: balance;
}
.hero-title em {
  font-style: italic;
  color: var(--accent-2);
}

.hero-lede {
  margin-top: 28px;
  max-width: 60ch;
  color: rgba(255,255,255,.76);
  font-size: clamp(1.03rem, 1.4vw, 1.16rem);
  line-height: 1.66;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 42px;
}

.jurisdictions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  margin-top: clamp(56px, 8vw, 84px);
  padding-top: 30px;
  border-top: 1px solid rgba(255,255,255,.12);
}
.jurisdictions-label {
  color: rgba(255,255,255,.5);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.jurisdictions-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
}
.jurisdictions-list li {
  padding: 6px 15px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  background: rgba(255,255,255,.045);
  color: rgba(255,255,255,.86);
  font-size: .86rem;
  font-weight: 500;
  letter-spacing: .04em;
}

/* --- Sections --------------------------------------------- */
.section { padding-block: var(--section-y); }
.section-alt {
  background: var(--paper-2);
  border-block: 1px solid var(--line);
}
.section-head { max-width: 74ch; margin-bottom: clamp(48px, 6vw, 72px); }

/* --- About ------------------------------------------------ */
.about-grid {
  display: grid;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.about-head { position: sticky; top: 118px; }
.about-body { display: grid; gap: 20px; color: var(--text-mute); }
.about-body .lede { color: var(--text); }

@media (min-width: 920px) {
  .about-grid { grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); }
}

.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1px;
  margin-top: clamp(56px, 7vw, 88px);
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.pillars li {
  padding: 32px 28px;
  background: var(--white);
}
.pillar-icon {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  margin-bottom: 18px;
  border-radius: 11px;
  background: rgba(27,138,107,.09);
  color: var(--accent);
}
.pillar-icon svg {
  width: 21px; height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pillars h3 { font-size: 1.02rem; margin-bottom: 7px; }
.pillars p { color: var(--text-mute); font-size: .93rem; line-height: 1.58; }

/* --- Service cards ---------------------------------------- */
.cards {
  display: grid;
  gap: clamp(18px, 2vw, 26px);
  grid-template-columns: 1fr;
}
@media (min-width: 720px)  { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .cards { grid-template-columns: repeat(3, 1fr); } }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 34px 30px 32px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease),
              border-color .3s var(--ease);
}
.card::before {
  content: "";
  position: absolute;
  inset: -1px -1px auto -1px;
  height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  border-color: #D6D2C9;
  box-shadow: var(--shadow-md);
}
.card:hover::before { opacity: 1; }

.card-num {
  position: absolute;
  top: 28px; right: 28px;
  color: var(--text-faint);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .1em;
  opacity: .7;
}

.card-icon {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  margin-bottom: 22px;
  border-radius: 13px;
  background: linear-gradient(150deg, rgba(27,138,107,.12), rgba(63,191,152,.08));
  color: var(--accent);
}
.card-icon svg {
  width: 23px; height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card-title {
  font-size: 1.2rem;
  letter-spacing: -.005em;
  margin-bottom: 12px;
  padding-right: 34px;
  text-wrap: balance;
}
.card-blurb {
  color: var(--text-mute);
  font-size: .955rem;
  line-height: 1.62;
}

.ticks {
  display: grid;
  gap: 11px;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.ticks li {
  position: relative;
  padding-left: 26px;
  font-size: .915rem;
  line-height: 1.55;
  color: var(--text);
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0; top: .42em;
  width: 14px; height: 9px;
  border: solid var(--accent);
  border-width: 0 0 1.9px 1.9px;
  border-radius: 0 0 0 2px;
  transform: rotate(-45deg);
}

/* Closing CTA panel — fills the services grid's last row.
   Spans 2 columns at 3-up, 1 column at 2-up, so the grid never ends ragged. */
.card-cta {
  justify-content: center;
  align-items: flex-start;
  gap: 16px;
  background:
    radial-gradient(70% 120% at 92% 6%, rgba(63,191,152,.20), transparent 60%),
    linear-gradient(158deg, #12263F 0%, #0B1A2E 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--shadow-md);
}
.card-cta:hover { transform: none; border-color: transparent; }
.card-cta::before { display: none; }

.card-cta-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1.12;
  letter-spacing: -.01em;
}
.card-cta-copy {
  max-width: 46ch;
  color: rgba(255,255,255,.72);
  font-size: .97rem;
  line-height: 1.62;
}
.card-cta .btn { margin-top: 6px; }

@media (min-width: 1080px) {
  .card-cta { grid-column: span 2; padding: 42px 40px; }
}

/* --- Why RGC ---------------------------------------------- */
.why-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}
.why-list li {
  display: grid;
  gap: 8px 40px;
  padding-block: clamp(28px, 3.6vw, 42px);
  border-bottom: 1px solid var(--line);
}
.why-num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--accent);
  line-height: 1;
}
.why-list h3 {
  font-size: clamp(1.16rem, 1.9vw, 1.45rem);
  letter-spacing: -.005em;
}
.why-list p {
  color: var(--text-mute);
  max-width: 68ch;
}

@media (min-width: 860px) {
  .why-list li {
    grid-template-columns: 64px minmax(0, .92fr) minmax(0, 1.08fr);
    align-items: baseline;
  }
}

/* --- Community & Impact ----------------------------------- */
.impact {
  position: relative;
  isolation: isolate;
  padding-block: clamp(72px, 9vw, 116px);
  background: var(--ink-2);
  color: #fff;
  overflow: hidden;
}
.impact::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(48% 70% at 88% 20%, rgba(63,191,152,.20), transparent 64%),
    radial-gradient(46% 66% at 4% 96%, rgba(38,110,170,.20), transparent 68%);
}
.impact-inner { max-width: 78ch; }
.impact-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.8rem, 3.4vw, 2.7rem);
  line-height: 1.14;
  letter-spacing: -.01em;
  text-wrap: balance;
}
.impact-copy {
  margin-top: 22px;
  max-width: 64ch;
  color: rgba(255,255,255,.75);
  font-size: 1.06rem;
  line-height: 1.68;
}

/* --- Contact ---------------------------------------------- */
.contact-grid {
  display: grid;
  gap: clamp(40px, 5vw, 68px);
  align-items: start;
}
@media (min-width: 940px) {
  .contact-grid { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); }
}

.contact-details {
  display: grid;
  gap: 26px;
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}
@media (min-width: 560px) {
  .contact-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.contact-details dt {
  color: var(--text-faint);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.contact-details dd { font-size: 1.02rem; }
.contact-details a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(27,138,107,.32);
  padding-bottom: 1px;
  transition: border-color .2s var(--ease);
}
.contact-details a:hover { border-bottom-color: var(--accent); }

.contact-form-wrap {
  padding: clamp(26px, 3.4vw, 40px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.contact-form {
  display: grid;
  gap: 20px;
}
@media (min-width: 560px) {
  .contact-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field-full { grid-column: 1 / -1; }
}

.field { display: grid; gap: 7px; }
.field label {
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-mute);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: .97rem;
  color: var(--text);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease),
              background .2s var(--ease);
}
.field textarea { resize: vertical; min-height: 112px; line-height: 1.55; }
.field select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%235A6B80' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px;
  padding-right: 38px;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  background: var(--white);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(27,138,107,.13);
}
.field input:user-invalid,
.field textarea:user-invalid {
  border-color: #C4553F;
  box-shadow: 0 0 0 3px rgba(196,85,63,.11);
}

.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 20px;
  margin-top: 4px;
}
.form-note {
  font-size: .875rem;
  color: var(--text-mute);
  max-width: 34ch;
}
.form-note.is-error { color: #B44B36; }
.form-note.is-ok { color: var(--accent-ink); }

.btn:disabled { opacity: .6; cursor: progress; box-shadow: none; transform: none; }

/* Honeypot — off-canvas rather than display:none, which some bots skip. */
.honeypot {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.form-success { text-align: center; padding: 20px 4px 12px; }
.form-success:focus { outline: none; }
.form-success-icon {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: rgba(27,138,107,.11);
  color: var(--accent);
}
.form-success-icon svg {
  width: 26px; height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.form-success h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  line-height: 1.16;
  margin-bottom: 12px;
}
.form-success p {
  max-width: 42ch;
  margin-inline: auto;
  color: var(--text-mute);
  font-size: .97rem;
}
.form-success a { color: var(--accent); text-decoration: none; border-bottom: 1px solid rgba(27,138,107,.32); }
.form-success a:hover { border-bottom-color: var(--accent); }

/* --- Footer ----------------------------------------------- */
.site-footer {
  padding-top: clamp(52px, 6vw, 72px);
  padding-bottom: 34px;
  background: var(--ink);
  color: rgba(255,255,255,.72);
  font-size: .93rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 34px 48px;
  padding-bottom: 38px;
}
.footer-brand { display: flex; align-items: flex-start; gap: 14px; }
.footer-brand .brand-mark { width: 32px; height: 32px; color: var(--accent-2); }
.footer-name {
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.24rem;
  letter-spacing: .01em;
  line-height: 1.2;
}
.footer-tag { margin-top: 5px; color: rgba(255,255,255,.55); font-size: .9rem; }

.footer-nav { display: flex; flex-wrap: wrap; gap: 14px 28px; }
.footer-nav a {
  color: rgba(255,255,255,.72);
  text-decoration: none;
  transition: color .2s var(--ease);
}
.footer-nav a:hover { color: #fff; }

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 26px;
  border-top: 1px solid var(--ink-3);
  color: rgba(255,255,255,.45);
  font-size: .84rem;
}
.footer-legal a { color: inherit; text-decoration: none; }
.footer-legal a:hover { color: rgba(255,255,255,.8); }

/* --- Scroll reveal ----------------------------------------
   Gated behind .js-reveal, which main.js stamps on <html> before first
   paint. Without JS the content is simply visible — it is never hidden
   by a state we can't undo. */
.js-reveal .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.js-reveal .reveal.is-in { opacity: 1; transform: none; }
.js-reveal .cards .reveal,
.js-reveal .why-list .reveal { transition-delay: var(--d, 0ms); }

/* ============================================================
   Mobile navigation
   ============================================================ */
@media (max-width: 900px) {
  .nav-toggle { display: block; }

  /* The panel is a later sibling, so lift the brand and toggle above it. */
  .brand, .nav-toggle { position: relative; z-index: 2; }

  .nav {
    position: fixed;
    inset: 0;
    z-index: 1;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 100px var(--gutter) 40px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--ink);
    transform: translateY(-100%);
    visibility: hidden;
    transition: transform .38s var(--ease), visibility .38s var(--ease);
  }
  .nav.is-open { transform: none; visibility: visible; }

  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-list a {
    display: block;
    padding: 17px 2px;
    border-bottom: 1px solid var(--ink-3);
    color: rgba(255,255,255,.85) !important;
    font-size: 1.08rem;
  }
  .nav-list a::after { display: none; }

  .nav-cta { align-self: flex-start; margin-top: 26px; padding: 13px 24px; }

  /* keep header controls light while the panel is open */
  body.nav-open .site-header { background: transparent; border-bottom-color: transparent; }
  body.nav-open .site-header .brand,
  body.nav-open .site-header .brand-mark { color: #fff; }
  body.nav-open .site-header .brand-mark { color: var(--accent-2); }
  body.nav-open .nav-toggle { border-color: rgba(255,255,255,.3); }
  body.nav-open .nav-toggle span { background: #fff; }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(5.2px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-5.2px) rotate(-45deg); }

  body.nav-open { overflow: hidden; }

  .about-head { position: static; }
}

/* ============================================================
   Preferences / print
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  .js-reveal .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .nav, .hero-actions, .contact-form-wrap { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .hero, .impact, .site-footer { background: #fff !important; color: #000 !important; }
  .hero-bg, .impact::before { display: none; }
  .hero-title em { color: #000; }
  .hero-lede, .impact-copy, .footer-tag, .footer-legal { color: #333 !important; }
  .card { break-inside: avoid; box-shadow: none; }
  .js-reveal .reveal { opacity: 1 !important; transform: none !important; }
}
