/**
 * The Latent Space - Main Stylesheet
 * 
 * Design system with dark theme, modern gradients, and accessible components.
 * Uses CSS custom properties for maintainable theming.
 */

@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;500;700&family=Poppins:wght@500;600;700&display=swap');

/* ==========================================================================
   Design Tokens / CSS Custom Properties
   ========================================================================== */

:root {
  /* Color Palette */
  --color-bg: #05060f;                    /* Main dark background */
  --color-surface: rgba(10, 12, 23, 0.72); /* Surface overlays */
  --color-panel: rgba(17, 20, 40, 0.88);   /* Panel backgrounds */
  --color-card: rgba(16, 19, 36, 0.9);     /* Card backgrounds */
  --color-primary: #56ccf2;                /* Primary brand color (cyan) */
  --color-secondary: #ff6b6b;              /* Secondary accent (coral) */
  --color-violet: #a78bfa;                 /* Accent color (violet) */
  --color-lime: #6ee7b7;                   /* Accent color (lime) */
  --color-text: #f5f7ff;                   /* Primary text color */
  --color-muted: rgba(245, 247, 255, 0.72); /* Muted/secondary text */
  
  /* Borders & Shadows */
  --border-soft: rgba(111, 128, 189, 0.22);
  --shadow-soft: 0 24px 80px rgba(5, 8, 20, 0.42);
  --shadow-card: 0 20px 60px rgba(5, 8, 20, 0.38);
  --shadow-elevated: 0 26px 80px rgba(5, 8, 20, 0.48);
  
  /* Border Radius */
  --radius-sm: 18px;
  --radius-md: 22px;
  --radius-lg: 28px;
  
  /* Layout */
  --max-width: 1180px;                     /* Maximum content width */
}

/* ==========================================================================
   Base Styles & Reset
   ========================================================================== */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Lato', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #05060f;
  color: var(--color-text);
  line-height: 1.7;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Skip to main content link - Hidden by default, visible on focus for accessibility */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--color-primary);
  color: #05060f;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  font-weight: 600;
  z-index: 100;
  border-radius: 0 0 4px 0;
  clip: rect(0, 0, 0, 0);
  overflow: hidden;
  white-space: nowrap;
}

.skip-link:focus {
  top: 0;
  clip: auto;
  overflow: visible;
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

/* Background gradient overlays for visual depth */
body::before,
body::after {
  content: '';
  position: fixed;
  inset: -40vh -10vw auto;
  height: 120vh;
  z-index: -2;
  pointer-events: none;
  background: radial-gradient(circle at top left, rgba(86, 204, 242, 0.18), transparent 55%),
    radial-gradient(circle at 80% 20%, rgba(167, 139, 250, 0.16), transparent 60%);
  filter: blur(0);
}

body::after {
  inset: auto -15vw -40vh;
  background: radial-gradient(circle at bottom right, rgba(110, 231, 183, 0.18), transparent 60%),
    radial-gradient(circle at 12% 88%, rgba(86, 204, 242, 0.1), transparent 60%);
}

/* Prevent body scroll when modals/menus are open */
.no-scroll {
  overflow: hidden;
}

/* ==========================================================================
   Typography & Links
   ========================================================================== */

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

a:hover {
  color: var(--color-primary);
}

/* Focus styles for keyboard navigation accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(86, 204, 242, 0.55);
  outline-offset: 3px;
}

/* Images */
img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 18px;
}

/* ==========================================================================
   Layout Components
   ========================================================================== */

main {
  padding-top: 96px; /* Account for sticky header */
}

/* Container for consistent max-width and centering */
.container {
  width: min(100% - 2.4rem, var(--max-width));
  margin-inline: auto;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(5, 7, 16, 0.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(86, 204, 242, 0.12);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.2rem 0;
}

.nav-panel-header {
  padding: 0;
  margin-bottom: 0.5rem;
}

.nav-panel-header .brand {
  flex-shrink: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.brand-text {
  display: inline-flex;
  flex-direction: column;
  gap: 0.1rem;
  line-height: 1.05;
  align-items: flex-start;
}

.brand-name {
  font-weight: 600;
}

.brand-tagline {
  display: block;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--color-muted);
  text-transform: uppercase;
}

.footer-brand .brand {
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

/* Brand logo container - circular gradient background */
.brand-mark {
  inline-size: 44px;
  block-size: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-violet));
  color: #05060f;
  font-weight: 700;
  overflow: hidden;
  padding: 8px; /* Padding ensures logo doesn't touch edges */
  box-sizing: border-box;
}

.brand-mark img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: contain; /* Maintains aspect ratio within circle */
  object-position: center;
  display: block;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero-heading {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-brand-row {
  display: inline-flex;
  align-items: center;
  gap: 1.25rem;
}

.hero-brand-row .eyebrow {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: clamp(1.6rem, 2.6vw + 0.5rem, 2.1rem);
  letter-spacing: 0.02em;
  text-transform: none;
  margin: 0;
  color: var(--color-text);
}

.hero-title-row {
  display: inline-flex;
  align-items: flex-end;
  gap: 1.5rem;
}

.hero-title-row h1 {
  margin: 0;
}

.hero-heading-logo {
  display: inline-flex;
}

.hero-heading-logo img {
  width: clamp(100px, 10vw + 40px, 160px);
  height: auto;
  display: block;
}

@media (max-width: 720px) {
  .hero-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .hero-brand-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .hero-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .hero-heading-logo img {
    width: clamp(120px, 18vw, 200px);
  }
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.desktop-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-muted);
  transition: color 0.2s ease;
}

.desktop-nav a.active {
  color: var(--color-primary);
}

/* Mobile menu toggle button (hamburger icon) */
.mobile-toggle {
  display: none;
  border: none;
  background: transparent;
  color: var(--color-text);
  padding: 0.5rem;
  min-width: 44px;  /* Minimum touch target size for accessibility */
  min-height: 44px;
  cursor: pointer;
  border-radius: 0.5rem;
  transition: background 0.2s ease;
}

.mobile-toggle:hover {
  background: rgba(255, 255, 255, 0.05);
}

.mobile-toggle:focus-visible {
  outline: 2px solid rgba(86, 204, 242, 0.55);
  outline-offset: 2px;
}

/* Mobile navigation overlay and panel */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  pointer-events: none;
}

.mobile-nav[data-open='true'] {
  display: block;
  pointer-events: auto;
}

.mobile-nav-overlay {
  position: absolute;
  inset: 0;
  background: rgba(3, 4, 10, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1;
}

.mobile-nav-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: auto;
  width: min(320px, 85vw);
  max-width: 85vw;
  height: 100vh;
  background: #050710;
  backdrop-filter: blur(20px);
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  border-left: 1px solid rgba(86, 204, 242, 0.2);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.5), var(--shadow-card);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 2;
  visibility: visible;
  opacity: 1;
  transform: translateX(0);
  box-sizing: border-box;
}

.mobile-nav-panel .nav-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-shrink: 0;
}

.mobile-nav-links {
  display: grid;
  gap: 0.75rem;
  flex: 1;
  min-height: 0;
  visibility: visible;
  opacity: 1;
  margin-top: 1rem;
  overflow-y: auto;
}

.mobile-nav-links a,
.mobile-nav-links button {
  font-size: 1rem;
  font-weight: 500;
  padding: 0.65rem 0.85rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  color: #f5f7ff;
  transition: background 0.2s ease, color 0.2s ease;
  text-align: left;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: inherit;
  cursor: pointer;
  display: block;
  visibility: visible;
  opacity: 1;
  text-decoration: none;
  line-height: 1.4;
}

.mobile-nav-links button {
  margin-top: 0.5rem;
}

.mobile-nav-links a:hover,
.mobile-nav-links button:hover {
  background: rgba(86, 204, 242, 0.1);
  color: var(--color-text);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
  padding-block: 3.4rem;
}

.hero-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.hero-copy p {
  font-size: 1.08rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-primary);
}

.eyebrow-small {
  font-size: 0.72rem;
  letter-spacing: 0.28em;
}

.hero h1,
.page-hero h1 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: clamp(2.5rem, 4vw + 1rem, 3.8rem);
  margin: 1.25rem 0 0;
  color: var(--color-text);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.hero p,
.page-hero p {
  margin-top: 1.25rem;
  color: var(--color-muted);
  font-size: 1.05rem;
  max-width: none;
}

.hero-highlights p {
  max-width: none;
}

.hero-highlights {
  margin-top: 2.1rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1rem;
}

.hero-intro {
  display: flex;
  gap: 2.2rem;
  align-items: flex-start;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.hero-text {
  flex: 1 1 320px;
}

.hero-logo-panel {
  flex: 1 1 260px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0;
  margin-top: -1rem;
  margin-left: auto;
}

.hero-logo-panel img {
  width: 100%;
  height: 100%;
  max-width: 320px;
  object-fit: cover;
  border-radius: 50%;
  border-radius: 999px;
}

@media (max-width: 680px) {
  .hero-logo-panel {
    justify-content: center;
    margin-top: 0;
    margin-left: 0;
  }
}

.hero-highlights li {
  padding: 1.25rem 1.5rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.04), rgba(86, 204, 242, 0.08));
  box-shadow: var(--shadow-card);
}

.hero-highlights h3 {
  margin: 0;
  font-size: 1.25rem;
  font-family: 'Poppins', sans-serif;
  color: var(--color-text);
}

.hero-highlights p {
  margin: 0.65rem 0 0;
  color: var(--color-muted);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 999px;
  padding: 0.875rem 1.75rem;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.25s ease, background 0.25s ease;
  letter-spacing: 0.01em;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-family: 'Poppins', sans-serif;
  min-height: 44px;
  min-width: 44px;
}

.btn-compact {
  width: fit-content;
  padding-inline: 1.25rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-violet));
  color: #05060f;
  box-shadow: 0 14px 30px rgba(86, 204, 242, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(86, 204, 242, 0.45);
  color: #05060f;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-text);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  border-color: rgba(86, 204, 242, 0.4);
  color: var(--color-text);
}

.hero-visual {
  position: relative;
}

.hero-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: radial-gradient(circle at 15% 20%, rgba(86, 204, 242, 0.2), transparent 65%),
    rgba(12, 15, 28, 0.86);
  box-shadow: var(--shadow-elevated);
  border: 1px solid rgba(86, 204, 242, 0.1);
  isolation: isolate;
}

.hero-card img {
  border-radius: 0;
  mix-blend-mode: lighten;
}

.hero-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(5, 6, 15, 0.92));
  z-index: 1;
}

.hero-card-caption {
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  padding: 1.75rem;
  color: #fefefe;
  z-index: 2;
}

.hero-card-caption p {
  margin: 0.4rem 0 0;
  color: rgba(255, 255, 255, 0.78);
}

/* ==========================================================================
   Section Components
   ========================================================================== */

.section {
  position: relative;
  padding-block: 4.75rem;
  isolation: isolate;
}

.section::before {
  content: '';
  position: absolute;
  inset: 1.5rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
  pointer-events: none;
}

.section:hover::before,
.section:focus-within::before {
  opacity: 1;
}

.split-grid {
  display: grid;
  gap: 3rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: start;
}

/* Grid layout for approach/service cards */
.approach-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 2.5rem;
}

.approach-card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(86, 204, 242, 0.08));
  border-radius: var(--radius-md);
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.approach-card h3 {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  font-size: 1.4rem;
  color: var(--color-text);
}

.approach-card p {
  color: var(--color-muted);
  margin: 0;
}

.principles-panel {
  display: grid;
  gap: 2rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  padding: 2.25rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.principles-panel article {
  display: grid;
  gap: 0.75rem;
}

.principles-panel h3 {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  font-size: 1.3rem;
  color: var(--color-text);
}

.principles-panel p {
  color: var(--color-muted);
  margin: 0;
}

.section-intro {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.section-intro p {
  margin: 0;
  color: var(--color-muted);
}

.founder-grid {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr);
  align-items: start;
}

.founder-story {
  display: grid;
  gap: 1.5rem;
  font-size: 1.05rem;
  color: var(--color-muted);
}

.founder-sidebar {
  display: grid;
  gap: 1.75rem;
}

.founder-photo {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(5, 8, 20, 0.26);
}

.founder-photo img {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}

.founder-highlight {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.8rem 2rem;
  box-shadow: 0 18px 50px rgba(5, 8, 20, 0.32);
  color: var(--color-muted);
  display: grid;
  gap: 0.75rem;
}

.founder-highlight h3 {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  color: var(--color-text);
  font-size: 1.4rem;
}

.founder-section {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4rem);
}

.founder-feature {
  display: grid;
  gap: clamp(1.75rem, 4vw, 2.75rem);
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  align-items: start;
}

.founder-feature .founder-highlight {
  align-self: stretch;
}

@media (max-width: 900px) {
  .founder-feature {
    grid-template-columns: 1fr;
  }
}

.section-heading {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(2rem, 3vw + 1rem, 2.8rem);
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0;
}

.section-subheading {
  margin-top: 1.25rem;
  color: var(--color-muted);
  font-size: 1.05rem;
}

.quote-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 24px;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 18px 60px rgba(5, 8, 20, 0.32);
}

.quote-stack {
  display: grid;
  gap: 1.5rem;
}

.feature-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.feature-card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(86, 204, 242, 0.08));
  border-radius: var(--radius-md);
  padding: 2.25rem 2rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-card);
  min-height: 100%;
  display: grid;
  gap: 0.75rem;
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: rgba(86, 204, 242, 0.2);
  color: var(--color-primary);
  font-weight: 600;
  font-size: 1rem;
}

.feature-card h3 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  margin: 1.25rem 0 0.75rem;
}

.feature-card p {
  color: var(--color-muted);
  margin: 0;
}

.section-header {
  display: grid;
  gap: 0.85rem;
  max-width: 40rem;
}

.section-header .eyebrow {
  letter-spacing: 0.32em;
}

.section-header p {
  color: var(--color-muted);
  margin: 0;
}

.proof-bar {
  padding-block: 4rem;
}

.proof-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.proof-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 1.5rem 1.6rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 12px 36px rgba(5, 8, 20, 0.28);
  display: grid;
  gap: 0.35rem;
}

.proof-value {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1.45rem;
  color: var(--color-primary);
}

.proof-label {
  font-size: 0.95rem;
  color: var(--color-muted);
}

/* ==========================================================================
   Call-to-Action Sections
   ========================================================================== */

.cta-section {
  margin-block: 4.4rem;
  padding: clamp(2.5rem, 4vw + 1rem, 4rem);
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(86, 204, 242, 0.16), rgba(167, 139, 250, 0.12));
  border: 1px solid rgba(86, 204, 242, 0.2);
  box-shadow: var(--shadow-soft);
}

.cta-section h2 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: clamp(2rem, 2vw + 1rem, 2.5rem);
  color: var(--color-text);
}

.cta-section p {
  max-width: 40rem;
  margin-top: 0.85rem;
  color: var(--color-muted);
}

/* Full-width variant - breaks out of container to span viewport width */
.cta-full-width {
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  width: 100vw;
  border-radius: 0;
  position: relative;
}

.cta-full-width .container {
  max-width: var(--max-width);
  margin-inline: auto;
  width: 100%;
  padding-inline: clamp(1.2rem, 4vw, 2.4rem);
}

.page-hero {
  padding-block: 3.2rem;
}

.page-hero p {
  max-width: none;
}

.page-section {
  padding-block: 3.3rem;
}

.page-section > .container.reveal {
  display: grid;
  gap: 1.3rem;
}

.page-section > .container.reveal p {
  margin: 0;
  color: var(--color-muted);
}

.service-grid,
.reason-grid,
.insight-grid {
  display: grid;
  gap: 2rem;
}

.service-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  grid-auto-rows: 1fr;
}

@media (max-width: 1024px) {
  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

.reason-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.insight-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.service-card,
.reason-card,
.insight-card {
  border-radius: var(--radius-md);
  padding: 2.25rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 100%;
}

.service-card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(86, 204, 242, 0.08));
}

.reason-card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(167, 139, 250, 0.12));
}

.insight-card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(86, 204, 242, 0.08));
}

.service-card .button-row {
  margin-top: auto;
  gap: 0.75rem;
}

.service-card h3,
.reason-card h3,
.insight-card h3 {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  font-size: 1.5rem;
  color: var(--color-text);
}

.service-card p,
.reason-card p,
.insight-card p {
  color: var(--color-muted);
  margin: 0;
}

.service-card ul {
  padding: 0;
  margin: 0;
  list-style: none;
  display: grid;
  gap: 0.75rem;
  color: var(--color-muted);
}

.service-card li {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 0.75rem;
  align-items: start;
}

.service-card li::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-top: 0.35rem;
  background: var(--color-secondary);
  box-shadow: 0 0 12px rgba(255, 107, 107, 0.5);
}

/* ==========================================================================
   Forms & Contact
   ========================================================================== */

.contact-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: 1.2fr 0.8fr; /* Form on left, contact details on right */
    align-items: start;
  }
}

.contact-form {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 28px;
  padding: clamp(2rem, 4vw + 1rem, 3rem);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 50px rgba(5, 8, 20, 0.32);
  display: grid;
  gap: 1.5rem;
}

.form-submit {
  justify-self: flex-start;
}

.form-row {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* Form labels */
label {
  display: grid;
  gap: 0.65rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-muted);
  line-height: 1.5;
}

/* Visual indicator for required fields */
label:has(input:required)::after,
label:has(select:required)::after,
label:has(textarea:required)::after {
  content: ' *';
  color: var(--color-secondary);
}

input,
select,
textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(5, 6, 15, 0.6);
  color: var(--color-text);
  font: inherit;
  font-size: 1rem;
  line-height: 1.5;
  transition: border 0.2s ease, box-shadow 0.2s ease;
  resize: vertical;
  min-height: 44px;
}

/* Custom dropdown arrow for select elements */
select {
  cursor: pointer;
  appearance: none; /* Remove default browser styling */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23f5f7ff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem; /* Space for custom arrow */
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(86, 204, 242, 0.45);
  box-shadow: 0 0 0 3px rgba(86, 204, 242, 0.2);
}

textarea {
  min-height: 160px;
}

.form-hint {
  font-size: 0.85rem;
  color: rgba(245, 247, 255, 0.6);
  margin-top: 0.75rem;
}

.form-feedback {
  font-size: 0.9rem;
  margin-top: 0.75rem;
  color: rgba(245, 247, 255, 0.65);
}

.form-feedback.is-success {
  color: rgba(86, 204, 242, 0.85);
}

.form-feedback.is-error {
  color: rgba(255, 120, 120, 0.9);
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: rgba(245, 247, 255, 0.65);
}

.contact-details p {
  margin: 0;
}

.contact-details strong {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(245, 247, 255, 0.55);
  margin-bottom: 0.2rem;
}

.contact-details a {
  color: var(--color-text);
  text-decoration: none;
}

.contact-details a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Footer
   ========================================================================== */

footer {
  margin-top: 5rem;
  padding-block: 3.5rem;
  background: rgba(5, 6, 15, 0.92);
  border-top: 1px solid rgba(86, 204, 242, 0.12);
}

.footer-inner {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: start;
}

.footer-brand h2 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1.75rem;
  margin: 1.5rem 0 0;
  background: linear-gradient(135deg, var(--color-primary), var(--color-violet));
  -webkit-background-clip: text;
  color: transparent;
}

.footer-brand h3 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1.5rem;
  margin: 1.5rem 0 0;
  background: linear-gradient(135deg, var(--color-primary), var(--color-violet));
  -webkit-background-clip: text;
  color: transparent;
}

.footer-brand p {
  margin: 1rem 0 0;
  color: var(--color-muted);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  font-size: 0.9rem;
  color: var(--color-muted);
}

.footer-cta {
  margin-top: 1.75rem;
}

.footer-bottom {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
}

/* ==========================================================================
   Modal Components
   ========================================================================== */

/* Enquiry modal - Contact form overlay */
.enquire-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 6vw, 3rem);
  background: transparent;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 40;
}

.enquire-modal[data-open='true'] {
  opacity: 1;
  pointer-events: auto;
}

.enquire-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 16, 0.78);
  backdrop-filter: blur(12px);
}

.enquire-dialog {
  position: relative;
  width: min(100%, 560px);
  max-height: 90vh;
  overflow: auto;
  background: rgba(9, 11, 22, 0.95);
  border-radius: 28px;
  border: 1px solid rgba(86, 204, 242, 0.18);
  box-shadow: 0 22px 70px rgba(5, 8, 20, 0.55);
  padding: clamp(2rem, 5vw, 3rem);
  display: grid;
  gap: 1.5rem;
}

.enquire-dialog h2 {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  font-size: 2rem;
  color: var(--color-text);
}

.enquire-dialog p {
  margin: 0;
  color: var(--color-muted);
}

.enquire-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: none;
  border: none;
  color: rgba(245, 247, 255, 0.7);
  cursor: pointer;
  padding: 0.35rem;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.enquire-close:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.enquire-form {
  display: grid;
  gap: 1.5rem;
}

.enquire-footer {
  font-size: 0.85rem;
  color: rgba(245, 247, 255, 0.58);
}

.enquire-footer strong {
  color: var(--color-text);
}

/* ==========================================================================
   Animation & Reveal Effects
   ========================================================================== */

/* Scroll-triggered reveal animation - elements fade in as they enter viewport */
.reveal {
  --reveal-delay: 0s;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: var(--reveal-delay);
}

.reveal.delay-1 {
  --reveal-delay: 0.08s;
}

.reveal.delay-2 {
  --reveal-delay: 0.16s;
}

.reveal.delay-3 {
  --reveal-delay: 0.24s;
}

.reveal.delay-4 {
  --reveal-delay: 0.32s;
}

.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

/* Tablet and below - Show mobile menu, hide desktop nav */
@media (max-width: 960px) {
  .desktop-nav {
    display: none;
  }

  .mobile-toggle {
    display: inline-flex;
  }

  .founder-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  main {
    padding-top: 84px;
  }

  .hero {
    padding-block: 3rem;
  }

  .section::before {
    inset: 0.75rem;
  }

  .cta-section {
    margin-block: 4rem;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .enquire-dialog {
    padding: 1.75rem;
  }

  .founder-photo {
    min-height: 260px;
  }

  .mobile-nav-panel {
    padding: 1.25rem 1rem;
    width: min(300px, 90vw);
  }

  .nav-panel-header {
    gap: 1rem;
    padding: 0;
  }

  .nav-panel-header .brand-text {
    font-size: 0.95rem;
  }

  .brand-mark {
    inline-size: 40px;
    block-size: 40px;
    flex-shrink: 0;
    padding: 6px;
  }
}

/* Accessibility: Respect user's motion preferences */
@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 !important;
    transform: none !important;
  }
}
