:root {
  --page: #070a0f;
  --surface: #0e131b;
  --surface-light: #151c27;
  --line: rgba(255, 255, 255, 0.09);
  --text: #f5f7fb;
  --muted: #9aa5b5;
  --accent: #73e5b3;
  --accent-strong: #32c98b;
  --blue: #638cff;
}

html {
  font-size: 16px;
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 75% 15%, rgba(68, 109, 211, 0.12), transparent 28rem),
    radial-gradient(circle at 15% 65%, rgba(44, 192, 137, 0.06), transparent 25rem),
    var(--page);
  font-family: Inter, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.container {
  max-width: 1180px;
}

.site-nav {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.site-brand > span:last-child span {
  color: var(--accent);
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  color: #07120d;
  background: linear-gradient(135deg, #9cf0c8, var(--accent-strong));
  border-radius: 0.6rem;
  box-shadow: 0 0 24px rgba(50, 201, 139, 0.18);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.nav-links a {
  transition: color 180ms ease;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-cta {
  padding: 0.65rem 1rem;
  color: var(--text) !important;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.04);
}

.page-container {
  position: relative;
}

.hero {
  min-height: 650px;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.75fr);
  align-items: center;
  gap: clamp(3rem, 8vw, 7rem);
  padding: 5.5rem 0 4.5rem;
}

.hero-copy,
.calculator-wrap {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.5rem;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.status-dot {
  width: 0.45rem;
  height: 0.45rem;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(115, 229, 179, 0.5);
  animation: pulse 2.2s infinite;
}

h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(3rem, 5.8vw, 5.25rem);
  font-weight: 680;
  line-height: 0.98;
  letter-spacing: -0.065em;
}

h1 span {
  display: block;
  color: transparent;
  background: linear-gradient(100deg, #84e8bc, #76a3ff 85%);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-description {
  max-width: 610px;
  margin: 1.7rem 0 2rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.75;
}

.spec-field {
  max-width: 600px;
  margin-bottom: 1.8rem;
}

.spec-field label {
  display: block;
  margin-bottom: 0.6rem;
  color: #c6ced9;
  font-size: 0.77rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.spec-input {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.48rem 0.5rem 0.48rem 0.9rem;
  background: rgba(13, 18, 26, 0.92);
  border: 1px solid rgba(115, 229, 179, 0.18);
  border-radius: 0.75rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.spec-input:focus-within {
  border-color: rgba(115, 229, 179, 0.55);
  box-shadow: 0 0 0 3px rgba(115, 229, 179, 0.08);
}

.spec-input > span {
  color: var(--accent);
}

.spec-input input {
  min-width: 0;
  flex: 1;
  color: #b8c2d0;
  background: transparent;
  border: 0;
  outline: 0;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 0.82rem;
}

.spec-input button {
  padding: 0.58rem 0.85rem;
  color: var(--accent);
  background: rgba(115, 229, 179, 0.08);
  border: 0;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease;
}

.spec-input button:hover {
  background: rgba(115, 229, 179, 0.15);
  transform: translateY(-1px);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  font-size: 0.88rem;
  font-weight: 650;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.86rem 1.15rem;
  color: #07110d;
  background: linear-gradient(135deg, #92edc3, #58d59e);
  border-radius: 0.65rem;
  box-shadow: 0 8px 26px rgba(50, 201, 139, 0.13);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.primary-action:hover {
  color: #07110d;
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(50, 201, 139, 0.22);
}

.secondary-action {
  color: #b6c0cd;
  border-bottom: 1px solid #49515d;
}

.calculator-wrap {
  justify-self: center;
  width: min(100%, 370px);
  animation: reveal 800ms 120ms both;
}

.calculator-glow {
  position: absolute;
  inset: 12% 8% 0;
  background: rgba(66, 157, 223, 0.2);
  filter: blur(60px);
  border-radius: 50%;
}

.calculator {
  position: relative;
  padding: 1rem;
  overflow: hidden;
  background: linear-gradient(155deg, rgba(24, 31, 43, 0.98), rgba(9, 13, 20, 0.99));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1.6rem;
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  transform: perspective(1000px) rotateY(-2deg) rotateX(1deg);
  transition: transform 350ms ease;
}

.calculator-wrap:hover .calculator {
  transform: perspective(1000px) rotateY(0) rotateX(0) translateY(-5px);
}

.calculator::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.055), transparent 30%);
}

.calculator-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.25rem 0.3rem 0.8rem;
  color: #7f8a99;
  font-size: 0.65rem;
  letter-spacing: 0.04em;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.live-pill span {
  width: 0.35rem;
  height: 0.35rem;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent);
}

.calculator-display {
  height: 115px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 1rem 0.6rem;
  margin-bottom: 0.85rem;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 0.9rem;
}

.calculator-display span {
  min-height: 1.4rem;
  color: #758091;
  font-size: 0.85rem;
}

.calculator-display output {
  max-width: 100%;
  overflow: hidden;
  color: #f8fafc;
  font-size: 2.8rem;
  font-weight: 320;
  line-height: 1.1;
  letter-spacing: -0.05em;
  text-overflow: ellipsis;
}

.calculator-display output.result-pop {
  animation: result-pop 220ms ease;
}

.calculator-keys {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.55rem;
}

.key {
  min-height: 54px;
  color: #e8ecf1;
  background: #19212d;
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 0.8rem;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  transition: transform 100ms ease, background 150ms ease, border-color 150ms ease;
}

.key:hover {
  background: #202a38;
  border-color: rgba(255, 255, 255, 0.1);
}

.key:active,
.key.key-pressed {
  transform: scale(0.94);
}

.key:focus-visible,
.spec-input button:focus-visible,
.hero-actions a:focus-visible,
.nav-links a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.key-muted {
  color: #9ca8b8;
  background: #121923;
}

.key-operator {
  color: var(--accent);
  background: rgba(65, 173, 130, 0.12);
}

.key-zero {
  grid-column: span 2;
}

.key-equals {
  color: #07130e;
  background: linear-gradient(145deg, #83e9b9, #43c88f);
  border-color: transparent;
  font-weight: 800;
}

.key-equals:hover {
  background: linear-gradient(145deg, #9af0c8, #55d79d);
}

.floating-chip {
  position: absolute;
  display: grid;
  place-items: center;
  color: #aab4c1;
  background: rgba(15, 21, 30, 0.92);
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 0.65rem;
  animation: float 4s ease-in-out infinite;
}

.chip-one {
  width: 52px;
  height: 42px;
  top: 24%;
  right: -2.6rem;
  color: var(--accent);
}

.chip-two {
  width: 58px;
  height: 42px;
  bottom: 17%;
  left: -3rem;
  animation-delay: -1.6s;
}

.ambient {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.025);
  border-radius: 50%;
}

.ambient-one {
  width: 380px;
  height: 380px;
  top: 4rem;
  right: -9rem;
}

.ambient-two {
  width: 240px;
  height: 240px;
  right: 3rem;
  bottom: 1rem;
}

.value-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 4.5rem;
  padding: 1.4rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.value-strip div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  border-right: 1px solid var(--line);
}

.value-strip div:last-child {
  border: 0;
}

.value-strip strong {
  font-size: 1rem;
}

.value-strip span {
  color: #747f8e;
  font-size: 0.72rem;
}

.site-footer {
  color: #67717f;
  border-top: 1px solid var(--line);
  font-size: 0.75rem;
}

.site-footer .container {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 7px rgba(115, 229, 179, 0);
  }
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-9px);
  }
}

@keyframes result-pop {
  50% {
    transform: scale(1.035);
    color: var(--accent);
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 4rem;
    text-align: center;
  }

  .hero-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-description,
  .spec-field {
    width: 100%;
  }

  .calculator-wrap {
    margin-bottom: 2rem;
  }
}

@media (max-width: 640px) {
  .container {
    width: calc(100% - 2rem);
  }

  .site-nav {
    min-height: 70px;
  }

  .nav-links > a:not(.nav-cta) {
    display: none;
  }

  .nav-cta {
    padding: 0.55rem 0.75rem;
    font-size: 0.78rem;
  }

  .hero {
    gap: 3rem;
    padding: 3.5rem 0;
  }

  h1 {
    font-size: clamp(2.7rem, 14vw, 4rem);
  }

  .hero-description {
    font-size: 0.95rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .floating-chip {
    display: none;
  }

  .value-strip {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .value-strip div {
    border: 0;
  }

  .site-footer .container {
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
