/* ==========================================================================
   Griffin Family Companies — shared stylesheet
   Built to the official Brand Identity System (Standards & Guidelines v1.0, 2025).
   Palette:  Griffin Navy #003E52 · Griffin Blue #4C92CF · Ember Red #B83A2E
             Griffin Ink #0D2B35 · Griffin Frost #EDF2F5 · Griffin Slate #6B8FA3
   Type:     Georgia (display / headings) · Calibri (body & UI)
   Accent rule: Griffin Blue = signature accent; Ember Red reserved for CTAs.
   ========================================================================== */

:root {
  /* Core surfaces */
  --background: 203 29% 95%;      /* Griffin Frost */
  --foreground: 197 61% 13%;      /* Griffin Ink  */
  --card: 0 0% 100%;
  --card-foreground: 197 61% 13%;
  --muted: 203 28% 91%;
  --muted-foreground: 201 22% 42%; /* Griffin Slate (darkened for text) */
  --border: 203 22% 85%;

  /* Brand */
  --navy: 195 100% 16%;           /* Griffin Navy  #003E52 */
  --navy-light: 196 82% 25%;      /* lighter teal-navy for gradients */
  --navy-dark: 197 61% 13%;       /* Griffin Ink   #0D2B35 */
  --blue: 208 58% 55%;            /* Griffin Blue  #4C92CF */
  --blue-light: 202 34% 75%;      /* Sky Mist      #A8C4D4 */
  --ember: 5 60% 45%;             /* Ember Red     #B83A2E */
  --ember-light: 6 62% 53%;
  --slate: 201 23% 53%;           /* Griffin Slate #6B8FA3 */

  --primary: var(--navy);
  --primary-foreground: 203 29% 97%;
  --accent: var(--blue);

  --radius: 0.625rem;
  --container: 1180px;
  --shadow-sm: 0 1px 3px hsl(197 61% 13% / 0.07), 0 1px 2px hsl(197 61% 13% / 0.05);
  --shadow-md: 0 8px 24px hsl(197 61% 13% / 0.10);
  --shadow-lg: 0 20px 50px hsl(197 61% 13% / 0.16);

  --font-display: Georgia, "Times New Roman", Times, serif;
  --font-body: Calibri, "Segoe UI", Candara, "Trebuchet MS", system-ui, -apple-system, sans-serif;
}

:root.dark {
  --background: 197 55% 8%;
  --foreground: 203 29% 96%;
  --card: 196 45% 12%;
  --card-foreground: 203 29% 96%;
  --muted: 196 38% 16%;
  --muted-foreground: 202 20% 68%;
  --border: 196 32% 20%;
  --primary: 208 58% 55%;
  --primary-foreground: 197 55% 8%;
  --shadow-md: 0 8px 24px hsl(0 0% 0% / 0.4);
  --shadow-lg: 0 20px 50px hsl(0 0% 0% / 0.5);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  line-height: 1.6;
  font-size: 1.02rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4, .display {
  font-family: var(--font-display);
  line-height: 1.14;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: hsl(var(--foreground));
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; padding: 0; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 1.5rem; }
.section { padding-block: clamp(3.5rem, 8vw, 7rem); }
.eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.78rem;
  font-weight: 700;
  color: hsl(var(--blue));
}
.section-head { max-width: 720px; margin-inline: auto; text-align: center; margin-bottom: 3rem; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.75rem); margin-top: 0.75rem; }
.section-head p:not(.eyebrow) { color: hsl(var(--muted-foreground)); font-size: 1.1rem; margin-top: 1rem; }
.lead { font-size: 1.15rem; color: hsl(var(--muted-foreground)); }
.text-accent { color: hsl(var(--blue)); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-body); font-weight: 700; font-size: 1rem;
  padding: 0.8rem 1.6rem; border-radius: var(--radius);
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 1.05em; height: 1.05em; }
/* Primary CTA — Ember Red (brand: CTAs / highlights) */
.btn-primary { background: hsl(var(--ember)); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: hsl(var(--ember-light)); box-shadow: var(--shadow-md); }
/* Secondary — Griffin Navy */
.btn-navy { background: hsl(var(--navy)); color: hsl(var(--primary-foreground)); }
.btn-navy:hover { background: hsl(var(--navy-light)); }
/* Highlight — Griffin Blue */
.btn-blue { background: hsl(var(--blue)); color: #fff; }
.btn-blue:hover { background: hsl(208 58% 48%); }
/* Ghost / outline */
.btn-outline { border-color: hsl(var(--border)); background: transparent; color: hsl(var(--foreground)); }
.btn-outline:hover { border-color: hsl(var(--navy)); background: hsl(var(--muted)); }
.btn-ghost-light { border-color: hsl(0 0% 100% / 0.4); color: #fff; background: hsl(0 0% 100% / 0.06); }
.btn-ghost-light:hover { background: hsl(0 0% 100% / 0.14); border-color: hsl(0 0% 100% / 0.7); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: hsl(var(--background) / 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid hsl(var(--border));
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: 0.65rem; }
.brand .mark { width: 38px; height: 38px; flex: none; }
.brand-logo { height: 38px; width: auto; display: block; }
:root.dark .brand-logo { filter: brightness(0) invert(1); }
@media (max-width: 480px) { .brand-logo { height: 30px; } }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text .b1 { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; }
.brand-text .b2 { font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; color: hsl(var(--muted-foreground)); font-family: var(--font-body); font-weight: 600; }

.nav-links { display: flex; align-items: center; gap: 0.35rem; }
.nav-links a, .nav-links .dropdown > button {
  font-family: var(--font-body); font-weight: 600; font-size: 0.98rem;
  color: hsl(var(--foreground)); padding: 0.5rem 0.85rem; border-radius: 0.5rem;
  background: none; border: none; cursor: pointer; display: inline-flex; align-items: center; gap: 0.3rem;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-links a:hover, .nav-links .dropdown > button:hover { background: hsl(var(--muted)); color: hsl(var(--navy)); }
.nav-links a.active { color: hsl(var(--navy)); background: hsl(var(--muted)); }
:root.dark .nav-links a:hover, :root.dark .nav-links a.active { color: hsl(var(--blue)); }

/* Dropdown */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 260px;
  background: hsl(var(--card)); border: 1px solid hsl(var(--border));
  border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 0.4rem;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
}
.dropdown:hover .dropdown-menu, .dropdown.open .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu a { display: flex; flex-direction: column; gap: 1px; padding: 0.6rem 0.75rem; border-radius: 0.5rem; }
.dropdown-menu a:hover { background: hsl(var(--muted)); }
.dropdown-menu a span.t { font-weight: 700; }
.dropdown-menu a span.d { font-size: 0.8rem; color: hsl(var(--muted-foreground)); font-family: var(--font-body); font-weight: 400; }

.nav-actions { display: flex; align-items: center; gap: 0.5rem; }
.icon-btn {
  width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid hsl(var(--border)); border-radius: 0.5rem; background: hsl(var(--card));
  cursor: pointer; color: hsl(var(--foreground)); transition: background 0.15s ease;
}
.icon-btn:hover { background: hsl(var(--muted)); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-toggle .moon { display: none; }
:root.dark .theme-toggle .sun { display: none; }
:root.dark .theme-toggle .moon { display: block; }

.nav-toggle { display: none; }
.mobile-menu { display: none; }

@media (max-width: 900px) {
  .nav-links, .nav .btn { display: none; }
  .nav-toggle { display: inline-flex; }
  .mobile-menu {
    display: block; position: fixed; inset: 68px 0 auto 0; z-index: 49;
    background: hsl(var(--card)); border-bottom: 1px solid hsl(var(--border));
    box-shadow: var(--shadow-lg); padding: 1rem 1.5rem 1.5rem;
    transform: translateY(-120%); transition: transform 0.28s ease; max-height: calc(100vh - 68px); overflow-y: auto;
  }
  .mobile-menu.open { transform: translateY(0); }
  .mobile-menu a { display: block; padding: 0.8rem 0.25rem; font-family: var(--font-body); font-weight: 600; border-bottom: 1px solid hsl(var(--border)); }
  .mobile-menu .sub { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em; color: hsl(var(--muted-foreground)); padding-top: 1rem; }
  .mobile-menu .btn { display: flex; justify-content: center; margin-top: 1.1rem; width: 100%; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background-color: hsl(var(--navy-dark));
  background-image:
    radial-gradient(1000px 500px at 85% -10%, hsl(var(--blue) / 0.28), transparent 60%),
    linear-gradient(160deg, hsl(var(--navy-dark) / 0.95) 0%, hsl(var(--navy) / 0.88) 50%, hsl(var(--navy-light) / 0.82) 100%),
    url("hero-bg.jpg");
  background-position: center, center, center 30%;
  background-size: cover;
  background-repeat: no-repeat;
}
.hero::after {
  content: ""; position: absolute; inset: 0; opacity: 0.5; pointer-events: none;
  background-image: radial-gradient(hsl(0 0% 100% / 0.05) 1px, transparent 1px);
  background-size: 26px 26px;
}
.hero .container { position: relative; z-index: 1; }
.hero-inner { padding-block: clamp(4.5rem, 12vw, 8.5rem); max-width: 860px; }
.hero h1 { color: #fff; font-size: clamp(2.6rem, 6.5vw, 4.75rem); }
.hero h1 .accent { color: hsl(var(--blue)); }
.hero .eyebrow { color: hsl(var(--blue-light)); }
.hero p { color: hsl(203 30% 90%); font-size: 1.22rem; max-width: 640px; margin-top: 1.4rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.25rem; }

/* Page hero (interior) */
.page-hero { position: relative; color: #fff; overflow: hidden;
  background-color: hsl(var(--navy-dark));
  background-image:
    linear-gradient(160deg, hsl(var(--navy-dark) / 0.96) 0%, hsl(var(--navy) / 0.91) 60%, hsl(var(--navy-light) / 0.85) 100%),
    url("hero-bg.jpg");
  background-position: center, center 35%;
  background-size: cover; background-repeat: no-repeat; }
.page-hero::after { content:""; position:absolute; inset:0; opacity:0.5;
  background-image: radial-gradient(hsl(0 0% 100% / 0.05) 1px, transparent 1px); background-size: 26px 26px; }
.page-hero .container { position: relative; z-index: 1; padding-block: clamp(3.5rem, 9vw, 6rem); }
.page-hero .eyebrow { color: hsl(var(--blue-light)); }
.page-hero h1 { color: #fff; font-size: clamp(2.2rem, 5.5vw, 3.6rem); margin-top: 0.5rem; }
.page-hero .subtitle { color: hsl(var(--blue-light)); font-size: 1.3rem; font-family: var(--font-display); font-style: italic; font-weight: 400; margin-top: 0.75rem; }
.page-hero p.lead { color: hsl(203 30% 90%); margin-top: 1.25rem; max-width: 720px; }
.page-hero .hero-actions { margin-top: 2rem; }
.back-link { display: inline-flex; align-items: center; gap: 0.4rem; color: hsl(var(--blue-light)); font-family: var(--font-body); font-weight: 600; font-size: 0.9rem; margin-bottom: 0.5rem; }
.back-link:hover { color: #fff; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.card {
  background: hsl(var(--card)); border: 1px solid hsl(var(--border));
  border-radius: var(--radius); padding: 1.75rem; box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: hsl(var(--blue) / 0.55); }
.card h3 { font-size: 1.22rem; margin-bottom: 0.5rem; }
.card p { color: hsl(var(--muted-foreground)); font-size: 0.98rem; }
.card-icon {
  width: 48px; height: 48px; border-radius: 0.6rem; display: inline-flex; align-items: center; justify-content: center;
  background: hsl(var(--navy) / 0.09); color: hsl(var(--navy)); margin-bottom: 1rem;
}
:root.dark .card-icon { background: hsl(var(--blue) / 0.16); color: hsl(var(--blue)); }
.card-icon svg { width: 24px; height: 24px; }

/* Company cards (home) */
.company-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.company-card .cc-top { padding: 1.75rem 1.75rem 0; }
.company-card .cc-badge {
  display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px;
  border-radius: 0.75rem; background: linear-gradient(150deg, hsl(var(--navy)), hsl(var(--navy-light)));
  color: hsl(var(--blue-light)); margin-bottom: 1.1rem;
}
.company-card .cc-badge svg { width: 28px; height: 28px; }
.company-card h3 { font-size: 1.5rem; margin-bottom: 0.15rem; }
.company-card .role { color: hsl(var(--blue)); font-weight: 700; font-family: var(--font-body); font-size: 0.95rem; }
.company-card > p { color: hsl(var(--muted-foreground)); padding: 0.9rem 1.75rem 0; flex: 1; }
.company-card ul.mini { padding: 1.1rem 1.75rem 0; display: grid; gap: 0.5rem; }
.company-card ul.mini li { display: flex; gap: 0.55rem; align-items: flex-start; font-size: 0.93rem; color: hsl(var(--foreground)); }
.company-card ul.mini li svg { width: 18px; height: 18px; color: hsl(var(--blue)); flex: none; margin-top: 2px; }
.company-card .cc-actions { display: flex; gap: 0.75rem; padding: 1.5rem 1.75rem 1.75rem; margin-top: 0.5rem; flex-wrap: wrap; }
.company-card .cc-actions .btn { flex: 1; justify-content: center; }

/* ---------- About / stats band ---------- */
.about-band { background: hsl(var(--muted)); }
.stat-row { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: center; margin-top: 2.5rem; }
.stat { text-align: center; min-width: 150px; }
.stat .num { font-family: var(--font-display); font-size: 2.5rem; font-weight: 700; color: hsl(var(--navy)); }
:root.dark .stat .num { color: hsl(var(--blue)); }
.stat .lbl { color: hsl(var(--muted-foreground)); font-size: 0.9rem; }

/* Highlights list */
.highlights { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem 2rem; }
@media (max-width: 640px) { .highlights { grid-template-columns: 1fr; } }
.highlights li { display: flex; gap: 0.75rem; align-items: flex-start; font-size: 1.02rem; }
.highlights li svg { width: 22px; height: 22px; color: hsl(var(--blue)); flex: none; margin-top: 3px; }

/* Quote */
.quote-band { background: linear-gradient(150deg, hsl(var(--navy-dark)), hsl(var(--navy))); color: #fff; }
.quote-band blockquote { font-family: var(--font-display); font-style: italic; font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 400; line-height: 1.45; max-width: 900px; margin-inline: auto; text-align: center; }
.quote-band blockquote::before { content: "\201C"; color: hsl(var(--blue)); font-size: 3rem; line-height: 0; vertical-align: -0.4em; margin-right: 0.15rem; }
.quote-band .cite { text-align: center; margin-top: 1.75rem; color: hsl(var(--blue-light)); font-weight: 700; letter-spacing: 0.02em; font-family: var(--font-body); font-style: normal; }

/* CTA band */
.cta-band { background: hsl(var(--navy)); color: #fff; text-align: center; }
.cta-band h2 { color: #fff; font-size: clamp(1.9rem, 4vw, 2.6rem); }
.cta-band p { color: hsl(203 30% 90%); font-size: 1.12rem; margin: 1rem auto 2rem; max-width: 620px; }

/* Split (page) */
.split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 3rem; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 2rem; } }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 2.5rem; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.form-card { background: hsl(var(--card)); border: 1px solid hsl(var(--border)); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow-md); }
.field { margin-bottom: 1.15rem; }
.field label { display: block; font-family: var(--font-body); font-weight: 600; font-size: 0.9rem; margin-bottom: 0.4rem; }
.field input, .field textarea {
  width: 100%; padding: 0.75rem 0.9rem; border: 1px solid hsl(var(--border)); border-radius: 0.5rem;
  background: hsl(var(--background)); color: hsl(var(--foreground)); font: inherit; font-size: 0.99rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus, .field textarea:focus { outline: none; border-color: hsl(var(--blue)); box-shadow: 0 0 0 3px hsl(var(--blue) / 0.16); }
.field textarea { resize: vertical; min-height: 130px; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { margin-top: 1rem; font-size: 0.9rem; color: hsl(var(--muted-foreground)); }
.form-note.ok { color: hsl(150 55% 34%); font-weight: 700; }
:root.dark .form-note.ok { color: hsl(150 50% 60%); }

.info-block { display: grid; gap: 1.5rem; }
.info-item { display: flex; gap: 1rem; align-items: flex-start; }
.info-item .ii-icon { width: 44px; height: 44px; flex: none; border-radius: 0.6rem; background: hsl(var(--navy) / 0.09); color: hsl(var(--navy)); display: inline-flex; align-items: center; justify-content: center; }
:root.dark .info-item .ii-icon { background: hsl(var(--blue) / 0.16); color: hsl(var(--blue)); }
.info-item .ii-icon svg { width: 20px; height: 20px; }
.info-item h4 { font-size: 1.05rem; margin-bottom: 0.15rem; }
.info-item p, .info-item a { color: hsl(var(--muted-foreground)); font-size: 0.98rem; }
.info-item a:hover { color: hsl(var(--blue)); }

/* ---------- Footer ---------- */
.site-footer { background: hsl(var(--navy-dark)); color: hsl(203 25% 82%); padding-block: 3.5rem 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 2.5rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 2rem; } }
.site-footer .footer-logo { height: 34px; width: auto; filter: brightness(0) invert(1); margin-bottom: 1rem; }
.site-footer h4 { font-family: var(--font-body); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.14em; margin-bottom: 1rem; color: hsl(var(--blue-light)); font-weight: 700; }
.site-footer p.blurb { color: hsl(203 22% 76%); max-width: 340px; font-size: 0.97rem; }
.site-footer ul li { margin-bottom: 0.6rem; }
.site-footer ul a, .site-footer .fcontact { color: hsl(203 22% 80%); font-size: 0.95rem; }
.site-footer ul a:hover { color: hsl(var(--blue)); }
.site-footer .fcontact { display: flex; flex-direction: column; gap: 0.5rem; }
.site-footer .fcontact a:hover { color: hsl(var(--blue)); }
.footer-bottom { border-top: 1px solid hsl(0 0% 100% / 0.12); margin-top: 2.5rem; padding-top: 1.5rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; font-size: 0.87rem; color: hsl(203 20% 68%); }
.footer-bottom a:hover { color: hsl(var(--blue)); }

/* ---------- Reveal on scroll ---------- */
/* Hidden state applies ONLY when JS is active (html.js), so no-JS users see all content. */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .btn:hover, .card:hover, .company-card:hover { transform: none; }
}
