/* =========================================================
   SamuelMarndi.com — Design Tokens & Base Styles
   ========================================================= */

:root {
  /* Brand — dark greenish teal (variable names kept as "copper" for legacy refs) */
  --copper: #0D9488;
  --copper-deep: #115E59;
  --copper-bright: #14B8A6;
  --copper-glow: #2DD4BF;

  /* Mint / paper surface (light mode) — pale teal tint */
  --cream: #E8F4F3;
  --cream-2: #D7EAE8;
  --cream-3: #C5DEDB;
  --paper-line: #B0CEC9;

  /* Ink — deep teal-tinted dark */
  --ink: #062626;
  --ink-2: #0B3A39;
  --ink-3: #1F524F;
  --ink-soft: #426E6B;
  --ink-mute: #6E8B88;

  /* Functional */
  --success: #15803D;
  --danger: #B91C1C;

  /* Surface roles — light mode (default) */
  --bg: var(--cream);
  --bg-2: var(--cream-2);
  --bg-3: var(--cream-3);
  --surface: #F0F8F7;
  --text: var(--ink);
  --text-soft: var(--ink-3);
  --text-mute: var(--ink-soft);
  --line: var(--paper-line);
  --line-soft: rgba(6, 38, 38, 0.08);

  /* Type families — modern tech sans, no editorial serif */
  --font-display: "Space Grotesk", "Plus Jakarta Sans", "Manrope", -apple-system, system-ui, sans-serif;
  --font-sans: "Manrope", "Geist", -apple-system, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* Type scale — slightly tightened */
  --fs-hero: clamp(44px, 6.5vw, 88px);
  --fs-display: clamp(32px, 4.2vw, 60px);
  --fs-h1: clamp(30px, 3.4vw, 48px);
  --fs-h2: clamp(24px, 2.6vw, 36px);
  --fs-h3: clamp(20px, 1.8vw, 26px);
  --fs-lg: 17px;
  --fs-md: 15px;
  --fs-sm: 14px;
  --fs-xs: 12px;
  --fs-mono: 13px;

  /* Density (tweakable) */
  --density: 1;
  --space-xs: calc(8px * var(--density));
  --space-sm: calc(12px * var(--density));
  --space-md: calc(20px * var(--density));
  --space-lg: calc(32px * var(--density));
  --space-xl: calc(56px * var(--density));
  --space-2xl: calc(96px * var(--density));
  --space-3xl: calc(140px * var(--density));

  /* Radii */
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(6,38,38,0.06), 0 2px 8px rgba(6,38,38,0.05);
  --shadow-md: 0 8px 28px rgba(6,38,38,0.10), 0 1px 2px rgba(6,38,38,0.08);
  --shadow-lg: 0 22px 60px rgba(6,38,38,0.18), 0 4px 8px rgba(6,38,38,0.06);
  --shadow-copper: 0 22px 60px rgba(13, 148, 136, 0.32);

  /* Layout */
  --maxw: 1320px;
  --gutter: clamp(20px, 4vw, 56px);
}

/* Dark mode — deep teal */
[data-theme="dark"] {
  --bg: #06181A;
  --bg-2: #0C2528;
  --bg-3: #103438;
  --surface: #0A2123;
  --text: #E6F2F1;
  --text-soft: #A9C5C2;
  --text-mute: #6E8B88;
  --line: #1E3F40;
  --line-soft: rgba(230, 242, 241, 0.08);
  --copper: #14B8A6;
  --copper-deep: #0D9488;
  --copper-bright: #2DD4BF;
  --copper-glow: #5EEAD4;
  --paper-line: #1E3F40;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  font-feature-settings: "ss01", "cv11";
  font-variant-ligatures: common-ligatures;
  transition: background-color 0.4s ease, color 0.4s ease;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }

/* Typography */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0;
  text-wrap: balance;
}
[data-typography="geometric"] h1,
[data-typography="geometric"] h2,
[data-typography="geometric"] h3 {
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
}
[data-typography="mono"] h1,
[data-typography="mono"] h2,
[data-typography="mono"] h3 {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

p { margin: 0; text-wrap: pretty; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--copper);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--copper);
  display: inline-block;
}

/* Layout */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.section { padding: var(--space-2xl) 0; position: relative; }
.section-tight { padding: var(--space-xl) 0; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.005em;
  transition: transform 0.18s ease, background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
  user-select: none;
}
.btn-primary {
  background: var(--ink);
  color: var(--cream);
  box-shadow: 0 4px 14px rgba(28,22,17,0.18);
}
.btn-primary:hover { background: var(--copper-deep); transform: translateY(-1px); box-shadow: var(--shadow-copper); }
[data-theme="dark"] .btn-primary { background: var(--copper); color: var(--ink); }
[data-theme="dark"] .btn-primary:hover { background: var(--copper-bright); }

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--text);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--ink); background: var(--bg-2); }

.btn-copper {
  background: var(--copper);
  color: #fff;
}
.btn-copper:hover { background: var(--copper-deep); transform: translateY(-1px); }

.btn-sm { padding: 9px 14px; font-size: 13px; }
.btn-lg { padding: 18px 28px; font-size: 16px; }

/* Nav arrow */
.arrow-r { width: 14px; height: 14px; }
.arrow-r path { stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--space-md);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { border-color: var(--copper); box-shadow: var(--shadow-md); }

/* Pill */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--text-soft);
}
.pill .dot {
  width: 6px; height: 6px;
  background: var(--copper);
  border-radius: 50%;
}

/* Divider */
.hr {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: var(--space-lg) 0;
}

/* Marquee */
.marquee {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  gap: 64px;
  animation: marquee 38s linear infinite;
  width: max-content;
  align-items: center;
}
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Top utility bar */
.topbar {
  background: var(--ink);
  color: #C9BCA8;
  font-size: 12px;
  border-bottom: 1px solid #2D2620;
  position: relative;
  z-index: 51;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  gap: 18px;
  flex-wrap: nowrap;
  overflow: hidden;
}
.topbar-left, .topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: nowrap;
}
.topbar-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #C9BCA8;
  transition: color 0.15s ease;
  white-space: nowrap;
  cursor: pointer;
}
.topbar-item:hover { color: var(--copper-bright); }
.topbar-wa { color: #C9BCA8; }
.topbar-wa:hover { color: #25D366; }
.topbar-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 2px 6px;
  background: #25D36622;
  color: #25D366;
  border-radius: 4px;
  margin-left: 2px;
}
.topbar-divider {
  width: 1px;
  height: 14px;
  background: #2D2620;
  flex-shrink: 0;
}
.topbar-loc { color: #A89A85; }
.topbar-status {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: #A89A85;
}
.topbar-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #7EB87A;
  box-shadow: 0 0 0 3px rgba(126,184,122,0.18);
  margin-right: 2px;
}
.topbar-theme {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #2D2620;
  color: #C9BCA8;
  background: transparent;
  transition: all 0.15s ease;
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
}
.topbar-theme:hover {
  border-color: var(--copper);
  color: var(--copper-bright);
}
.topbar-theme-label {
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 10px;
}

/* Updated nav logo sizing — bird mark + text */
.nav-logo img.nav-logo-mark { height: 56px; width: auto; transition: transform 0.3s ease; }
.nav-logo:hover img.nav-logo-mark { transform: rotate(-6deg) scale(1.05); }
.nav-logo img:not(.nav-logo-mark) { height: 56px; width: auto; }
[data-theme="dark"] .nav-logo img { filter: brightness(1.1) saturate(1.05); }

/* Topbar responsive */
@media (max-width: 1100px) {
  .topbar-hide-md { display: none !important; }
}
@media (max-width: 820px) {
  .topbar-inner { gap: 10px; }
  .topbar-loc, .topbar-status { display: none; }
  .topbar-item span:not(.topbar-badge) { display: none; }
  .topbar-item { padding: 6px; }
  .topbar-wa span:nth-of-type(1) { display: inline; }
  .topbar-wa .topbar-badge { display: none; }
  .topbar-divider { display: none; }
  .topbar-theme-label { display: none; }
}
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  gap: 24px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--text);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
}
.nav-link { color: var(--text-soft); transition: color 0.15s ease; position: relative; }
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link.has-menu::after {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  margin-left: 6px;
  vertical-align: middle;
  opacity: 0.5;
}
.nav-cta { display: flex; align-items: center; gap: 10px; }

/* Mega menu */
.mega {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  padding: 28px 0 32px;
  display: none;
  z-index: 49;
}
.mega.open { display: block; }
.mega-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px 24px;
}
.mega-item {
  padding: 10px 12px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: background 0.15s ease;
}
.mega-item:hover { background: var(--bg-2); }
.mega-icon {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--bg-2);
  display: grid; place-items: center;
  color: var(--copper);
  border: 1px solid var(--line);
}
.mega-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.mega-desc { font-size: 12px; color: var(--text-mute); line-height: 1.4; }

/* Footer */
footer {
  background: var(--ink);
  color: #C9BCA8;
  padding: var(--space-2xl) 0 var(--space-lg);
}
footer h4 { color: var(--cream); font-family: var(--font-sans); font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 16px; }
footer a { color: #C9BCA8; transition: color 0.15s ease; font-size: 14px; }
footer a:hover { color: var(--copper-bright); }
footer .footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: var(--space-xl);
}
footer .footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
footer .footer-bottom {
  border-top: 1px solid #2D2620;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #8E8170;
  flex-wrap: wrap;
  gap: 16px;
}

/* Chatbot launcher */
.chat-launcher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--copper);
  color: #fff;
  display: grid; place-items: center;
  box-shadow: var(--shadow-copper);
  cursor: pointer;
  transition: transform 0.2s ease;
}
.chat-launcher:hover { transform: scale(1.06); }
.chat-launcher.has-greet::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: var(--copper);
  opacity: 0.3;
  animation: pulseRing 2.4s ease-out infinite;
}
@keyframes pulseRing {
  0% { transform: scale(0.9); opacity: 0.4; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* Sticky bottom CTA */
.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 55;
  background: var(--ink);
  color: var(--cream);
  padding: 14px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -8px 30px rgba(0,0,0,0.2);
}
.sticky-cta.visible { transform: translateY(0); }
.sticky-cta-text { font-size: 14px; }
.sticky-cta strong { color: var(--copper-bright); }
.sticky-cta-actions { display: flex; gap: 8px; align-items: center; }
.sticky-cta .btn-primary { background: var(--copper); color: #fff; }
.sticky-cta .btn-ghost { color: var(--cream); border-color: rgba(245,238,226,0.2); }

/* Exit-intent modal */
.exit-overlay {
  position: fixed; inset: 0;
  background: rgba(28,22,17,0.6);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  align-items: center; justify-content: center;
  padding: 24px;
}
.exit-overlay.open { display: flex; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.exit-modal {
  background: var(--surface);
  border-radius: var(--r-xl);
  max-width: 560px;
  width: 100%;
  padding: 40px;
  border: 1px solid var(--line);
  position: relative;
  animation: popIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes popIn { from { opacity: 0; transform: translateY(20px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
.exit-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--text-mute);
}
.exit-close:hover { background: var(--bg-2); color: var(--text); }

/* Animations on scroll */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-up.in {
  opacity: 1;
  transform: translateY(0);
}

/* Forms */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-soft);
}
.field input,
.field textarea,
.field select {
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: 14px;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
  width: 100%;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--copper);
  box-shadow: 0 0 0 3px rgba(184,122,79,0.16);
}
.field textarea { min-height: 100px; resize: vertical; }

/* Service chip selection */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.chip:hover { border-color: var(--copper); color: var(--text); }
.chip.active {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}
[data-theme="dark"] .chip.active {
  background: var(--copper);
  color: var(--ink);
  border-color: var(--copper);
}

/* Service cards grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.service-card {
  position: relative;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: all 0.25s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 240px;
}
.service-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, color-mix(in srgb, var(--copper) 22%, transparent) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.service-card:hover { transform: translateY(-3px); border-color: var(--copper); box-shadow: var(--shadow-md); }
.service-card:hover::after { opacity: 1; }
.service-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  color: var(--copper);
}
.service-title {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1.05;
  letter-spacing: -0.015em;
}
[data-typography="geometric"] .service-title,
[data-typography="mono"] .service-title {
  font-family: inherit;
  font-weight: 600;
  font-size: 22px;
}
.service-desc { font-size: 14px; color: var(--text-soft); line-height: 1.5; flex: 1; }
.service-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  font-size: 12px;
  color: var(--text-mute);
  font-family: var(--font-mono);
}

/* List variant */
[data-layout="list"] .services-grid {
  grid-template-columns: 1fr;
}
[data-layout="list"] .service-card {
  flex-direction: row;
  align-items: center;
  min-height: auto;
  gap: 24px;
  padding: 22px 28px;
}
[data-layout="list"] .service-card .service-icon { width: 52px; height: 52px; flex-shrink: 0; }
[data-layout="list"] .service-card .service-title { font-size: 22px; }
[data-layout="list"] .service-card .service-desc { font-size: 14px; }
[data-layout="list"] .service-meta {
  margin-left: auto;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

/* Carousel variant */
[data-layout="carousel"] .services-grid {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 24px;
  gap: 18px;
  margin: 0 calc(var(--gutter) * -1);
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
[data-layout="carousel"] .service-card {
  flex-shrink: 0;
  width: 320px;
  scroll-snap-align: start;
}

/* Stat */
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(48px, 6vw, 84px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--text);
  display: flex;
  align-items: baseline;
}
.stat-num .unit { font-size: 0.5em; color: var(--copper); margin-left: 4px; }
.stat-label { font-size: 13px; color: var(--text-mute); margin-top: 8px; max-width: 200px; }

/* Decorative paper texture */
.paper-bg {
  background-image:
    radial-gradient(circle at 12% 18%, rgba(184,122,79,0.06), transparent 40%),
    radial-gradient(circle at 88% 82%, rgba(184,122,79,0.05), transparent 45%);
}

.scribble {
  position: absolute;
  pointer-events: none;
  opacity: 0.6;
}

/* Inline link */
.ilink {
  color: var(--text);
  border-bottom: 1px solid var(--copper);
  padding-bottom: 1px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.ilink:hover { color: var(--copper-deep); }

/* Tooltip pop */
.kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--text-soft);
}

/* Responsive */
@media (max-width: 920px) {
  .nav-links { display: none; }
  footer .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .mega-grid { grid-template-columns: repeat(2, 1fr); }
  .sticky-cta { padding: 12px 16px; flex-wrap: wrap; }
  .sticky-cta-text { flex: 1; min-width: 180px; }
}
@media (max-width: 560px) {
  footer .footer-grid { grid-template-columns: 1fr; }
  .exit-modal { padding: 28px 22px; }
  [data-layout="list"] .service-card { flex-direction: column; align-items: flex-start; }
  [data-layout="list"] .service-meta { margin-left: 0; flex-direction: row; align-items: center; }
}

/* Selection */
::selection { background: var(--copper); color: #fff; }

/* =========================================================
   Founder photo hero
   ========================================================= */
.founder-photo-wrap {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 540px;
}
.founder-photo-frame {
  position: relative;
  width: 100%;
  max-width: 460px;
  aspect-ratio: 4/5;
}
.founder-photo-bg {
  position: absolute;
  inset: 10% 0 0 0;
  background: linear-gradient(160deg, var(--copper) 0%, var(--copper-deep) 70%, #5C3920 100%);
  border-radius: 24px;
  z-index: 0;
  box-shadow: var(--shadow-lg);
}
.founder-photo-bg::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  pointer-events: none;
}
.founder-photo {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: bottom center;
  z-index: 1;
  filter: drop-shadow(0 22px 32px rgba(28, 22, 17, 0.18));
}
.founder-photo-card {
  position: absolute;
  bottom: 20px;
  left: 20px;
  z-index: 2;
  background: rgba(28, 22, 17, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-md);
}
.founder-photo-card-name {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.1;
  color: #fff;
}
.founder-photo-card-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 2px;
}
.founder-photo-card-loc {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  color: var(--copper-bright);
}
.founder-loc-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7EB87A;
  box-shadow: 0 0 0 3px rgba(126, 184, 122, 0.3);
}

@media (max-width: 820px) {
  .founder-grid { grid-template-columns: 1fr !important; gap: 32px !important; }
  .founder-photo-wrap { min-height: 420px; }
}

/* =========================================================
   About Samuel section
   ========================================================= */
.about-section {
  position: relative;
  overflow: hidden;
}
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  align-items: center;
}
.about-photo-card {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: 24px;
  background: linear-gradient(160deg, #E8D5BA 0%, #DDC09A 100%);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
[data-theme="dark"] .about-photo-card {
  background: linear-gradient(160deg, #2D2620 0%, #1F1812 100%);
}
.about-photo-card img {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 100%;
  width: auto;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 22px 32px rgba(28, 22, 17, 0.2));
}
.about-photo-stat {
  position: absolute;
  background: rgba(28, 22, 17, 0.86);
  backdrop-filter: blur(12px);
  color: #fff;
  border-radius: 14px;
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.about-stat-num {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1;
  color: var(--copper-bright);
}
.about-stat-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 4px;
  letter-spacing: 0.04em;
}

@media (max-width: 820px) {
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
}
.tech-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 32px;
  align-items: start;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}
.tech-cat {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-mute);
  padding-top: 14px;
}
.tech-items {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tech-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: all 0.2s ease;
  cursor: default;
}
.tech-chip:hover {
  border-color: var(--copper);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(184,122,79,0.18);
}
.tech-chip svg { flex-shrink: 0; }

@media (max-width: 720px) {
  .tech-row { grid-template-columns: 1fr; gap: 12px; }
  .tech-cat { padding-top: 0; }
}

/* =========================================================
   Partners marquee
   ========================================================= */
.brand-marquee {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.brand-marquee-track {
  display: flex;
  gap: 18px;
  animation: brandMarquee 60s linear infinite;
  width: max-content;
}
.brand-marquee-track.reverse { animation-direction: reverse; animation-duration: 70s; }
@keyframes brandMarquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.brand-tile {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 18px 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  min-width: 220px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.brand-tile:hover {
  border-color: var(--copper);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
/* White plate behind the brand icon so any brand colour (incl. black/dark
   marks like Apple, AWS dark navy, Meta blue) stays visible on the dark
   teal site background. */
.brand-tile svg {
  background: #fff;
  padding: 6px;
  border-radius: 10px;
  box-sizing: content-box;
  flex-shrink: 0;
}
.brand-name {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--text);
}
.partner-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-soft);
}
.partner-badge svg { color: var(--copper); }

/* =========================================================
   JARVIS section
   ========================================================= */
.jarvis-section {
  padding: var(--space-3xl) 0;
}
.jarvis-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.jarvis-particle {
  position: absolute;
  width: 3px; height: 3px;
  background: var(--copper-bright);
  border-radius: 50%;
  opacity: 0.4;
  animation: floatUp linear infinite;
  box-shadow: 0 0 6px var(--copper-bright);
}
@keyframes floatUp {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.4; }
  100% { transform: translateY(-100vh) translateX(40px); opacity: 0; }
}

.jarvis-orb-wrap {
  display: grid;
  place-items: center;
  position: relative;
  min-height: 360px;
}
.jarvis-orb {
  position: relative;
  width: 320px;
  height: 320px;
  display: grid;
  place-items: center;
  animation: orbPulse 6s ease-in-out infinite;
}
@keyframes orbPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 40px rgba(184,122,79,0.4)); }
  50% { transform: scale(1.04); filter: drop-shadow(0 0 60px rgba(232,184,148,0.6)); }
}
.jarvis-mark {
  width: 130px;
  height: auto;
  position: relative;
  z-index: 2;
  animation: markFloat 4s ease-in-out infinite;
  filter: drop-shadow(0 0 24px rgba(232,184,148,0.45));
}
@keyframes markFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.jarvis-node {
  position: absolute;
  top: 50%; left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  animation: nodePulse 3s ease-in-out infinite;
  transform-origin: center;
}
@keyframes nodePulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}
.jarvis-node-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--copper-bright);
  box-shadow: 0 0 12px var(--copper-bright);
}
.jarvis-node-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--copper-bright);
  white-space: nowrap;
}

/* Counter-rotate node labels to stay upright */
.jarvis-node { white-space: nowrap; }

@media (max-width: 920px) {
  .jarvis-orb { width: 240px; height: 240px; }
  .jarvis-mark { width: 90px; }
}
@media (max-width: 720px) {
  .jarvis-grid { grid-template-columns: 1fr !important; }
}

/* Density tweak applied */
[data-density="dense"] { --density: 0.7; }
[data-density="spacious"] { --density: 1.25; }
