/* ============================================================
   CLARIFIND — Main Stylesheet
   
   Sections:
   1. Custom Properties (Design Tokens)
   2. Reset & Base
   3. Typography
   4. Layout Utilities
   5. Header / Nav
   6. Hero Section
   7. Services Section
   8. Projects Section
   9. Experience Section
   10. How We Work Section
   11. Approach Section
   12. Contact Section
   13. Footer
   14. Animations & Transitions
   15. Responsive Overrides
   ============================================================ */


/* ============================================================
   1. CUSTOM PROPERTIES
============================================================ */
:root {
  /* Colors */
  --color-bg:         #F7F5F2;        /* Warm off-white */
  --color-bg-card:    #FFFFFF;
  --color-bg-dark:    #141210;        /* Near black, warm */
  --color-bg-mid:     #EDEAE6;
  --color-text:       #1A1714;        /* Warm near-black */
  --color-text-muted: #6E6861;
  --color-text-light: #A09890;
  --color-accent:     #2A5EBB;        /* Clarifind blue — clear, confident */
  --color-accent-mid: #3E72D0;
  --color-accent-light: #EBF1FB;
  --color-accent-warm: #C85A2A;      /* Secondary warm accent */
  --color-border:     rgba(26,23,20,0.1);
  --color-border-strong: rgba(26,23,20,0.18);

  /* Typography */
  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;

  /* Type Scale */
  --text-xs:    0.75rem;
  --text-sm:    0.875rem;
  --text-base:  1rem;
  --text-md:    1.125rem;
  --text-lg:    1.375rem;
  --text-xl:    1.75rem;
  --text-2xl:   2.25rem;
  --text-3xl:   3rem;
  --text-4xl:   3.75rem;
  --text-5xl:   5rem;

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Layout */
  --container-max: 1160px;
  --container-pad: clamp(1.25rem, 5vw, 3rem);
  --section-gap:   clamp(5rem, 10vw, 9rem);

  /* Borders */
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  32px;
  --radius-full: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 4px rgba(26,23,20,0.06), 0 0 1px rgba(26,23,20,0.04);
  --shadow-md: 0 4px 16px rgba(26,23,20,0.08), 0 1px 4px rgba(26,23,20,0.06);
  --shadow-lg: 0 8px 32px rgba(26,23,20,0.12), 0 2px 8px rgba(26,23,20,0.06);
  --shadow-card: 0 2px 8px rgba(26,23,20,0.06), 0 0 1px rgba(26,23,20,0.08);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 160ms;
  --duration-base: 280ms;
  --duration-slow: 500ms;
}


/* ============================================================
   2. RESET & BASE
============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg {
  display: block;
  max-width: 100%;
}

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

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

ul { list-style: none; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: var(--space-3);
  background: var(--color-text);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  z-index: 2000;
}
.skip-link:focus {
  left: var(--space-3);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* Focus styles */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}


/* ============================================================
   3. TYPOGRAPHY
============================================================ */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

h1 { font-size: clamp(var(--text-3xl), 7vw, var(--text-5xl)); }
h2 { font-size: clamp(var(--text-2xl), 4.5vw, var(--text-3xl)); }
h3 { font-size: var(--text-lg); font-weight: 600; }

p { max-width: 62ch; }

strong { font-weight: 600; }

em {
  font-style: italic;
  color: var(--color-accent);
}

.section-label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-bottom: var(--space-4);
}

.section-title {
  margin-bottom: var(--space-5);
}

.section-intro {
  font-size: var(--text-md);
  color: var(--color-text-muted);
  max-width: 52ch;
}

.section-header {
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.centered { text-align: center; }
.section-header.centered .section-intro { margin-left: auto; margin-right: auto; }

.compliance {
  background: var(--color-accent-light);
}

.compliance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6);
}

.compliance-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-sm);
}

.compliance-card h3 {
  margin-bottom: var(--space-3);
}

.compliance-card p + p {
  margin-top: var(--space-3);
}


/* ============================================================
   4. LAYOUT UTILITIES
============================================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

section {
  padding-top: var(--section-gap);
  padding-bottom: var(--section-gap);
}

/* Accessibility toggles */
body.acc-high-contrast {
  --color-bg: #fff;
  --color-bg-card: #fff;
  --color-bg-dark: #000;
  --color-bg-mid: #f3f3f3;
  --color-text: #000;
  --color-text-muted: #111;
  --color-text-light: #333;
  --color-accent: #0038ff;
  --color-accent-mid: #0030db;
  --color-accent-light: #e9eeff;
}

body.acc-readable-font {
  --font-body: Arial, "Helvetica Neue", sans-serif;
}

body.acc-links a {
  text-decoration: underline !important;
  text-underline-offset: 3px;
}

body.acc-motion-off *,
body.acc-motion-off *::before,
body.acc-motion-off *::after {
  animation: none !important;
  transition: none !important;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-full);
  transition: all var(--duration-base) var(--ease-out);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.btn-primary {
  background: var(--color-accent);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(42,94,187,0.25);
}
.btn-primary:hover {
  background: var(--color-accent-mid);
  box-shadow: 0 4px 16px rgba(42,94,187,0.35);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--color-text);
  border: 1.5px solid var(--color-border-strong);
}
.btn-ghost:hover {
  background: var(--color-bg-mid);
  border-color: var(--color-text-light);
}

.btn-large {
  font-size: var(--text-base);
  padding: 0.9rem 2rem;
}


/* ============================================================
   5. HEADER / NAV
============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-4) 0;
  transition: background var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out),
              padding var(--duration-base) var(--ease-out);
}

.site-header.scrolled {
  background: rgba(247,245,242,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--color-border), 0 4px 20px rgba(26,23,20,0.06);
  padding: var(--space-3) 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
  text-decoration: none;
  transition: opacity var(--duration-fast);
}
.brand-mark:hover { opacity: 0.7; }

.brand-icon {
  display: flex;
  align-items: center;
  color: var(--color-accent);
  flex-shrink: 0;
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.main-nav a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color var(--duration-fast);
  letter-spacing: -0.01em;
}
.main-nav a:hover { color: var(--color-text); }

.main-nav .nav-cta {
  background: var(--color-accent);
  color: #FFFFFF;
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  transition: background var(--duration-fast), box-shadow var(--duration-fast), transform var(--duration-fast);
}
.main-nav .nav-cta:hover {
  background: var(--color-accent-mid);
  box-shadow: 0 3px 12px rgba(42,94,187,0.28);
  transform: translateY(-1px);
  color: #fff;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  z-index: 110;
}
.nav-toggle span {
  display: block;
  height: 1.5px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all var(--duration-base) var(--ease-out);
  transform-origin: center;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(4.5px, 4.5px);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(4.5px, -4.5px);
}


/* ============================================================
   6. HERO SECTION
============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding-top: clamp(5rem, 12vw, 8rem);
  padding-bottom: var(--space-16);
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
  max-width: var(--container-max);
  margin: 0 auto;
  gap: var(--space-10);
  overflow: hidden;
}

/* The section itself isn't a container so we fix that */
section.hero {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
  padding-top: 0;
  padding-bottom: 0;
}
section.hero > .hero-content,
section.hero > .hero-visual {
  padding-left: var(--container-pad);
  padding-right: 0;
}
section.hero > .hero-visual {
  padding-right: var(--container-pad);
  padding-left: 0;
}

/* Override: hero is a grid container */
section.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas: "content visual";
  align-items: center;
  min-height: 100svh;
  padding-top: clamp(5rem, 12vw, 8rem);
  padding-bottom: var(--space-16);
  overflow: hidden;
  position: relative;
}
.hero-content {
  grid-area: content;
  padding-left: var(--container-pad);
  padding-right: var(--space-8);
  max-width: 600px;
}
.hero-visual {
  grid-area: visual;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-right: var(--container-pad);
}

/* Background */
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.hero-content, .hero-visual { position: relative; z-index: 1; }

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.35;
}

.hero-gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}
.orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(42,94,187,0.12) 0%, transparent 70%);
  top: -10%;
  right: 10%;
}
.orb-2 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(200,90,42,0.07) 0%, transparent 70%);
  bottom: 5%;
  left: 5%;
}

/* Hero badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--color-accent-light);
  border: 1px solid rgba(42,94,187,0.2);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: var(--space-6);
  opacity: 0;
  transform: translateY(10px);
}
.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  animation: pulse-dot 2s ease-in-out infinite;
}

/* Hero headline */
.hero-headline {
  font-size: clamp(2.75rem, 6.5vw, var(--text-5xl));
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.035em;
  margin-bottom: var(--space-6);
  display: flex;
  flex-direction: column;
}
.hero-headline .line {
  display: block;
  opacity: 0;
  transform: translateY(30px);
}
.hero-headline em {
  font-style: normal;
  color: var(--color-accent);
  position: relative;
}
.hero-headline em::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 0;
  right: 0;
  height: 3px;
  background: currentColor;
  border-radius: 2px;
  opacity: 0.3;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.8s var(--ease-out) 0.8s;
}
.hero-headline em.underlined::after {
  transform: scaleX(1);
}

.hero-sub {
  font-size: var(--text-md);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-8);
  max-width: 46ch;
  opacity: 0;
  transform: translateY(16px);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(16px);
}

.hero-scroll-hint {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-12);
  opacity: 0;
}
.scroll-line {
  width: 32px;
  height: 1px;
  background: var(--color-text-light);
}
.hero-scroll-hint span {
  font-size: var(--text-xs);
  color: var(--color-text-light);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Signal graphic */
.signal-graphic {
  width: 100%;
  max-width: 440px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.signal-svg {
  width: 100%;
  height: 100%;
  color: var(--color-accent);
  opacity: 0;
  transform: scale(0.92);
}

.node {
  animation: node-pulse 3s ease-in-out infinite;
}
.node:nth-child(2) { animation-delay: 0.3s; }
.node:nth-child(3) { animation-delay: 0.6s; }
.node:nth-child(4) { animation-delay: 0.9s; }
.node:nth-child(5) { animation-delay: 1.2s; }
.node:nth-child(6) { animation-delay: 1.5s; }

.pulse-anim {
  animation: ring-expand 3s ease-out infinite;
}


/* ============================================================
   7. SERVICES SECTION
============================================================ */
.services {
  background: var(--color-bg);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}

.service-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  transition: all var(--duration-base) var(--ease-out);
  cursor: default;
  opacity: 0;
  transform: translateY(20px);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(42,94,187,0.04) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--duration-base);
}
.service-card:hover {
  border-color: rgba(42,94,187,0.25);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.service-card:hover::before { opacity: 1; }

.card-icon {
  width: 44px;
  height: 44px;
  color: var(--color-accent);
  flex-shrink: 0;
}
.card-icon svg { width: 100%; height: 100%; }

.service-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}

.service-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.65;
  margin: 0;
}

.card-tag {
  margin-top: auto;
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-light);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}


/* ============================================================
   8. PROJECTS SECTION
============================================================ */
.projects {
  background: var(--color-bg-mid);
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
}

.project-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out);
  box-shadow: var(--shadow-card);
  opacity: 0;
  transform: translateY(24px);
}
.project-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: rgba(42,94,187,0.2);
}

.project-featured {
  grid-column: 1 / -1;
}

.project-card-inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
}
.project-featured .project-card-inner {
  grid-template-columns: 1fr 1.4fr;
}
/* Non-featured: stack vertically */
.project-card:not(.project-featured) .project-card-inner {
  grid-template-columns: 1fr;
}
.project-card:not(.project-featured) .project-visual {
  height: 180px;
}

/* Project visual area */
.project-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
  min-height: 200px;
}

.pv-1 { background: linear-gradient(135deg, #EBF1FB 0%, #D4E3F7 100%); }
.pv-2 { background: linear-gradient(135deg, #F0EBF8 0%, #E0D4F0 100%); }
.pv-3 { background: linear-gradient(135deg, #EBF5F0 0%, #D4EDE0 100%); }
.pv-4 { background: linear-gradient(135deg, #FBF1EB 0%, #F7E2D4 100%); }
.pv-5 { background: linear-gradient(135deg, #F5F5EB 0%, #EDEDD4 100%); }

/* Project info */
.project-info {
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.project-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.project-number {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 800;
  color: var(--color-accent);
  letter-spacing: 0.05em;
}
.project-tag {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-light);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.project-info h3 {
  font-size: 1.2rem;
  margin: 0;
}

.project-summary {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
}

.project-expand-area {
  display: none;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
}
.project-card[aria-expanded="true"] .project-expand-area {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.project-result {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--color-accent-light);
  border-radius: var(--radius-md);
  border-left: 2px solid var(--color-accent);
}
.result-icon {
  font-size: var(--text-base);
  color: var(--color-accent);
  font-weight: 700;
  flex-shrink: 0;
  line-height: 1.5;
}
.project-result span {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.project-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: auto;
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
  transition: gap var(--duration-fast);
}
.project-toggle:hover { gap: var(--space-3); }

.toggle-icon {
  transition: transform var(--duration-base) var(--ease-out);
  display: inline-block;
}
.project-card[aria-expanded="true"] .toggle-icon {
  transform: rotate(180deg);
}
.project-card[aria-expanded="true"] .toggle-text::before {
  content: 'See less';
}
.project-card:not([aria-expanded="true"]) .toggle-text::before {
  content: 'See more';
}
.toggle-text { font-size: 0; } /* hide original text, use pseudo */
.toggle-text::before { font-size: var(--text-xs); }


/* CSS-drawn project graphics */

/* Platform graphic */
.pg-platform {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}
.pg-screen {
  background: white;
  border-radius: 8px;
  padding: 12px;
  width: 120px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 4px 16px rgba(42,94,187,0.12);
}
.pg-bar {
  height: 6px;
  background: var(--color-accent);
  border-radius: 3px;
  opacity: 0.7;
}
.pg-bar.short { width: 55%; opacity: 0.4; }
.pg-bar.medium { width: 75%; opacity: 0.55; }
.pg-dots { display: flex; gap: 4px; margin-top: 4px; }
.pg-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--color-accent); opacity: 0.4; }
.pg-phone {
  background: white;
  border-radius: 12px;
  padding: 10px 7px;
  width: 54px;
  height: 90px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  box-shadow: 0 4px 12px rgba(42,94,187,0.1);
  justify-content: center;
}

/* AI chat graphic */
.ai-chat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 140px;
}
.chat-bubble {
  display: flex;
  gap: 4px;
  align-items: center;
  border-radius: 12px;
  padding: 8px 12px;
}
.chat-bubble.user {
  background: var(--color-accent);
  border-bottom-right-radius: 3px;
  align-self: flex-end;
}
.chat-bubble.ai {
  background: white;
  border-bottom-left-radius: 3px;
  align-self: flex-start;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.chat-bubble.short { padding: 6px 10px; }
.chat-bubble span {
  height: 6px;
  border-radius: 3px;
  background: currentColor;
}
.chat-bubble.user span { background: rgba(255,255,255,0.7); }
.chat-bubble.user span:nth-child(1) { width: 30px; }
.chat-bubble.user span:nth-child(2) { width: 20px; opacity: 0.5; }
.chat-bubble.ai span { background: var(--color-accent); opacity: 0.3; }
.chat-bubble.ai span:nth-child(1) { width: 50px; }
.chat-bubble.ai span:nth-child(2) { width: 35px; }
.chat-bubble.ai span:nth-child(3) { width: 40px; }
.chat-bubble.short span { width: 22px; background: rgba(255,255,255,0.7); }
.ai-indicator {
  display: flex;
  gap: 4px;
  padding: 6px 12px;
  align-self: flex-start;
}
.ai-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-accent);
  opacity: 0.4;
  animation: typing-dot 1.2s ease-in-out infinite;
}
.ai-dot:nth-child(2) { animation-delay: 0.2s; }
.ai-dot:nth-child(3) { animation-delay: 0.4s; }

/* VR graphic */
.vr-graphic { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.vr-headset {
  background: white;
  border-radius: 16px;
  padding: 12px 20px;
  display: flex;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.vr-lens {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c5e0d0, #a8cfbc);
  border: 2px solid rgba(255,255,255,0.6);
}
.vr-rays { display: flex; gap: 6px; }
.vr-ray {
  width: 2px;
  height: 20px;
  background: linear-gradient(to bottom, rgba(76,170,120,0.6), transparent);
  border-radius: 1px;
  animation: ray-pulse 1.5s ease-in-out infinite;
}
.vr-ray:nth-child(2) { animation-delay: 0.2s; height: 28px; }
.vr-ray:nth-child(3) { animation-delay: 0.4s; }

/* Operations graphic */
.ops-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  width: 100px;
}
.ops-cell {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(200,90,42,0.1);
  border: 1.5px solid rgba(200,90,42,0.15);
  transition: background 0.3s;
}
.ops-cell.filled { background: var(--color-accent-warm); border-color: var(--color-accent-warm); opacity: 0.7; }

/* Clarifind orbit graphic */
.clarifind-graphic { display: flex; align-items: center; justify-content: center; }
.cf-orbit {
  position: relative;
  width: 110px;
  height: 110px;
}
.cf-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #b5ab22;
  opacity: 0.8;
}
.cf-node {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #b5ab22;
  opacity: 0.5;
}
.cf-node.n1 { top: 5px; left: 50%; transform: translateX(-50%); animation: orbit 4s linear infinite; }
.cf-node.n2 { bottom: 10px; right: 10px; animation: orbit 4s linear infinite 1.3s; }
.cf-node.n3 { bottom: 10px; left: 10px; animation: orbit 4s linear infinite 2.6s; }


/* ============================================================
   9. EXPERIENCE SECTION
============================================================ */
.experience {
  background: var(--color-bg);
}

.experience-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(3rem, 6vw, 5rem);
  align-items: start;
}

.experience-left .section-label { margin-bottom: var(--space-4); }
.experience-left .section-title { margin-bottom: var(--space-5); }
.experience-left p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-8);
  font-size: var(--text-md);
}

.stats-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-6);
}

.stat-item { display: flex; flex-direction: column; gap: var(--space-1); }

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--color-accent);
  letter-spacing: -0.04em;
  line-height: 1;
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* Milestones */
.milestones {
  display: flex;
  flex-direction: column;
}

.milestone {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: var(--space-4);
  opacity: 0;
  transform: translateX(20px);
}

.milestone-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 4px;
}
.marker-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-accent);
  flex-shrink: 0;
  border: 2px solid var(--color-bg);
  box-shadow: 0 0 0 2px var(--color-accent);
  transition: transform var(--duration-base);
}
.milestone:hover .marker-dot { transform: scale(1.3); }
.marker-line {
  width: 1px;
  flex: 1;
  background: linear-gradient(to bottom, var(--color-accent), transparent);
  margin-top: 6px;
  min-height: 32px;
  opacity: 0.3;
}

.milestone-content {
  padding-bottom: var(--space-8);
}

.milestone-badge {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-accent);
  background: var(--color-accent-light);
  border: 1px solid rgba(42,94,187,0.15);
  border-radius: var(--radius-full);
  padding: 2px 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

.milestone-content h3 {
  font-size: var(--text-base);
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.milestone-content p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.65;
  max-width: none;
}


/* ============================================================
   10. HOW WE WORK SECTION
============================================================ */
.how-we-work {
  background: var(--color-bg-dark);
  color: #FFFFFF;
}

.how-we-work .section-label { color: rgba(255,255,255,0.4); }
.how-we-work .section-title { color: #FFFFFF; }
.how-we-work .section-intro { color: rgba(255,255,255,0.55); }

.work-modes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
  margin-bottom: var(--space-10);
}

.work-mode {
  padding: var(--space-8);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  transition: all var(--duration-base) var(--ease-out);
  opacity: 0;
  transform: translateY(16px);
  background: rgba(255,255,255,0.02);
}
.work-mode:hover {
  border-color: rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.04);
  transform: translateY(-4px);
}

.mode-number {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  color: rgba(255,255,255,0.08);
  letter-spacing: -0.04em;
  line-height: 1;
}

.mode-content h3 {
  font-size: var(--text-md);
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: var(--space-3);
}

.mode-content p {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.55);
  line-height: 1.7;
  margin-bottom: var(--space-5);
}

.mode-scope {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: var(--space-4);
}
.mode-scope li {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.mode-scope li::before {
  content: '·';
  color: var(--color-accent-mid);
  font-size: 1.2em;
}

.work-note {
  text-align: center;
  padding: var(--space-8);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.02);
}
.work-note p {
  font-size: var(--text-md);
  color: rgba(255,255,255,0.6);
  max-width: none;
  margin: 0;
}
.work-note strong { color: #FFFFFF; }


/* ============================================================
   11. APPROACH SECTION
============================================================ */
.approach {
  background: var(--color-bg);
}

.approach-layout {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: clamp(3rem, 6vw, 5rem);
  align-items: center;
}

/* Clarity graphic */
.clarity-graphic {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-5);
  padding: var(--space-12);
  background: var(--color-bg-mid);
  border-radius: var(--radius-xl);
  aspect-ratio: 1;
  max-width: 380px;
  width: 100%;
  margin: 0 auto;
}

.cg-chaos, .cg-order {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  align-items: center;
}
.cg-node {
  border-radius: 50%;
  background: var(--color-accent);
  transition: transform 0.6s var(--ease-out);
}
.cg-node.scattered {
  width: 10px;
  height: 10px;
  opacity: 0.4;
}
.cg-node.scattered.n1 { transform: translate(-12px, 5px); opacity: 0.3; }
.cg-node.scattered.n2 { transform: translate(8px, -8px); opacity: 0.5; }
.cg-node.scattered.n3 { transform: translate(-5px, 12px); opacity: 0.25; }
.cg-node.scattered.n4 { transform: translate(14px, 4px); opacity: 0.4; }
.cg-node.scattered.n5 { transform: translate(-9px, -4px); opacity: 0.35; }
.cg-node.scattered.n6 { transform: translate(6px, 8px); opacity: 0.3; }

.cg-node.ordered {
  opacity: 0.8;
}
.cg-node.ordered.n1 { width: 14px; height: 14px; }
.cg-node.ordered.n2 { width: 10px; height: 10px; opacity: 0.6; }
.cg-node.ordered.n3 { width: 7px; height: 7px; opacity: 0.4; }

.cg-arrow {
  width: 60px;
  color: var(--color-text-light);
  flex-shrink: 0;
}
.cg-arrow svg { width: 100%; }

/* Approach content */
.approach-content .section-label { margin-bottom: var(--space-4); }
.approach-content .section-title { margin-bottom: var(--space-3); }

.approach-lead {
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--color-accent);
  margin-bottom: var(--space-8);
  font-style: italic;
}

.principles {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}

.principle {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: var(--space-4);
  align-items: start;
  opacity: 0;
  transform: translateX(16px);
}

.principle-marker {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 800;
  color: var(--color-accent);
  opacity: 0.5;
  letter-spacing: 0.05em;
  padding-top: 3px;
}

.principle-text h3 {
  font-size: var(--text-base);
  font-weight: 700;
  margin-bottom: var(--space-2);
}
.principle-text p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.65;
  max-width: none;
}

.approach-quote {
  border: none;
  padding: var(--space-6) var(--space-8);
  background: var(--color-accent-light);
  border-left: 3px solid var(--color-accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-accent);
  font-style: normal;
  letter-spacing: -0.02em;
  opacity: 0;
}


/* ============================================================
   12. CONTACT SECTION
============================================================ */
.contact {
  background: var(--color-bg-mid);
}

.contact-inner {
  position: relative;
  display: flex;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: clamp(3rem, 6vw, 6rem) var(--container-pad);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
}

.contact-bg-graphic {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.contact-bg-graphic svg {
  width: 100%;
  height: 100%;
  color: var(--color-accent);
  position: absolute;
}

.contact-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 580px;
}

.contact-content .section-title {
  margin-bottom: var(--space-4);
}

.contact-sub {
  font-size: var(--text-md);
  color: var(--color-text-muted);
  margin-bottom: var(--space-8);
  max-width: none;
}

.contact-links {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: var(--space-8);
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  padding: var(--space-3) var(--space-5);
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-full);
  transition: all var(--duration-base) var(--ease-out);
}
.contact-link:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: var(--color-accent-light);
  transform: translateY(-2px);
}
.contact-link-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
}
.contact-link-icon svg { width: 100%; height: 100%; }


/* ============================================================
   13. FOOTER
============================================================ */
.site-footer {
  background: var(--color-bg-dark);
  color: rgba(255,255,255,0.5);
  padding: var(--space-10) 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: var(--space-8);
}

.footer-brand .brand-mark {
  color: rgba(255,255,255,0.9);
  margin-bottom: var(--space-2);
}
.footer-brand .brand-icon { color: var(--color-accent-mid); }

.footer-tagline {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.3);
  max-width: none;
}

.footer-nav {
  display: flex;
  gap: var(--space-6);
}
.footer-nav a {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.4);
  transition: color var(--duration-fast);
}
.footer-nav a:hover { color: rgba(255,255,255,0.9); }

.footer-legal p {
  font-size: var(--text-xs);
  max-width: none;
}


/* ============================================================
   14. ANIMATIONS & KEYFRAMES
============================================================ */

/* Scroll reveal — these classes are added by JS */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

@keyframes node-pulse {
  0%, 100% { opacity: inherit; transform: scale(1); }
  50%       { opacity: 0.7; transform: scale(1.4); }
}

@keyframes ring-expand {
  0%   { r: 30; opacity: 0.5; }
  80%  { r: 90; opacity: 0; }
  100% { r: 90; opacity: 0; }
}

@keyframes typing-dot {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40%           { transform: translateY(-3px); opacity: 0.8; }
}

@keyframes ray-pulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50%       { opacity: 0.7; transform: scaleY(1.2); }
}

@keyframes orbit {
  0%   { transform: translate(-50%, -50%) rotate(0deg) translateY(-38px) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg) translateY(-38px) rotate(-360deg); }
}
.cf-node.n1 { top: 50%; left: 50%; }
.cf-node.n2 { top: 50%; left: 50%; animation-delay: 1.3s; }
.cf-node.n3 { top: 50%; left: 50%; animation-delay: 2.6s; }


/* ============================================================
   15. RESPONSIVE OVERRIDES
============================================================ */

/* Tablet — ≤ 900px */
@media (max-width: 900px) {

  section.hero {
    grid-template-columns: 1fr;
    grid-template-areas:
      "content"
      "visual";
    min-height: auto;
    padding-top: clamp(6rem, 14vw, 8rem);
    padding-bottom: var(--space-12);
  }
  .hero-content {
    padding-left: var(--container-pad);
    padding-right: var(--container-pad);
    max-width: none;
    text-align: center;
    align-items: center;
    display: flex;
    flex-direction: column;
  }
  .hero-badge, .hero-actions, .hero-scroll-hint { justify-content: center; }
  .hero-sub { text-align: center; margin-left: auto; margin-right: auto; }
  .hero-visual {
    padding: 0 var(--container-pad);
    max-height: 280px;
  }
  .signal-graphic { max-width: 240px; }

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

  .projects-grid {
    grid-template-columns: 1fr;
  }
  .project-featured .project-card-inner {
    grid-template-columns: 1fr;
  }
  .project-featured .project-visual { height: 200px; }

  .experience-layout {
    grid-template-columns: 1fr;
  }
  .stats-row {
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--space-6);
  }

  .work-modes {
    grid-template-columns: 1fr;
    max-width: 480px;
  }

  .approach-layout {
    grid-template-columns: 1fr;
  }
  .clarity-graphic {
    max-width: 280px;
    padding: var(--space-8);
    aspect-ratio: auto;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: var(--space-5);
    text-align: center;
  }
  .footer-nav { justify-content: center; flex-wrap: wrap; gap: var(--space-4); }
  .footer-brand .brand-mark { justify-content: center; }
}

/* Mobile — ≤ 600px */
@media (max-width: 600px) {

  .main-nav {
    position: fixed;
    inset: 0;
    background: rgba(247,245,242,0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--duration-base) var(--ease-out);
    z-index: 100;
  }
  .main-nav.is-open {
    opacity: 1;
    pointer-events: auto;
  }
  .main-nav ul {
    flex-direction: column;
    align-items: center;
    gap: var(--space-6);
  }
  .main-nav a {
    font-size: var(--text-xl);
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--color-text);
  }
  .main-nav .nav-cta {
    padding: var(--space-3) var(--space-8);
    font-size: var(--text-lg);
  }
  .nav-toggle { display: flex; }

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

  .project-card-inner {
    grid-template-columns: 1fr !important;
  }
  .project-visual { height: 160px !important; }

  .stats-row {
    flex-direction: column;
  }

  .work-modes {
    max-width: none;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .hero-actions .btn {
    justify-content: center;
  }

  .contact-links {
    flex-direction: column;
    align-items: center;
  }
}

/* Large desktop — ≥ 1400px */
@media (min-width: 1400px) {
  :root {
    --container-max: 1300px;
  }
}

/* Floating accessibility and privacy controls */
.accessibility-toggle {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  background: var(--color-accent);
  color: #fff;
  border-radius: var(--radius-full);
  padding: 0.65rem 1rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  z-index: 1500;
}

.accessibility-panel {
  position: fixed;
  right: 1rem;
  bottom: 4.5rem;
  width: min(320px, calc(100vw - 2rem));
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-5);
  z-index: 1500;
}

.accessibility-panel h2 {
  font-size: var(--text-md);
  margin-bottom: var(--space-4);
}

.accessibility-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.accessibility-actions button {
  border: 1px solid var(--color-border);
  background: var(--color-bg-mid);
  border-radius: var(--radius-md);
  padding: 0.55rem 0.7rem;
  font-size: var(--text-sm);
}

.privacy-consent {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 1400;
}

.privacy-consent-inner {
  max-width: 760px;
  margin: 0 auto;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-5);
}

.privacy-consent-inner h2 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}

.privacy-consent-actions {
  margin-top: var(--space-4);
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

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