/* ============================================================
   FTTR Telecommunications Consulting & Research
   Website v1 — stylesheet
   Palette: navy + bone + copper. Copper is a quiet nod —
   telecom was built on it. Type: Space Grotesk + Inter.
   Motion: initial-load + in-view reveals only. No scroll-jacking.
   ============================================================ */

/* ---------- Variables ---------- */
:root {
  --navy:        #0B1F33;
  --navy-deep:   #07151F;
  --bone:        #FAF8F4;
  --bone-warm:   #F1ECE3;
  --copper:      #C16E33;  /* brand copper — graphic/decorative use + on navy */
  --copper-light:#D98A4F;  /* lighter copper — text on navy (passes AA) */
  --copper-text: #9E5418;  /* darker copper — small text on bone backgrounds.
                              Brand copper #C16E33 only hits ~3.5:1 on bone,
                              which fails WCAG AA for normal text. This deeper
                              shade reaches ~5:1 on bone / ~4.8:1 on bone-warm.
                              Decorative copper stays #C16E33 throughout. */
  --slate:       #586471;
  --ink:         #14202B;
  --line:        #E2DCD0;
  --line-navy:   rgba(255,255,255,0.12);

  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --maxw: 1140px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bone);
  color: var(--ink);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

/* ---------- Focus visibility (keyboard accessibility) ----------
   No visible focus state existed before — keyboard users had only the
   inconsistent browser default. A copper ring, offset so it reads on
   both light and dark backgrounds, applied only for keyboard focus. */
:focus-visible {
  outline: 2px solid var(--copper-light);
  outline-offset: 3px;
  border-radius: 2px;
}
/* Mouse/touch users keep a clean, ring-free press. */
:focus:not(:focus-visible) { outline: none; }

/* ---------- Skip link ----------
   Visually hidden until focused, then drops into view at top-left. */
.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  background: var(--copper);
  color: var(--navy-deep); /* navy on copper — AA-compliant, matches button */
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 12px 20px;
  border-radius: 2px;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}
/* A skip link is only ever reached by keyboard — reveal it on any focus
   so it never stays hidden, regardless of the :focus-visible heuristic. */
.skip-link:focus {
  top: 12px;
  outline: 2px solid var(--bone);
  outline-offset: 2px;
}

/* ---------- Shared layout ---------- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }

.section { padding: 120px 0; position: relative; }
/* Offset anchored jumps so a section heading clears the sticky nav
   (~77px) instead of hiding behind it. */
.section[id] { scroll-margin-top: 84px; }
.section-light { background: var(--bone); }
.section-bone  { background: var(--bone-warm); }
.section-navy  { background: var(--navy); color: var(--bone); }

.section-label {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--copper-text);
  margin-bottom: 22px;
}
.section-label-light { color: var(--copper-light); }

.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--ink);
  max-width: 16ch;
}
.section-title-light { color: var(--bone); }

.section-intro {
  font-size: 1.15rem;
  color: rgba(250,248,244,0.7);
  max-width: 56ch;
  margin-top: 24px;
}
.section-intro-dark { color: var(--slate); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  padding: 15px 30px;
  border-radius: 2px;
  text-decoration: none;
  transition: transform 0.35s var(--ease), background 0.25s ease, color 0.25s ease;
  cursor: pointer;
}
/* Navy text on copper = 4.88:1 — passes WCAG AA for normal text.
   White-on-copper was only 3.79:1 (fails AA for normal-size text).
   Navy-on-copper also reads more intentional + editorial with this palette. */
.btn-primary {
  background: var(--copper);
  color: var(--navy-deep);
}
/* Hover keeps the copper background (lightening it dropped the white-text
   contrast below AA). The lift + shadow carry the hover affordance instead. */
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(11,31,51,0.28);
}
.btn-ghost {
  background: transparent;
  color: var(--bone);
  border: 1px solid rgba(250,248,244,0.35);
}
.btn-ghost:hover { border-color: var(--bone); transform: translateY(-2px); }
.btn-lg { padding: 18px 40px; font-size: 1.05rem; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11,31,51,0.94);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line-navy);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.wordmark { text-decoration: none; display: flex; flex-direction: column; line-height: 1.1; }
.wordmark-mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  color: var(--bone);
}
.wordmark-sub {
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(250,248,244,0.55);
  margin-top: 3px;
}
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  color: rgba(250,248,244,0.78);
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--bone); }
.nav-cta {
  border: 1px solid rgba(250,248,244,0.3);
  padding: 9px 20px;
  border-radius: 2px;
}
.nav-cta:hover { border-color: var(--copper-light); color: var(--copper-light) !important; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--navy);
  color: var(--bone);
  padding: 150px 0 160px;
  overflow: hidden;
}
/* Hero art layer: the generated copper-fiber image, positioned so its
   converging strands fill the right of the hero and its negative space
   sits under the left-aligned headline. */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image: url('og-image.png');
  background-repeat: no-repeat;
  background-position: right center;
  background-size: cover;
}
/* Navy scrim over the art — solid under the text (left), clearing to
   reveal the strands (right). Guarantees headline contrast. The solid
   band holds to 42% and stays near-opaque to 66% so even the widest
   desktop (1920px+) keeps every hero text row above WCAG AA — at wide
   viewports the cover-fit image slides brighter strands leftward. */
.hero-grid::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    95deg,
    var(--navy) 0%,
    var(--navy) 42%,
    rgba(11, 31, 51, 0.82) 66%,
    rgba(11, 31, 51, 0.30) 100%
  );
}
.hero-inner {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
}
.eyebrow {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--copper-light);
  margin-bottom: 28px;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.5rem, 6vw, 4.6rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
  color: var(--bone);
  max-width: 20ch;
  text-wrap: balance;
}
.hero-lede {
  font-size: 1.25rem;
  line-height: 1.6;
  color: rgba(250,248,244,0.74);
  max-width: 52ch;
  margin-top: 32px;
}
.hero-actions { display: flex; gap: 16px; margin-top: 42px; flex-wrap: wrap; }
.hero-note {
  font-size: 0.92rem;
  color: rgba(250,248,244,0.5);
  margin-top: 40px;
  padding-top: 26px;
  border-top: 1px solid var(--line-navy);
  max-width: 46ch;
}

/* ---------- The Challenge ---------- */
.challenge-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 72px;
  margin-top: 48px;
  align-items: start;
}
.challenge-copy p {
  font-size: 1.12rem;
  color: var(--ink);
  margin-bottom: 22px;
}
.challenge-copy p:last-child {
  color: var(--copper-text);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.18rem;
  line-height: 1.5;
}
.challenge-stats { list-style: none; }
.challenge-stats li {
  padding: 24px 0;
  border-top: 1px solid var(--line);
}
.challenge-stats li:last-child { border-bottom: 1px solid var(--line); }
.stat-figure {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--navy);
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.stat-label { font-size: 0.97rem; color: var(--slate); }

/* ---------- Services ---------- */
.section-navy .section-title { color: var(--bone); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  margin-top: 56px;
  background: var(--line-navy);
  border: 1px solid var(--line-navy);
}
.service-card {
  background: var(--navy);
  padding: 44px 40px;
  transition: background 0.3s ease;
}
.service-card:hover { background: var(--navy-deep); }
.service-number {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--copper-light);
  letter-spacing: 0.08em;
}
.service-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
  color: var(--bone);
  margin: 18px 0 14px;
}
.service-desc {
  font-size: 1.02rem;
  color: rgba(250,248,244,0.68);
}

/* ---------- The Advantage ---------- */
.advantage-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
  margin-top: 60px;
}
.advantage-item {
  padding: 36px 30px;
  background: var(--bone);
  border: 1px solid var(--line);
  border-top: 3px solid var(--copper);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.advantage-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 44px rgba(11,31,51,0.08);
}
.advantage-kicker {
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--copper-text);
}
.advantage-head {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 14px 0 12px;
}
.advantage-item p { font-size: 1rem; color: var(--slate); }
.advantage-grid-4 { grid-template-columns: repeat(2, 1fr); }
.advantage-close {
  margin-top: 52px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--navy);
  max-width: 32ch;
}

/* ---------- Career timeline ---------- */
.timeline {
  list-style: none;
  margin-top: 56px;
}
.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 40px;
  padding: 26px 0 26px 38px;
  border-left: 2px solid var(--line);
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -9px;
  top: 28px;            /* aligned to the year text's first line */
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bone-warm);
  border: 3px solid var(--copper);
}
.timeline-item:last-child { border-left-color: transparent; }
.timeline-item-now::before { background: var(--copper); box-shadow: 0 0 0 5px rgba(193,110,51,0.16); }
.timeline-years {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--copper-text);
  letter-spacing: 0.02em;
  padding-top: 1px;
}
.timeline-body h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.18rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 4px;
}
.timeline-org {
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
}
.timeline-note {
  font-size: 0.96rem;
  color: var(--slate);
  max-width: 56ch;
}
.timeline-item-now .timeline-body h3 { color: var(--copper-text); }

/* ---------- About ---------- */
.about-container {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 72px;
  align-items: start;
}
.about-portrait { position: sticky; top: 120px; }
.portrait-placeholder {
  aspect-ratio: 4 / 5;
  background: var(--navy);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.portrait-initials {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 3.4rem;
  color: var(--copper-light);
  letter-spacing: 0.05em;
}
.portrait-caption {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(250,248,244,0.4);
}
/* .about-copy prefix raises specificity above the generic ".about-copy p"
   body-text rule, which was silently overriding the copper accent. */
.about-copy .about-role {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--copper-text);
  margin: 6px 0 28px;
}
.about-copy p {
  font-size: 1.08rem;
  color: var(--ink);
  margin-bottom: 20px;
}
.about-meaning {
  margin-top: 32px;
  padding: 28px 30px;
  background: var(--bone);
  border-left: 3px solid var(--copper);
  font-size: 1.02rem !important;
  color: var(--slate) !important;
}
.about-meaning strong { color: var(--navy); }
.about-facts {
  list-style: none;
  margin-top: 36px;
  border-top: 1px solid var(--line);
}
.about-facts li {
  display: flex;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 1rem;
  color: var(--ink);
}
.about-facts li span {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--copper-text);
  width: 110px;
  flex-shrink: 0;
  padding-top: 3px;
}

/* ---------- Contact ---------- */
.section-contact { padding: 130px 0; }
.contact-container { text-align: center; }
.contact-container .section-label,
.contact-container .section-title { margin-left: auto; margin-right: auto; }
.contact-title { max-width: 20ch; }
.contact-lede {
  font-size: 1.18rem;
  color: rgba(250,248,244,0.74);
  max-width: 54ch;
  margin: 26px auto 40px;
}
.contact-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.contact-phone {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--copper-light);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.contact-phone:hover { border-color: var(--copper-light); }
.contact-note {
  margin-top: 48px;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(250,248,244,0.4);
}

/* ---------- Footer ---------- */
.footer { background: var(--navy-deep); color: var(--bone); padding: 36px 0; }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.footer-mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  color: var(--copper-light);
}
.footer-legal { font-size: 0.85rem; color: rgba(250,248,244,0.5); }
.footer-top {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  color: rgba(250,248,244,0.7);
  transition: color 0.2s ease;
}
.footer-top:hover { color: var(--copper-light); }

/* ---------- Motion: reveals ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  animation: revealUp 0.9s var(--ease) forwards;
}
.reveal-1 { animation-delay: 0.10s; }
.reveal-2 { animation-delay: 0.20s; }
.reveal-3 { animation-delay: 0.30s; }
.reveal-4 { animation-delay: 0.42s; }
@keyframes revealUp {
  to { opacity: 1; transform: translateY(0); }
}

/* In-view section reveals — only hide content when JS is present to
   reveal it. The .js class is set by an inline script in <head>, so a
   no-JS visitor sees every section immediately (progressive enhancement). */
.js .section { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.js .section.in-view { opacity: 1; transform: translateY(0); }
.js .hero { opacity: 1; transform: none; } /* hero animates its own children */

@media (prefers-reduced-motion: reduce) {
  .reveal, .section { animation: none !important; opacity: 1 !important; transform: none !important; transition: none !important; }
  /* Suppress transform-based hover lifts too — color/shadow still respond. */
  .btn:hover, .advantage-item:hover { transform: none !important; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */

/* Nav: the full link set needs ~860px to sit beside the wordmark
   without overflowing. Below that, collapse to the wordmark + CTA. */
@media (max-width: 880px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .nav-links { gap: 16px; }
}

@media (max-width: 960px) {
  .challenge-grid { grid-template-columns: 1fr; gap: 44px; }
  .advantage-grid, .advantage-grid-4 { grid-template-columns: 1fr; gap: 20px; }
  .about-container { grid-template-columns: 1fr; gap: 44px; }
  .about-portrait { position: static; max-width: 320px; }
  .services-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .section { padding: 84px 0; }
  .container, .hero-inner, .nav-inner { padding-left: 22px; padding-right: 22px; }
  .hero { padding: 96px 0 104px; }
  .wordmark-sub { display: none; }
  .footer-inner { flex-direction: column; text-align: center; gap: 14px; }
  .hero-actions .btn { flex: 1; }
  .timeline-item { grid-template-columns: 1fr; gap: 6px; padding-left: 30px; }
  .timeline-item::before { top: 26px; }
  /* Drop the forced break — let the title wrap naturally (balanced)
     in the narrower column instead of breaking mid-phrase. */
  .hero-break { display: none; }
  /* Heavier scrim on narrow screens — the hero art becomes a faint
     texture so the full-width headline stays fully legible. */
  .hero-grid::after {
    background: linear-gradient(
      170deg,
      rgba(11, 31, 51, 0.90) 0%,
      rgba(11, 31, 51, 0.78) 60%,
      rgba(11, 31, 51, 0.66) 100%
    );
  }
}
