/* ============================================================
   ISTatlas — dark futuristic theme
   ============================================================ */

:root {
  --bg: #05070d;
  --bg-soft: #0a0e18;
  --card: #0d1220;
  --card-border: rgba(99, 179, 255, 0.12);
  --text: #e8edf5;
  --text-dim: #93a0b4;
  --accent: #4da3ff;
  --accent-2: #7b6cff;
  --accent-glow: rgba(77, 163, 255, 0.35);
  --radius: 16px;
  --max-w: 1100px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, .logo {
  font-family: "Space Grotesk", "Inter", sans-serif;
  letter-spacing: -0.02em;
}

a { color: var(--accent); text-decoration: none; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- hero dot field (see hero-dots.js) ---------- */
.hero-fx {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  pointer-events: none;
}

.glow-orb {
  position: fixed;
  z-index: -1;
  width: 640px;
  height: 640px;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.16;
  pointer-events: none;
}
.glow-orb.one { background: var(--accent); top: -280px; right: -160px; }
.glow-orb.two { background: var(--accent-2); bottom: -320px; left: -200px; opacity: 0.10; }

/* ---------- nav ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(5, 7, 13, 0.72);
  border-bottom: 1px solid rgba(99, 179, 255, 0.08);
}

nav {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
}
.logo img {
  height: 26px;
  width: auto;
  display: block;
}

/* brand name in running text — squared techno letterforms matching the logo */
.brand {
  font-family: "Audiowide", "Space Grotesk", sans-serif;
  font-weight: 400;
  text-transform: lowercase;
  letter-spacing: 0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  color: var(--text-dim);
  font-size: 0.95rem;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }

.lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-dim);
}
.lang-switch a { color: var(--text-dim); font-weight: 600; }
.lang-switch a.active { color: var(--accent); }
.lang-switch a:hover { color: var(--text); }

.nav-cta {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid rgba(77, 163, 255, 0.45);
  color: var(--accent) !important;
  font-weight: 600;
  transition: background 0.2s, box-shadow 0.2s;
}
.nav-cta:hover {
  background: rgba(77, 163, 255, 0.1);
  box-shadow: 0 0 24px var(--accent-glow);
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 110px 0 90px;
  text-align: center;
}

/* keep the hero copy above the dot field */
.hero .container {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: rgba(77, 163, 255, 0.06);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1.08;
  font-weight: 700;
  max-width: 860px;
  margin: 0 auto 24px;
  background: linear-gradient(120deg, #ffffff 30%, #9fc6ff 70%, #b3a6ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  max-width: 640px;
  margin: 0 auto 40px;
  color: var(--text-dim);
  font-size: 1.13rem;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  padding: 15px 34px;
  border-radius: 999px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.02rem;
  font-weight: 600;
  color: #05070d;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 32px var(--accent-glow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 52px var(--accent-glow);
}

.btn.big {
  padding: 20px 48px;
  font-size: 1.18rem;
}

/* ---------- dot-border button ----------
   Frame draws itself in on hover: corner dots fly out, then the four
   dashed edges sweep in, then a diagonal grid fades up behind.
   Ported from the threeui "Dot Border button" effect. */
.dot-btn-wrap {
  --dot-size: 8px;
  --line-weight: 1px;
  --animation-speed: 0.35s;
  --dot-color: var(--accent);
  --line-color: rgba(77, 163, 255, 0.75);
  --grid-color: rgba(77, 163, 255, 0.22);

  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1rem;
  -webkit-user-select: none;
  user-select: none;
}

/* diagonal hatch that fades up last */
.dot-btn-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(45deg, var(--grid-color) 0 1px, transparent 2px 5px);
  opacity: 0;
}
.dot-btn-wrap:has(.dot-btn:is(:hover, :focus-visible))::after {
  animation: dot-grid-in calc(var(--animation-speed) * 4) ease-in-out forwards;
}
@keyframes dot-grid-in {
  80% { opacity: 0; }
  100% { opacity: 1; }
}

.dot-btn {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 18px 40px;
  border: 1px solid var(--grid-color);
  border-radius: 10px;
  background-color: transparent;
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.18rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease-in-out, letter-spacing 0.2s ease-in-out,
              background-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.dot-btn:is(:hover, :focus-visible) {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #05070d;
  transform: scale(1.05);
  letter-spacing: 0.04em;
  box-shadow: 0 0 42px var(--accent-glow);
}
.dot-btn:active {
  transform: scale(0.98);
  letter-spacing: 0.02em;
}

.dot-btn svg {
  margin-left: 0.6rem;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --- the four edges --- */
.dot-btn-wrap .line {
  position: absolute;
  z-index: 1;
  transition: all 0.3s ease-in-out;
}
.dot-btn-wrap .line.horizontal {
  height: var(--line-weight);
  width: 100%;
  background-image: repeating-linear-gradient(90deg, transparent 0 calc(var(--line-weight) * 2), var(--line-color) calc(var(--line-weight) * 2) calc(var(--line-weight) * 4));
}
.dot-btn-wrap .line.vertical {
  width: var(--line-weight);
  height: 100%;
  background-image: repeating-linear-gradient(0deg, transparent 0 calc(var(--line-weight) * 2), var(--line-color) calc(var(--line-weight) * 2) calc(var(--line-weight) * 4));
}
.dot-btn-wrap .line.top {
  top: calc(var(--line-weight) * -0.5);
  transform-origin: top left;
  transform: rotate(5deg) scaleX(0);
}
.dot-btn-wrap .line.bottom {
  bottom: calc(var(--line-weight) * -0.5);
  transform-origin: bottom right;
  transform: rotate(5deg) scaleX(0);
}
.dot-btn-wrap .line.left {
  left: calc(var(--line-weight) * -0.5);
  transform-origin: bottom left;
  transform: scaleY(0);
}
.dot-btn-wrap .line.right {
  right: calc(var(--line-weight) * -0.5);
  transform-origin: top right;
  transform: rotate(5deg) scaleY(0);
}

.dot-btn-wrap:has(.dot-btn:is(:hover, :focus-visible)) .line.top {
  animation: draw-x var(--animation-speed) ease-in-out forwards;
  animation-delay: calc(var(--animation-speed) * 0.8);
}
.dot-btn-wrap:has(.dot-btn:is(:hover, :focus-visible)) .line.right {
  animation: draw-y var(--animation-speed) ease-in-out forwards;
  animation-delay: calc(var(--animation-speed) * 1.4);
}
.dot-btn-wrap:has(.dot-btn:is(:hover, :focus-visible)) .line.bottom {
  animation: draw-x var(--animation-speed) ease-in-out forwards;
  animation-delay: calc(var(--animation-speed) * 2);
}
.dot-btn-wrap:has(.dot-btn:is(:hover, :focus-visible)) .line.left {
  animation: draw-y var(--animation-speed) ease-in-out forwards;
  animation-delay: calc(var(--animation-speed) * 2.4);
}
@keyframes draw-x { 100% { transform: rotate(0deg) scaleX(1); } }
@keyframes draw-y { 100% { transform: rotate(0deg) scaleY(1); } }

/* --- the four corner dots --- */
.dot-btn-wrap .dot {
  position: absolute;
  z-index: 1;
  width: var(--dot-size);
  aspect-ratio: 1;
  border-radius: 2px;
  background-color: var(--dot-color);
  opacity: 0;
  transition: all 0.3s ease-in-out;
}
.dot-btn-wrap:has(.dot-btn:is(:hover, :focus-visible)) .dot.top.left {
  top: 50%;
  left: 20%;
  animation: move-top-left var(--animation-speed) ease-in-out forwards;
}
.dot-btn-wrap:has(.dot-btn:is(:hover, :focus-visible)) .dot.top.right {
  top: 50%;
  right: 20%;
  animation: move-top-right var(--animation-speed) ease-in-out forwards;
  animation-delay: calc(var(--animation-speed) * 0.6);
}
.dot-btn-wrap:has(.dot-btn:is(:hover, :focus-visible)) .dot.bottom.right {
  bottom: 50%;
  right: 20%;
  animation: move-bottom-right var(--animation-speed) ease-in-out forwards;
  animation-delay: calc(var(--animation-speed) * 1.2);
}
.dot-btn-wrap:has(.dot-btn:is(:hover, :focus-visible)) .dot.bottom.left {
  bottom: 50%;
  left: 20%;
  animation: move-bottom-left var(--animation-speed) ease-in-out forwards;
  animation-delay: calc(var(--animation-speed) * 1.8);
}
@keyframes move-top-left {
  90% { opacity: 0.6; }
  100% { top: calc(var(--dot-size) * -0.5); left: calc(var(--dot-size) * -0.5); opacity: 1; }
}
@keyframes move-top-right {
  80% { opacity: 0.6; }
  100% { top: calc(var(--dot-size) * -0.5); right: calc(var(--dot-size) * -0.5); opacity: 1; }
}
@keyframes move-bottom-right {
  80% { opacity: 0.6; }
  100% { bottom: calc(var(--dot-size) * -0.5); right: calc(var(--dot-size) * -0.5); opacity: 1; }
}
@keyframes move-bottom-left {
  80% { opacity: 0.6; }
  100% { bottom: calc(var(--dot-size) * -0.5); left: calc(var(--dot-size) * -0.5); opacity: 1; }
}

/* visitors who ask for less motion get the frame, not the choreography */
@media (prefers-reduced-motion: reduce) {
  .dot-btn-wrap :is(.line, .dot),
  .dot-btn-wrap::after {
    animation: none !important;
    transition: none !important;
  }
  .dot-btn-wrap:has(.dot-btn:is(:hover, :focus-visible)) :is(.line, .dot) {
    opacity: 1;
    transform: none;
  }
  .dot-btn-wrap:has(.dot-btn:is(:hover, :focus-visible)) .dot.top.left { top: calc(var(--dot-size) * -0.5); left: calc(var(--dot-size) * -0.5); }
  .dot-btn-wrap:has(.dot-btn:is(:hover, :focus-visible)) .dot.top.right { top: calc(var(--dot-size) * -0.5); right: calc(var(--dot-size) * -0.5); }
  .dot-btn-wrap:has(.dot-btn:is(:hover, :focus-visible)) .dot.bottom.right { bottom: calc(var(--dot-size) * -0.5); right: calc(var(--dot-size) * -0.5); }
  .dot-btn-wrap:has(.dot-btn:is(:hover, :focus-visible)) .dot.bottom.left { bottom: calc(var(--dot-size) * -0.5); left: calc(var(--dot-size) * -0.5); }
  .dot-btn:is(:hover, :focus-visible) { transform: none; letter-spacing: normal; }
}

/* ---------- sections ---------- */
section { padding: 84px 0; }

.section-label {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 16px;
  max-width: 640px;
}

.section-intro {
  color: var(--text-dim);
  max-width: 620px;
  margin-bottom: 48px;
}

/* ---------- cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.card {
  background: linear-gradient(160deg, var(--card), var(--bg-soft));
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: border-color 0.25s, transform 0.25s;
}
.card:hover {
  border-color: rgba(77, 163, 255, 0.35);
  transform: translateY(-3px);
}

.card .icon {
  font-size: 1.6rem;
  margin-bottom: 16px;
  display: block;
}

.card h3 {
  font-size: 1.12rem;
  margin-bottom: 10px;
}

.card p {
  color: var(--text-dim);
  font-size: 0.95rem;
}

/* ---------- process ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  counter-reset: step;
}

.step {
  position: relative;
  background: var(--bg-soft);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 30px 26px;
}

.step .num {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.12em;
  margin-bottom: 14px;
}

.step h3 { font-size: 1.08rem; margin-bottom: 8px; }
.step p { color: var(--text-dim); font-size: 0.93rem; }

/* ---------- final CTA ---------- */
.cta-final {
  text-align: center;
  padding: 110px 0 130px;
}

.cta-final h2 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  margin-bottom: 20px;
  background: linear-gradient(120deg, #ffffff 40%, #9fc6ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.cta-final p {
  color: var(--text-dim);
  max-width: 560px;
  margin: 0 auto 44px;
  font-size: 1.1rem;
}

/* ---------- about page ---------- */
.about-hero {
  padding: 90px 0 40px;
}

.about-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 56px;
  align-items: start;
}

.photo-frame {
  position: sticky;
  top: 110px;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  border: 1px solid rgba(77, 163, 255, 0.3);
  background:
    linear-gradient(160deg, rgba(77, 163, 255, 0.08), rgba(123, 108, 255, 0.06)),
    var(--bg-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-dim);
  font-size: 0.9rem;
  text-align: center;
  padding: 20px;
  overflow: hidden;
  box-shadow: 0 0 44px rgba(77, 163, 255, 0.1);
}

.photo-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
}

.photo-frame .placeholder-icon { font-size: 2.2rem; }

.about-story h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  margin-bottom: 8px;
}

.about-story .role {
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 32px;
}

.about-story p {
  color: var(--text-dim);
  margin-bottom: 22px;
  font-size: 1.05rem;
}

.about-story p strong { color: var(--text); font-weight: 600; }

.about-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 36px 0 0;
}

.fact-chip {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: rgba(77, 163, 255, 0.05);
  color: var(--text-dim);
  font-size: 0.88rem;
}

/* ---------- footer ---------- */
footer {
  border-top: 1px solid rgba(99, 179, 255, 0.08);
  padding: 44px 0;
  background: rgba(5, 7, 13, 0.6);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  color: var(--text-dim);
  font-size: 0.92rem;
}

.footer-inner a { color: var(--text-dim); transition: color 0.2s; }
.footer-inner a:hover { color: var(--accent); }

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .photo-frame { position: relative; top: 0; max-width: 340px; }
  .hero { padding: 70px 0 60px; }
  section { padding: 60px 0; }
  .nav-links { gap: 18px; }
}

@media (max-width: 560px) {
  nav { padding: 14px 16px; }
  .nav-links { gap: 14px; }
  .nav-links a { font-size: 0.88rem; }
  .nav-links .nav-secondary { display: none; }
  .nav-cta { padding: 8px 14px; white-space: nowrap; }
  .logo img { height: 22px; }
}
