:root {
  --bg-1: #ffffff;
  --bg-2: #f1f1f1;
  --card: #ffffff;
  --ink: #111111;
  --muted: #4c4c4c;
  --accent: #111111;
  --accent-2: #000000;
  --border: #d6d6d6;
  --shadow: rgba(0, 0, 0, 0.18);
  --success: #111111;
  --warning: #111111;
  --info: #111111;
  --danger: #111111;
  --radius: 22px;
  --neon-rgb: 255, 94, 0;
}

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

html {
  overflow-x: hidden;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 0 20px calc(40px + env(safe-area-inset-bottom));
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background: #f5f5f5;
  position: relative;
  overflow-x: hidden;
}


.page {
  width: min(1080px, 100%);
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: relative;
  z-index: 1;
  margin: 0 auto;
}

.hero {
  width: 100%;
  max-width: none;
  margin: 0;
  text-align: center;
  display: grid;
  gap: 12px;
  justify-items: center;
}

.brand-strip {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background: #000000;
  border-radius: 0;
  padding: 4px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
}

.brand-logo {
  height: clamp(92px, 16.1vw, 150px);
  width: auto;
  max-width: min(391px, 92vw);
  display: block;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-2);
  color: #ffffff;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  justify-self: center;
}

.hero h1 {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.8rem, 2.4vw, 2.6rem);
  font-weight: 650;
  margin: 8px 0 4px;
  letter-spacing: 0.01em;
  max-width: 680px;
}

.hero p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.6;
  max-width: 520px;
}

.hero-subtitle {
  display: block;
  color: var(--muted);
  max-width: 520px;
}

.hero-cta {
  font-size: 0.9rem;
  color: var(--ink);
  font-weight: 600;
  font-style: italic;
}

.community {
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
}

.community-text {
  font-size: 0.95rem;
  color: var(--muted);
  font-style: italic;
  max-width: 640px;
  margin: 0;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 26px;
  border-radius: 999px;
  background: #000000;
  color: #ffffff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid #000000;
  box-shadow: none;
  text-shadow: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px -14px rgba(0, 0, 0, 0.55);
}

.calculator {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 24px;
}

.panel {
  background: var(--card);
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--ink);
  box-shadow: 0 16px 40px -24px var(--shadow);
}

.form {
  display: grid;
  gap: 20px;
}

.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}

.field-help {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin: -2px 0 8px;
}

.input-wrap {
  position: relative;
}

.input-wrap input {
  padding-right: 56px;
}

.suffix {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  font-size: 0.85rem;
  color: var(--muted);
}

input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #bdbdbd;
  background: #ffffff;
  font-size: 1rem;
  font-family: inherit;
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.12);
}

.field[data-error="true"] input {
  border-color: var(--danger);
  border-style: dashed;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.16);
}

.hint,
.error {
  display: block;
  font-size: 0.82rem;
  margin-top: 6px;
}

.hint {
  color: var(--muted);
}

.error {
  color: var(--danger);
}

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

.result-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 18px 20px;
  border: 1px solid var(--ink);
  box-shadow: 0 12px 24px -20px var(--shadow);
}

.result-label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 10px;
}

.result-value {
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  font-weight: 600;
  color: var(--ink);
}

.messages {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
}

.message {
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid var(--ink);
  font-size: 0.95rem;
  background: #ffffff;
}

.message.warning {
  border-left: 4px solid var(--ink);
  color: var(--ink);
}

.message.info {
  border-left: 4px solid #333333;
  color: var(--ink);
}

.message.success {
  border-left: 4px solid #000000;
  color: var(--ink);
}

.footer {
  font-size: 0.9rem;
  color: var(--muted);
}

.float-home {
  position: fixed;
  right: 20px;
  bottom: 20px;
  padding: 10px 18px;
  border-radius: 999px;
  background: #000000;
  color: #ffffff;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 10px 20px -14px rgba(0, 0, 0, 0.6);
  z-index: 5;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.float-home:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px -16px rgba(0, 0, 0, 0.7);
}

.fade-up {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.7s ease forwards;
}

.hero.fade-up {
  animation-delay: 0.05s;
}

.panel.fade-up {
  animation-delay: 0.15s;
}

.results.fade-up {
  animation-delay: 0.25s;
}

.messages.fade-up {
  animation-delay: 0.35s;
}

.footer.fade-up {
  animation-delay: 0.45s;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(14px);
  }
}

@media (max-width: 900px) {
  .brand-strip {
    width: calc(100% + 40px);
    margin-left: -20px;
    margin-right: -20px;
  }

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

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

@media (prefers-reduced-motion: reduce) {
  .fade-up {
    opacity: 1;
    transform: none;
    animation: none;
  }

  body::before,
  body::after {
    animation: none;
  }
}
