/* ============================================================
   Toombs Consulting — Brand Stylesheet
   Single source of truth for all site styling.
   Brand colors from brand.py / brand discipline doc.
   ============================================================ */

/* ---- Custom properties ---- */
:root {
  --toombs-orange:   #F49400;
  --toombs-orange-dark: #d97f00;
  --toombs-navy:     #121C30;
  --toombs-white:    #FFFFFF;
  --toombs-body:     #2C3A52;
  --toombs-warm-grey: #E8E5DF;

  --font-heading: 'Montserrat', sans-serif;
  --font-body:    'Montserrat', sans-serif;

  --container-max: 1160px;
  --container-pad: 0 24px;

  --radius-btn: 4px;
  --transition: 0.18s ease;
}

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

html { font-size: 18px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--toombs-body);
  background: var(--toombs-white);
  line-height: 1.6;
}

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

a {
  color: var(--toombs-navy);
  text-decoration: underline;
  transition: color var(--transition);
}
a:hover { color: var(--toombs-orange); }

ul { list-style: none; }

/* ---- Typography scale (desktop) ---- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--toombs-navy);
  line-height: 1.2;
}

h1 { font-size: 48px; }
h2 { font-size: 32px; margin-bottom: 20px; }
h3 { font-size: 24px; margin-bottom: 12px; }
h4 { font-size: 18px; margin-bottom: 8px; }

p { margin-bottom: 16px; }
p:last-child { margin-bottom: 0; }

small, .text-small { font-size: 14px; }

em { font-style: italic; }
strong { font-weight: 700; }

/* ---- Layout ---- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--container-pad);
}

/* ---- Header ---- */
.site-header {
  background: var(--toombs-white);
  border-bottom: 2px solid var(--toombs-navy);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo img {
  height: 44px;
  width: auto;
}
.logo { text-decoration: none; }

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

.primary-nav a {
  font-size: 14px;
  font-weight: 600;
  color: var(--toombs-navy);
  text-decoration: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: color var(--transition);
}
.primary-nav a:hover { color: var(--toombs-orange); }

/* Hamburger (mobile — shown only below 768px) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--toombs-navy);
  border-radius: 2px;
  transition: background var(--transition);
}

/* ---- Hero banners ---- */
.hero-image {
  width: 100%;
  aspect-ratio: 4 / 1;
  object-fit: cover;
  display: block;
}

/* Contact hero is slightly shorter */
.hero-image--short {
  aspect-ratio: 16 / 3;
}

.hero-caption {
  background: var(--toombs-white);
  padding: 48px 24px 40px;
}

.hero-caption .container { }

.hero-caption h1 {
  margin-bottom: 16px;
}

.hero-caption .hero-sub {
  font-size: 20px;
  color: var(--toombs-body);
  max-width: 680px;
}

/* ---- About page compact hero ---- */
.about-hero {
  background: var(--toombs-white);
  padding: 72px 24px 40px;
}
.about-hero__inner {
  display: flex;
  align-items: center;
  gap: 48px;
  flex-wrap: wrap;
}
.about-hero__photo img {
  width: 240px;
  height: 240px;
  display: block;
  border-radius: 50%;
  box-shadow: 0 16px 32px -12px rgba(18, 28, 48, 0.25);
}
.about-hero__text {
  flex: 1 1 320px;
  min-width: 0;
}
.about-hero__text h1 {
  margin: 0 0 12px;
}
.about-hero__text .hero-sub {
  font-size: 20px;
  color: var(--toombs-body);
  max-width: 540px;
  margin: 0;
}
@media (max-width: 768px) {
  .about-hero {
    padding: 48px 20px 32px;
  }
  .about-hero__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }
  .about-hero__photo img {
    width: 180px;
    height: 180px;
  }
}

/* ---- Section spacing ---- */
.section {
  padding: 72px 0;
}

.section--grey {
  background: var(--toombs-warm-grey);
}

.section--navy {
  background: var(--toombs-navy);
  color: var(--toombs-white);
}
.section--navy h2,
.section--navy h3,
.section--navy h4,
.section--navy p {
  color: var(--toombs-white);
}

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 16px;
  padding: 14px 28px;
  border-radius: var(--radius-btn);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), opacity var(--transition), border-color var(--transition);
  line-height: 1;
}

/* Primary: orange bg, white text */
.btn--primary {
  background: var(--toombs-orange);
  color: var(--toombs-white);
}
.btn--primary:hover {
  background: var(--toombs-orange-dark);
  color: var(--toombs-white);
}

/* Secondary outline: for use on navy blocks */
.btn--outline {
  background: transparent;
  color: var(--toombs-white);
  border: 2px solid var(--toombs-white);
}
.btn--outline:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--toombs-white);
}

/* ---- Three-card row (Home) ---- */
.cards-intro {
  text-align: center;
  margin-bottom: 40px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.card {
  background: var(--toombs-white);
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card__icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.card__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--toombs-navy);
  margin: 0;
}

.card__desc {
  font-size: 16px;
  color: var(--toombs-body);
  margin: 0;
  flex: 1;
}

.card__link {
  font-size: 15px;
  font-weight: 600;
  color: var(--toombs-orange);
  text-decoration: none;
  margin-top: auto;
}
.card__link:hover { text-decoration: underline; color: var(--toombs-orange-dark); }

/* ---- Credibility strip ---- */
.credibility-strip {
  background: var(--toombs-warm-grey);
  padding: 28px 24px;
  text-align: center;
  font-size: 15px;
  color: var(--toombs-navy);
  font-weight: 500;
}
.credibility-strip em { font-style: italic; }

/* ---- CTA block ---- */
.cta-block {
  position: relative;
  background: var(--toombs-navy);
  overflow: hidden;
}

.cta-block__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}

.cta-block__inner {
  position: relative;
  z-index: 1;
  padding: 72px 24px;
  text-align: center;
  max-width: var(--container-max);
  margin: 0 auto;
}

.cta-block__heading {
  font-size: 28px;
  font-weight: 400;
  color: var(--toombs-white);
  margin-bottom: 24px;
}

.cta-block__buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* ---- Boxed callouts (Health Checks tiers) ---- */
.callout-box {
  background: var(--toombs-white);
  border: 1px solid #e0e0e0;
  border-left: 6px solid var(--toombs-orange);
  border-radius: 4px;
  padding: 36px 40px;
  margin-bottom: 32px;
}

.callout-box h2 {
  color: var(--toombs-navy);
  margin-bottom: 10px;
}

.callout-box .callout-tagline {
  font-style: italic;
  color: var(--toombs-body);
  margin-bottom: 24px;
  font-size: 16px;
}

.callout-box p {
  font-size: 16px;
  margin-bottom: 12px;
}

.callout-label {
  font-weight: 700;
  color: var(--toombs-navy);
}

/* ---- Section image (centered full-width within container) ---- */
.section-image {
  display: block;
  width: 100%;
  max-width: 960px;
  border-radius: 12px;
  margin: 0 auto 40px;
  box-shadow: 0 4px 20px rgba(18, 28, 48, 0.12);
}

/* ---- Bulleted content lists ---- */
.content-list {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: 24px;
}

.content-list li {
  margin-bottom: 14px;
  font-size: 17px;
  color: var(--toombs-body);
}

.content-list li strong {
  color: var(--toombs-navy);
}

.content-list li em {
  color: var(--toombs-navy);
  font-style: italic;
  font-weight: 700;
}

/* ---- Prose sections ---- */
.prose {
  max-width: 760px;
}

.prose p {
  font-size: 18px;
  margin-bottom: 20px;
}

/* Bold-led paragraphs in "How I work" */
.prose p strong:first-child {
  color: var(--toombs-navy);
}

/* ---- Two-column body (Contact) ---- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.contact-item {
  margin-bottom: 40px;
}

.contact-item h3 {
  margin-bottom: 8px;
}

.contact-item p {
  font-size: 16px;
  margin-bottom: 8px;
}

.contact-item a {
  font-weight: 600;
  color: var(--toombs-orange);
  text-decoration: none;
}
.contact-item a:hover { text-decoration: underline; }

/* ---- Closing note ---- */
.closing-note {
  text-align: center;
  font-style: italic;
  font-size: 14px;
  color: var(--toombs-body);
  padding-top: 16px;
  border-top: 1px solid #e0e0e0;
}

/* ---- 404 page ---- */
.not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px;
  min-height: 40vh;
}

.not-found h1 { margin-bottom: 20px; }
.not-found p { margin-bottom: 32px; font-size: 18px; max-width: 480px; }

/* ---- Footer ---- */
.site-footer {
  background: var(--toombs-navy);
  color: var(--toombs-white);
  padding: 64px 0 40px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 48px;
}

.footer-logo {
  height: 80px;
  width: auto;
  margin-bottom: 16px;
}

.footer-tagline {
  font-size: 14px;
  color: rgba(255,255,255,0.75);
}

.footer-col h4 {
  color: var(--toombs-white);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.footer-links,
.footer-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links li,
.footer-meta li {
  font-size: 14px;
  color: rgba(255,255,255,0.75);
}

.footer-links a,
.footer-meta a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  transition: color var(--transition);
}
.footer-links a:hover,
.footer-meta a:hover {
  color: var(--toombs-orange);
}

/* ============================================================
   Hero — two-column mesh-gradient layout (Home)
   ============================================================ */

/* Gradient mesh container — animated */
.hero-mesh {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--toombs-navy);
}

/* The animated gradient layer sits behind everything */
.hero-mesh__gradient {
  position: absolute;
  inset: -60px;          /* overscan so translation doesn't expose edges */
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 30%, rgba(31, 45, 74, 0.95) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 80% 70%, rgba(18, 28, 48, 0.98) 0%, transparent 65%),
    radial-gradient(ellipse 40% 40% at 60% 20%, rgba(244, 148, 0, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 55% 45% at 35% 75%, rgba(232, 229, 223, 0.04) 0%, transparent 55%),
    radial-gradient(ellipse 70% 70% at 50% 50%, #1a2540 0%, #121C30 100%);
  animation: meshDrift 22s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes meshDrift {
  0%   { transform: translate3d(0,    0,    0) scale(1); }
  25%  { transform: translate3d(12px, -8px, 0) scale(1.008); }
  50%  { transform: translate3d(-8px, 10px, 0) scale(1.005); }
  75%  { transform: translate3d(10px,  6px, 0) scale(1.01); }
  100% { transform: translate3d(-6px, -4px, 0) scale(1); }
}

.hero-mesh__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 80px 24px;
  display: grid;
  grid-template-columns: 60fr 40fr;
  gap: 64px;
  align-items: center;
}

/* Left column */
.hero-mesh__text {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.hero-mesh__text h1 {
  font-size: 64px;
  font-weight: 700;
  color: var(--toombs-white);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-mesh__text h1 .accent {
  color: var(--toombs-orange);
}

.hero-mesh__sub {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.82);
  max-width: 480px;
  line-height: 1.65;
  margin-bottom: 36px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease 0.1s, transform 0.55s ease 0.1s;
}

.hero-mesh__cta {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease 0.2s, transform 0.5s ease 0.2s;
}

/* Right column — photo card */
.hero-mesh__photo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease 0.15s, transform 0.6s ease 0.15s;
}

.hero-photo-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(18, 28, 48, 0.55),
              0  8px 24px -8px  rgba(18, 28, 48, 0.35);
  transform: rotate(2.5deg);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  max-width: 340px;
  width: 100%;
}

.hero-photo-card:hover {
  transform: rotate(0deg);
  box-shadow: 0 40px 80px -24px rgba(18, 28, 48, 0.6),
              0 12px 32px -8px  rgba(18, 28, 48, 0.4);
}

.hero-photo-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
}

/* Orange accent line on bottom-right edge */
.hero-photo-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 60%;
  height: 4px;
  background: linear-gradient(to left, var(--toombs-orange), transparent);
  border-radius: 0 0 16px 0;
}

/* Fade-in on load via .loaded class added by JS */
body.loaded .hero-mesh__text h1,
body.loaded .hero-mesh__sub,
body.loaded .hero-mesh__cta,
body.loaded .hero-mesh__photo-wrap {
  opacity: 1;
  transform: translateY(0);
}

/* Scroll cue */
.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  letter-spacing: 0.05em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}
.scroll-cue:hover { color: rgba(255,255,255,0.7); }

.scroll-cue__arrow {
  display: block;
  font-size: 18px;
  animation: scrollBounce 3s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(7px); }
}

/* ============================================================
   Scroll fade-in (IntersectionObserver)
   ============================================================ */
.fade-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-on-scroll.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   Button lift hover
   ============================================================ */
.btn--primary {
  box-shadow: 0 4px 14px rgba(244, 148, 0, 0.3);
  transition: background var(--transition), color var(--transition),
              transform 0.2s ease, box-shadow 0.2s ease;
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(244, 148, 0, 0.4);
}

/* ============================================================
   Card hover lift (home three-card row)
   ============================================================ */
.card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px -8px rgba(18, 28, 48, 0.15);
}

/* ============================================================
   Inline SVG diagram containers
   ============================================================ */
.svg-diagram {
  width: 100%;
  display: block;
  margin: 0 auto 40px;
  overflow: visible;
}

/* ============================================================
   Text-first hero (working pages)
   ============================================================ */
.text-hero {
  background: var(--toombs-white);
  padding: 80px 0 48px;
}

.text-hero h1 {
  margin-bottom: 16px;
}

.text-hero .hero-sub {
  font-size: 22px;
  color: var(--toombs-body);
  max-width: 760px;
  margin-bottom: 24px;
}

.text-hero .prose {
  margin-top: 8px;
}

/* ============================================================
   Labeled diagram section (working pages)
   ============================================================ */
.diagram-section {
  padding: 48px 0 64px;
  background: #fafbfc;
}

.diagram-image {
  display: block;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  border-radius: 16px;
  box-shadow: 0 24px 48px -16px rgba(18, 28, 48, 0.18);
  background: #fff;
}

@media (max-width: 768px) {
  .diagram-image {
    border-radius: 8px;
  }

  .text-hero {
    padding: 56px 0 32px;
  }

  .text-hero .hero-sub {
    font-size: 18px;
  }
}

/* ============================================================
   prefers-reduced-motion overrides
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .hero-mesh__gradient { animation: none; }
  @keyframes meshDrift { 0%, 100% { transform: none; } }

  .hero-mesh__text h1,
  .hero-mesh__sub,
  .hero-mesh__cta,
  .hero-mesh__photo-wrap {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .fade-on-scroll {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .scroll-cue__arrow { animation: none; }

  .btn--primary:hover { transform: none; }
  .card:hover { transform: none; }
}

/* ============================================================
   Mobile — single breakpoint at 768px
   ============================================================ */
@media (max-width: 768px) {
  html { font-size: 16px; }

  h1 { font-size: 32px; }
  h2 { font-size: 24px; }

  .hero-image { aspect-ratio: 16 / 7; }
  .hero-image--short { aspect-ratio: 16 / 6; }

  .hero-caption { padding: 32px 20px 28px; }
  .hero-caption .hero-sub { font-size: 17px; }

  /* Home hero mesh — stacked on mobile */
  .hero-mesh { min-height: 80vh; }

  .hero-mesh__inner {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 60px 20px 80px;
    /* photo above text */
    grid-template-areas: "photo" "text";
  }

  .hero-mesh__text { grid-area: text; }
  .hero-mesh__photo-wrap { grid-area: photo; }

  .hero-mesh__text h1 { font-size: 36px; }
  .hero-mesh__sub { font-size: 16px; }

  .hero-photo-card { max-width: 240px; margin: 0 auto; }

  /* Mobile nav */
  .nav-toggle { display: flex; }

  .primary-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--toombs-white);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    border-bottom: 2px solid var(--toombs-navy);
    padding: 8px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  }

  .primary-nav.open { display: flex; }

  .primary-nav a {
    width: 100%;
    padding: 14px 24px;
    border-bottom: 1px solid #eee;
  }
  .primary-nav a:last-child { border-bottom: none; }

  /* Cards */
  .cards-grid { grid-template-columns: 1fr; gap: 20px; }

  /* Two-col Contact */
  .two-col { grid-template-columns: 1fr; gap: 0; }

  /* Footer */
  .footer-inner { grid-template-columns: 1fr; gap: 36px; }

  /* Section padding */
  .section { padding: 48px 0; }

  /* Callout boxes */
  .callout-box { padding: 24px 20px; }

  /* CTA block */
  .cta-block__inner { padding: 48px 20px; }
  .cta-block__buttons { flex-direction: column; align-items: center; }
}
