/* ==========================================================================
   Cornwell Ventures Inc. — stylesheet
   Palette matches the source brand (navy / gold / leaf green).
   ========================================================================== */

:root {
  /* --- brand colors (kept as H S% L% so hsl() can add alpha easily) --- */
  --navy: 213 84% 15%;
  --navy-deep: 213 88% 11%;
  --gold: 42 76% 58%;
  --gold-soft: 42 84% 68%;
  --leaf: 145 55% 40%;

  --bg: 0 0% 100%;
  --fg: 213 84% 15%;
  --muted: 210 30% 96%;
  --muted-fg: 213 15% 42%;
  --border: 213 20% 88%;

  --font-display: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius: 0.9rem;
  --container: 1240px;
  --header-h: 84px;

  --shadow-sm: 0 8px 20px -12px rgba(6, 22, 44, 0.25);
  --shadow-md: 0 24px 50px -30px rgba(6, 22, 44, 0.5);
  --shadow-lg: 0 30px 70px -25px rgba(6, 22, 44, 0.55);

  color-scheme: light;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
svg { display: block; }

body {
  font-family: var(--font-body);
  color: hsl(var(--fg));
  background: hsl(var(--bg));
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

section[id] { scroll-margin-top: var(--header-h); }

.text-gold { color: hsl(var(--gold)); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: hsl(var(--gold));
  color: hsl(var(--navy));
  font-weight: 700;
  padding: 0.75rem 1.25rem;
  z-index: 1000;
  border-radius: 0 0 0.5rem 0;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 2px solid hsl(var(--gold));
  outline-offset: 3px;
}

/* ---------- headings / eyebrow ---------- */
.heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 1.4rem + 2vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: hsl(var(--navy));
  position: relative;
  padding-bottom: 1.1rem;
}
.heading-light { color: #fff; }
.heading::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 5px;
  width: 64px;
  border-radius: 999px;
  background: hsl(var(--gold));
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 0.45rem 1rem;
  border-radius: 999px;
}
.eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: hsl(var(--gold));
  flex: none;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.9rem 1.6rem;
  border-radius: 0.6rem;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}
.btn svg { width: 16px; height: 16px; transition: transform 0.25s ease; }
.btn-gold {
  background: hsl(var(--gold));
  color: hsl(var(--navy));
  box-shadow: var(--shadow-sm);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); background: hsl(var(--gold-soft)); }
.btn-gold:hover svg { transform: translateX(3px); }
.btn-outline-light {
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
}
.btn-outline-light:hover { border-color: hsl(var(--gold)); color: hsl(var(--gold)); }
.btn-outline-navy {
  border: 1px solid hsl(var(--border));
  color: hsl(var(--navy));
}
.btn-outline-navy:hover { border-color: hsl(var(--gold)); background: hsl(var(--gold)); color: hsl(var(--navy)); }

/* ---------- header ---------- */
.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(6, 26, 51, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.site-header.is-scrolled {
  background: hsl(var(--navy-deep) / 0.92);
  box-shadow: 0 12px 30px -18px rgba(0, 0, 0, 0.6);
  border-bottom-color: rgba(255, 255, 255, 0.12);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

.brand { display: flex; align-items: center; gap: 0.75rem; flex: none; }
.brand-logo { width: 44px; height: 44px; object-fit: contain; flex: none; }
.brand-name {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.25;
  color: #fff;
}
.footer-brand .brand-name { color: #fff; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-link {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.8);
  position: relative;
  padding: 0.35rem 0;
  transition: color 0.2s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: hsl(var(--gold));
  transition: width 0.25s ease;
}
.nav-link:hover, .nav-link.is-active { color: #fff; }
.nav-link:hover::after, .nav-link.is-active::after { width: 100%; }
.nav-link.nav-cta {
  color: hsl(var(--navy));
  background: hsl(var(--gold));
  padding: 0.55rem 1.15rem;
  border-radius: 0.5rem;
}
.nav-link.nav-cta::after { display: none; }
.nav-link.nav-cta:hover { background: hsl(var(--gold-soft)); color: hsl(var(--navy)); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  border-radius: 0.5rem;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: hsl(var(--navy));
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    hsl(var(--navy-deep) / 0.92) 0%,
    hsl(var(--navy) / 0.86) 45%,
    hsl(var(--navy-deep) / 0.97) 100%);
}
.hero-glow {
  position: absolute;
  right: -8rem;
  top: 20%;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: hsl(var(--gold) / 0.22);
  filter: blur(120px);
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 2;
  padding-block: 9rem 7rem;
  max-width: 46rem;
}
.hero-content h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 1.9rem + 3.2vw, 4.2rem);
  line-height: 1.05;
  color: #fff;
  margin-top: 1.75rem;
  letter-spacing: -0.01em;
}
.gold-bar {
  margin-top: 1.4rem;
  height: 6px;
  width: 10rem;
  max-width: 40%;
  border-radius: 999px;
  background: hsl(var(--gold));
}
.hero-lead {
  margin-top: 1.9rem;
  max-width: 34rem;
  font-size: 1.1rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.78);
}
.hero-actions {
  margin-top: 2.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.marquee {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: 2;
  padding-block: 1rem;
  background: hsl(var(--navy-deep) / 0.82);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}
.marquee-track {
  display: flex;
  width: max-content;
  gap: 3rem;
  animation: marquee 28s linear infinite;
}
.marquee-track span {
  white-space: nowrap;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}
.marquee-track span.sep { color: hsl(var(--gold) / 0.6); }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- generic sections ---------- */
.section { padding-block: 6rem; }
@media (min-width: 900px) { .section { padding-block: 8rem; } }
.section-light { background: hsl(var(--bg)); }
.section-navy { background: hsl(var(--navy)); }

/* ---------- who we are ---------- */
.who-grid {
  display: grid;
  gap: 3rem;
  align-items: start;
}
@media (min-width: 992px) {
  .who-grid { grid-template-columns: 1.25fr 0.85fr; gap: 4.5rem; }
  .who-image { padding-top: 2.5rem; }
}
.who-text p {
  margin-top: 1.5rem;
  font-size: 1.05rem;
  line-height: 1.75;
  color: hsl(var(--muted-fg));
  text-align: justify;
  hyphens: auto;
}
.who-text strong { color: hsl(var(--navy)); }
.who-image img {
  width: 100%;
  border-radius: 1.5rem;
  box-shadow: var(--shadow-md);
}

/* ---------- stats banner ---------- */
.stats-wrap { padding-bottom: 6rem; }
@media (min-width: 900px) { .stats-wrap { padding-bottom: 8rem; } }
.stats-banner {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  background: hsl(var(--navy));
  padding: 2.75rem 1.75rem;
  box-shadow: var(--shadow-md);
  display: grid;
  gap: 2rem;
}
.stats-banner::before {
  content: "";
  position: absolute;
  right: -5rem;
  top: -5rem;
  width: 16rem;
  height: 16rem;
  border-radius: 50%;
  background: hsl(var(--gold) / 0.1);
  filter: blur(90px);
}
@media (min-width: 768px) {
  .stats-banner {
    grid-template-columns: repeat(3, 1fr);
    padding: 3rem 3.5rem;
  }
  .stat { border-left: 1px solid rgba(255, 255, 255, 0.12); padding-left: 2.5rem; }
  .stat:first-child { border-left: 0; padding-left: 0; }
}
.stat { position: relative; z-index: 1; text-align: center; }
.stat-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: hsl(var(--gold));
}
.stat-value {
  display: block;
  margin-top: 0.65rem;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
}
.stat p {
  margin: 0.5rem auto 0;
  max-width: 240px;
  font-size: 0.88rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.55);
}

/* ---------- portfolio ---------- */
.section-head { margin-bottom: 3.25rem; max-width: 42rem; }
.section-head p { margin-top: 1.75rem; font-size: 1.02rem; line-height: 1.7; color: rgba(255, 255, 255, 0.65); }
.section-light .section-head p { color: hsl(var(--muted-fg)); }

.portfolio-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .portfolio-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .portfolio-grid { grid-template-columns: repeat(3, 1fr); } }

.portfolio-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: 1.5rem;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.portfolio-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

.portfolio-art {
  position: relative;
  aspect-ratio: 4 / 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  overflow: hidden;
  color: #fff;
}
.portfolio-art.tone-navy { background: linear-gradient(155deg, hsl(var(--navy)) 0%, hsl(var(--navy-deep)) 100%); }
.portfolio-art.tone-gold { background: linear-gradient(155deg, hsl(var(--navy-deep)) 0%, hsl(var(--navy)) 55%, hsl(var(--gold) / 0.35) 130%); }
.portfolio-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0.5;
}
.portfolio-art .art-icon {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: hsl(var(--gold) / 0.16);
  border: 1px solid hsl(var(--gold) / 0.4);
}
.portfolio-art .art-icon svg { width: 28px; height: 28px; color: hsl(var(--gold)); }
.portfolio-art .art-brand {
  position: relative;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}
.status-chip {
  position: absolute;
  top: 1.1rem;
  left: 1.1rem;
  z-index: 1;
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
}
.status-operational { background: hsl(var(--leaf)); color: #fff; }
.status-construction { background: hsl(var(--gold)); color: hsl(var(--navy)); }
.status-awarded { background: #fff; color: hsl(var(--navy)); }
.status-upcoming { background: hsl(var(--gold-soft)); color: hsl(var(--navy)); }

.portfolio-body { padding: 1.6rem 1.6rem 1.8rem; }
.portfolio-body h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: hsl(var(--navy));
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.portfolio-place {
  margin-top: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  color: hsl(var(--muted-fg));
}
.portfolio-place svg { width: 15px; height: 15px; flex: none; color: hsl(var(--gold)); }

/* ---------- opportunities ---------- */
.opportunities-grid {
  display: grid;
  gap: 3rem;
}
@media (min-width: 992px) { .opportunities-grid { grid-template-columns: repeat(12, 1fr); gap: 4rem; } }
.opportunities-text { min-width: 0; }
@media (min-width: 992px) { .opportunities-text { grid-column: span 6; } }
.goal-tag {
  display: inline-flex;
  margin-top: 1.9rem;
  padding: 0.7rem 1.4rem;
  border-radius: 0.5rem;
  background: hsl(var(--navy));
  color: hsl(var(--gold));
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}
.opportunities-text p {
  margin-top: 1.5rem;
  font-size: 1.02rem;
  line-height: 1.75;
  color: hsl(var(--muted-fg));
  text-align: justify;
  hyphens: auto;
}
.values-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 480px) { .values-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .values-grid { grid-column: span 6; } }

.value-card {
  height: 100%;
  border: 1px solid hsl(var(--border));
  border-radius: 1.15rem;
  padding: 1.9rem 1.5rem;
  text-align: center;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.value-card:hover {
  transform: translateY(-4px);
  border-color: hsl(var(--gold));
  box-shadow: var(--shadow-md);
}
.value-icon {
  margin-inline: auto;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: hsl(var(--navy));
}
.value-icon svg { width: 30px; height: 30px; color: hsl(var(--gold)); }
.value-card h3 {
  margin-top: 1.1rem;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: hsl(var(--navy));
}
.value-card p { margin-top: 0.5rem; font-size: 0.88rem; color: hsl(var(--muted-fg)); line-height: 1.5; }

/* ---------- contact ---------- */
.contact-grid { display: grid; gap: 3rem; }
@media (min-width: 992px) { .contact-grid { grid-template-columns: repeat(12, 1fr); gap: 3.5rem; align-items: start; } }
.contact-text { min-width: 0; }
@media (min-width: 992px) { .contact-text { grid-column: span 5; } }
.contact-text p { margin-top: 2rem; max-width: 26rem; font-size: 1.02rem; line-height: 1.65; color: rgba(255, 255, 255, 0.7); }

.contact-cards { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 560px) { .contact-cards { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 992px) { .contact-cards { grid-column: span 7; } }

.contact-card {
  height: 100%;
  border-radius: 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  padding: 1.75rem;
  transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.25s ease;
}
.contact-card:hover { border-color: hsl(var(--gold) / 0.5); background: rgba(255, 255, 255, 0.08); transform: translateY(-3px); }
.contact-card svg { width: 24px; height: 24px; color: hsl(var(--gold)); }
.contact-label {
  margin-top: 1rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}
.contact-value {
  margin-top: 0.5rem;
  display: block;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #fff;
  word-break: break-word;
}
a.contact-value:hover { color: hsl(var(--gold)); }

/* ---------- footer ---------- */
.site-footer { background: hsl(var(--navy-deep)); padding-block: 3rem; }
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
  text-align: center;
}
@media (min-width: 768px) {
  .footer-inner { flex-direction: row; justify-content: space-between; text-align: left; }
}
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem; }
.footer-nav a { font-size: 0.85rem; color: rgba(255, 255, 255, 0.6); transition: color 0.2s ease; }
.footer-nav a:hover { color: hsl(var(--gold)); }
.footer-bottom {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}
.footer-bottom p { font-size: 0.75rem; color: rgba(255, 255, 255, 0.4); }

/* ---------- back to top ---------- */
.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 90;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: hsl(var(--gold));
  color: hsl(var(--navy));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top svg { width: 20px; height: 20px; }
.back-to-top:hover { background: hsl(var(--gold-soft)); }

/* ---------- reveal-on-scroll ----------
   Visible by default; only hidden-then-fade when JS confirms it can
   flip the .in-view class back in (progressive enhancement — content
   never depends on JavaScript to be readable). */
.reveal { transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal:not(.in-view) { opacity: 0; transform: translateY(24px); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal:not(.in-view) { opacity: 1; transform: none; }
  .reveal { transition: none; }
  .marquee-track { animation: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------- mobile nav ---------- */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background: hsl(var(--navy-deep) / 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1.5rem 1.5rem 2.5rem;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  }
  .main-nav.is-open {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
  }
  .nav-link {
    padding: 1rem 0.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 1rem;
  }
  .nav-link.nav-cta { margin-top: 1.25rem; text-align: center; border-bottom: none; }
}

@media (max-width: 640px) {
  .hero-content { padding-block: 7.5rem 6.5rem; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
  .section { padding-block: 4.5rem; }
  .stats-wrap { padding-bottom: 4.5rem; }
  /* justified text reads ragged once lines get this short */
  .who-text p, .opportunities-text p { text-align: left; hyphens: none; }
}
