/* =========================================================
   2S Labs — styles
   ========================================================= */

:root {
  --bg: #0a1120;
  --bg-2: #0e1729;
  --surface: rgba(255, 255, 255, 0.025);
  --fg: #e9eef6;
  --muted: #8a96aa;
  --faint: #5b6679;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --accent: #4f9cf9;
  --accent-ink: #0a1120;
  --glow: rgba(79, 156, 249, 0.16);

  --font: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  --container: 1160px;
  --gutter: 24px;
  --nav-h: 72px;

  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f7f8fa;
  --bg-2: #ffffff;
  --surface: rgba(15, 27, 45, 0.02);
  --fg: #0f1b2d;
  --muted: #556175;
  --faint: #8c96a6;
  --line: rgba(15, 27, 45, 0.09);
  --line-strong: rgba(15, 27, 45, 0.18);
  --accent: #1f6fe5;
  --accent-ink: #ffffff;
  --glow: rgba(31, 111, 229, 0.10);

  color-scheme: light;
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

::selection { background: var(--accent); color: var(--accent-ink); }

a { color: inherit; text-decoration: none; }
svg { display: block; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.mono {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.accent { color: var(--accent); }
.muted { color: var(--muted); }

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--fg);
  color: var(--bg);
  font-size: 14px;
}
.skip:focus { top: 12px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 50px;
  padding: 0 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), background-color 0.25s, border-color 0.25s, color 0.25s;
}

.btn-sm { height: 38px; padding: 0 16px; font-size: 14.5px; }

.btn-primary { background: var(--fg); color: var(--bg); }
.btn-primary:hover { transform: translateY(-1px); background: var(--accent); color: var(--accent-ink); }

.btn-ghost { border-color: var(--line-strong); color: var(--fg); }
.btn-ghost:hover { border-color: var(--fg); }

.btn .arrow {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.25s var(--ease);
}
.btn:hover .arrow { transform: translateX(3px); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}
.icon-btn:hover { color: var(--fg); border-color: var(--line-strong); }
.icon-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lang-btn { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; }

[data-theme="dark"] .i-moon,
[data-theme="light"] .i-sun { display: none; }

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s, border-color 0.3s;
}

.nav.scrolled,
.nav.open {
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border-bottom-color: var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--nav-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.015em;
}
.brand-mark { width: 30px; height: 27px; color: var(--fg); }
.brand-sm { font-size: 17px; }
.brand-sm .brand-mark { width: 24px; height: 22px; }

.nav-links {
  display: flex;
  gap: 36px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-links a {
  font-size: 15px;
  color: var(--muted);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--fg); }

.nav-tools { display: flex; align-items: center; gap: 8px; }
.nav-cta { margin-left: 6px; }
.menu-btn { display: none; }

/* ---------- Reveal ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--d, 0s);
}
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: min(920px, 100svh);
  padding: calc(var(--nav-h) + 72px) 0 96px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 60% 65% at 72% 45%, #000 10%, transparent 72%);
  mask-image: radial-gradient(ellipse 60% 65% at 72% 45%, #000 10%, transparent 72%);
}

.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 50%;
  right: -10%;
  width: 760px;
  height: 760px;
  translate: 0 -50%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow), transparent 65%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  align-items: center;
  gap: 56px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.pulse {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0%   { transform: scale(1);   opacity: 0.6; }
  100% { transform: scale(3.2); opacity: 0; }
}

h1 {
  margin: 28px 0 28px;
  font-size: clamp(2.6rem, 6.2vw, 5.3rem);
  line-height: 1.02;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.lead {
  max-width: 36em;
  font-size: clamp(1.05rem, 1.35vw, 1.2rem);
  font-weight: 300;
  line-height: 1.65;
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 44px;
}

.hero-visual {
  justify-self: end;
  width: 100%;
  max-width: 400px;
}
.hero-visual svg { width: 100%; height: auto; overflow: visible; }
.hero-visual g { stroke-width: 4.2; }
.layer-top { stroke: var(--fg); animation: float 6s ease-in-out infinite; }
.layer-bottom { stroke: var(--accent); }

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

/* ---------- Sections ---------- */

.section {
  padding: clamp(88px, 11vw, 144px) 0;
  border-top: 1px solid var(--line);
}

.section-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  align-items: start;
  gap: 48px;
  margin-bottom: clamp(56px, 7vw, 88px);
}

.label {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 0.9em;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.label .num { color: var(--accent); }
.label .num::after {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  margin-left: 14px;
  vertical-align: middle;
  background: var(--line-strong);
}

h2 {
  font-size: clamp(2rem, 4.3vw, 3.5rem);
  line-height: 1.06;
  font-weight: 500;
  letter-spacing: -0.035em;
}

h3 { font-weight: 500; letter-spacing: -0.02em; }

/* ---------- Services ---------- */

.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}

.service {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 36px 36px 8px;
  border-left: 1px solid var(--line);
}
.service:first-child { padding-left: 0; border-left: 0; }
.service:last-child { padding-right: 0; }

.service::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.6s var(--ease);
}
.service:hover::before { width: 100%; }

.service-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 56px;
}

.icon {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.3s, transform 0.5s var(--ease);
}
.service:hover .icon { stroke: var(--accent); transform: translateY(-2px); }

.service h3 { font-size: 30px; margin-bottom: 14px; }
.service p { color: var(--muted); font-weight: 300; }

.service .tags {
  margin-top: auto;
  padding-top: 28px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--faint);
}

/* ---------- Process ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  position: relative;
  padding-top: 28px;
  border-top: 1px solid var(--line-strong);
}
.step::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--accent);
  transition: background-color 0.3s;
}
.step:hover::before { background: var(--accent); }

.step h3 { margin: 18px 0 10px; font-size: 23px; }
.step p { color: var(--muted); font-weight: 300; font-size: 16px; }

/* ---------- About ---------- */

.about-lead { margin-top: 28px; }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
}

.principles {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.principles li { padding-top: 24px; border-top: 1px solid var(--line); }
.principles h3 { font-size: 19px; margin-bottom: 8px; }
.principles p { color: var(--muted); font-weight: 300; font-size: 15.5px; }

.founders {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.founder {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  transition: border-color 0.3s;
}
.founder:hover { border-color: var(--line-strong); }

.avatar {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  font-family: var(--mono);
  font-size: 14px;
  color: var(--accent);
  background: var(--bg-2);
}

.founder-info { flex: 1; min-width: 0; }
.founder h3 { font-size: 19px; }
.founder .mono { font-size: 12px; margin-top: 2px; }

/* ---------- Contact ---------- */

.contact {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-bottom: clamp(104px, 13vw, 168px);
}
.contact::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  bottom: -420px;
  width: 1000px;
  height: 700px;
  translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(ellipse, var(--glow), transparent 65%);
  pointer-events: none;
}

.contact-title {
  margin: 36px 0 28px;
  font-size: clamp(2.6rem, 7.6vw, 6.4rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.contact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin-top: 52px;
}

.email {
  font-size: clamp(1.45rem, 3.4vw, 2.5rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 2px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  padding-bottom: 4px;
  transition: background-size 0.5s var(--ease), color 0.3s;
  overflow-wrap: anywhere;
}
.email:hover { background-size: 100% 2px; }

.copy-btn {
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.copy-btn:hover { color: var(--fg); border-color: var(--fg); }
.copy-btn.done { color: var(--accent); border-color: var(--accent); }

/* ---------- Footer ---------- */

.footer { border-top: 1px solid var(--line); }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-top: 32px;
  padding-bottom: 32px;
  font-size: 14px;
}
.footer .mono { font-size: 11.5px; letter-spacing: 0.16em; }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .hero::before {
    -webkit-mask-image: radial-gradient(ellipse 90% 60% at 60% 30%, #000 10%, transparent 72%);
    mask-image: radial-gradient(ellipse 90% 60% at 60% 30%, #000 10%, transparent 72%);
  }

  .section-head { grid-template-columns: 1fr; gap: 20px; }
  .label { padding-top: 0; }

  .services { grid-template-columns: 1fr; }
  .service,
  .service:first-child,
  .service:last-child { padding: 32px 0 36px; border-left: 0; border-bottom: 1px solid var(--line); }
  .service-top { margin-bottom: 28px; }

  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 48px; }

  .about-grid { grid-template-columns: 1fr; }
  .principles, .founders { grid-column: 1; }
}

@media (max-width: 860px) {
  .menu-btn { display: inline-grid; }
  .nav-cta { display: none; }

  .nav-links {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 8px var(--gutter) 24px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }
  .nav.open .nav-links { display: flex; }
  .nav-links a {
    display: block;
    padding: 16px 0;
    font-size: 20px;
    color: var(--fg);
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }

  .hero { min-height: auto; padding: calc(var(--nav-h) + 64px) 0 80px; }
  .actions .btn { flex: 1 1 auto; justify-content: center; }

  .steps { grid-template-columns: 1fr; row-gap: 40px; }
  .principles { grid-template-columns: 1fr; gap: 24px; }
  .founders { grid-template-columns: 1fr; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
