/* ══════════════════════════════════════════════
   GhostOS — Main Stylesheet
   Root bg: #191919  |  Font: Inter
   ══════════════════════════════════════════════ */

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

:root {
  --bg: #191919;
  --border: rgba(255, 255, 255, 0.1);
  --text-white: #ffffff;
  --text-dim: rgba(255, 255, 255, 0.55);
  --text-muted: rgba(255, 255, 255, 0.32);
  --nav-h: 72px;
  --nav-h-shrunk: 54px;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text-white);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::-webkit-scrollbar {
  width: 3px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
}

/* ══════════════════════════════════════
   BOOT LOADER
   ══════════════════════════════════════ */
.boot-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #111111;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.6s;
}

.boot-loader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.boot-loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.boot-logo {
  height: 64px;
  width: auto;
  opacity: 0.9;
  filter: drop-shadow(0 0 12px rgba(255,255,255,0.1));
}

.boot-bar-container {
  width: 200px;
  height: 3px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
  border-radius: 2px;
}

.boot-bar {
  height: 100%;
  width: 0%;
  background: #fff;
  transition: width 0.15s ease-out;
  box-shadow: 0 0 10px rgba(255,255,255,0.5);
}

.boot-text {
  font-family: monospace;
  font-size: 13px;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
/* ══════════════════════════════════════
   NAVBAR
   — Fixed, full-width
   — Logo left: ghost icon + "GhostOS"
   — Links right: pill container
   — Shrinks when scrolled
   ══════════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: background 0.35s ease, backdrop-filter 0.35s ease, border-color 0.35s ease;
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  background: rgba(25, 25, 25, 0.75);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom-color: var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  padding: 0 28px;
  max-width: 100%;
  transition: height 0.35s ease;
}

.navbar.scrolled .nav-inner {
  height: var(--nav-h-shrunk);
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
}

.nav-logo-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
}

.nav-logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
  transition: width 0.35s ease, height 0.35s ease;
}

.navbar.scrolled .nav-logo-img {
  width: 26px;
  height: 26px;
}



.nav-logo-text {
  font-family: 'Inter', sans-serif;
  font-size: 25px;
  font-weight: 600;
  color: var(--text-white);
  letter-spacing: -0.01em;
  transition: font-size 0.35s ease;
}

.navbar.scrolled .nav-logo-text {
  font-size: 20px;
}

/* Nav links pill group */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 100px;
  padding: 3px;
  transition: padding 0.35s ease;
}

.navbar.scrolled .nav-links {
  padding: 2px;
}

.nav-link {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  padding: 5px 16px;
  border-radius: 100px;
  transition: color 0.25s ease, background 0.25s ease, font-size 0.35s ease, padding 0.35s ease;
  letter-spacing: 0;
}

.navbar.scrolled .nav-link {
  font-size: 15px;
  padding: 4px 13px;
}

.nav-link:hover {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.08);
}

.nav-link.active {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.1);
}


/* ══════════════════════════════════════
   HERO SECTION
   — Full 100vh
   — s1end.png as background, covers full area
   — Gradient overlay darker at bottom
   — Top-right text: "Your entire developer world. / In your pocket."
   — Bottom-left text: "Plug in and it's already home."
   ══════════════════════════════════════ */
.hero {
  position: relative;
  width: 100%;
  height: 350vh; /* Scroll runway for image sequence */
  background: #191919;
}

.hero-sticky {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.hero-bg-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(25, 25, 25, 0) 30%, #191919 75%);
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
}

/* Overlay removed — image shows in full */

/* Top-left text block for 3-Step Section */
.steps-top-left-container {
  position: absolute;
  top: 10%;
  left: calc(50% - 50vw + 4vw);
  z-index: 3;
  text-align: left;
}

.hero-top-left {
  font-family: 'Inter', sans-serif;
  font-size: clamp(24px, 10vw, 40px);
  font-weight: 300;
  line-height: 1.4;
  color: var(--text-white);
  letter-spacing: -0.01em;
}

.hero-top-left strong {
  font-weight: 700;
}

/* Top-right text block */
.hero-content {
  position: absolute;
  top: 10%;
  right: 4%;
  z-index: 3;
  text-align: right;
}

.hero-top-right {
  font-family: 'Inter', sans-serif;
  font-size: clamp(24px, 10vw, 40px);
  font-weight: 300;
  /* light for "Your entire" and "In your" */
  line-height: 1.4;
  color: var(--text-white);
  letter-spacing: -0.01em;
}

/* Bold words: "developer world." and "pocket." */
.hero-top-right strong {
  font-weight: 700;
}

/* Bottom-left text block */
.hero-bottom-left {
  position: absolute;
  bottom: 6%;
  left: 4%;
  z-index: 3;
  will-change: transform;
}

.hero-tagline {
  font-family: 'Inter', sans-serif;
  font-size: clamp(24px, 10vw, 40px);
  font-weight: 300;
  color: var(--text-white);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.hero-tagline strong {
  font-weight: 700;
}


/* ══════════════════════════════════════
   3-STEP SECTION
   — Left: text lines, stacked, left-aligned
   — Right: looping video
   — Centered vertically in min-height: 100vh
   ══════════════════════════════════════ */
.steps-section {
  position: relative;
  background: var(--bg);
  height: 400vh;
}

.steps-inner {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  max-width: 1100px;
  /* Slight bump for wider inner space */
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 80px;
  padding: 0 80px;
}

.steps-text {
  flex: 0 0 auto;
}

/* Each line — slides in driven by JS scroll */
.steps-line {
  font-family: 'Inter', sans-serif;
  font-size: clamp(18px, 2vw, 35px);
  font-weight: 400;
  color: var(--text-white);
  line-height: 1.65;
  letter-spacing: -0.01em;
  will-change: opacity, transform;
}

/* "You're home." — bold, slight gap above */
.steps-home {
  font-weight: 700;
  margin-top: 16px;
}

/* Video side — slides in driven by JS scroll */
.steps-video-wrap {
  flex: 0 0 auto;
  width: 75%;
  /* Increased from 70% */
  max-width: 860px;
  /* Increased from 700px */
  overflow: hidden;
  will-change: opacity, transform;
}

.steps-video {
  width: 100%;
  height: auto;
  display: block;
}

.steps-terminal {
  margin-top: 24px;
  font-family: monospace;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
}

.terminal-url {
  color: #4ade80; /* GhostOS Terminal Green */
  font-size: clamp(14px, 1.5vw, 18px);
  letter-spacing: 0.05em;
}

.terminal-desc {
  color: var(--text-dim);
  font-size: clamp(12px, 1.2vw, 16px);
  letter-spacing: 0.02em;
}


/* ══════════════════════════════════════
   SCROLL-REVEAL TEXT SECTION
   — Word-by-word reveal driven by scroll
   — Each .rw starts dim + slightly blurred
   — Gets .lit class → full white, sharp
   ══════════════════════════════════════ */
.reveal-section {
  position: relative;
  height: 400vh;
  /* extra height = more scroll time per word */
  background: var(--bg);
}

.reveal-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reveal-content {
  text-align: center;
  padding: 0 2.5rem;
  max-width: 780px;
  width: 100%;
}

/* Title */
.reveal-title {
  font-family: 'Inter', sans-serif;
  font-size: clamp(30px, 4.2vw, 58px);
  font-weight: 700;
  color: transparent;
  /* controlled entirely via .rw spans */
  letter-spacing: -0.03em;
  line-height: 1.15;
  /* no margin — words inline */
}

/* Quote */
.reveal-quote {
  margin-top: 22px;
  font-family: 'Inter', sans-serif;
  font-size: clamp(13px, 1.35vw, 18px);
  font-weight: 400;
  color: transparent;
  /* controlled via .rw spans */
  letter-spacing: 0;
  line-height: 1.65;
}

/* ── Individual word span ─────────────────
   Dim ghost state: very low opacity + slight blur
   Lit state: full white, no blur
   The transition makes each word gently
   'focus in' as scroll reaches it.
   ──────────────────────────────────────── */
/* The parent word container just holds the letter spans */
.rw {
  display: inline;
}

/* A real space between words (::after pseudo adds a non-breaking space) */
.rw::after {
  content: '\00a0';
}

/* Individual character spans — JS drives opacity, filter, transform */
.rc {
  display: inline;
  will-change: opacity, filter, transform;
}


/* ══════════════════════════════════════
   CLAW SECTION
   — Centered column layout
   — "Introducing" (small, light) above
   — "CLAW — the AI execution engine." (mixed weight)
   — Laptop image with pointer line annotations
   — "Read → Analyze → Fix → Deploy → Verify" below
   ══════════════════════════════════════ */
.claw-section {
  position: relative;
  height: 400vh;
  background: var(--bg);
}

.claw-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 40px;
}

.claw-intro {
  text-align: center;
  margin-bottom: 64px;
}

/* Individual word wrapper for CLAW section reveal */
.crw {
  display: inline;
}

.crw::after {
  content: '\00a0';
}

/* "Introducing" — light, small */
.claw-introducing {
  font-family: 'Inter', sans-serif;
  font-size: 40px;
  font-weight: 300;
  color: var(--text-dim);
  letter-spacing: 0.01em;
  margin-bottom: 6px;
}

/* "CLAW — the AI execution engine." */
.claw-title {
  font-family: 'Inter', sans-serif;
  font-size: clamp(22px, 3vw, 42px);
  font-weight: 300;
  /* base is light */
  color: var(--text-white);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* "CLAW" is bold */
.claw-title strong {
  font-weight: 700;
}

/* Laptop image container — annotations are absolutely positioned relative to this */
.claw-laptop-wrap {
  position: relative;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
}

.claw-laptop-img {
  width: 100%;
  height: auto;
  display: block;
}

/* Generic annotation wrapper */
.annotation {
  position: absolute;
  display: flex;
  align-items: flex-start;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.annotation.revealed {
  opacity: 1;
}

.ann-text-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.text-right {
  text-align: right;
  align-items: flex-end;
}

.text-left {
  text-align: left;
  align-items: flex-start;
}

.ann-title {
  font-family: 'Inter', sans-serif;
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 800;
  color: var(--text-white);
  letter-spacing: -0.01em;
  line-height: 1;
}

.ann-desc {
  font-family: 'Inter', sans-serif;
  font-size: clamp(14px, 1.8vw, 19px);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.4;
}

/* ── Top-right annotation ─────────────────
   Text label sits at top-right outside the laptop
   Line goes from label down-left to dot on laptop screen
   ──────────────────────────────────────── */
.annotation-tr {
  top: -10%;
  right: -20%;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

/* ── Bottom-left annotation ───────────────
   Text label sits at bottom-left outside
   Line goes from label up-right to dot on laptop
   ──────────────────────────────────────── */
.annotation-bl {
  bottom: 0%;
  left: -20%;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

/* SVG lines */
.anno-svg {
  height: 120px;
  flex-shrink: 0;
}

.anno-svg-tr {
  width: 400px;
}

.anno-svg-bl {
  width: 450px;
}

.anno-path {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.anno-path.drawn {
  stroke-dashoffset: 0;
}

.anno-dot {
  opacity: 0;
  transition: opacity 0.3s ease 0.85s;
}

.anno-dot.shown {
  opacity: 1;
}

/* Pipeline flow text */
.claw-pipeline {
  font-family: 'Inter', sans-serif;
  font-size: clamp(20px, 3.5vw, 32px);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.95);
  white-space: nowrap;
  letter-spacing: 0.02em;
  text-align: center;
  line-height: 1.2;
  margin-top: 40px;
}


/* ══════════════════════════════════════
   CREDIT SECTION
   — Centered, large padding around it
   ══════════════════════════════════════ */
.credit-section {
  background: var(--bg);
  padding: 300px 0;
  text-align: center;
}

.credit-text {
  font-family: 'Inter', sans-serif;
  font-size: 35px;
  font-weight: 300;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

.credit-text strong {
  font-weight: 700;
  color: var(--text-white);
}


/* ══════════════════════════════════════
   FOOTER
   — Brand (logo + desc + tagline) on left
   — "Project" links on right
   ══════════════════════════════════════ */
.footer {
  background: #1f1f1f;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 100px 40px;
}

.footer-inner {
  max-width: 1060px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 60px;
}

/* Brand column */
.footer-brand {
  max-width: 380px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 14px;
}

/* .footer-logo-ghost {
  font-size: 18px;
  line-height: 1;
} */

.footer-logo-ghost img {
  width: 50px;
  height: 50px;
}

.footer-logo-name {
  font-family: 'Inter', sans-serif;
  font-size: 35px;
  font-weight: 600;
  color: var(--text-white);
  letter-spacing: -0.01em;
}

.footer-desc {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 14px;
}

.footer-tagline {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0;
}

/* Links column */
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 15px;
  min-width: 100px;
}

.footer-links-title {
  font-family: 'Inter', sans-serif;
  font-size: 30px;
  font-weight: 500;
  color: var(--text-white);
  margin-bottom: 6px;
  letter-spacing: 0;
}

.footer-link {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 400;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
  letter-spacing: 0;
}

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


/* ══════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════ */
@media (max-width: 900px) {
  .steps-section {
    padding: 80px 40px;
  }

  .steps-inner {
    flex-direction: column-reverse;
    justify-content: center;
    gap: 24px;
  }

  .steps-video-wrap {
    width: 100%;
    max-width: 100%;
  }

  .claw-section {
    padding: 80px 32px 60px;
  }

  .annotation-tr {
    right: -2%;
    top: 5%;
  }

  .annotation-bl {
    left: -2%;
    bottom: 20%;
  }

  .anno-svg {
    height: 60px;
  }

  .anno-svg-tr, .anno-svg-bl {
    width: 150px;
  }

  .footer {
    padding: 48px 32px 32px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 36px;
  }
}

@media (max-width: 600px) {
  .nav-inner {
    padding: 0 18px;
  }

  .steps-section {
    padding: 70px 24px;
  }

  .claw-section {
    padding: 70px 24px 50px;
  }

  .footer {
    padding: 42px 24px 28px;
  }

  .hero-content {
    top: 22%;
    right: 5%;
  }

  .steps-top-left-container {
    left: 24px;
    top: 5%;
  }

  .hero-bottom-left {
    bottom: 22%;
    left: 5%;
  }
}
/* ══════════════════════════════════════
   FEATURES SECTION
   ══════════════════════════════════════ */
.features-section {
  padding: 120px 80px;
  background: var(--bg);
  position: relative;
  z-index: 10;
}

.features-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 60px;
}

.features-title {
  font-family: 'Inter', sans-serif;
  font-size: 48px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.5) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.features-subtitle {
  font-size: 18px;
  color: var(--text-dim);
  font-weight: 300;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 24px;
  max-width: 1280px;
  margin: 0 auto;
}

.feature-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), 
              transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1),
              border-color 0.3s ease, background 0.3s ease;
  opacity: 0;
  transform: translateY(40px);
}

.feature-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.feature-card.visible[style*="--anim-delay"] {
  transition-delay: var(--anim-delay);
}

.feature-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.03);
}

.fc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.fc-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #f1f5f9;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fc-icon svg {
  width: 24px;
  height: 24px;
}

.fc-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.fc-badge {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  line-height: 1;
}

.fc-badge-primary {
  background: rgba(255, 255, 255, 0.9);
  color: #1a1a1a;
  letter-spacing: -0.01em;
}

.fc-badge-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-dim);
  font-weight: 500;
}

.fc-title {
  font-family: 'Inter', sans-serif;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-white);
  line-height: 1.3;
}

.fc-desc {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: var(--text-dim);
  line-height: 1.6;
}

.fc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto; /* Pushes tags to bottom if cards vary in height */
  padding-top: 10px;
}

.fc-tag {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.2);
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Make delays max out so later cards don't wait an eternity if user is scrolling fast */
@media screen and (max-width: 800px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
  .feature-card.visible {
    /* If fully stacked, don't delay hugely */
    transition-delay: 0s !important;
  }
}
