/* ============================================================
   ToolOS Marketing Site — style.css
   Mirrors the Spatial OS aesthetic: dark, starfield, glass, neon
   ============================================================ */

/* --- Fonts ------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* --- Reset & Base ------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #000000;
  --text:        #e6edf3;
  --text-sec:    #8b949e;
  --text-muted:  #484f58;
  --blue:        #4f8fff;
  --teal:        #7dcfff;
  --purple:      #a78bfa;
  --green:       #34d399;
  --surface:     rgba(255,255,255,0.03);
  --glass:       rgba(0,0,0,0.8);
  --glass-border:rgba(255,255,255,0.06);
  --card-border: rgba(79,143,255,0.12);
  --card-hover:  rgba(79,143,255,0.25);
  --radius:      12px;
  --radius-sm:   8px;
  --font-body:   'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:   'JetBrains Mono', 'Fira Code', 'SF Mono', 'Consolas', monospace;
  --nav-h:       64px;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: var(--blue); text-decoration: none; transition: color .2s; }
a:hover { color: var(--teal); }

img { max-width: 100%; height: auto; }

/* --- Starfield Canvas + Nebula ----------------------------- */
#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.nebula {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 45% 35% at 15% 25%, rgba(79,143,255,0.03), transparent),
    radial-gradient(ellipse 40% 30% at 75% 15%, rgba(167,139,250,0.025), transparent),
    radial-gradient(ellipse 50% 40% at 60% 75%, rgba(56,189,248,0.015), transparent),
    radial-gradient(ellipse 35% 25% at 85% 65%, rgba(139,92,246,0.02), transparent),
    radial-gradient(ellipse 30% 20% at 30% 80%, rgba(52,211,153,0.012), transparent);
}

/* --- Layout wrapper ---------------------------------------- */
.page-content {
  position: relative;
  z-index: 1;
}

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

/* --- Navigation -------------------------------------------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 1000;
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
}

.nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 20px;
  color: var(--text);
  text-decoration: none;
}

.nav__logo .prompt { color: var(--blue); }
.nav__logo .os { color: var(--blue); }

.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav__links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-sec);
  transition: color .2s;
  position: relative;
}

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

.nav__links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--blue);
  border-radius: 1px;
}

.nav__cta {
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  background: var(--blue);
  color: #fff !important;
  border-radius: var(--radius-sm);
  transition: background .2s, box-shadow .2s;
}

.nav__cta:hover {
  background: #3a7ae8;
  box-shadow: 0 0 20px rgba(79,143,255,0.3);
  color: #fff !important;
}

/* Hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}

.nav__hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__hamburger.open span:nth-child(2) { opacity: 0; }
.nav__hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Alpha badge */
.nav__alpha {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: var(--blue);
  color: #fff;
  padding: 2px 8px;
  border-radius: 100px;
  margin-left: 8px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

/* --- Sections ---------------------------------------------- */
section {
  padding: 100px 0;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 16px;
  color: var(--text-sec);
  max-width: 600px;
  line-height: 1.7;
}

/* Center variant */
.text-center { text-align: center; }
.text-center .section-subtitle { margin: 0 auto; }

/* --- Hero -------------------------------------------------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: var(--nav-h);
}

.hero__title {
  font-family: var(--font-mono);
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 4px;
}

.hero__title .prompt { color: var(--blue); }
.hero__title .name   { color: var(--text); }
.hero__title .os     { color: var(--blue); }
.hero__cursor {
  display: inline-block;
  width: 3px;
  height: 0.8em;
  background: var(--blue);
  margin-left: 4px;
  animation: blink 1.2s step-end infinite;
  vertical-align: text-bottom;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.hero__subtitle {
  font-size: clamp(16px, 2.5vw, 22px);
  color: var(--text-sec);
  margin-top: 16px;
  margin-bottom: 40px;
  font-weight: 400;
}

.hero__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Buttons ----------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
}

.btn-primary:hover {
  background: #3a7ae8;
  box-shadow: 0 0 30px rgba(79,143,255,0.35);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--blue);
  border: 1px solid var(--blue);
}

.btn-secondary:hover {
  background: rgba(79,143,255,0.1);
  box-shadow: 0 0 20px rgba(79,143,255,0.15);
  color: var(--teal);
  border-color: var(--teal);
}

/* --- Cards ------------------------------------------------- */
.card-grid {
  display: grid;
  gap: 24px;
  margin-top: 48px;
}

.card-grid--3 { grid-template-columns: repeat(3, 1fr); }
.card-grid--4 { grid-template-columns: repeat(4, 1fr); }
.card-grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 32px;
  transition: border-color .3s, box-shadow .3s, transform .3s;
}

.card:hover {
  border-color: var(--card-hover);
  box-shadow: 0 0 40px rgba(79,143,255,0.08);
  transform: translateY(-2px);
}

.card__icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(79,143,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 20px;
  color: var(--blue);
  font-family: var(--font-mono);
}

.card__title {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.card__desc {
  font-size: 14px;
  color: var(--text-sec);
  line-height: 1.65;
}

.card__tag {
  display: inline-block;
  margin-top: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--teal);
  font-family: var(--font-mono);
}

/* Product tier card variant */
.card--tier {
  text-align: center;
  position: relative;
  overflow: hidden;
}

.card--tier::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--blue), transparent);
  opacity: 0;
  transition: opacity .3s;
}

.card--tier:hover::before {
  opacity: 1;
}

.card--tier .card__title {
  font-size: 20px;
}

.card--tier .card__price {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--teal);
  margin-bottom: 12px;
}

/* --- Three Rings Diagram ----------------------------------- */
.rings {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  margin-top: 48px;
  position: relative;
}

.ring {
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-direction: column;
  transition: transform .3s, box-shadow .3s;
}

.ring:hover {
  transform: scale(1.05);
}

.ring--outer {
  width: 340px;
  height: 340px;
  border: 2px solid rgba(79,143,255,0.3);
  background: rgba(79,143,255,0.03);
  position: relative;
}

.ring--outer:hover {
  box-shadow: 0 0 60px rgba(79,143,255,0.1);
}

.ring--mid {
  width: 230px;
  height: 230px;
  border: 2px solid rgba(125,207,255,0.3);
  background: rgba(125,207,255,0.03);
}

.ring--mid:hover {
  box-shadow: 0 0 40px rgba(125,207,255,0.1);
}

.ring--inner {
  width: 130px;
  height: 130px;
  border: 2px solid rgba(167,139,250,0.4);
  background: rgba(167,139,250,0.05);
}

.ring--inner:hover {
  box-shadow: 0 0 30px rgba(167,139,250,0.15);
}

.ring__label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-sec);
}

.ring__name {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  margin-top: 4px;
}

.ring--outer .ring__name { color: var(--blue); }
.ring--mid   .ring__name { color: var(--teal); }
.ring--inner .ring__name { color: var(--purple); }

/* Ring labels positioned outside the circles */
.ring--outer > .ring__info {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}

/* --- App Mockup -------------------------------------------- */
.mockup {
  margin-top: 48px;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  overflow: hidden;
  background: #050510;
  position: relative;
  aspect-ratio: 16 / 10;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.mockup__starfield {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 30% 50%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 50% 30%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 70% 60%, rgba(255,255,255,0.25), transparent),
    radial-gradient(1px 1px at 85% 15%, rgba(255,255,255,0.45), transparent),
    radial-gradient(1px 1px at 15% 80%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 60% 80%, rgba(255,255,255,0.35), transparent),
    radial-gradient(1px 1px at 90% 45%, rgba(255,255,255,0.2), transparent),
    radial-gradient(1px 1px at 40% 70%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 25% 40%, rgba(255,255,255,0.15), transparent);
}

.mockup__window {
  position: absolute;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(10,10,20,0.9);
  backdrop-filter: blur(8px);
}

.mockup__window--chat {
  top: 12%;
  left: 5%;
  width: 38%;
  height: 65%;
}

.mockup__window--files {
  top: 18%;
  right: 5%;
  width: 30%;
  height: 50%;
}

.mockup__window-bar {
  height: 28px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 6px;
}

.mockup__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
}

.mockup__dot--r { background: rgba(255,100,100,0.5); }
.mockup__dot--y { background: rgba(255,200,50,0.4); }
.mockup__dot--g { background: rgba(100,255,100,0.4); }

.mockup__window-title {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  margin-left: 8px;
}

.mockup__content {
  padding: 12px;
}

.mockup__line {
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.04);
  margin-bottom: 8px;
}

.mockup__line--short { width: 60%; }
.mockup__line--med   { width: 80%; }
.mockup__line--full  { width: 100%; }
.mockup__line--blue  { background: rgba(79,143,255,0.15); }

.mockup__taskbar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 44px;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 0 20px;
}

.mockup__taskbar-item {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
}

.mockup__taskbar-item--active {
  border-color: rgba(79,143,255,0.4);
  background: rgba(79,143,255,0.1);
}

/* --- Footer ------------------------------------------------ */
.footer {
  border-top: 1px solid var(--glass-border);
  padding: 32px 0;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.footer a {
  color: var(--text-sec);
  margin: 0 12px;
}

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

/* --- Page Header (non-home pages) -------------------------- */
.page-header {
  padding-top: calc(var(--nav-h) + 60px);
  padding-bottom: 40px;
  text-align: center;
}

.page-header .section-title {
  font-size: 40px;
}

/* --- About Page -------------------------------------------- */
.about-profile {
  display: flex;
  gap: 48px;
  align-items: flex-start;
  margin-top: 48px;
}

.about-photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--purple), var(--teal));
  padding: 3px;
  flex-shrink: 0;
}

.about-photo__inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 48px;
  font-weight: 700;
  color: var(--blue);
}

.about-bio h3 {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
}

.about-bio .role {
  color: var(--teal);
  font-family: var(--font-mono);
  font-size: 14px;
  margin-bottom: 16px;
  display: block;
}

.about-bio p {
  color: var(--text-sec);
  margin-bottom: 12px;
  line-height: 1.7;
}

.about-links {
  display: flex;
  gap: 16px;
  margin-top: 16px;
}

.about-links a {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 6px 14px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-sec);
  transition: all .2s;
}

.about-links a:hover {
  border-color: var(--blue);
  color: var(--blue);
}

/* --- Blog Cards -------------------------------------------- */
.blog-card {
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 32px;
  transition: border-color .3s, transform .3s;
  display: block;
  color: var(--text);
}

.blog-card:hover {
  border-color: var(--card-hover);
  transform: translateY(-2px);
  color: var(--text);
}

.blog-card__date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.blog-card__title {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
}

.blog-card__excerpt {
  font-size: 14px;
  color: var(--text-sec);
  line-height: 1.65;
  margin-bottom: 16px;
}

.blog-card__link {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--blue);
  font-weight: 600;
}

/* --- Docs List --------------------------------------------- */
.docs-section {
  margin-bottom: 48px;
}

.docs-section__title {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--glass-border);
}

.docs-item {
  display: block;
  padding: 16px 20px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  transition: border-color .2s, background .2s;
  color: var(--text);
}

.docs-item:hover {
  border-color: var(--card-hover);
  background: var(--surface);
  color: var(--text);
}

.docs-item__title {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
}

.docs-item__desc {
  font-size: 13px;
  color: var(--text-sec);
}

/* --- Architecture Embed ------------------------------------ */
.arch-embed {
  margin-top: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  overflow: hidden;
  background: #050510;
}

.arch-embed iframe {
  width: 100%;
  height: 80vh;
  border: none;
}

/* --- Fade-in animation ------------------------------------- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive -------------------------------------------- */
@media (max-width: 768px) {
  .nav__links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(20px);
    padding: 40px 24px;
    gap: 24px;
    transform: translateX(100%);
    transition: transform .3s ease;
  }

  .nav__links.open {
    transform: translateX(0);
  }

  .nav__links a { font-size: 18px; }

  .nav__hamburger { display: flex; }

  .card-grid--3,
  .card-grid--4 {
    grid-template-columns: 1fr;
  }

  .card-grid--2 {
    grid-template-columns: 1fr;
  }

  .about-profile {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .about-links { justify-content: center; }

  .ring--outer {
    width: 260px;
    height: 260px;
  }

  .ring--mid {
    width: 180px;
    height: 180px;
  }

  .ring--inner {
    width: 100px;
    height: 100px;
  }

  .ring__label { font-size: 9px; }
  .ring__name  { font-size: 11px; }

  .section-title { font-size: 26px; }

  .mockup { aspect-ratio: 4/3; }
}

@media (max-width: 480px) {
  .hero__actions { flex-direction: column; align-items: center; }
  .btn { width: 100%; justify-content: center; }

  .ring--outer { width: 220px; height: 220px; }
  .ring--mid   { width: 150px; height: 150px; }
  .ring--inner { width: 80px;  height: 80px;  }
}
