:root{
  /* default = dark (but JS will follow system unless user saved a choice) */
  --bg: #0b0f14;
  --text: #eef2f7;
  --muted: #a8b3c2;
  --line: rgba(255,255,255,0.10);
  --card: rgba(255,255,255,0.04);
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
  --shadow2: 0 8px 24px rgba(0,0,0,0.42);
  --radius: 18px;
  --accent: #60a5fa;
  --accent2: #3b82f6;
  --success: #22c55e;
  --danger: #fb7185;
  --focus: 0 0 0 4px rgba(96,165,250,.18);
  --max: 1120px;

  --navBg: rgba(11,15,20,.72);
  --inputBg: rgba(255,255,255,0.04);
}

/* Light theme override */
html[data-theme="light"]{
  --bg: #ffffff;
  --text: #0b0f14;
  --muted: #5b6573;
  --line: rgba(15, 23, 42, 0.10);
  --card: #ffffff;
  --shadow: 0 10px 30px rgba(2, 8, 23, 0.08);
  --shadow2: 0 6px 20px rgba(2, 8, 23, 0.10);
  --accent: #3b82f6;
  --accent2: #2563eb;
  --success: #16a34a;
  --danger: #ef4444;
  --focus: 0 0 0 4px rgba(59,130,246,.18);
  --navBg: rgba(255,255,255,.75);
  --inputBg: #ffffff;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color: var(--text);
  background: var(--bg);
  line-height:1.5;
}

a{ color:inherit; text-decoration:none; }
a:hover{ color: var(--accent2); }

.container{
  width:min(var(--max), calc(100% - 40px));
  margin-inline:auto;
}

.nav{
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navBg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding: 14px 0;
}

/* ===== Fireflies Intro Scene (Home) ===== */
.intro-wrap{
  height: 220vh;                 /* scroll length for the intro */
  position: relative;
  border-bottom: 1px solid var(--line);
}

.intro-sticky{
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: radial-gradient(circle at 50% 35%, rgba(255,255,255,0.05), transparent 55%),
              radial-gradient(circle at 30% 80%, rgba(96,165,250,0.06), transparent 55%),
              #070a10;
}

/* canvas behind everything */
.intro-canvas{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  display:block;
  z-index:1;
  opacity:1;
  transform: scale(1);
}

/* overlay above canvas */
.intro-overlay{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  pointer-events:none;
  z-index:2;
}

.intro-center{
  text-align:center;
  padding: 0 18px;
  max-width: 980px;
  opacity:1;
  transform: translateY(0);
}

.intro-badge{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding: 10px 14px;
  border:1px solid rgba(255,255,255,0.10);
  border-radius: 999px;
  background: rgba(255,255,255,0.03);
  color: rgba(230,236,245,0.75);
  font-weight: 900;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}

.intro-title{
  position: relative;
  margin: 18px 0 10px 0;
  font-size: clamp(64px, 10vw, 118px);
  line-height: 0.9;
  letter-spacing: -0.08em;
  font-weight: 1000;
}

.intro-title-solid{
  position: relative;
  z-index: 2;
  color: rgba(240,245,255,0.95);
  text-shadow: 0 10px 30px rgba(0,0,0,.55),
               0 0 14px rgba(96,165,250,.10);
}

.intro-title-glow{
  position:absolute;
  inset:0;
  z-index:1;
  color: rgba(255,220,120,0.22); /* subtle warm glow */
  filter: blur(12px);
  transform: translateY(8px);
}

.intro-sub{
  margin:0;
  color: rgba(230,236,245,0.70);
  font-weight: 800;
}

/* scroll hint pill */
.intro-hint{
  position:absolute;
  bottom: 22px;
  left:50%;
  transform: translateX(-50%);
  display:flex;
  align-items:center;
  gap:10px;
  color: rgba(230,236,245,0.70);
  font-weight: 900;
  border:1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
  padding: 10px 12px;
  border-radius: 999px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}

.intro-wheel{
  width: 18px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  position: relative;
}
.intro-wheel::after{
  content:"";
  position:absolute;
  left:50%;
  top:6px;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  transform: translateX(-50%);
  background: rgba(230,236,245,0.65);
  animation: wheel 1.2s ease-in-out infinite;
}
@keyframes wheel{
  0%{ transform: translateX(-50%) translateY(0); opacity: .85; }
  70%{ transform: translateX(-50%) translateY(10px); opacity: .35; }
  100%{ opacity: 0; }
}

@media (max-width: 720px){
  .intro-wrap{ height: 150vh; }
  .intro-title{ font-size: clamp(48px, 14vw, 84px); }
}


.brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:800;
  letter-spacing:-0.02em;
}
.logo{
  width:34px;
  height:34px;
  border-radius: 10px;
  overflow: hidden;
  border:1px solid var(--line);
  background: rgba(255,255,255,0.04);
  box-shadow: var(--shadow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.logo img{
  width: 100%;
  height: 100%;
  object-fit: cover; /* prevents distortion */
  display: block;
}

.nav-links{
  display:flex;
  align-items:center;
  gap:18px;
}
.nav-links a{
  color: var(--muted);
  font-weight:600;
  padding: 8px 10px;
  border-radius: 999px;
  transition: transform .15s ease, background .15s ease, color .15s ease;
}
.nav-links a:hover{
  background: rgba(255,255,255,.06);
  color: var(--text);
  transform: translateY(-1px);
}
.nav-links a.active{
  background: rgba(96,165,250,.14);
  color: var(--text);
  border:1px solid rgba(96,165,250,.22);
}

.mobile-toggle{
  display:none;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: var(--shadow);
  cursor:pointer;
}
.mobile-menu{
  display:none;
  padding: 0 0 14px 0;
}
.mobile-menu a{
  display:block;
  padding: 12px 10px;
  border-radius: 12px;
  color: var(--muted);
  font-weight:600;
}
.mobile-menu a:hover{ background: rgba(255,255,255,.06); color: var(--text); }

/* Theme Toggle */
.theme-toggle{
  display:inline-flex;
  align-items:center;
  gap:10px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: var(--shadow);
  cursor:pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.theme-toggle:hover{ transform: translateY(-1px); box-shadow: var(--shadow2); }
.theme-toggle:active{ transform: translateY(0px); }
.theme-toggle .dot{
  width:10px; height:10px;
  border-radius:999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(96,165,250,.14);
}
.theme-toggle .label{
  font-weight:800;
  color: var(--muted);
  font-size: 13px;
}

.hero{
  padding: 64px 0 28px 0;
  position:relative;
  overflow:hidden;
}
.hero::before{
  content:"";
  position:absolute;
  inset:-40% -20%;
  background:
    radial-gradient(circle at 20% 20%, rgba(96,165,250,.14), transparent 45%),
    radial-gradient(circle at 80% 40%, rgba(255,255,255,.06), transparent 50%),
    radial-gradient(circle at 50% 90%, rgba(96,165,250,.10), transparent 55%);
  filter: blur(8px);
  pointer-events:none;
}
.hero-grid{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 26px;
  align-items: center;
  position:relative;
}
.kicker{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding: 8px 12px;
  border:1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  color: var(--muted);
  font-weight:600;
  box-shadow: var(--shadow);
}
.h1{
  margin: 16px 0 10px 0;
  font-size: clamp(34px, 4.3vw, 54px);
  line-height:1.05;
  letter-spacing:-0.04em;
}
.sub{
  margin: 0 0 18px 0;
  color: var(--muted);
  font-size: 16.5px;
  max-width: 56ch;
}
.actions{
  display:flex;
  gap: 12px;
  flex-wrap: wrap;
}
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding: 12px 16px;
  border-radius: 14px;
  font-weight:700;
  border:1px solid var(--line);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  box-shadow: var(--shadow);
  cursor:pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border .15s ease;
}
.btn:hover{ transform: translateY(-2px); box-shadow: var(--shadow2); }
.btn:active{ transform: translateY(0px); }
.btn.primary{
  background: var(--accent2);
  color: #fff;
  border-color: rgba(59,130,246,.5);
}
.btn.primary:hover{
  background: var(--accent);
  color:#0b0f14;
}
.btn.ghost{
  background: rgba(255,255,255,0.03);
}

.hero-card{
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border:1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 18px;
}
.hero-card h3{
  margin:0 0 6px 0;
  letter-spacing:-0.02em;
}
.hero-card p{
  margin:0 0 16px 0;
  color: var(--muted);
}
.pills{
  display:flex;
  flex-wrap: wrap;
  gap:8px;
}
.pill{
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
}

.section{
  padding: 42px 0;
}
.section h2{
  margin: 0 0 10px 0;
  letter-spacing:-0.03em;
  font-size: 28px;
}
.section p.lead{
  margin: 0 0 22px 0;
  color: var(--muted);
  max-width: 70ch;
}

.grid-3{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.grid-2{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.card{
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 16px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover{ transform: translateY(-2px); box-shadow: var(--shadow2); }
.card h3{
  margin: 0 0 6px 0;
  letter-spacing:-0.02em;
}
.card p{
  margin: 0;
  color: var(--muted);
}

.subjects .card{
  display:flex;
  align-items:flex-start;
  gap:12px;
}
.icon{
  width:42px; height:42px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(96,165,250,.14), rgba(255,255,255,.03));
  display:grid;
  place-items:center;
  flex:0 0 auto;
}
.icon svg{ width:20px; height:20px; opacity:.9; }

.bullets{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 14px;
}
.bullet{
  display:flex;
  gap:10px;
  align-items:flex-start;
  padding: 12px 12px;
  border:1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.03);
  box-shadow: var(--shadow);
}
.check{
  width:20px; height:20px;
  border-radius: 6px;
  background: rgba(96,165,250,.16);
  border: 1px solid rgba(96,165,250,.22);
  display:grid;
  place-items:center;
  flex:0 0 auto;
}
.check svg{ width:14px; height:14px; }

.quote{
  position:relative;
  padding-top: 22px;
}
.quote::before{
  content:"“";
  position:absolute;
  top: 6px;
  left: 12px;
  font-size: 38px;
  color: rgba(255,255,255,.16);
  font-weight:900;
}
.quote .who{
  margin-top: 10px;
  font-weight: 800;
  color: var(--text);
}

.banner{
  border-radius: calc(var(--radius) + 6px);
  border: 1px solid rgba(96,165,250,.22);
  background: linear-gradient(135deg, rgba(96,165,250,.12), rgba(255,255,255,.03));
  box-shadow: var(--shadow);
  padding: 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.banner h3{ margin:0; letter-spacing:-0.02em; }
.banner p{ margin:4px 0 0 0; color: var(--muted); }

.footer{
  border-top: 1px solid var(--line);
  padding: 26px 0;
  color: var(--muted);
}
.footer-grid{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 16px;
  align-items:start;
}
.footer a{ color: var(--muted); }
.footer a:hover{ color: var(--text); }

.page-title{
  padding: 44px 0 18px 0;
}
.page-title h1{
  margin:0 0 8px 0;
  font-size: 38px;
  letter-spacing:-0.04em;
}
.page-title p{ margin:0; color: var(--muted); max-width: 70ch; }

.team-grid{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.avatar{
  width: 68px;
  height: 68px;
  border-radius: 50%;
  overflow: hidden; /* IMPORTANT: keeps image inside circle */
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

/* Avatar image */
.avatar img{
  width: 100%;
  height: 100%;
  object-fit: cover;     /* prevents stretching */
  object-position: center; /* centers face */
  display: block;
}

.role{
  display:inline-flex;
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 800;
  font-size: 12px;
}
.linkedin{
  margin-top: 12px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 40px; height: 40px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.linkedin:hover{ transform: translateY(-2px); box-shadow: var(--shadow2); }
.linkedin svg{ width: 18px; height: 18px; opacity:.9; }

.tabs{
  display:flex;
  gap: 10px;
  padding: 8px;
  border-radius: 16px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.03);
  width: fit-content;
}
.tab{
  border:none;
  background: transparent;
  padding: 10px 12px;
  border-radius: 14px;
  font-weight: 900;
  color: var(--muted);
  cursor:pointer;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.tab:hover{ transform: translateY(-1px); }
.tab.active{
  background: rgba(255,255,255,0.04);
  color: var(--text);
  border:1px solid var(--line);
  box-shadow: var(--shadow);
}

.form-wrap{
  margin-top: 16px;
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 14px;
  align-items:start;
}
form{
  display:grid;
  gap: 10px;
}
.field{
  display:grid;
  gap: 6px;
}
label{
  font-weight: 900;
  font-size: 13px;
  color: rgba(255,255,255,.85);
}
html[data-theme="light"] label{
  color: rgba(15,23,42,.82);
}

input, select, textarea{
  width:100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--inputBg);
  outline:none;
  transition: box-shadow .15s ease, border .15s ease;
  font: inherit;
  color: var(--text);
}
textarea{ min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus{
  border-color: rgba(96,165,250,.55);
  box-shadow: var(--focus);
}
select option{ color:#0b0f14; }

.inline{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.help{
  color: var(--muted);
  font-size: 13px;
}
.error{
  display:none;
  color: var(--danger);
  font-weight:800;
  font-size: 13px;
}
.success{
  display:none;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(34,197,94,.25);
  background: rgba(34,197,94,.10);
  color: rgba(187,255,214,.95);
  font-weight: 900;
}
html[data-theme="light"] .success{
  color: rgba(8,54,28,.95);
  background: rgba(22,163,74,.08);
  border-color: rgba(22,163,74,.25);
}

.checkbox-row{
  display:flex;
  gap: 10px;
  align-items:flex-start;
}
.checkbox-row input{ width:auto; margin-top: 3px; }

.faq{
  margin-top: 18px;
}
.accordion{
  display:grid;
  gap: 10px;
}
.acc-item{
  border:1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.acc-btn{
  width:100%;
  text-align:left;
  padding: 14px 14px;
  background: transparent;
  border: none;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  font-weight: 900;
  letter-spacing:-0.01em;
  color: var(--text);
}
.acc-btn span{ color: var(--muted); font-weight: 900; }
.acc-panel{
  max-height: 0px;
  overflow:hidden;
  transition: max-height .2s ease;
  border-top: 1px solid var(--line);
}
.acc-panel > div{
  padding: 12px 14px;
  color: var(--muted);
}

/* ===== Micro-interactions: reveal on scroll ===== */
.fade-in{
  opacity: 0;
  transform: translateY(10px);
  will-change: opacity, transform;
}

/* becomes visible when JS adds .in-view */
.fade-in.in-view{
  animation: fadeUp .6s ease forwards;
}

@keyframes fadeUp{
  to{ opacity:1; transform: translateY(0); }
}


/* ===== Micro-interactions: links, cards, buttons, ripple ===== */

/* nicer underline-on-hover for links */
.nav-links a, .footer a{
  position: relative;
}
.nav-links a::after, .footer a::after{
  content:"";
  position:absolute;
  left:10px;
  right:10px;
  bottom:6px;
  height:2px;
  border-radius:999px;
  background: rgba(255,255,255,.18);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .18s ease;
  pointer-events:none;
}
html[data-theme="light"] .nav-links a::after,
html[data-theme="light"] .footer a::after{
  background: rgba(15,23,42,.18);
}
.nav-links a:hover::after, .footer a:hover::after{
  transform: scaleX(1);
}

/* smoother card hover */
.card{
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}
.card:hover{
  border-color: rgba(96,165,250,.22);
}

/* subtle “press” feel on clickable elements */
.btn, .theme-toggle, .linkedin, .mobile-toggle, .tab, .acc-btn{
  transform: translateY(0);
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease, border .14s ease, opacity .14s ease;
}
.btn:active, .theme-toggle:active, .linkedin:active, .mobile-toggle:active, .tab:active{
  transform: translateY(0px) scale(0.98);
}

/* Ripple container */
.btn, .theme-toggle, .linkedin{
  position: relative;
  overflow: hidden;
}

/* Ripple element (JS injects span.ripple) */
.ripple{
  position:absolute;
  border-radius:50%;
  transform: scale(0);
  opacity: 0.55;
  pointer-events:none;
  background: rgba(255,255,255,0.35);
  animation: ripple .55s ease-out forwards;
}
html[data-theme="light"] .ripple{
  background: rgba(15,23,42,0.18);
}
@keyframes ripple{
  to{
    transform: scale(1);
    opacity: 0;
  }
}

/* Checkbox micro: nicer tap + check feel */
.checkbox-row input[type="checkbox"]{
  accent-color: var(--accent2);
  transform: translateY(1px);
  transition: transform .12s ease;
}
.checkbox-row input[type="checkbox"]:active{
  transform: translateY(1px) scale(1.08);
}

/* Accordion: tiny hover highlight */
.acc-item:hover{
  border-color: rgba(96,165,250,.18);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  .fade-in, .fade-in.in-view{
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
  .btn, .theme-toggle, .linkedin, .card,
  .nav-links a, .footer a{
    transition: none !important;
  }
  .ripple{ display:none !important; }
}


@media (max-width: 920px){
  .hero-grid{ grid-template-columns: 1fr; }
  .grid-3{ grid-template-columns: 1fr; }
  .grid-2{ grid-template-columns: 1fr; }
  .bullets{ grid-template-columns: 1fr; }
  .team-grid{ grid-template-columns: repeat(2, 1fr); }
  .form-wrap{ grid-template-columns: 1fr; }
}
@media (max-width: 720px){
  .nav-links{ display:none; }
  .mobile-toggle{ display:inline-flex; }
  .mobile-menu{ display:block; }
  .team-grid{ grid-template-columns: 1fr; }
  .inline{ grid-template-columns: 1fr; }
}
