/* ============================================================
   v6j — landing page styles
   Vanilla CSS. Mobile-first, no dependencies.
   ============================================================ */

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

:root {
  --bg: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --muted-strong: #334155;
  --line: rgba(15, 23, 42, 0.10);
  --line-strong: rgba(15, 23, 42, 0.18);
  --accent: #0891b2;
  --accent-2: #7c3aed;
  --max: 1200px;
  --nav-h: 76px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "SF Pro Display", "Segoe UI", system-ui, -apple-system,
    BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
}

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

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

p {
  margin: 0;
}

::selection {
  background: rgba(8, 145, 178, 0.18);
  color: #0f172a;
}

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

/* ---------- Navigation ---------- */

.nav {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(100% - 40px, var(--max));
  min-height: var(--nav-h);
  margin: 0 auto;
  padding: 18px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand__favicon {
  display: block;
  width: auto;
  height: 30px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
  font-size: 0.92rem;
  color: var(--muted-strong);
}

.nav__links a {
  position: relative;
  padding: 6px 0;
  transition: color 0.2s ease;
}

.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}

.nav__links a:hover {
  color: var(--text);
}

.nav__links a:hover::after {
  transform: scaleX(1);
}

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

.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100% - 40px, var(--max));
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100svh - var(--nav-h));
  margin: 0 auto;
  padding: 24px 0;
}

.hero__visual {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0;
}

/* ---------- Orbital diagram ---------- */

.orbital {
  --size: clamp(260px, 82vw, 560px);
  --px: 0;
  --py: 0;
  position: relative;
  width: var(--size);
  height: var(--size);
  margin: 0 auto;
  transform: translate3d(calc(var(--px) * 12px), calc(var(--py) * 12px), 0);
  transition: transform 0.4s var(--ease);
  will-change: transform;
}

.orbital__halo {
  position: absolute;
  inset: 4%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(8, 145, 178, 0.08) 0%, rgba(249, 115, 22, 0.06) 38%, transparent 68%);
  filter: blur(14px);
}

.orbital__ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  border: 1px solid var(--line);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.orbital__ring--one {
  width: 100%;
  height: 100%;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: inset 0 0 60px rgba(8, 145, 178, 0.035);
}

.orbital__ring--two {
  width: 70%;
  height: 70%;
  border-style: dashed;
  border-color: rgba(15, 23, 42, 0.12);
}

.orbital__ring--three {
  width: 40%;
  height: 40%;
  border-color: rgba(249, 115, 22, 0.22);
  box-shadow: 0 0 40px rgba(249, 115, 22, 0.08);
}

.orbit {
  --icon: max(30px, calc(var(--size) * 0.10));
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--d);
  height: var(--d);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: orbit-spin var(--dur) linear infinite;
  animation-direction: var(--dir, normal);
  will-change: transform;
}

.orbit--outer { z-index: 1; }
.orbit--middle { z-index: 2; }
.orbit--inner { z-index: 3; }

.orbit__item {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  transform: rotate(var(--angle)) translateY(calc(var(--d) * -0.5));
}

.orbit__icon {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: var(--icon);
  height: var(--icon);
  margin-top: calc(var(--icon) / -2);
  margin-left: calc(var(--icon) / -2);
  padding: 16%;
  border-radius: 30%;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow:
    0 8px 22px rgba(15, 23, 42, 0.08),
    0 0 0 1px rgba(8, 145, 178, 0.03),
    inset 0 1px 0 #ffffff;
  transform: rotate(calc(-1 * var(--angle)));
  animation: icon-counter var(--dur) linear infinite;
  animation-direction: var(--dir, normal);
  transition: box-shadow 0.25s ease;
  will-change: transform;
}

.orbit__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.25s var(--ease);
}

.orbit__icon::after {
  content: attr(data-label);
  position: absolute;
  top: calc(100% + 9px);
  left: 50%;
  z-index: 10;
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, -4px);
  transition: opacity 0.2s ease, transform 0.2s var(--ease);
  pointer-events: none;
  backdrop-filter: blur(8px);
}

.orbit__icon:hover {
  box-shadow:
    0 12px 28px rgba(15, 23, 42, 0.12),
    0 0 0 1px rgba(8, 145, 178, 0.25),
    0 0 24px rgba(8, 145, 178, 0.12),
    inset 0 1px 0 #ffffff;
}

.orbit__icon:hover img {
  transform: scale(1.14);
}

.orbit__icon:hover::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.orbital:hover .orbit,
.orbital:hover .orbit__icon {
  animation-play-state: paused;
}

.orbital__core {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 5%;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(circle at 34% 28%, rgba(8, 145, 178, 0.18), transparent 42%),
    radial-gradient(circle at 70% 76%, rgba(249, 115, 22, 0.20), transparent 52%),
    linear-gradient(150deg, #ffffff, #f1f5ff);
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow:
    0 0 0 3px rgba(8, 145, 178, 0.04),
    0 0 20px rgba(8, 145, 178, 0.12),
    inset 0 1px 0 #ffffff;
}

.orbital__core-ring {
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 1px dashed rgba(8, 145, 178, 0.35);
  animation: core-spin 26s linear infinite;
}

.orbital__core-label {
  position: relative;
  z-index: 1;
  color: #0f172a;
  font-size: clamp(0.4rem, calc(var(--size) * 0.012), 0.55rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(8, 145, 178, 0.18);
}

@keyframes orbit-spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes icon-counter {
  from { transform: rotate(calc(-1 * var(--angle))); }
  to { transform: rotate(calc(-1 * var(--angle) - 360deg)); }
}

@keyframes core-spin {
  to { transform: rotate(360deg); }
}

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

.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: min(100% - 40px, var(--max));
  margin: 0 auto;
  padding: 28px 0 36px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.brand--footer .brand__favicon {
  height: 24px;
}

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

@media (min-width: 640px) {
  .footer {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

@media (min-width: 900px) {
  .hero {
    padding: 20px 0;
  }

  .orbital {
    --size: clamp(360px, 42vw, 620px);
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .orbit,
  .orbit__icon,
  .orbital__core-ring {
    animation: none;
  }
}
