/* ================= ATOM X — design system from name card ================= */
:root {
  --bg: #03060f;
  --bg-panel: #0a1220;
  --bg-panel-2: #0d1730;
  --line: rgba(80, 140, 255, 0.18);
  --line-strong: rgba(90, 167, 255, 0.45);
  --blue: #1e6eff;
  --blue-light: #5aa7ff;
  --text: #f2f6ff;
  --text-dim: #8a9bb8;
  --radius: 18px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---------- wordmark ---------- */
.wordmark {
  font-weight: 700;
  letter-spacing: 0.38em;
  font-size: 1.05rem;
  color: #fff;
}
.wordmark .x { color: var(--blue); margin-left: 0.1em; }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(3, 6, 15, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1120px; margin: 0 auto; padding: 0 24px;
  height: 68px; display: flex; align-items: center; justify-content: space-between;
}
.nav-brand { display: flex; align-items: center; gap: 12px; }
.nav-mark { height: 26px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a {
  font-size: 0.92rem; color: var(--text-dim); font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: #fff; }
.nav-links .nav-cta {
  color: var(--blue-light);
  border: 1px solid var(--line-strong);
  padding: 8px 18px; border-radius: 999px;
  transition: all 0.25s;
}
.nav-links .nav-cta:hover {
  background: var(--blue); border-color: var(--blue); color: #fff;
  box-shadow: 0 0 24px rgba(30, 110, 255, 0.5);
}
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: #fff;
  margin: 5px 0; border-radius: 2px; transition: 0.3s;
}

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; overflow: hidden;
  background:
    radial-gradient(1000px 500px at 50% -10%, rgba(30, 110, 255, 0.14), transparent 65%),
    var(--bg);
}
.hero-glow {
  position: absolute; border-radius: 50%; filter: blur(90px); pointer-events: none;
}
.hero-glow-1 {
  width: 560px; height: 560px; left: -180px; top: 8%;
  background: radial-gradient(circle, rgba(30, 110, 255, 0.22), transparent 70%);
}
.hero-glow-2 {
  width: 640px; height: 640px; right: -220px; bottom: -10%;
  background: radial-gradient(circle, rgba(90, 167, 255, 0.16), transparent 70%);
}
.hero-flare-v {
  position: absolute; left: 62%; top: 6%; width: 2px; height: 260px; pointer-events: none;
  background: linear-gradient(to bottom, transparent, rgba(90, 167, 255, 0.9), transparent);
  filter: drop-shadow(0 0 10px rgba(90, 167, 255, 0.9));
}
.hero-content { position: relative; z-index: 2; padding: 120px 24px 80px; }
.hero-mark {
  height: 96px; width: auto; margin: 0 auto 34px;
  filter: drop-shadow(0 8px 40px rgba(30, 110, 255, 0.45));
}
.hero-title {
  font-size: clamp(3rem, 9vw, 5.6rem);
  font-weight: 700; letter-spacing: 0.34em; margin-left: 0.34em;
  line-height: 1.05;
}
.hero-title .x { color: var(--blue); text-shadow: 0 0 46px rgba(30, 110, 255, 0.65); }
.hero-tagline {
  margin-top: 18px;
  font-size: clamp(0.72rem, 1.8vw, 0.95rem);
  letter-spacing: 0.52em; margin-left: 0.52em;
  color: var(--text-dim); font-weight: 500;
}
.hero-sub {
  margin: 30px auto 0; max-width: 560px;
  font-size: clamp(1rem, 2.4vw, 1.2rem); color: var(--text-dim); font-weight: 300;
}
.hero-sub .accent { color: var(--blue-light); font-weight: 500; }
.hero-ctas { margin-top: 44px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-baseline {
  position: absolute; bottom: 64px; left: 12%; right: 12%; height: 1px; pointer-events: none;
  background: linear-gradient(to right, transparent, rgba(90, 167, 255, 0.7) 50%, transparent);
}
.hero-baseline::after {
  content: ''; position: absolute; left: 50%; top: -3px; width: 7px; height: 7px;
  transform: translateX(-50%); border-radius: 50%;
  background: #cfe4ff; box-shadow: 0 0 18px 6px rgba(90, 167, 255, 0.85);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 30px; border-radius: 999px;
  font-weight: 600; font-size: 0.95rem;
  transition: all 0.25s; border: 1px solid transparent;
}
.btn-lg { padding: 16px 42px; font-size: 1.02rem; }
.btn-primary {
  background: linear-gradient(135deg, var(--blue), #4d9fff);
  color: #fff;
  box-shadow: 0 6px 28px rgba(30, 110, 255, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 40px rgba(30, 110, 255, 0.55); }
.btn-ghost { border-color: var(--line-strong); color: var(--blue-light); }
.btn-ghost:hover { background: rgba(30, 110, 255, 0.12); color: #fff; }
.btn-ico { width: 18px; height: 18px; }

/* ---------- sections ---------- */
.section { position: relative; padding: 110px 0; border-top: 1px solid var(--line); }
.section-kicker {
  color: var(--blue-light); font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.32em; text-transform: uppercase; margin-bottom: 14px;
}
.section-title { font-size: clamp(1.7rem, 4.4vw, 2.5rem); font-weight: 700; letter-spacing: -0.01em; }
.section-title .muted { color: var(--text-dim); font-weight: 400; font-size: 0.72em; }
.section-lead { color: var(--text-dim); max-width: 640px; margin-top: 16px; font-weight: 300; }

/* ---------- services ---------- */
.services-grid {
  margin-top: 56px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px;
}
.service-card {
  background: linear-gradient(160deg, var(--bg-panel), rgba(10, 18, 32, 0.4));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 26px;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.service-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-4px);
  box-shadow: 0 18px 44px rgba(3, 8, 24, 0.8), 0 0 0 1px rgba(90, 167, 255, 0.12) inset;
}
.service-icon {
  width: 52px; height: 52px; border-radius: 14px;
  border: 1px solid var(--line-strong);
  display: flex; align-items: center; justify-content: center;
  color: var(--blue-light); margin-bottom: 22px;
  background: rgba(30, 110, 255, 0.08);
  box-shadow: 0 0 22px rgba(30, 110, 255, 0.18);
}
.service-icon svg { width: 26px; height: 26px; }
.service-card h3 { font-size: 1.06rem; font-weight: 600; margin-bottom: 10px; }
.service-card p { color: var(--text-dim); font-size: 0.92rem; font-weight: 300; }

/* ---------- pettox showcase ---------- */
.section-work {
  background:
    radial-gradient(900px 420px at 85% 0%, rgba(30, 110, 255, 0.08), transparent 65%),
    var(--bg);
}
.pettox-hero {
  margin-top: 56px;
  display: grid; grid-template-columns: 1fr 1.15fr; gap: 36px; align-items: center;
}
.pettox-splash {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line);
  background: #0d1f4a;
  box-shadow: 0 24px 60px rgba(2, 6, 18, 0.8), 0 0 44px rgba(30, 110, 255, 0.1);
  aspect-ratio: 4 / 5;
  width: min(380px, 100%);
  justify-self: center;
}
.pettox-splash video { width: 100%; height: 100%; object-fit: cover; }
.pettox-title-row { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; }
.pettox-icon {
  width: 72px; height: 72px; border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.pettox-title-row h3 { font-size: 1.7rem; font-weight: 700; }
.pettox-sub { color: var(--text-dim); font-size: 0.92rem; }
.pettox-intro > p { color: var(--text-dim); font-weight: 300; }
.pettox-ctas { margin-top: 26px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.coming-soon { color: var(--text-dim); font-size: 0.85rem; }

/* ---------- three.js playground ---------- */
.playground-wrap { margin-top: 48px; }
.playground {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  height: clamp(300px, 44vw, 460px);
  background: linear-gradient(165deg, #fdf6ec 0%, #f9ecd9 55%, #f6e3c6 100%);
  border: 1px solid rgba(255, 210, 150, 0.35);
  box-shadow: 0 30px 80px rgba(2, 6, 18, 0.75), 0 0 0 6px rgba(30, 110, 255, 0.05);
}
.playground canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; }
.playground.fallback {
  background-image: url('../assets/pettox-cover.jpg');
  background-size: cover; background-position: center;
}
.playground-hint {
  position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.72);
  color: #6b533a;
  font-size: 0.82rem; font-weight: 600;
  padding: 7px 18px; border-radius: 999px;
  pointer-events: none;
  backdrop-filter: blur(6px);
  transition: opacity 0.6s;
}
.playground-hint.hidden { opacity: 0; }
.playground-caption {
  text-align: center; color: var(--text-dim); font-size: 0.86rem;
  margin-top: 16px; font-weight: 300;
}

/* ---------- pettox features ---------- */
.pettox-features {
  margin-top: 56px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px;
}
.pf-card {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px;
  transition: border-color 0.3s, transform 0.3s;
}
.pf-card:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.pf-icons { display: flex; gap: 8px; margin-bottom: 16px; }
.pf-icons img {
  width: 44px; height: 44px; border-radius: 11px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
.pf-card h4 { font-size: 1rem; font-weight: 600; margin-bottom: 8px; }
.pf-card p { color: var(--text-dim); font-size: 0.88rem; font-weight: 300; }

/* ---------- pettox demo ---------- */
.pettox-demo-row {
  margin-top: 72px;
  display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 48px; align-items: center;
}
.demo-phone {
  justify-self: center;
  width: min(280px, 80%);
  border-radius: 34px;
  border: 8px solid #101a2e;
  outline: 1px solid var(--line-strong);
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(2, 6, 18, 0.85), 0 0 60px rgba(30, 110, 255, 0.12);
  background: #000;
}
.demo-phone video { width: 100%; }
.demo-copy h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 14px; }
.demo-copy > p { color: var(--text-dim); font-weight: 300; }
.feature-flag {
  display: inline-block;
  color: var(--blue-light); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 7px 16px; margin-bottom: 18px;
  background: rgba(30, 110, 255, 0.08);
}
.story-steps {
  margin: 18px 0; padding-left: 0; list-style: none;
  counter-reset: step;
}
.story-steps li {
  counter-increment: step;
  position: relative; padding-left: 44px; margin-bottom: 14px;
  color: var(--text-dim); font-weight: 300; font-size: 0.95rem;
}
.story-steps li strong { color: var(--text); font-weight: 600; }
.story-steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 1px;
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.82rem; font-weight: 700; color: var(--blue-light);
  border: 1px solid var(--line-strong);
  background: rgba(30, 110, 255, 0.1);
}
.pettox-promo-row {
  margin-top: 88px;
  display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 48px; align-items: center;
}
.promo-copy h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 14px; }
.promo-copy > p { color: var(--text-dim); font-weight: 300; }
.promo-points { margin: 18px 0; padding: 0; list-style: none; }
.promo-points li {
  position: relative; padding-left: 40px; margin-bottom: 14px;
  color: var(--text-dim); font-weight: 300; font-size: 0.95rem;
}
.promo-points li strong { color: var(--text); font-weight: 600; }
.promo-points li::before {
  content: '✓';
  position: absolute; left: 0; top: 1px;
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 700; color: var(--blue-light);
  border: 1px solid var(--line-strong);
  background: rgba(30, 110, 255, 0.1);
}
.community-banner {
  display: block; margin-top: 80px;
  border-radius: 16px; overflow: hidden;
  border: 1px solid var(--line);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.community-banner:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: 0 22px 56px rgba(2, 6, 18, 0.85);
}
.community-strip {
  display: block; margin-top: 26px;
  border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line);
  transition: transform 0.3s, box-shadow 0.3s;
}
.community-strip:hover { transform: translateY(-3px); box-shadow: 0 16px 44px rgba(2, 6, 18, 0.8); }
.product-of { margin-top: 22px; color: var(--text-dim); font-size: 0.9rem; }
.product-of strong { color: #fff; letter-spacing: 0.18em; }

/* ---------- founder ---------- */
.founder-grid {
  display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; align-items: center;
}
.founder-photo img {
  border-radius: 22px;
  border: 1px solid var(--line-strong);
  box-shadow: 0 30px 70px rgba(2, 6, 18, 0.85), 0 0 44px rgba(30, 110, 255, 0.14);
}
.founder-role { color: var(--blue-light); font-weight: 500; margin: 10px 0 22px; }
.founder-copy > p:not(.section-kicker):not(.founder-role) {
  color: var(--text-dim); font-weight: 300; margin-bottom: 16px;
}
.founder-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.founder-tags span {
  font-size: 0.8rem; color: var(--blue-light);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 16px;
}

/* ---------- contact ---------- */
.section-contact { overflow: hidden; }
.contact-glow {
  position: absolute; left: 50%; top: -220px; transform: translateX(-50%);
  width: 900px; height: 480px; pointer-events: none;
  background: radial-gradient(ellipse, rgba(30, 110, 255, 0.15), transparent 65%);
  filter: blur(30px);
}
.contact-grid {
  margin-top: 48px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px;
}
.contact-card {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--bg-panel);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 22px;
  transition: border-color 0.3s, transform 0.3s;
}
a.contact-card:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.contact-label {
  font-size: 0.74rem; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--blue-light); font-weight: 600;
}
.contact-value { font-weight: 500; font-size: 1.02rem; word-break: break-word; }
.contact-cta { margin-top: 44px; }

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 48px;
  background:
    radial-gradient(600px 200px at 50% 120%, rgba(30, 110, 255, 0.1), transparent 70%),
    var(--bg);
}
.footer-inner { text-align: center; }
.footer-brand { display: flex; align-items: center; justify-content: center; gap: 12px; }
.footer-mark { height: 24px; }
.footer-tagline {
  margin-top: 14px; color: var(--text-dim);
  font-size: 0.72rem; letter-spacing: 0.42em; margin-left: 0.42em;
}
.footer-copy { margin-top: 20px; color: rgba(138, 155, 184, 0.55); font-size: 0.82rem; }

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }

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

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .pettox-hero, .pettox-demo-row, .founder-grid { grid-template-columns: 1fr; }
  .pettox-promo-row { grid-template-columns: 1fr; }
  .pettox-promo-row .promo-copy { order: 2; }
  .pettox-promo-row .demo-phone { order: 1; }
  .founder-photo { max-width: 420px; }
  .section { padding: 80px 0; }
}
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: rgba(3, 6, 15, 0.97);
    border-bottom: 1px solid var(--line);
    padding: 8px 24px 20px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 0; font-size: 1.05rem; width: 100%; }
  .nav-links .nav-cta { border: none; padding: 14px 0; }
  .hero-mark { height: 72px; }
  .hero-ctas .btn { width: 100%; justify-content: center; }
  .pettox-ctas .btn { width: 100%; justify-content: center; }
}
