/* ===== Design tokens ===== */
:root {
  --navy: #0f1720;
  --navy-soft: #16212c;
  --blue: #2f6fef;
  --blue-dark: #1d4ed8;
  --white: #ffffff;
  --ink: #0f1720;
  --muted: #5b6672;
  --line: #e6e9ec;
  --bg-soft: #f6f8f9;

  --font-head: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;

  --container: 1160px;
  --radius: 12px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

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

section { padding: 88px 0; }

@media (max-width: 768px) {
  section { padding: 56px 0; }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--blue);
  color: var(--white);
}
.btn-primary:hover { background: var(--blue-dark); color: var(--white); }

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.35);
}
.btn-outline:hover { border-color: var(--white); }

.btn-outline-dark {
  background: transparent;
  color: var(--navy);
  border-color: var(--line);
}
.btn-outline-dark:hover { border-color: var(--navy); }

/* ===== Header / Nav ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 32, 0.92);
  backdrop-filter: blur(8px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--white);
}

.logo .mark {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  color: rgba(255,255,255,0.78);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
}

.nav-cta { display: flex; align-items: center; gap: 20px; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.6rem;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--navy-soft);
    padding: 24px;
    gap: 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
  }
  .nav-cta .btn-primary { padding: 10px 20px; font-size: 0.9rem; }
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(160deg, var(--navy) 0%, #101d27 60%, #0c161f 100%);
  color: var(--white);
  padding: 110px 0 90px;
  text-align: center;
}

.tag {
  display: inline-block;
  color: var(--blue);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2.2rem, 4.6vw, 3.6rem);
  max-width: 820px;
  margin: 0 auto 22px;
}

.hero p {
  max-width: 640px;
  margin: 0 auto 36px;
  color: rgba(255,255,255,0.72);
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero.hero-left { text-align: left; }
.hero.hero-left h1,
.hero.hero-left p { margin-left: 0; }
.hero.hero-left .hero-actions { justify-content: flex-start; }

/* ===== Section headers ===== */
.section-head {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 14px; }
.section-head p { color: var(--muted); font-size: 1.02rem; }
.section-head.left { margin: 0 0 48px; text-align: left; }

.eyebrow {
  color: var(--blue-dark);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: block;
}

/* ===== Cards / grids ===== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 32px;
}

.service-card {
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 40px;
  border: 1px solid var(--line);
}
.service-card .num {
  font-family: var(--font-head);
  color: var(--blue-dark);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 18px;
}
.service-card h3 { font-size: 1.5rem; margin-bottom: 14px; }
.service-card p { color: var(--muted); margin-bottom: 22px; }
.service-card ul { list-style: none; margin-bottom: 24px; }
.service-card ul li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 0.96rem;
}
.service-card ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--blue);
}
.service-card a.learn-more,
.article-card a.learn-more {
  color: var(--blue-dark);
  font-weight: 600;
  font-size: 0.95rem;
}
.service-card a.learn-more:hover,
.article-card a.learn-more:hover { text-decoration: underline; }
.article-card a.learn-more { margin-top: 14px; display: inline-block; }

/* ===== Stats band ===== */
.stats-band {
  background: var(--navy);
  color: var(--white);
  padding: 56px 0;
}
.stats-band .grid-4 { text-align: center; }
.stats-band .stat-num {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 2.6rem);
  color: var(--blue);
  font-weight: 700;
}
.stats-band .stat-label {
  color: rgba(255,255,255,0.65);
  font-size: 0.92rem;
  margin-top: 6px;
}

/* ===== Feature list (Why Crest / Principles) ===== */
.feature {
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.feature:first-child { border-top: none; }
.feature .num {
  font-family: var(--font-head);
  color: var(--blue-dark);
  font-weight: 700;
  font-size: 0.9rem;
  display: block;
  margin-bottom: 10px;
}
.feature h3 { font-size: 1.2rem; margin-bottom: 8px; }
.feature p { color: var(--muted); }

/* ===== Small pill tags (industries, filters) ===== */
.pill-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.pill {
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink);
  background: var(--white);
}

.filter-tabs { display: flex; gap: 10px; margin-bottom: 40px; }
.filter-tab {
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s ease;
}
.filter-tab.active,
.filter-tab:hover {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

/* ===== CTA section ===== */
.cta-section {
  background: var(--navy);
  color: var(--white);
  text-align: center;
  padding: 90px 0;
}
.cta-section h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-bottom: 16px; }
.cta-section p { color: rgba(255,255,255,0.7); max-width: 560px; margin: 0 auto 32px; }

.cta-strip {
  background: var(--blue);
  color: var(--navy);
  padding: 56px 0;
  text-align: center;
}
.cta-strip h3 { font-size: 1.4rem; margin-bottom: 20px; }

/* ===== Footer ===== */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  padding: 64px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-grid .logo { color: var(--white); margin-bottom: 14px; }
.footer-grid p { max-width: 320px; font-size: 0.92rem; margin-bottom: 18px; }
.footer-contact { font-size: 0.92rem; line-height: 1.9; }
.footer-contact a:hover { color: var(--blue); }
.footer-col h4 {
  color: var(--white);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 12px; font-size: 0.92rem; }
.footer-col a:hover { color: var(--blue); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  font-size: 0.85rem;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom .legal-links { display: flex; gap: 20px; }

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ===== Process steps ===== */
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 40px; }
@media (max-width: 900px) { .process-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .process-grid { grid-template-columns: 1fr; } }
.process-step .num {
  font-family: var(--font-head);
  font-size: 1.6rem;
  color: var(--blue);
  font-weight: 700;
  margin-bottom: 12px;
}
.process-step h4 { font-size: 1.05rem; margin-bottom: 8px; }
.process-step p { color: var(--muted); font-size: 0.94rem; }

/* ===== Team ===== */
.team-card {
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 32px;
  border: 1px solid var(--line);
}
.team-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--navy));
  margin-bottom: 20px;
}
.team-card h3 { font-size: 1.15rem; margin-bottom: 2px; }
.team-card .role { color: var(--blue-dark); font-weight: 600; font-size: 0.88rem; margin-bottom: 14px; display: block; }
.team-card p { color: var(--muted); font-size: 0.92rem; }

/* ===== Contact page ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

.info-item { display: flex; gap: 16px; margin-bottom: 24px; }
.info-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--navy);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}
.info-item h4 { font-size: 1rem; margin-bottom: 4px; }
.info-item p { color: var(--muted); font-size: 0.94rem; }

.callout-card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  margin-top: 32px;
}
.callout-card h4 { margin-bottom: 10px; }
.callout-card p { color: var(--muted); font-size: 0.94rem; }

.form-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px;
}
.form-card h3 { margin-bottom: 24px; }
.form-row { margin-bottom: 20px; }
.form-row label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 8px;
}
.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--white);
  color: var(--ink);
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--blue);
}
.form-row textarea { resize: vertical; min-height: 130px; }
.form-note { color: var(--muted); font-size: 0.85rem; margin-top: 14px; }
.form-status { margin-top: 16px; font-size: 0.9rem; font-weight: 600; }
.form-status.success { color: var(--blue-dark); }
.form-status.error { color: #c0392b; }

/* ===== Insights ===== */
.featured-article {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 44px;
  margin-bottom: 56px;
}
.featured-article .eyebrow { color: var(--blue-dark); }
.featured-article h3 { font-size: 1.6rem; margin-bottom: 14px; }
.featured-article p { color: var(--muted); margin-bottom: 18px; }
.featured-article .meta { color: var(--muted); font-size: 0.88rem; margin-bottom: 20px; }

.article-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.article-card .eyebrow { font-size: 0.72rem; }
.article-card h3 { font-size: 1.15rem; margin-bottom: 12px; flex-grow: 0; }
.article-card p { color: var(--muted); font-size: 0.92rem; margin-bottom: 18px; }
.article-card .meta { color: var(--muted); font-size: 0.85rem; margin-top: auto; }
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .article-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .article-grid { grid-template-columns: 1fr; } }

/* ===== Story / about text blocks ===== */
.story-block p { color: var(--muted); margin-bottom: 18px; font-size: 1rem; }
.story-block p:last-child { margin-bottom: 0; }

.presence-map {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  padding: 48px;
  text-align: center;
}
.presence-map h2 { margin-bottom: 24px; }

/* ===== Legal pages ===== */
.legal-content { max-width: 760px; margin: 0 auto; }
.legal-content .updated { color: var(--muted); font-size: 0.9rem; margin-bottom: 40px; }
.legal-content h2 { font-size: 1.3rem; margin: 40px 0 14px; }
.legal-content h2:first-of-type { margin-top: 0; }
.legal-content p { color: var(--muted); margin-bottom: 16px; }
.legal-content ul { color: var(--muted); margin: 0 0 16px 20px; }
.legal-content li { margin-bottom: 8px; }
.legal-content a { color: var(--blue-dark); font-weight: 600; }
.legal-content a:hover { text-decoration: underline; }
