/* ── SheetBuddy — dark, glowing, modern ─────────────────────────────── */

:root {
  --bg: #05080a;
  --ink: #f4f7f5;
  --ink-soft: #9aa8a1;
  --ink-faint: #5c6a63;

  --green: #10b981;
  --green-bright: #34d399;
  --cyan: #06b6d4;
  --violet: #7c6cf0;

  --glass: rgba(255, 255, 255, 0.04);
  --glass-edge: rgba(255, 255, 255, 0.09);

  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "Space Grotesk", var(--sans);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ── Ambient background ─────────────────────────────────────────────── */

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.aurora {
  position: absolute;
  width: 60vw;
  height: 60vw;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  mix-blend-mode: screen;
}
.aurora-a {
  top: -22vw; left: -14vw;
  background: radial-gradient(circle at center, rgba(16, 185, 129, 0.5), transparent 65%);
  animation: drift-a 22s ease-in-out infinite alternate;
}
.aurora-b {
  top: -18vw; right: -18vw;
  background: radial-gradient(circle at center, rgba(124, 108, 240, 0.4), transparent 65%);
  animation: drift-b 26s ease-in-out infinite alternate;
}
@keyframes drift-a {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(9vw, 7vh) scale(1.15); }
}
@keyframes drift-b {
  from { transform: translate(0, 0) scale(1.1); }
  to   { transform: translate(-8vw, 9vh) scale(0.95); }
}

/* perspective spreadsheet grid receding to the horizon */
.grid-floor {
  position: absolute;
  left: -25%; right: -25%;
  bottom: -12%;
  height: 62vh;
  background:
    linear-gradient(to right, rgba(16, 185, 129, 0.32) 1px, transparent 1px),
    linear-gradient(to top, rgba(16, 185, 129, 0.32) 1px, transparent 1px);
  background-size: 72px 44px;
  transform: perspective(620px) rotateX(62deg);
  transform-origin: bottom center;
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.85), transparent 82%);
          mask-image: linear-gradient(to top, rgba(0,0,0,0.85), transparent 82%);
  animation: floor-scroll 3.2s linear infinite;
}
@keyframes floor-scroll {
  from { background-position: 0 0; }
  to   { background-position: 0 44px; }
}

/* faint noise-ish stars */
.stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 12% 28%, rgba(255,255,255,0.35), transparent),
    radial-gradient(1px 1px at 78% 16%, rgba(255,255,255,0.28), transparent),
    radial-gradient(1.5px 1.5px at 62% 42%, rgba(255,255,255,0.22), transparent),
    radial-gradient(1px 1px at 34% 12%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 88% 56%, rgba(255,255,255,0.2), transparent),
    radial-gradient(1.5px 1.5px at 8% 64%, rgba(255,255,255,0.18), transparent);
}

.cursor-glow {
  position: fixed;
  z-index: 1;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle at center, rgba(16, 185, 129, 0.09), transparent 65%);
  transform: translate(-50%, -50%);
  transition: opacity 0.4s ease;
  opacity: 0;
}

/* ── Nav ────────────────────────────────────────────────────────────── */

.nav {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100%, 1080px);
  margin: 0 auto;
  padding: 22px 28px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
}
.brand-mark { width: 26px; height: 26px; }

.nav-cta {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--glass-edge);
  background: var(--glass);
  backdrop-filter: blur(8px);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.nav-cta:hover {
  border-color: rgba(52, 211, 153, 0.5);
  background: rgba(16, 185, 129, 0.1);
}

/* ── Hero ───────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  z-index: 2;
  flex: 1;
  width: min(100%, 880px);
  margin: 0 auto;
  padding: clamp(28px, 6vh, 72px) 28px 40px;
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 26px;
  padding: 8px 18px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green-bright);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 999px;
  backdrop-filter: blur(8px);
}
.pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green-bright);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5); }
  50%      { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0); }
}

h1 {
  margin: 0 0 24px;
  font-family: var(--display);
  font-size: clamp(2.9rem, 8vw, 5.4rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.shine {
  background: linear-gradient(110deg,
    var(--green-bright) 0%, var(--cyan) 28%,
    #a7f3d0 46%, var(--green-bright) 62%, var(--cyan) 100%);
  background-size: 240% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  animation: shine 5.5s ease-in-out infinite;
}
@keyframes shine {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

.lede {
  margin: 0 auto;
  max-width: 580px;
  font-size: clamp(1.02rem, 1.7vw, 1.18rem);
  line-height: 1.75;
  color: var(--ink-soft);
}
.lede strong { color: var(--ink); font-weight: 600; }

/* ── Floating cells ─────────────────────────────────────────────────── */

.float-cell {
  position: absolute;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--ink-soft);
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  animation: float 7s ease-in-out infinite;
}
.fc-1 { top: 13%; left: -21%; animation-delay: 0s; transform: rotate(-4deg); }
.fc-2 { top: 30%; right: -22%; animation-delay: 1.6s; transform: rotate(3deg); }
.fc-3 { top: 66%; left: -19%; animation-delay: 3.1s; transform: rotate(2deg); }

/* keep the cells clear of the copy on mid-width screens */
@media (max-width: 1180px) {
  .float-cell { display: none; }
}

.fc-label {
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--green-bright);
  background: rgba(16, 185, 129, 0.12);
  border-radius: 6px;
}
.fc-formula { color: #bcd0c7; }
.fc-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--green-bright);
}
.fc-tag { font-size: 0.7rem; color: var(--ink-faint); }
.fc-mini { font-size: 0.7rem; letter-spacing: 0.1em; color: var(--ink-faint); }

@keyframes float {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -14px; }
}

/* ── Terminal demo ──────────────────────────────────────────────────── */

.terminal {
  width: min(100%, 560px);
  margin: 42px auto 0;
  text-align: left;
  background: rgba(10, 15, 13, 0.72);
  border: 1px solid var(--glass-edge);
  border-radius: 16px;
  backdrop-filter: blur(14px);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.term-head {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.term-head i {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}
.term-head i:nth-child(1) { background: #f26d60; }
.term-head i:nth-child(2) { background: #f5bf4f; }
.term-head i:nth-child(3) { background: #58c665; }
.term-title {
  margin-left: 8px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-faint);
}
.term-body {
  padding: 18px 20px 20px;
  font-family: var(--mono);
  font-size: 0.92rem;
}
.term-line {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #d7e4de;
  min-height: 1.5em;
}
.prompt { color: var(--green-bright); font-weight: 600; }
.caret {
  width: 8px; height: 1.1em;
  background: var(--green-bright);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.term-answer {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 14px;
  padding: 12px 14px;
  background: rgba(16, 185, 129, 0.07);
  border-left: 3px solid var(--green);
  border-radius: 0 10px 10px 0;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.term-answer.show { opacity: 1; transform: translateY(0); }
.ans-value {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--green-bright);
  letter-spacing: 0.01em;
}
.ans-meta { font-size: 0.74rem; color: var(--ink-faint); }

/* ── Notify form ────────────────────────────────────────────────────── */

.notify {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 44px auto 0;
  max-width: 480px;
}
.notify input {
  flex: 1;
  min-width: 0;
  padding: 15px 18px;
  font: 500 0.95rem var(--sans);
  color: var(--ink);
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  border-radius: 12px;
  outline: none;
  backdrop-filter: blur(8px);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.notify input::placeholder { color: var(--ink-faint); }
.notify input:focus {
  border-color: rgba(52, 211, 153, 0.6);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}
.notify input.invalid {
  border-color: rgba(242, 109, 96, 0.7);
  box-shadow: 0 0 0 4px rgba(242, 109, 96, 0.12);
}

.notify button {
  position: relative;
  flex: none;
  padding: 15px 26px;
  font: 600 0.95rem var(--sans);
  color: #03130c;
  background: linear-gradient(120deg, var(--green-bright), var(--cyan));
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(16, 185, 129, 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.notify button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(16, 185, 129, 0.5);
  filter: brightness(1.06);
}
.notify button:active { transform: translateY(0); }
.notify button:disabled {
  cursor: default;
  filter: saturate(0.7);
  transform: none;
}

.form-note {
  margin: 16px 0 0;
  font-size: 0.82rem;
  color: var(--ink-faint);
}
.form-note.success {
  color: var(--green-bright);
  font-weight: 600;
}

/* ── Footer ─────────────────────────────────────────────────────────── */

footer {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 26px 20px 30px;
  font-size: 0.8rem;
  color: var(--ink-faint);
}
.foot-dot { opacity: 0.5; }

/* ── Reveal ─────────────────────────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
  animation-delay: var(--d, 0ms);
}
@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; transform: none; }
  .aurora, .grid-floor, .float-cell, .caret, .pulse-dot, .shine { animation: none; }
  .cursor-glow { display: none; }
}

/* ── Small screens ──────────────────────────────────────────────────── */

@media (max-width: 720px) {
  .float-cell { display: none; }
  .notify { flex-direction: column; }
  .notify button { width: 100%; }
  footer { flex-direction: column; align-items: center; gap: 4px; }
  .foot-dot { display: none; }
}
