:root {
  --bg: #0c1222;
  --panel: #111a30;
  --panel-2: #16223d;
  --text: #f8fafc;
  --muted: #aeb9cf;
  --line: rgba(255, 255, 255, 0.13);
  --accent: #7c5cff;
  --accent-2: #22c55e;
  --danger: #f97316;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(124, 92, 255, 0.32), transparent 34rem),
    radial-gradient(circle at 82% 12%, rgba(34, 197, 94, 0.16), transparent 28rem),
    var(--bg);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
}

button,
input,
select {
  font: inherit;
}

input,
select {
  width: 100%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.85rem 0.95rem;
  outline: none;
}

input:focus,
select:focus {
  border-color: rgba(124, 92, 255, 0.85);
  box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.18);
}

select option {
  color: #0f172a;
}

label {
  display: grid;
  gap: 0.45rem;
  color: var(--text);
  font-weight: 700;
}

small,
.fine-print {
  color: var(--muted);
  line-height: 1.55;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(16px);
  background: rgba(12, 18, 34, 0.78);
  border-bottom: 1px solid var(--line);
}

.nav {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 800;
}

.nav a:not(.brand):hover {
  color: var(--text);
}

.brand {
  margin-right: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text) !important;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--accent), #3b82f6);
  color: white;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

.section-shell {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 2rem;
  align-items: center;
  padding: 6rem 0 3rem;
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: #b7a8ff;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 900;
  font-size: 0.8rem;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2.5rem, 7vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: -0.075em;
  max-width: 850px;
  margin-bottom: 1.25rem;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1;
  letter-spacing: -0.045em;
  margin-bottom: 0.9rem;
}

h3 {
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
}

.hero-text {
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.7;
  max-width: 720px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.6rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.95rem 1.2rem;
  font-weight: 900;
  text-decoration: none;
}

.button.primary {
  color: white;
  background: var(--accent);
  box-shadow: 0 12px 32px rgba(124, 92, 255, 0.35);
}

.button.ghost {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
}

.hero-card,
.panel,
.info-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.045));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 2rem;
  transform: rotate(1.5deg);
}

.hero-card strong {
  display: block;
  font-size: clamp(2.2rem, 7vw, 4.4rem);
  letter-spacing: -0.07em;
  line-height: 0.95;
  margin: 1.2rem 0;
}

.hero-card p {
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 0;
}

.card-label {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  color: #d9d1ff;
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 900;
}

.calculator-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: 1.2rem;
  align-items: start;
  padding: 2rem 0 4rem;
}

.panel {
  padding: 1.3rem;
}

.section-heading.compact h2 {
  font-size: 1.55rem;
  letter-spacing: -0.035em;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.money-input,
.percent-input {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.money-input span,
.percent-input span {
  color: var(--muted);
  padding: 0 0.85rem;
  font-weight: 900;
}

.money-input input,
.percent-input input {
  border: 0;
  background: transparent;
  border-radius: 0;
}

.money-input:focus-within,
.percent-input:focus-within {
  border-color: rgba(124, 92, 255, 0.85);
  box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.18);
}

.toggle-row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}

.switch-label {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  cursor: pointer;
}

.switch-label input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-ui {
  width: 54px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  position: relative;
  transition: 180ms ease;
}

.switch-ui::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: white;
  transition: 180ms ease;
}

.switch-label input:checked + .switch-ui {
  background: var(--accent);
}

.switch-label input:checked + .switch-ui::after {
  transform: translateX(22px);
}

.sales-tax-field {
  width: min(200px, 100%);
}

.sales-tax-field.is-disabled {
  opacity: 0.45;
}

.sales-tax-field.is-disabled input {
  pointer-events: none;
}

.results-panel {
  position: sticky;
  top: 92px;
}

.big-result {
  padding: 1.2rem;
  border-radius: 20px;
  background: rgba(124, 92, 255, 0.14);
  border: 1px solid rgba(124, 92, 255, 0.25);
  margin-bottom: 1rem;
}

.big-result span {
  display: block;
  font-size: clamp(2.8rem, 8vw, 5.4rem);
  font-weight: 950;
  letter-spacing: -0.075em;
  line-height: 0.9;
}

.big-result p {
  color: var(--muted);
  line-height: 1.55;
  margin: 0.9rem 0 0;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.metric-card {
  padding: 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}

.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  margin-bottom: 0.35rem;
}

.metric-card strong {
  font-size: 1.35rem;
  letter-spacing: -0.035em;
}

.breakdown {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.breakdown h3 {
  margin-bottom: 0.8rem;
}

dl {
  display: grid;
  gap: 0.55rem;
  margin: 0;
}

dl div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
}

dd {
  margin: 0;
  color: var(--text);
  font-weight: 900;
}

.info-section {
  padding: 1rem 0 5rem;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.info-card {
  padding: 1.2rem;
  box-shadow: none;
}

.info-card p {
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 0;
}

.fine-print {
  max-width: 920px;
  margin-top: 1.2rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
  padding: 2rem 1rem;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 860px) {
  .hero,
  .calculator-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 4rem;
  }

  .hero-card {
    transform: none;
  }

  .results-panel {
    position: static;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .nav {
    min-height: auto;
    padding: 0.85rem 0;
    flex-wrap: wrap;
  }

  .brand {
    width: 100%;
  }

  .form-grid,
  .metrics {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: clamp(2.45rem, 15vw, 4.2rem);
  }
}
