/* =========================================================
   Grand Strategy Partners — static stylesheet
   Mirrors the design tokens from the Lovable build exactly:
   - HSL CSS variables matching src/index.css
   - Playfair Display (display) + Source Sans 3 (body)
   - section-padding, corporate-divider utilities preserved
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Source+Sans+3:wght@300;400;500;600;700&display=swap');

/* ---------- Design tokens (HSL, identical to original) ---------- */
:root {
  --background: 40 20% 97%;
  --foreground: 220 25% 14%;

  --card: 40 15% 99%;
  --card-foreground: 220 25% 14%;

  --primary: 218 35% 15%;
  --primary-foreground: 40 30% 95%;

  --muted: 40 10% 92%;
  --muted-foreground: 220 10% 42%;

  --accent: 40 50% 48%;
  --accent-foreground: 218 35% 12%;

  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 210 40% 98%;

  --border: 40 12% 86%;
  --input: 40 12% 86%;
  --ring: 40 50% 48%;

  --section-alt: 40 15% 95%;
  --gold-glow: 40 60% 55%;

  --radius: 0.25rem;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: 'Source Sans 3', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; padding: 0; margin: 0; }

/* ---------- Typography defaults ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, serif;
  margin: 0;
}
p { margin: 0; }

/* ---------- Utility classes (mirrors original Tailwind utilities) ---------- */
.section-padding {
  padding: 6rem 1.5rem;          /* py-24 px-6 */
}
@media (min-width: 768px)  { .section-padding { padding: 8rem 3rem; } }   /* md: py-32 px-12 */
@media (min-width: 1024px) { .section-padding { padding: 8rem 5rem; } }   /* lg: px-20      */

.corporate-divider {
  width: 3rem;        /* 48px */
  height: 1px;
  background: hsl(var(--accent));
  display: block;
}

.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: hsl(var(--accent));
  font-weight: 400;
  margin: 0;
}

.section-h2 {
  font-size: clamp(1.875rem, 3vw, 2.25rem);   /* text-3xl md:text-4xl */
  font-weight: 600;
  line-height: 1.25;
  color: hsl(var(--foreground));
}

/* ============ NAVBAR ============ */
.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: hsl(var(--primary));
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}
.nav-inner {
  max-width: 1152px;       /* max-w-6xl */
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;          /* py-5 px-6 */
}
@media (min-width: 768px) { .nav-inner { padding: 1.25rem 3rem; } }     /* md: px-12 */

.brand {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.125rem;
  font-weight: 600;
  color: hsl(var(--primary-foreground));
  letter-spacing: 0.025em;
}

.nav-links {
  display: none;
  gap: 2.5rem;          /* gap-10 */
  align-items: center;
}
@media (min-width: 768px) { .nav-links { display: flex; } }

.nav-link {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  color: hsl(var(--primary-foreground) / 0.6);
  transition: color 200ms;
}
.nav-link:hover { color: hsl(var(--accent)); }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--primary-foreground));
  padding: 0.25rem;
}
@media (min-width: 768px) { .nav-toggle { display: none; } }

.nav-toggle svg { width: 1.25rem; height: 1.25rem; }
.nav-toggle .icon-x { display: none; }
.nav-toggle.is-open .icon-menu { display: none; }
.nav-toggle.is-open .icon-x { display: block; }

.nav-mobile {
  display: none;
  background: hsl(var(--primary) / 0.98);
  backdrop-filter: blur(12px);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 300ms ease, opacity 300ms ease;
}
.nav-mobile.is-open {
  display: block;
  max-height: 24rem;
  opacity: 1;
}
@media (min-width: 768px) { .nav-mobile { display: none !important; } }
.nav-mobile-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem 0;          /* py-8 */
}

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    hsl(218 35% 8% / 0.85) 0%,
    hsl(218 30% 12% / 0.75) 50%,
    hsl(218 35% 8% / 0.9) 100%
  );
}
.hero-top-strip {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: hsl(var(--accent));
  z-index: 20;
}
.hero-bottom-fade {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 8rem;        /* h-32 */
  background: linear-gradient(to top, hsl(var(--background)), transparent);
}
.hero-content {
  position: relative;
  z-index: 10;
  max-width: 64rem;        /* max-w-5xl */
  margin: 0 auto;
  padding: 0 1.5rem;
  text-align: center;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.hero-eyebrow-line {
  width: 3rem;
  height: 1px;
  background: hsl(var(--accent));
}
.hero-eyebrow-text {
  color: hsl(var(--accent));
  font-size: 0.75rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
}

.hero-title {
  font-size: clamp(2.25rem, 6vw, 4.5rem);   /* text-4xl md:text-6xl lg:text-7xl */
  font-weight: 600;
  color: hsl(var(--primary-foreground));
  line-height: 1.1;
  margin-bottom: 2rem;
  letter-spacing: -0.025em;
}

.hero-divider {
  width: 4rem;       /* w-16 */
  height: 1px;
  background: hsl(var(--accent));
  margin: 0 auto 2rem;
}

.hero-subhead {
  font-size: 1.125rem;
  color: hsl(var(--primary-foreground) / 0.75);
  font-weight: 300;
  max-width: 42rem;     /* max-w-2xl */
  margin: 0 auto 3rem;
  line-height: 1.625;
}
@media (min-width: 768px) { .hero-subhead { font-size: 1.25rem; } }

.hero-cta {
  display: inline-block;
  border: 1px solid hsl(var(--accent) / 0.8);
  color: hsl(var(--accent));
  padding: 1rem 2.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-weight: 500;
  transition: background 300ms, color 300ms;
}
.hero-cta:hover {
  background: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

/* ============ ABOUT / HOW-WE-WORK shared layout ============ */
.split-grid {
  display: grid;
  gap: 3rem;
  max-width: 64rem;       /* max-w-5xl */
  margin: 0 auto;
  align-items: start;
}
@media (min-width: 768px) {
  .split-grid {
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
  }
}

.split-left p.eyebrow { margin: 1rem 0; }
.split-right {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  font-size: 17px;
  line-height: 1.8;
  color: hsl(var(--muted-foreground));
}

#about { background: hsl(var(--background)); }

#approach { background: hsl(var(--primary)); }
#approach .section-h2 { color: hsl(var(--primary-foreground)); }
#approach .split-right { color: hsl(var(--primary-foreground) / 0.75); }

/* ============ SERVICES ============ */
#services { background: hsl(var(--section-alt)); }
.services-inner {
  max-width: 1152px;
  margin: 0 auto;
}
.services-header {
  text-align: center;
  margin-bottom: 5rem;     /* mb-20 */
}
.services-header .corporate-divider {
  margin: 0 auto 1.5rem;
}
.services-header .eyebrow { margin-bottom: 1rem; }
.services-header .section-h2 { display: inline-block; }

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: hsl(var(--border));
}
@media (min-width: 768px)  { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .services-grid { grid-template-columns: repeat(4, 1fr); } }

.service-tile {
  background: hsl(var(--card));
  padding: 2rem;
  transition: background 300ms;
}
@media (min-width: 768px) { .service-tile { padding: 2.5rem; } }
.service-tile:hover { background: hsl(var(--muted) / 0.3); }

.service-icon { color: hsl(var(--accent)); }
.service-icon svg { width: 2rem; height: 2rem; stroke-width: 1.5; }

.service-divider {
  width: 2rem;
  height: 1px;
  background: hsl(var(--accent));
  margin: 1rem 0 1.5rem;
}

.service-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  line-height: 1.375;
  margin-bottom: 1.5rem;
}

.service-list { display: flex; flex-direction: column; gap: 0.75rem; }
.service-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: 0.875rem;
  line-height: 1.625;
  color: hsl(var(--muted-foreground));
}
.service-list li::before {
  content: '\25C6';        /* ◆ */
  color: hsl(var(--accent));
  font-size: 8px;
  margin-top: 6px;
  flex-shrink: 0;
}

/* ============ CONTACT ============ */
.contact-section { background: hsl(var(--background)); }
.contact-inner {
  max-width: 48rem;       /* max-w-3xl */
  margin: 0 auto;
}
.contact-header {
  text-align: center;
  margin-bottom: 3.5rem;       /* mb-14 */
}
.contact-header .corporate-divider { margin: 0 auto 1.5rem; }
.contact-header .eyebrow { margin-bottom: 1rem; }
.contact-header h2 {
  font-size: clamp(1.875rem, 3vw, 2.25rem);
  font-weight: 600;
  color: hsl(var(--foreground));
  margin-bottom: 1.5rem;
}
.contact-header p {
  color: hsl(var(--muted-foreground));
  font-size: 1.125rem;
  line-height: 1.625;
}

.contact-form { display: flex; flex-direction: column; gap: 1.5rem; }
.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .form-row { grid-template-columns: 1fr 1fr; }
}
.form-field { display: flex; flex-direction: column; gap: 0.5rem; }
.form-field label {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
}
.form-field input,
.form-field textarea {
  width: 100%;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 0;
  height: 3rem;
  padding: 0 0.75rem;
  font-family: inherit;
  font-size: 0.875rem;
  color: hsl(var(--foreground));
  transition: border-color 150ms, box-shadow 150ms;
}
.form-field textarea {
  height: auto;
  padding: 0.75rem;
  resize: none;
  line-height: 1.5;
}
.form-field input::placeholder,
.form-field textarea::placeholder {
  color: hsl(var(--muted-foreground) / 0.4);
}
.form-field input:focus-visible,
.form-field textarea:focus-visible {
  outline: none;
  border-color: hsl(var(--accent));
  box-shadow: 0 0 0 2px hsl(var(--accent) / 0.4);
}

.form-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding-top: 1rem;
}
@media (min-width: 640px) { .form-actions { flex-direction: row; } }

.btn-primary {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  padding: 1rem 2.5rem;       /* py-6 px-10 visual match */
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background 300ms;
  width: 100%;
}
@media (min-width: 640px) { .btn-primary { width: auto; } }
.btn-primary:hover { background: hsl(var(--primary) / 0.9); }
.btn-primary:disabled { opacity: 0.7; cursor: not-allowed; }
.btn-primary svg { width: 1rem; height: 1rem; }

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
  letter-spacing: 0.025em;
  transition: color 200ms;
}
.contact-email:hover { color: hsl(var(--accent)); }
.contact-email svg { width: 1rem; height: 1rem; }

.contact-page-spacer { padding-top: 6rem; }     /* pt-24 — clears fixed navbar */

/* ============ FOOTER ============ */
.footer {
  background: hsl(var(--primary));
  padding: 3rem 1.5rem;       /* py-12 px-6 */
  border-top: 1px solid hsl(var(--accent) / 0.2);
}
.footer-inner {
  max-width: 1152px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
@media (min-width: 768px) { .footer-inner { flex-direction: row; } }

.footer-copyright {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 0.875rem;
  color: hsl(var(--primary-foreground) / 0.5);
  letter-spacing: 0.025em;
}
.footer-links { display: flex; gap: 2rem; }
.footer-link {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: hsl(var(--primary-foreground) / 0.35);
  transition: color 200ms;
}
.footer-link:hover { color: hsl(var(--accent)); }

/* ============ TOAST ============ */
.toast {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  box-shadow: 0 10px 25px -5px rgb(0 0 0 / 0.15);
  max-width: 24rem;
  z-index: 100;
  opacity: 0;
  transform: translateY(-1rem);
  transition: opacity 250ms, transform 250ms;
  pointer-events: none;
}
.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.toast-title {
  font-weight: 600;
  color: hsl(var(--foreground));
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}
.toast-desc {
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
}

/* ============ 404 ============ */
.notfound {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: hsl(var(--muted));
  text-align: center;
  padding: 1.5rem;
}
.notfound h1 {
  font-size: 2.25rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  margin-bottom: 1rem;
}
.notfound p {
  font-size: 1.25rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 1rem;
}
.notfound a {
  color: hsl(var(--primary));
  text-decoration: underline;
}

/* =====================================================
   ANIMATIONS
   - Hero: animate on page load with staggered delays
   - Other sections: animated by IntersectionObserver in script.js
   ===================================================== */
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade-up-sm {
  from { opacity: 0; transform: translateY(15px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade-up-md {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Hero on-load animations (named to mirror framer-motion delays) */
.hero-eyebrow {
  opacity: 0;
  animation: fade-in 1s ease-out forwards;
}
.hero-title {
  opacity: 0;
  animation: fade-up-md 0.9s ease-out 0.2s forwards;
}
.hero-divider {
  opacity: 0;
  animation: fade-in 0.7s ease-out 0.5s forwards;
}
.hero-subhead {
  opacity: 0;
  animation: fade-up-sm 0.8s ease-out 0.6s forwards;
}
.hero-cta-wrap {
  opacity: 0;
  animation: fade-in 0.6s ease-out 0.8s forwards;
}

/* Scroll-revealed elements (set by JS once they enter the viewport) */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
  transition-delay: var(--reveal-delay, 0s);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Smaller variant — used for second columns in About / How We Work */
.reveal--soft {
  transform: translateY(20px);
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
