:root {
  --ink: #0c1218;
  --ink-soft: #4a5968;
  --fog: #edf3f7;
  --fog-2: #d9e5ee;
  --line: rgba(12, 18, 24, 0.1);
  --lime: #10b981;
  --lime-deep: #059669;
  --desk: #0f171e;
  --desk-2: #15222c;
  --desk-3: #1a2834;
  --mist: #8fa3b5;
  --cream: #fff6d6;
  --font-display: "Fraunces", Georgia, serif;
  --font-brand: "Syne", sans-serif;
  --font-body: "Sora", sans-serif;
  --font-mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--fog);
  overflow-x: hidden;
}

a {
  color: var(--lime-deep);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--ink);
}

/* Sky / atmosphere — soft washes, not neon glow orbs */
.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    linear-gradient(155deg, #f7fafc 0%, var(--fog) 38%, #cfe0d8 100%);
}

.sky__wash {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(ellipse 55% 45% at 18% 20%, rgba(16, 185, 129, 0.16), transparent 60%),
    radial-gradient(ellipse 50% 40% at 88% 12%, rgba(90, 140, 175, 0.18), transparent 58%),
    radial-gradient(ellipse 40% 35% at 70% 85%, rgba(12, 18, 24, 0.06), transparent 70%);
  animation: wash-shift 18s ease-in-out infinite alternate;
}

.sky__mesh {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
  opacity: 0.45;
  animation: mesh-drift 36s linear infinite;
}

.sky__beam {
  position: absolute;
  top: -30%;
  right: -5%;
  width: 55vw;
  height: 140%;
  background: linear-gradient(
    108deg,
    transparent 35%,
    rgba(255, 255, 255, 0.55) 48%,
    transparent 62%
  );
  transform: skewX(-12deg);
  animation: beam-sweep 14s ease-in-out infinite;
  opacity: 0.55;
}

@keyframes wash-shift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-2%, 2%, 0) scale(1.04); }
}

@keyframes mesh-drift {
  from { transform: translateY(0); }
  to { transform: translateY(-56px); }
}

@keyframes beam-sweep {
  0%, 100% { opacity: 0.25; transform: skewX(-12deg) translateX(0); }
  50% { opacity: 0.65; transform: skewX(-12deg) translateX(-4%); }
}

/* Hero — one composition */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
  align-items: end;
  gap: 0;
  padding: clamp(1.75rem, 4vw, 3.25rem);
  padding-bottom: 0;
}

.hero__copy {
  position: relative;
  z-index: 2;
  max-width: 36rem;
  padding-bottom: clamp(1.5rem, 4vw, 2.5rem);
  animation: rise 0.95s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 0 0 1.35rem;
}

.brand__mark {
  width: 3rem;
  height: 3rem;
  flex-shrink: 0;
}

.brand__name {
  font-family: var(--font-brand);
  font-weight: 800;
  font-size: clamp(2.75rem, 8vw, 4.75rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.hero__headline {
  margin: 0 0 0.9rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-optical-sizing: auto;
  font-size: clamp(1.65rem, 4vw, 2.35rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--ink);
  animation: rise 0.95s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.hero__lede {
  margin: 0 0 1.85rem;
  max-width: 30rem;
  font-size: clamp(1.02rem, 2.1vw, 1.15rem);
  line-height: 1.55;
  color: var(--ink-soft);
  animation: rise 0.95s cubic-bezier(0.22, 1, 0.36, 1) 0.18s both;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
  animation: rise 0.95s cubic-bezier(0.22, 1, 0.36, 1) 0.26s both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3.15rem;
  padding: 0.8rem 1.4rem;
  border-radius: 12px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.22s ease, background 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}

.btn--primary {
  background: var(--ink);
  color: #f5faf7;
  border: 1px solid var(--ink);
}

.btn--primary:hover {
  background: var(--lime-deep);
  border-color: var(--lime-deep);
  color: #fff;
  transform: translateY(-2px);
}

.btn--primary svg {
  transition: transform 0.22s ease;
}

.btn--primary:hover svg {
  transform: translateY(2px);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.45);
  color: var(--ink-soft);
  border: 1px solid rgba(12, 18, 24, 0.14);
  backdrop-filter: blur(8px);
}

.btn--ghost:hover {
  color: var(--ink);
  border-color: rgba(12, 18, 24, 0.28);
  background: rgba(255, 255, 255, 0.7);
}

/* Full-bleed product canvas */
.hero__canvas {
  position: relative;
  z-index: 1;
  width: calc(100% + 2 * clamp(1.75rem, 4vw, 3.25rem));
  margin-left: calc(-1 * clamp(1.75rem, 4vw, 3.25rem));
  margin-right: calc(-1 * clamp(1.75rem, 4vw, 3.25rem));
  min-height: min(52vh, 460px);
  animation: stage-in 1.15s cubic-bezier(0.22, 1, 0.36, 1) 0.18s both;
}

@keyframes stage-in {
  from {
    opacity: 0;
    transform: translateY(36px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.workspace {
  display: grid;
  grid-template-columns: 44px 1fr;
  grid-template-rows: 1fr auto;
  height: 100%;
  min-height: inherit;
  background: linear-gradient(165deg, var(--desk-2), var(--desk));
  color: #d5e0ea;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.workspace__rail {
  grid-row: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 0;
  background: rgba(0, 0, 0, 0.22);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.workspace__rail i {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
}

.workspace__rail i:first-child {
  background: rgba(16, 185, 129, 0.55);
}

.workspace__main {
  min-width: 0;
  padding: 0 0 1rem;
}

.workspace__tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.72rem;
  color: var(--mist);
}

.workspace__tabs span {
  padding: 0.7rem 1rem;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.workspace__tabs .is-active {
  color: #e8f0f6;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 -2px 0 var(--lime);
}

.workspace__code {
  margin: 0;
  padding: 1.1rem 1rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.7;
  white-space: pre;
  overflow: hidden;
}

.ln {
  display: inline-block;
  width: 1.6rem;
  margin-right: 0.75rem;
  color: rgba(143, 163, 181, 0.55);
  user-select: none;
}

.tok-kw { color: #7eb8ff; }
.tok-fn { color: #7dffa8; }
.tok-str { color: #ffd08a; }

.caret {
  display: inline-block;
  width: 0.55ch;
  height: 1.05em;
  margin-left: 1px;
  vertical-align: text-bottom;
  background: var(--lime);
  animation: blink 1.05s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.workspace__chat {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.85rem 1rem 1rem;
  background: linear-gradient(180deg, var(--desk-3), #121c24);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  animation: chat-up 1s cubic-bezier(0.22, 1, 0.36, 1) 0.45s both;
}

@keyframes chat-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.workspace__chat-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.workspace__chat-head strong {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--cream);
  letter-spacing: -0.02em;
}

.workspace__chat-head em {
  font-style: normal;
  font-size: 0.7rem;
  color: var(--mist);
}

.msg {
  max-width: 36rem;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  font-size: 0.8rem;
  line-height: 1.45;
}

.msg--user {
  align-self: flex-end;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.msg--asst {
  align-self: stretch;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(16, 185, 129, 0.18);
}

.msg--asst p {
  margin: 0 0 0.55rem;
}

.change {
  display: grid;
  gap: 0.35rem;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.16);
  animation: change-in 0.8s ease 1.1s both;
}

@keyframes change-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.change__path {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--lime);
}

.change__diff {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #9dffb8;
}

.composer {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.15rem;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--mist);
  font-size: 0.78rem;
}

.composer__pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1); }
}

/* Install */
.install {
  position: relative;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 40%),
    var(--fog);
  border-top: 1px solid rgba(12, 18, 24, 0.06);
}

.install__inner {
  max-width: 42rem;
  margin: 0 auto;
  padding: clamp(3.25rem, 8vw, 5.5rem) clamp(1.5rem, 4vw, 3rem);
}

.install h2 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 3.2vw, 2.1rem);
  letter-spacing: -0.03em;
}

.install__inner > p {
  margin: 0 0 2rem;
  color: var(--ink-soft);
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.steps li {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1.15rem 0;
  border-top: 1px solid var(--line);
}

.steps li:last-child {
  border-bottom: 1px solid var(--line);
}

.steps__n {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--lime-deep);
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.steps strong {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--ink);
  font-weight: 600;
}

.steps span {
  color: var(--ink-soft);
  line-height: 1.5;
  font-size: 0.95rem;
}

.steps em {
  font-style: normal;
  color: var(--ink);
}

kbd {
  display: inline-block;
  padding: 0.12rem 0.42rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.7);
  font-family: var(--font-body);
  font-size: 0.8em;
  color: var(--ink);
}

.site-foot {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem clamp(1.5rem, 4vw, 3rem) 2.1rem;
  border-top: 1px solid var(--line);
  background: var(--fog);
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.site-foot span {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
}

@media (min-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    align-items: stretch;
    padding-bottom: clamp(1.75rem, 4vw, 3.25rem);
    gap: 1.5rem;
  }

  .hero__copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-bottom: 0;
    padding-right: 1rem;
  }

  .brand__name {
    font-size: clamp(3.5rem, 6.5vw, 4.75rem);
  }

  .hero__canvas {
    width: auto;
    margin: 0;
    min-height: calc(100vh - 2 * clamp(1.75rem, 4vw, 3.25rem));
    border-radius: 22px 0 0 22px;
    overflow: hidden;
    box-shadow: -18px 12px 48px rgba(12, 18, 24, 0.14);
  }

  .workspace {
    grid-template-columns: 52px minmax(0, 1fr) minmax(280px, 34%);
    grid-template-rows: 1fr;
    height: 100%;
    min-height: 100%;
    border-top: 0;
  }

  .workspace__rail {
    padding-top: 1.25rem;
  }

  .workspace__main {
    border-right: 1px solid rgba(255, 255, 255, 0.05);
  }

  .workspace__code {
    font-size: 0.86rem;
    padding: 1.35rem 1.25rem;
  }

  .workspace__chat {
    grid-column: auto;
    border-top: 0;
    border-left: 0;
    padding: 1rem 1rem 1.15rem;
    justify-content: flex-start;
  }

  .msg {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .caret {
    opacity: 1;
  }
}
