/* ============================================================
   Rally Public Affairs — "The Beacon"
   Ink-midnight base · ember signal · serif heritage + mono signal
   ============================================================ */

:root {
  --ink:       #0b1a2a;
  --ink-900:   #07111d;
  --ink-800:   #0e2336;
  --ink-700:   #16314b;
  --ember:     #e68a2e;
  --ember-2:   #f4a949;
  --ember-soft: rgba(230, 138, 46, 0.16);
  --paper:     #ecede8;
  --paper-2:   #e3e4dc;
  --text-paper:#15202b;
  --slate:     #54616e;
  --mist:      #a4b5c5;
  --mist-dim:  #6f8499;
  --line-d:    rgba(255, 255, 255, 0.09);
  --line-l:    rgba(11, 26, 42, 0.13);

  --display: "Fraunces", Georgia, serif;
  --body:    "Inter", system-ui, sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, monospace;

  --gutter: clamp(1.25rem, 5vw, 6rem);
  --maxw: 1240px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--body);
  background: var(--ink);
  color: var(--mist);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.skip {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--ember); color: var(--ink-900); padding: .6rem 1rem;
  font: 500 .85rem/1 var(--mono); border-radius: 0 0 6px 0;
}
.skip:focus { left: 0; }

a { color: inherit; text-decoration: none; }
em { font-style: italic; }

/* Shared eyebrow / section tags ----------------------------- */
.eyebrow {
  font: 500 .72rem/1 var(--mono);
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--ember-2);
  display: inline-flex; align-items: center; gap: .6rem;
}
.eyebrow.center { justify-content: center; }
.eyebrow-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 0 0 var(--ember);
  animation: ping 2.6s ease-out infinite;
}
@keyframes ping {
  0%   { box-shadow: 0 0 0 0 rgba(230,138,46,.55); }
  70%  { box-shadow: 0 0 0 9px rgba(230,138,46,0); }
  100% { box-shadow: 0 0 0 0 rgba(230,138,46,0); }
}

.section-tag {
  font: 500 .72rem/1 var(--mono);
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--mist-dim);
}
.section-tag.light { color: var(--mist-dim); }
.section-tag.dark  { color: var(--slate); }

.h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.9rem, 4.4vw, 3.1rem);
  line-height: 1.04;
  letter-spacing: -.015em;
  color: #f4f6f8;
}
.h2.dark { color: var(--text-paper); }
.h2 em { color: var(--ember-2); font-style: italic; }
.h2.dark em { color: var(--ember); }

/* ============================================================
   Nav
   ============================================================ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem var(--gutter);
  background: rgba(8, 17, 29, 0.55);
  backdrop-filter: blur(14px) saturate(120%);
  border-bottom: 1px solid var(--line-d);
}
.brand { display: flex; align-items: baseline; gap: .55rem; }
.brand-mark {
  width: 11px; height: 11px; border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, var(--ember-2), var(--ember) 55%, #b3641a);
  box-shadow: 0 0 14px 1px rgba(230,138,46,.7);
  align-self: center;
}
.brand-word {
  font: 600 1.12rem/1 var(--display);
  letter-spacing: .02em; color: #fff;
}
.brand-sub {
  font: 400 .66rem/1 var(--mono);
  letter-spacing: .2em; text-transform: uppercase; color: var(--mist-dim);
}
.nav-links { display: flex; gap: 2rem; }
.nav-links a {
  font: 450 .9rem/1 var(--body); color: var(--mist);
  position: relative; padding: .2rem 0; transition: color .2s;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -3px;
  width: 0; height: 1.5px; background: var(--ember);
  transition: width .25s ease;
}
.nav-links a:hover { color: #fff; }
.nav-links a:hover::after { width: 100%; }

.nav-call {
  display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
  padding: .45rem .9rem; border: 1px solid var(--line-d); border-radius: 9px;
  transition: border-color .2s, background .2s;
}
.nav-call:hover { border-color: rgba(230,138,46,.5); background: var(--ember-soft); }
.nav-call-label { font: 500 .58rem/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--mist-dim); }
.nav-call-num { font: 500 .92rem/1 var(--mono); color: #fff; letter-spacing: .02em; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 8rem var(--gutter) 0;
  background:
    radial-gradient(120% 90% at 78% 28%, rgba(230,138,46,.10), transparent 55%),
    linear-gradient(180deg, var(--ink-900), var(--ink) 40%);
  overflow: hidden;
}
.beacon {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}
.hero-grid { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; width: 100%; }
.hero-copy { max-width: 46rem; }

.hero-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.7rem, 7.5vw, 6rem);
  line-height: 0.99;
  letter-spacing: -.03em;
  color: #fbfcfd;
  margin: 1.6rem 0 1.5rem;
}
.hero-title em { color: var(--ember); font-style: italic; }

.hero-lede {
  font-size: clamp(1.02rem, 1.7vw, 1.22rem);
  color: var(--mist); max-width: 36rem; line-height: 1.62;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2.2rem; }

.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  font: 500 .96rem/1 var(--body);
  padding: .92rem 1.5rem; border-radius: 11px;
  transition: transform .15s ease, box-shadow .25s ease, background .2s, border-color .2s;
}
.btn:active { transform: translateY(1px); }
.btn-ember {
  background: linear-gradient(180deg, var(--ember-2), var(--ember));
  color: #2a1402; font-weight: 600;
  box-shadow: 0 8px 28px -8px rgba(230,138,46,.6), inset 0 1px 0 rgba(255,255,255,.35);
}
.btn-ember:hover { box-shadow: 0 12px 34px -8px rgba(230,138,46,.75); transform: translateY(-1px); }
.btn-ghost { border: 1px solid var(--line-d); color: #e9eef3; }
.btn-ghost:hover { border-color: rgba(230,138,46,.5); background: var(--ember-soft); }

/* Signal log */
.signal-log {
  position: relative; z-index: 2;
  list-style: none;
  max-width: var(--maxw); margin: clamp(3rem, 7vh, 5.5rem) auto 2.4rem;
  width: 100%;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border-top: 1px solid var(--line-d);
}
.signal-log li {
  font: 400 .82rem/1.45 var(--mono);
  color: var(--mist); padding: 1rem 1.3rem 1rem 0;
  border-right: 1px solid var(--line-d);
}
.signal-log li:last-child { border-right: none; }
.sl-k { display: block; color: var(--ember-2); letter-spacing: .12em; text-transform: uppercase; font-size: .66rem; margin-bottom: .4rem; }

/* ============================================================
   Thesis
   ============================================================ */
.thesis {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(5rem, 12vh, 9rem) var(--gutter);
}
.thesis .section-tag { display: block; margin-bottom: 2rem; }
.thesis-statement {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.5rem, 3.4vw, 2.5rem);
  line-height: 1.28; letter-spacing: -.01em;
  color: #e8edf1; max-width: 30ch + 8rem; max-width: 56rem;
}
.thesis-statement em { color: var(--ember-2); font-style: italic; }

/* ============================================================
   Capabilities
   ============================================================ */
.caps {
  background: var(--ink-900);
  border-top: 1px solid var(--line-d);
  padding: clamp(4.5rem, 11vh, 8rem) var(--gutter);
}
.caps-head { max-width: var(--maxw); margin: 0 auto 3rem; }
.caps-head .section-tag { display: block; margin-bottom: 1.1rem; }
.caps-grid {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line-d);
  border: 1px solid var(--line-d);
  border-radius: 16px; overflow: hidden;
}
.cap {
  background: var(--ink-800);
  padding: 2rem 1.9rem 2.2rem;
  transition: background .25s ease, transform .25s ease;
  position: relative;
}
.cap:hover { background: var(--ink-700); }
.cap-no {
  font: 500 .72rem/1 var(--mono); color: var(--ember); letter-spacing: .1em;
}
.cap h3 {
  font-family: var(--display); font-weight: 500; font-size: 1.32rem;
  line-height: 1.15; color: #f3f6f8; margin: 1.1rem 0 .7rem;
  letter-spacing: -.01em;
}
.cap p { font-size: .96rem; color: var(--mist); line-height: 1.6; }

/* ============================================================
   Principal — the one light section
   ============================================================ */
.principal {
  background: var(--paper);
  color: var(--text-paper);
  padding: clamp(4.5rem, 11vh, 8.5rem) var(--gutter);
}
.principal-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 300px 1fr; gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: start;
}
.principal-aside { position: sticky; top: 6.5rem; }
.principal-aside .section-tag { display: block; margin-bottom: 1.6rem; }
.portrait {
  position: relative;
  aspect-ratio: 4 / 5; width: 100%; border-radius: 14px;
  background: linear-gradient(160deg, var(--ink-700), var(--ink-900));
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; border: 1px solid rgba(11,26,42,.12);
}
.portrait img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center; z-index: 1;
}
.portrait-glow {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 42%; z-index: 2;
  background: linear-gradient(to top, rgba(230,138,46,.22), transparent);
  mix-blend-mode: screen; pointer-events: none;
}
.portrait-name { font-family: var(--display); font-weight: 600; font-size: 1.45rem; margin: 1.1rem 0 .2rem; }
.portrait-role { font: 400 .8rem/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--slate); }
.portrait-link {
  display: inline-block; margin-top: .9rem;
  font: 500 .9rem/1 var(--mono); color: #b5681e;
  border-bottom: 1px solid rgba(181,104,30,.35); padding-bottom: 3px;
}
.portrait-link:hover { color: var(--ember); }

.principal-body .h2 { margin-bottom: 1.6rem; }
.principal-body p {
  font-size: 1.05rem; color: #2b3742; line-height: 1.68; margin-bottom: 1.15rem;
  max-width: 44rem;
}
.principal-body strong { color: var(--text-paper); font-weight: 600; }
.principal-body em { color: #b5681e; font-style: italic; }

.creds {
  list-style: none; margin-top: 2.2rem;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
  background: var(--line-l); border: 1px solid var(--line-l); border-radius: 12px; overflow: hidden;
}
.creds li {
  background: var(--paper); padding: 1rem 1.2rem;
  font-size: .98rem; color: var(--text-paper);
  display: flex; flex-direction: column; gap: .25rem;
}
.creds li span {
  font: 500 .68rem/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--slate);
}

/* ============================================================
   Approach
   ============================================================ */
.approach {
  background: var(--ink);
  padding: clamp(4.5rem, 11vh, 8rem) var(--gutter);
  border-top: 1px solid var(--line-d);
}
.approach-head { max-width: var(--maxw); margin: 0 auto 3rem; }
.approach-head .section-tag { display: block; margin-bottom: 1.1rem; }
.steps {
  max-width: var(--maxw); margin: 0 auto; list-style: none;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem;
  counter-reset: none;
}
.step {
  border-top: 2px solid var(--ember);
  padding: 1.6rem 0 0;
  position: relative;
}
.step-no {
  font: 500 .8rem/1 var(--mono); color: var(--ember); letter-spacing: .1em;
}
.step h3 {
  font-family: var(--display); font-weight: 500; font-size: 1.55rem;
  color: #f3f6f8; margin: .9rem 0 .7rem; letter-spacing: -.01em;
}
.step p { font-size: .98rem; color: var(--mist); line-height: 1.62; max-width: 30rem; }

/* ============================================================
   Contact
   ============================================================ */
.contact {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 100% at 50% 6%, rgba(230,138,46,.14), transparent 55%),
    linear-gradient(180deg, var(--ink), var(--ink-900));
  padding: clamp(5rem, 13vh, 9rem) var(--gutter);
  border-top: 1px solid var(--line-d);
  text-align: center;
}
.contact-inner { position: relative; z-index: 2; max-width: 44rem; margin: 0 auto; }
.contact-inner .eyebrow { margin-bottom: 1.5rem; }
.contact-title {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(2.3rem, 6vw, 4.2rem); line-height: 1.02; letter-spacing: -.025em;
  color: #fbfcfd;
}
.contact-lede { color: var(--mist); font-size: 1.08rem; margin: 1.4rem auto 0; max-width: 32rem; }

.phone-cta {
  display: inline-flex; flex-direction: column; align-items: center; gap: .4rem;
  margin: 2.6rem 0 1rem;
  padding: 1.5rem 2.6rem; border-radius: 16px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(230,138,46,.35);
  transition: transform .18s ease, box-shadow .3s ease, border-color .2s;
}
.phone-cta:hover {
  transform: translateY(-2px);
  border-color: rgba(230,138,46,.7);
  box-shadow: 0 20px 50px -18px rgba(230,138,46,.55);
}
.phone-label { font: 500 .68rem/1 var(--mono); letter-spacing: .22em; text-transform: uppercase; color: var(--ember-2); }
.phone-number {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(2rem, 5.5vw, 3.4rem); color: #fff; letter-spacing: .01em;
}
.contact-or { font-size: .95rem; color: var(--mist-dim); }
.contact-or a { color: var(--ember-2); border-bottom: 1px solid rgba(244,169,73,.35); }
.contact-or a:hover { color: var(--ember); }

/* ============================================================
   Footer
   ============================================================ */
.foot {
  background: var(--ink-900); padding: clamp(2.5rem, 6vh, 4rem) var(--gutter) 2rem;
  border-top: 1px solid var(--line-d);
}
.foot-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  flex-wrap: wrap;
}
.foot-brand { display: flex; align-items: baseline; gap: .55rem; }
.foot-legal { font-size: .88rem; color: var(--mist-dim); line-height: 1.55; text-align: center; }
.foot-legal strong { color: var(--mist); font-weight: 500; }
.foot-call { font: 500 1.1rem/1 var(--mono); color: #fff; }
.foot-call:hover { color: var(--ember-2); }
.foot-fine {
  max-width: var(--maxw); margin: 2rem auto 0; padding-top: 1.4rem;
  border-top: 1px solid var(--line-d);
  font: 400 .76rem/1.4 var(--mono); color: var(--mist-dim); letter-spacing: .04em;
}

/* ============================================================
   Scroll reveal
   ============================================================ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 940px) {
  .nav-links { display: none; }
  .caps-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; gap: 0; }
  .step { border-top: none; border-left: 2px solid var(--ember); padding: .4rem 0 2rem 1.4rem; }
  .step:last-child { padding-bottom: 0; }
  .principal-inner { grid-template-columns: 1fr; }
  .principal-aside { position: static; max-width: 280px; }
  .signal-log { grid-template-columns: repeat(2, 1fr); }
  .signal-log li:nth-child(2) { border-right: none; }
  .signal-log li:nth-child(1), .signal-log li:nth-child(2) { border-bottom: 1px solid var(--line-d); }
}
@media (max-width: 560px) {
  .caps-grid { grid-template-columns: 1fr; }
  .creds { grid-template-columns: 1fr; }
  .signal-log { grid-template-columns: 1fr; }
  .signal-log li { border-right: none; border-bottom: 1px solid var(--line-d); }
  .signal-log li:last-child { border-bottom: none; }
  .foot-inner { flex-direction: column; align-items: flex-start; }
  .foot-legal { text-align: left; }
  .nav-call-label { display: none; }
}

/* ============================================================
   A11y
   ============================================================ */
:focus-visible { outline: 2px solid var(--ember-2); outline-offset: 3px; border-radius: 4px; }

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