/* Lunar landing — styles */
@import url('colors_and_type.css');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html,
body {
  background: var(--color-background);
  color: var(--color-foreground);
  font-family: var(--font-sans);
  scroll-behavior: smooth;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  display: block;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--duration-normal) var(--ease-standard);
  white-space: nowrap;
}
.btn-lg {
  padding: 12px 20px;
  font-size: 14px;
  border-radius: 10px;
}
.btn-primary {
  background: hsl(0 0% 98%);
  color: hsl(240 5.9% 10%);
}
.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 0 24px rgb(99 102 241 / 0.25);
}
.btn-outline {
  background: transparent;
  border-color: var(--color-border);
  color: var(--color-foreground);
}
.btn-outline:hover {
  background: var(--color-accent);
  border-color: var(--color-muted-foreground);
}

/* ─── Nav ─── */
.lunar-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 32px;
  background: hsl(240 10% 3.9% / 0.6);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid hsl(240 3.7% 15.9% / 0.4);
}
.lunar-nav__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: var(--color-foreground);
  transition: opacity var(--duration-fast) ease;
}
.lunar-nav__brand:hover {
  opacity: 0.8;
}
.lunar-nav__brand img {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 0 8px rgb(139 92 246 / 0.3));
}
.lunar-nav__links {
  display: flex;
  gap: 32px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--color-muted-foreground);
}
.lunar-nav__links a {
  transition: color var(--duration-fast) ease;
}
.lunar-nav__links a:hover {
  color: var(--color-foreground);
}
.lunar-nav__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ─── Hero ─── */
.lunar-hero {
  position: relative;
  padding: 80px 32px 40px;
  overflow: hidden;
}
.lunar-hero__glow {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  pointer-events: none;
}
.lunar-hero__glow::before {
  content: '';
  width: 900px;
  height: 900px;
  margin-top: -200px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgb(99 102 241 / 0.18) 0%,
    rgb(139 92 246 / 0.08) 40%,
    transparent 70%
  );
  filter: blur(60px);
}
.lunar-hero__inner {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}
.lunar-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 8px;
  border: 1px solid hsl(240 3.7% 15.9% / 0.8);
  background: hsl(240 6% 6% / 0.5);
  border-radius: 999px;
  font-size: 12px;
  color: var(--color-muted-foreground);
  margin-bottom: 24px;
}

.lunar-pill__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}
.lunar-pill__sep {
  width: 1px;
  height: 10px;
  background: hsl(240 3.7% 25%);
}

.lunar-hero__title {
  font-size: clamp(40px, 6vw, 76px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.02;
  margin-bottom: 20px;
}
.lunar-gradient-text {
  background: linear-gradient(135deg, #38bdf8 0%, #6366f1 50%, #8b5cf6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lunar-hero__sub {
  max-width: 640px;
  margin: 0 auto 32px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--color-muted-foreground);
}
.lunar-hero__cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.lunar-hero__meta {
  display: flex;
  gap: 14px;
  justify-content: center;
  align-items: center;
  font-size: 12px;
  color: hsl(240 5% 64.9% / 0.8);
  margin-bottom: 64px;
  flex-wrap: wrap;
}
.lunar-hero__meta-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: hsl(240 5% 64.9% / 0.4);
}
.lunar-hero__meta kbd {
  display: inline-flex;
  align-items: center;
  padding: 1px 5px;
  margin: 0 2px;
  border: 1px solid var(--color-border);
  background: var(--color-muted);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
}

/* ─── Fake app window ─── */
.lunar-app-window {
  max-width: 1080px;
  margin: 0 auto;
  border: 1px solid hsl(240 3.7% 15.9% / 0.9);
  border-radius: 12px;
  overflow: hidden;
  background: hsl(240 6% 6%);
  box-shadow:
    0 40px 80px -20px rgb(0 0 0 / 0.6),
    0 0 80px rgb(99 102 241 / 0.15),
    0 0 0 1px hsl(240 3.7% 15.9% / 0.5);
  text-align: left;
}
.lunar-app-window__chrome {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  background: hsl(240 6% 8%);
  border-bottom: 1px solid hsl(240 3.7% 15.9%);
}
.lunar-app-window__lights {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}
.lunar-app-window__lights span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.lunar-app-window__title {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: var(--color-muted-foreground);
}
.lunar-app-window__title img {
  width: 14px;
  height: 14px;
}
.lunar-app-window__chrome-spacer {
  flex: 0 0 51px;
}

.lunar-app-window__body {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 460px;
}
.lunar-app-window__sidebar {
  background: hsl(240 6% 5%);
  border-right: 1px solid hsl(240 3.7% 15.9%);
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.lunar-side-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.lunar-side-label {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: hsl(240 5% 64.9% / 0.7);
  padding: 0 8px 4px;
}
.lunar-side-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--color-foreground);
  cursor: pointer;
}
.lunar-side-item:hover {
  background: hsl(240 3.7% 15.9% / 0.5);
}
.lunar-side-item--active {
  background: hsl(240 3.7% 15.9%);
  color: var(--color-foreground);
}
.lunar-side-item--muted {
  color: var(--color-muted-foreground);
  font-size: 12px;
}
.lunar-side-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  box-shadow: 0 0 6px currentColor;
  flex: 0 0 auto;
}

.lunar-app-window__main {
  display: flex;
  flex-direction: column;
}
.lunar-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 10px 0;
  background: hsl(240 6% 7%);
  border-bottom: 1px solid hsl(240 3.7% 15.9%);
  overflow-x: auto;
}
.lunar-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 6px 6px 0 0;
  font-size: 11.5px;
  color: var(--color-muted-foreground);
  cursor: pointer;
  border: 1px solid transparent;
  border-bottom: 0;
}
.lunar-tab:hover {
  color: var(--color-foreground);
}
.lunar-tab--active {
  background: #1a1b26;
  color: var(--color-foreground);
  border-color: hsl(240 3.7% 15.9%);
}
.lunar-tab-add {
  margin-left: 4px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-size: 14px;
  color: var(--color-muted-foreground);
  cursor: pointer;
}
.lunar-tab-add:hover {
  background: hsl(240 3.7% 15.9%);
  color: var(--color-foreground);
}

.lunar-terminal {
  flex: 1;
  background: #1a1b26;
  padding: 18px 20px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.65;
  overflow: hidden;
}
.lunar-term-line {
  white-space: pre;
}
.lunar-cursor {
  display: inline-block;
  width: 7px;
  height: 14px;
  background: #c0caf5;
  vertical-align: text-bottom;
  animation: lunar-blink 1s steps(2) infinite;
}
@keyframes lunar-blink {
  0%,
  50% {
    opacity: 1;
  }
  50.01%,
  100% {
    opacity: 0;
  }
}

.lunar-statusbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 6px 14px;
  background: hsl(240 6% 8%);
  border-top: 1px solid hsl(240 3.7% 15.9%);
  font-size: 11px;
  color: var(--color-muted-foreground);
  font-family: var(--font-mono);
}
.lunar-status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 4px;
}
.lunar-status-dot--ok {
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
}

/* ─── Section ─── */
.lunar-section {
  padding: 100px 32px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}
.lunar-section__head {
  max-width: 720px;
  margin: 0 auto 56px;
  text-align: center;
}
.lunar-eyebrow {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-indigo);
  margin-bottom: 14px;
  font-weight: 500;
}
.lunar-section__title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 16px;
}
.lunar-section__sub {
  font-size: 16px;
  line-height: 1.55;
  color: var(--color-muted-foreground);
}

/* ─── Features ─── */
.lunar-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.lunar-feature {
  padding: 28px;
  border: 1px solid hsl(240 3.7% 15.9% / 0.8);
  background: hsl(240 6% 6% / 0.5);
  border-radius: 14px;
  transition: all var(--duration-normal) var(--ease-standard);
}
.lunar-feature:hover {
  border-color: hsl(240 3.7% 25%);
  background: hsl(240 6% 7%);
  transform: translateY(-2px);
}
.lunar-feature__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  margin-bottom: 18px;
}
.lunar-feature__title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.lunar-feature__desc {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--color-muted-foreground);
}

/* ─── Theme showcase ─── */
.lunar-theme-tabs {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.lunar-theme-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid hsl(240 3.7% 15.9%);
  background: hsl(240 6% 6%);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--color-muted-foreground);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-standard);
  font-family: var(--font-sans);
}
.lunar-theme-tab:hover {
  color: var(--color-foreground);
  border-color: hsl(240 3.7% 25%);
}
.lunar-theme-tab.is-active {
  background: hsl(240 3.7% 12%);
  color: var(--color-foreground);
  border-color: hsl(240 3.7% 30%);
}
.lunar-theme-tab__chip {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.lunar-theme-preview {
  border-radius: 12px;
  border: 1px solid;
  overflow: hidden;
  transition:
    background-color var(--duration-slow) ease,
    border-color var(--duration-slow) ease;
}
.lunar-theme-preview__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid rgb(255 255 255 / 0.06);
}
.lunar-theme-preview__bar > span:not(.lunar-theme-preview__name) {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.lunar-theme-preview__name {
  font-family: var(--font-mono);
  font-size: 11px;
  margin-left: auto;
}
.lunar-theme-preview__code {
  padding: 24px 28px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.7;
  white-space: pre-wrap;
  margin: 0;
}
.lunar-theme-preview__swatches {
  display: flex;
  gap: 6px;
  padding: 10px 16px;
  border-top: 1px solid rgb(255 255 255 / 0.06);
}
.lunar-theme-preview__swatches span {
  width: 22px;
  height: 22px;
  border-radius: 5px;
}

/* ─── Download ─── */
.lunar-download {
  position: relative;
}
.lunar-download__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  justify-content: center;
}
.lunar-download__glow::before {
  content: '';
  width: 700px;
  height: 400px;
  background: radial-gradient(ellipse, rgb(139 92 246 / 0.12) 0%, transparent 60%);
  filter: blur(40px);
}
.lunar-download__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  position: relative;
  margin-bottom: 32px;
}
.lunar-download__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 24px;
  background: hsl(240 6% 6% / 0.7);
  border: 1px solid hsl(240 3.7% 15.9%);
  border-radius: 14px;
  text-align: center;
  transition: all var(--duration-normal) var(--ease-standard);
  cursor: pointer;
}
.lunar-download__card:hover {
  border-color: var(--brand-indigo);
  background: hsl(240 6% 8%);
  transform: translateY(-2px);
  box-shadow: 0 0 32px rgb(99 102 241 / 0.2);
}
.lunar-download__card.is-detected {
  border-color: var(--brand-indigo);
  background: hsl(240 6% 8% / 0.8);
  position: relative;
  box-shadow: 0 0 40px rgb(99 102 241 / 0.1);
}
.lunar-download__card.is-dimmed {
  opacity: 0.4;
  filter: grayscale(0.5);
  transition: all var(--duration-normal) var(--ease-standard);
}
.lunar-download__card.is-dimmed:hover {
  opacity: 1;
  filter: grayscale(0);
}
.lunar-download__badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 2px 8px;
  background: var(--brand-indigo);
  color: white;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: 4px;
  letter-spacing: 0.05em;
}
.lunar-download__icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: hsl(240 3.7% 15.9% / 0.6);
  color: var(--color-foreground);
  margin-bottom: 16px;
}
.lunar-download__name {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.lunar-download__arch {
  font-size: 12px;
  color: var(--color-muted-foreground);
  margin-bottom: 18px;
  font-family: var(--font-mono);
}
.lunar-download__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--brand-indigo);
  font-weight: 500;
}
.lunar-download__hint {
  text-align: center;
  font-size: 13px;
  color: var(--color-muted-foreground);
  position: relative;
}
.lunar-download__hint code {
  display: inline-block;
  padding: 4px 10px;
  background: hsl(240 6% 6%);
  border: 1px solid hsl(240 3.7% 15.9%);
  border-radius: 6px;
  font-size: 12px;
  margin-left: 6px;
  color: var(--color-foreground);
}

/* ─── Footer ─── */
.lunar-footer {
  border-top: 1px solid hsl(240 3.7% 15.9%);
  padding: 60px 32px 24px;
  background: hsl(240 6% 4%);
}
.lunar-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 2fr;
  gap: 48px;
  padding-bottom: 40px;
}
.lunar-footer__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.lunar-footer__brand img {
  width: 36px;
  height: 36px;
}
.lunar-footer__name {
  font-size: 15px;
  font-weight: 600;
}
.lunar-footer__tag {
  font-size: 12px;
  color: var(--color-muted-foreground);
}
.lunar-footer__cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.lunar-footer__heading {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-foreground);
  margin-bottom: 14px;
  font-weight: 500;
}
.lunar-footer__cols a {
  display: block;
  font-size: 13px;
  color: var(--color-muted-foreground);
  margin-bottom: 8px;
}
.lunar-footer__cols a:hover {
  color: var(--color-foreground);
}
.lunar-footer__bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid hsl(240 3.7% 15.9%);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: hsl(240 5% 64.9% / 0.7);
  font-family: var(--font-mono);
}

/* ─── Responsive ─── */

/* Large Tablets & Small Laptops */
@media (max-width: 1100px) {
  .lunar-feature-grid,
  .lunar-download__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Tablets & Large Phones */
@media (max-width: 880px) {
  .lunar-nav {
    padding: 12px 20px;
    gap: 16px;
  }
  .lunar-nav__links {
    display: none;
  }
  .lunar-hero {
    padding: 60px 20px 20px;
  }
  .lunar-section {
    padding: 60px 20px;
  }
  .lunar-app-window {
    transform: scale(0.95);
    transform-origin: top center;
  }
  .lunar-footer__inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .lunar-footer__cols {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Small Phones */
@media (max-width: 640px) {
  .lunar-hero__title {
    font-size: 38px;
    line-height: 1.1;
  }
  .lunar-hero__sub {
    font-size: 15px;
  }
  .lunar-feature-grid,
  .lunar-download__grid,
  .lunar-footer__cols {
    grid-template-columns: 1fr;
  }
  .lunar-hero__cta {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
    margin: 0 auto 24px;
  }
  .lunar-hero__cta .btn {
    width: 100%;
    justify-content: center;
  }
  .lunar-app-window {
    transform: scale(0.85);
    margin-top: -20px;
  }
  .lunar-app-window__sidebar {
    display: none;
  }
  .lunar-app-window__body {
    grid-template-columns: 1fr;
  }
  .lunar-footer__bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  .lunar-section__title {
    font-size: 28px;
  }
}

/* Extra small scaling for the app preview */
@media (max-width: 480px) {
  .lunar-app-window {
    transform: scale(0.7);
    margin-bottom: -100px; /* Pull content up as the scaled element leaves space */
  }
  .lunar-terminal {
    font-size: 11px;
    padding: 12px;
  }
}
