/* ============================================
   F1R3FLY.IO — Rebuilt Mobile-First CSS
   ============================================
   Brand: Black bg (#0A0A0A), section gradients, Josefin Sans headings
   Layout: CSS Grid + Flexbox, no fixed heights
   Approach: Mobile-first with breakpoints at 768px and 1024px
   ============================================ */

/* --- Reveal page once styles are parsed (prevents FOUC) --- */
html { visibility: visible; }

/* --- Custom Properties (Brand System) --- */
:root {
  /* Colors */
  --color-bg: #000000;
  /* ALL body text is white. No greys, no off-whites. Keep it this way forever. */
  --color-text: #ffffff;
  --color-text-muted: #ffffff;
  --color-text-faint: rgba(255, 255, 255, 0.5);
  --color-white: #fff;
  --color-accent: #3FA9F5;
  --color-highlight: #F3D630;
  --color-border: rgba(255, 255, 255, 0.2);
  --color-border-faint: rgba(255, 255, 255, 0.08);
  --color-card-bg: rgba(20, 20, 25, 0.85);
  --color-card-bg-hover: rgba(30, 30, 35, 0.95);

  /* Gradients */
  --gradient-brand: linear-gradient(90deg, #F3D630 0%, #8BB999 100%);
  --gradient-nav-cta: linear-gradient(90deg, #5c0269, #7b0429);
  --gradient-developer: linear-gradient(90deg, #007BC4, #009188);
  --gradient-client: linear-gradient(90deg, #5c0269, #7b0429);
  --gradient-partner: linear-gradient(90deg, #0c8e23, #7a9d0e);
  --gradient-neutral: linear-gradient(90deg, #2a3441, #3d4a5c);

  /* Section gradients */
  --gradient-purple: linear-gradient(90deg, #002537 0%, #021135 100%);
  --gradient-teal: linear-gradient(90deg, #002624 0%, #00294b 100%);
  --gradient-magenta: linear-gradient(90deg, #360008 0%, #290034 100%);
  --gradient-green: linear-gradient(90deg, #343a00 0%, #003118 100%);
  --gradient-section-neutral: linear-gradient(90deg, #282C2D 0%, #021135 100%);

  /* Typography */
  --font-heading: 'Josefin Sans', sans-serif;
  --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --leading-body: 1.7;
  --leading-tight: 1.3;
  --tracking-wide: 1.47px;
  --tracking-label: 1.5px;

  /* Spacing */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 40px;
  --space-xl: 60px;
  --space-2xl: 80px;

  /* Layout */
  --container-max: 1400px;
  --nav-height: 96px; /* measured from DOM: 30px padding + 40px logo + 25px line-margin + 1px line */
  --border-radius: 12px;

  /* Section band spacing */
  --section-band-v: 60px;
  --section-band-v-bottom: 60px;
  --eyebrow-to-h2: 16px;
  --h2-to-body: 14px;
  --body-to-content: 24px;
  --eyebrow-offset: 24px; /* height of eyebrow + gap, used to align h2 in sections without eyebrow */

  /* Z-index scale */
  --z-base: 1;
  --z-parallax-bg: 0;
  --z-parallax-mid: 1;
  --z-parallax-fg: 2;
  --z-content: 3;
  --z-nav: 100;
  --z-overlay: 200;
  --z-modal: 300;
}

/* --- Reset & Base --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  /* scroll-behavior handled by JS — removed from CSS to prevent
     conflicts between CSS smooth scroll and JS scrollTo calls */
}

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: var(--leading-body);
  font-weight: 300;
  font-size: 16px;
  letter-spacing: 0.04em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  hyphens: none;
  -webkit-hyphens: none;
  overflow-wrap: break-word;
  word-break: normal;
}

/* Josefin Sans: ONLY headers, eyebrows, and navigation */
h1, h2, .label, .nav-links a, .nav-cta {
  font-family: var(--font-heading);
  text-wrap: balance;
}
/* Everything else uses Source Sans 3 (body font) */
h3, h4, h5, h6 { text-wrap: balance; }

p, .section-intro, li { text-wrap: pretty; }

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

/* --- Gradient Text (shared pattern) ---
   Brand gradient applied as text color via background-clip.
   Used by: eyebrow labels, nav subtitle, hero subtitle, team roles */
.label,
.nav-logo-subtitle,
.hero-subsidiary,
.hero-subsidiary a,
.team-member .role {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Skip Navigation (a11y) --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-sm);
  padding: var(--space-xs) var(--space-sm);
  background: var(--color-accent);
  color: var(--color-bg);
  font-weight: 600;
  z-index: 999;
  border-radius: 4px;
}
.skip-link:focus { top: var(--space-sm); }

/* --- Navigation --- */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: var(--z-nav);
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.nav-container {
  width: 100%;
  padding: 30px 30px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.nav-logo-wordmark { height: 40px; width: auto; }

.nav-logo-area {
  display: flex;
  align-items: center;
  gap: 0;
}

.nav-logo-divider {
  color: var(--color-white);
  font-size: 18px;
  font-weight: 200;
  margin: 0 10px;
  display: none;
}

.nav-logo-subtitle {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 330;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  white-space: nowrap;
  display: none;
  width: fit-content;
}

.nav-logo-subtitle a {
  -webkit-text-fill-color: inherit;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.nav-logo-subtitle a:hover {
  opacity: 0.7;
}

.nav-line {
  width: 100%;
  height: 1px;
  background: var(--gradient-brand);
  margin-top: 25px;
}

/* Desktop nav links - hidden on mobile */
.nav-links {
  display: none;
  gap: 20px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--color-white);
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 330;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  transition: color 0.3s ease;
}

.nav-links a:hover { color: var(--color-accent); }
.nav-links a.active { color: var(--color-highlight) !important; font-weight: 400; }
.nav-divider { color: rgba(255,255,255,0.3); font-weight: 100; font-size: 18px; }

.nav-cta {
  display: inline-block;
  margin-left: 20px;
  height: 36px;
  line-height: 36px;
  padding: 0 32px !important;
  font-size: 16px !important;
  font-weight: 400 !important;
  letter-spacing: var(--tracking-wide) !important;
  background: var(--gradient-nav-cta) !important;
  border: none;
  border-radius: 50px;
  color: var(--color-white) !important;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: none !important;
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(123, 4, 41, 0.4);
}

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  cursor: pointer;
  z-index: calc(var(--z-overlay) + 1);
  background: none;
  border: none;
  padding: 0;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-white);
  transition: all 0.3s ease;
}

.hamburger[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

/* Mobile menu overlay */
.mobile-menu-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100vh;
  background: rgba(0, 0, 0, 0.98);
  z-index: var(--z-overlay);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active { opacity: 1; visibility: visible; }

.mobile-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 30px;
}

.mobile-menu a {
  color: var(--color-white);
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 300;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

.mobile-menu a:hover { color: var(--color-accent); }

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 20px 60px;
  position: relative;
  background: var(--color-bg);
  overflow: hidden;
}

.hero-parallax-bg,
.hero-parallax-pines,
.hero-parallax-branches {
  position: absolute;
  left: 0;
  width: 100%;
  background-size: cover;
  background-repeat: no-repeat;
  will-change: transform;
}

.hero-parallax-bg {
  top: 0;
  height: 120%;
  background-image: url('../images/parallax-stars.webp');
  background-position: center top;
  z-index: var(--z-parallax-bg);
}

.hero-parallax-pines {
  bottom: 0;
  height: 60%;
  background-image: url('../images/parallax-pines.png');
  background-position: center bottom;
  z-index: var(--z-parallax-mid);
}

.hero-parallax-branches {
  bottom: 0;
  height: 50%;
  background-image: url('../images/parallax-branches.png');
  background-position: center bottom;
  z-index: var(--z-parallax-fg);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center,
    rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0.7) 100%);
  z-index: var(--z-parallax-mid);
}

.hero-bottom-fade {
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 200px;
  background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.5) 40%, #000 100%);
  z-index: var(--z-content);
  pointer-events: none;
}

.hero-fireflies {
  position: absolute;
  inset: 0;
  z-index: var(--z-parallax-fg);
  pointer-events: none;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: var(--z-content);
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-logo { max-width: 500px; margin: 0 auto 13px; }

.hero-subsidiary {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 330;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  margin-top: 20px;
  text-align: center;
}

.hero-subsidiary a {
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.hero-subsidiary a:hover {
  background: var(--color-accent);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-arrow {
  display: inline-block;
  margin-top: var(--space-lg);
  animation: bounce 4s infinite ease-in-out;
  text-decoration: none;
}

.hero-arrow img { width: 55px; height: 55px; }

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* --- Sections & Layout --- */
.section {
  padding: var(--space-lg) 20px;
  max-width: var(--container-max);
  margin: 0 auto;
}

/* Nav-linked page sections: fixed height so every nav click
   lands at the same position and gradients align predictably.
   85vh lets the next section's gradient peek in at the bottom.
   Mobile: min-height instead of height to prevent content overflow/overlap. */
.section-page {
  min-height: calc(85vh - var(--nav-height));
  /* scroll-margin-top = nav height so section's black bg sits flush
     against nav bottom. No gradient from previous section visible. */
  scroll-margin-top: var(--nav-height);
  display: flex;
  flex-direction: column;
  overflow: visible;
  position: relative;
  z-index: var(--z-base);
  background-color: var(--color-bg);
}

/* Double-class selector: higher specificity than .section shorthand
   in media queries, so this padding-top survives breakpoint changes.
   96px + 24px eyebrow-offset = 120px from nav bottom to h2. */
.section.section-page {
  padding-top: 53px;
}

.section-band {
  padding: var(--section-band-v) 20px var(--section-band-v-bottom);
  margin: 0;
}

.section-band > .section { padding-top: 0; padding-bottom: 0; }

.section-band.purple   { background: var(--gradient-purple); }
.section-band.teal     { background: var(--gradient-teal); }
.section-band.magenta  { background: var(--gradient-magenta); }
.section-band.green    { background: var(--gradient-green); }
.section-band.neutral  { background: var(--gradient-section-neutral); }

h2 {
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  margin-bottom: var(--h2-to-body);
  font-weight: 100;
  letter-spacing: 0.5px;
  color: var(--color-white);
  line-height: 1.4;
}

/* When h2 is the first child (no eyebrow label above it),
   add offset so it aligns with h2s that follow an eyebrow label */
h2:first-child,
.fly-in-header:first-child {
  margin-top: var(--eyebrow-offset);
}

/* When h2 follows a .label eyebrow, no extra offset needed */
.label + h2,
.label + .fly-in-header {
  margin-top: 0;
}

h3 {
  font-size: 1.2rem;
  margin-bottom: 15px;
  font-weight: 400;
  letter-spacing: 0.5px;
  color: var(--color-white);
}

.section-intro {
  font-size: 16px;
  color: var(--color-text);
  margin-bottom: var(--body-to-content);
  line-height: var(--leading-body);
  max-width: 1100px;
}

/* --- Label (eyebrow text) --- */
.label {
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  background-size: 100% 100%;
  display: inline-block;
  margin-bottom: var(--eyebrow-to-h2);
  font-weight: 700;
}

/* --- Card Grid --- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: var(--body-to-content);
}

.card {
  position: relative;
  background: transparent;
  border-radius: var(--border-radius);
  padding: 20px;
  border: 1px dashed var(--color-border);
  display: flex;
  flex-direction: column;
}

.card .icon {
  width: 50px;
  height: 55px;
  margin-bottom: 12px;
}

.card h3 { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.card p { font-size: 16px; color: var(--color-text); line-height: var(--leading-body); margin-bottom: 12px; }

.card ul {
  font-size: 16px;
  color: var(--color-text);
  line-height: var(--leading-body);
  padding-left: 20px;
  margin-bottom: 16px;
  list-style: disc;
}

.card li { margin-bottom: 4px; }

/* --- Text Grid (no boxes) --- */
.text-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: var(--body-to-content);
}

.text-grid h3 { font-size: 16px; font-weight: 700; }

.text-grid ul {
  font-size: 16px;
  color: var(--color-text);
  line-height: var(--leading-body);
  padding-left: 20px;
  margin-bottom: 30px;
  list-style: disc;
}

.text-grid li { margin-bottom: var(--space-xs); }

/* Two column variant */
.text-grid--two {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--body-to-content);
  margin-top: var(--body-to-content);
}

/* --- Buttons --- */
.gradient-btn {
  display: inline-block;
  height: 36px;
  line-height: 36px;
  padding: 0 32px;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: var(--tracking-wide);
  color: var(--color-white);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.gradient-btn:hover { transform: translateY(-2px); }

.gradient-btn.btn-developer { background: var(--gradient-developer); }
.gradient-btn.btn-developer:hover { box-shadow: 0 10px 30px rgba(0, 122, 115, 0.4); }
.gradient-btn.btn-client { background: var(--gradient-client); }
.gradient-btn.btn-client:hover { box-shadow: 0 10px 30px rgba(123, 4, 41, 0.4); }
.gradient-btn.btn-partner { background: var(--gradient-partner); }
.gradient-btn.btn-partner:hover { box-shadow: 0 10px 30px rgba(122, 157, 14, 0.4); }
.gradient-btn.btn-neutral { background: var(--gradient-neutral); }
.gradient-btn.btn-neutral:hover { box-shadow: 0 10px 30px rgba(61, 74, 92, 0.4); }

.card .gradient-btn { margin-top: auto; align-self: start; }

/* --- Math Parallax Band --- */
.parallax-image {
  height: 150px;
  background-image: url('../images/parallax-stars.webp');
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  position: relative;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: none;
}

.parallax-ticker {
  position: absolute;
  top: 5px;
  bottom: 0;
  left: 0;
  white-space: nowrap;
  display: flex;
  align-items: center;
  animation: ticker-scroll 160s linear infinite;
  font-family: var(--font-heading);
  font-size: 158px;
  line-height: 0.65;
  font-weight: 900;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  mix-blend-mode: overlay;
  pointer-events: none;
  user-select: none;
}

.parallax-ticker span {
  flex-shrink: 0;
}

.parallax-ticker-boost {
  opacity: 0.5;
}

@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@supports (background-attachment: fixed) {
  @media (hover: hover) {
    .parallax-image { background-attachment: fixed; }
  }
}

.parallax-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,0.15) 70%, rgba(0,0,0,0.3) 100%);
}

/* --- Client Logo Grid (static) --- */
.client-logo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.client-logo-grid .carousel-logo {
  width: 100%;
  aspect-ratio: 2 / 1;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--color-border);
  border-radius: var(--border-radius);
  transition: border-color 0.3s ease, transform 0.2s ease, background 0.4s ease;
}
.client-logo-grid .carousel-logo:hover {
  border-color: transparent;
  transform: scale(1.02);
  background: var(--gradient-magenta);
}

.client-logo-grid .carousel-logo img {
  max-width: 75%;
  max-height: 60%;
  object-fit: contain;
}

.client-body-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  align-items: start;
  margin-top: var(--space-lg);
}

/* --- FAQ Accordion --- */
.faq-accordion-item {
  overflow: hidden;
  padding-bottom: 15px;
  margin-bottom: 15px;
}

.faq-accordion-item:last-child { margin-bottom: 0; }

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0 8px;
  cursor: pointer;
  transition: color 0.3s ease;
}

.faq-question:hover, .faq-question:hover h3 { color: var(--color-accent); }

.faq-question h3 {
  font-size: 18px;
  font-weight: 400;
  color: var(--color-white);
  margin: 0;
  transition: color 0.3s ease;
}

.faq-icon {
  font-size: 24px;
  font-weight: 300;
  color: var(--color-accent);
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 20px;
}

.faq-accordion-item.open .faq-icon { transform: rotate(45deg); }

.faq-answer-accordion {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.faq-accordion-item.open .faq-answer-accordion { max-height: 500px; }

.faq-answer-accordion p {
  font-size: 16px;
  color: var(--color-text);
  line-height: var(--leading-body);
  margin-bottom: var(--space-sm);
  max-width: 800px;
}

.faq-answer-accordion p:last-child { margin-bottom: 0; }

/* --- FAQ Unified Section --- */
.faq-subsection-label {
  margin-top: 50px;
}

/* --- In-content links --- */
.card a:not(.gradient-btn),
.section-band a:not(.gradient-btn),
.section a:not(.gradient-btn):not(.nav-logo):not(.social-icon):not(.hero-arrow) {
  transition: color 0.3s ease;
}
.card a:not(.gradient-btn):hover,
.section-band a:not(.gradient-btn):hover {
  color: var(--color-highlight) !important;
}

/* --- Expandable Blog Cards --- */
.blog-parent {
  background: transparent;
  border: 1px dashed var(--color-border);
  border-radius: var(--border-radius);
  padding: 30px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
}
.blog-parent:hover {
  border-color: transparent;
  transform: scale(1.02);
}
.blog-parent:nth-child(6n+1):hover { background: var(--gradient-purple); }
.blog-parent:nth-child(6n+2):hover { background: var(--gradient-teal); }
.blog-parent:nth-child(6n+3):hover { background: var(--gradient-magenta); }
.blog-parent:nth-child(6n+4):hover { background: var(--gradient-green); }
.blog-parent:nth-child(6n+5):hover { background: var(--gradient-purple); }
.blog-parent:nth-child(6n+6):hover { background: var(--gradient-teal); }
/* Blog tags match eyebrow .label style (minus gradient — uses per-category color) */
.blog-parent .blog-tag {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  margin-bottom: 12px;
  display: block;
}
.blog-tag-ai    { color: #3FA9F5; }
.blog-tag-comp  { color: #F3D630; }
.blog-tag-phil  { color: #8BB999; }
.blog-tag-dev   { color: #009188; }
/* Blog card h3 matches .card h3 */
.blog-parent h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: var(--leading-tight);
  color: var(--color-white);
}
/* Blog body text matches site standard: 16px, white. Keep consistent. */
.blog-parent .blog-parent-desc {
  font-size: 16px;
  color: var(--color-text);
  line-height: var(--leading-body);
  margin-bottom: 16px;
}
/* Blog date matches body text */
.blog-parent .blog-parent-date {
  font-size: 16px;
  color: var(--color-text);
}
/* --- SPA Content Transitions --- */
/* Crossfade for smooth page swaps. No transform on default state
   to avoid stacking context issues that affect scroll measurements. */
main#app {
  opacity: 1;
}
main#app.spa-fade-out {
  opacity: 0;
  transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
main#app.spa-fade-in {
  animation: spaFadeIn 0.3s cubic-bezier(0, 0, 0.2, 1) forwards;
}
@keyframes spaFadeIn {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}

/* --- Blog Link Cards (link to individual article pages) --- */
a.blog-link-card {
  text-decoration: none;
  display: block;
  transition: border-color 0.3s ease, transform 0.2s ease;
}
a.blog-link-card:hover {
  border-color: rgba(255,255,255,0.3);
  transform: translateY(-2px);
}
/* Blog read-more matches site link style */
.blog-read-more {
  display: block;
  margin-top: 16px;
  font-size: 16px;
  font-weight: 300;
  color: var(--color-accent);
  transition: opacity 0.2s ease;
}
a.blog-link-card:hover .blog-read-more {
  opacity: 0.8;
}

/* --- Team Grid --- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: var(--body-to-content);
}

.team-member { text-align: center; }

.team-photo {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-member h3 { font-size: 16px; margin-bottom: 6px; font-weight: 400; }

.team-member .role {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
}

/* --- Partner / Team Image --- */
.full-image {
  width: 100%;
  height: 300px;
  margin-top: var(--space-lg);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.full-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Contact Form --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  margin-top: var(--space-lg);
  align-items: start;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 400;
  color: rgba(255,255,255,0.9);
  font-size: 16px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  background: rgba(255,255,255,0.05);
  border: 1px dashed var(--color-border);
  border-radius: 8px;
  color: var(--color-white);
  font-family: inherit;
  font-size: 16px;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  border-style: solid;
}

.form-group textarea { min-height: 100px; resize: vertical; }
.form-group select option { background: #111; color: var(--color-white); }

/* --- Cross-link Banner --- */
.crosslink-banner {
  background: var(--gradient-teal);
  padding: 30px 40px;
  text-align: center;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.crosslink-banner + .site-footer {
  margin-top: 0 !important;
}

.gradient-btn.btn-nav-cta {
  background: var(--gradient-nav-cta);
}

.gradient-btn.btn-nav-cta:hover {
  box-shadow: 0 10px 30px rgba(92, 2, 105, 0.4);
}

/* --- Footer --- */
.site-footer {
  text-align: left;
  color: var(--color-text);
  font-size: 14px;
}

.footer-grid {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
}

.footer-heading {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-white);
  margin-bottom: 20px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li { margin-bottom: 10px; }

.footer-links a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--color-white); }

.footer-address {
  color: rgba(255,255,255,0.5);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 8px;
}

.footer-address a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-address a:hover { color: var(--color-white); }

.footer-bottom {
  max-width: var(--container-max);
  margin: 50px auto 0;
  padding-top: 30px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom p {
  color: rgba(255,255,255,0.4);
  font-size: 13px;
}

.footer-bottom-links {
  display: flex;
  gap: 12px;
  align-items: center;
}

.footer-bottom-links a {
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s;
}

.footer-bottom-links a:hover { color: var(--color-white); }

.footer-bottom-links span {
  color: rgba(255,255,255,0.2);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

.social-icons {
  display: flex;
  gap: 16px;
  margin-bottom: 30px;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: var(--color-white);
  transition: all 0.3s ease;
}

.social-icon:hover { background: var(--color-accent); color: var(--color-bg); }
.social-icon svg { width: 20px; height: 20px; }

/* --- Scroll Animations --- */
.animate-in {
  opacity: 0;
  will-change: opacity, transform;
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-in.from-left   { transform: translateX(-20px); }
.animate-in.from-right  { transform: translateX(20px); }
.animate-in.from-bottom { transform: translateY(20px); }

.animate-in.visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.animate-in.delay-1 { transition-delay: 0.1s; }
.animate-in.delay-2 { transition-delay: 0.2s; }
.animate-in.delay-3 { transition-delay: 0.3s; }
.animate-in.delay-4 { transition-delay: 0.4s; }

.fly-in-header {
  opacity: 0;
  transform: translateY(-12px);
  will-change: opacity, transform;
  transition: opacity 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fly-in-header.visible { opacity: 1; transform: translate3d(0, 0, 0); }

.fade-in {
  opacity: 0;
  transform: translateY(12px);
  will-change: opacity, transform;
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-in.visible { opacity: 1; transform: translate3d(0, 0, 0); }
.fade-in.delay-1 { transition-delay: 0.15s; }
.fade-in.delay-2 { transition-delay: 0.3s; }
.fade-in.delay-3 { transition-delay: 0.45s; }

/* --- Quote Block --- */
.quote-block { text-align: center; }
.quote-attribution {
  margin-top: 20px;
  color: var(--color-text-muted);
}

/* ============================================
   RESPONSIVE: TABLET (768px+)
   ============================================ */
@media (min-width: 768px) {
  .mobile-break { display: none; }
  .hero-subsidiary { white-space: nowrap; }

  .nav-container { padding: 30px 40px 0; }
  .nav-logo-divider { display: inline; }
  .nav-logo-subtitle { display: inline-block; }

  .hero { padding: 120px 40px 80px; }
  .hero-logo { max-width: 500px; }

  .section { padding: var(--space-lg) 40px; }
  .section-page { min-height: calc(85vh - var(--nav-height)); }
  .section-band { padding: var(--section-band-v) 40px; }

  .card-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .text-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .text-grid--two { grid-template-columns: 1fr 1fr; gap: 50px; }
  .contact-grid { grid-template-columns: 1fr 1fr; gap: 60px; }

  .team-grid { grid-template-columns: repeat(3, 1fr); gap: 30px; }
  .team-member h3 { font-size: 18px; }
  .team-member .role { font-size: 16px; }

  .client-logo-grid { grid-template-columns: repeat(4, 1fr); }
  .client-body-grid { grid-template-columns: 2fr 1fr; }

  .full-image { height: 400px; }
  .parallax-image { height: 130px; }

}

/* ============================================
   RESPONSIVE: DESKTOP (1024px+)
   ============================================ */
@media (min-width: 1024px) {
  /* Show desktop nav, hide hamburger */
  .nav-links { display: flex; }
  .hamburger { display: none; }
  .mobile-menu-overlay { display: none !important; }

  .hero-logo { max-width: 500px; }

  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .text-grid { grid-template-columns: repeat(3, 1fr); }
  .team-grid { grid-template-columns: repeat(4, 1fr); }

  .full-image { height: 500px; }
  .parallax-image { height: 130px; }

  .label { font-size: 18px; }

}

/* ============================================
   RESPONSIVE: WIDE (1440px+)
   ============================================ */
@media (min-width: 1440px) {
  .section { padding: var(--space-xl) 60px; }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .hero-arrow { animation: none; }
}

/* --- Print --- */
@media print {
  .site-nav, .hero-parallax-bg, .hero-parallax-pines, .hero-parallax-branches,
  .hero-fireflies, .hero-overlay, .hero-bottom-fade, .hamburger,
  .mobile-menu-overlay { display: none !important; }
  body { background: #fff; color: #000; }
  .section-band { background: #f5f5f5 !important; }
}
