:root {
  --bg: #fcfcf8;
  --surface: #ffffff;
  --surface-soft: #fffef9;
  --text: #111111;
  --text-soft: #6d6d6d;
  --text-muted: #8e8e8e;
  --line: #ece7d9;
  --line-soft: rgba(245, 193, 14, 0.22);
  --yellow: #f7c817;
  --yellow-strong: #ffd633;
  --yellow-dark: #d8a400;
  --green: #0f8e61;
  --green-soft: #eefaf4;
  --white: #ffffff;
  --black: #141414;
  --shadow-shell: 0 30px 70px rgba(19, 19, 19, 0.1);
  --shadow-card: 0 18px 36px rgba(18, 18, 18, 0.08);
  --shadow-soft: 0 14px 28px rgba(247, 200, 23, 0.16);
  --radius-shell: 34px;
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 20px;
  --radius-sm: 16px;
  --container: min(1100px, calc(100vw - 40px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Poppins", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(255, 223, 87, 0.12), transparent 28%),
    linear-gradient(180deg, #ffffff, #fbfaf5 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  background: none;
}

svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: var(--container);
  margin: 0 auto;
}

.simulator-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 0;
}

.simulator-center {
  display: flex;
  justify-content: center;
}

.calculator-card {
  position: relative;
  width: min(100%, 1024px);
  padding: clamp(28px, 3.2vw, 38px);
  border-radius: var(--radius-shell);
  border: 1px solid rgba(17, 17, 17, 0.05);
  background:
    radial-gradient(circle at 82% 65%, rgba(255, 213, 54, 0.12), transparent 22%),
    linear-gradient(105deg, #ffffff 0%, #fffefb 58%, #fff6cb 100%);
  box-shadow: var(--shadow-shell);
  overflow: hidden;
}

.calculator-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 88% 80%, rgba(255, 203, 24, 0.22), transparent 18%),
    radial-gradient(circle at 90% 24%, rgba(255, 228, 117, 0.2), transparent 18%);
  pointer-events: none;
}

.simulator-stage {
  display: grid;
}

.stage-view {
  grid-area: 1 / 1;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px) scale(0.985);
  transition:
    opacity 0.42s ease,
    transform 0.42s ease,
    visibility 0.42s ease;
  pointer-events: none;
  position: relative;
  z-index: 1;
}

.stage-view.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  align-items: center;
  gap: clamp(26px, 4.8vw, 60px);
  min-height: 620px;
}

.hero-copy {
  position: relative;
  z-index: 2;
  padding-inline: clamp(4px, 1vw, 10px);
}

.panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.panel-top--single {
  justify-content: flex-start;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 16px 8px 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffd11b, #f6c20d);
  color: #111111;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 12px 24px rgba(247, 200, 23, 0.22);
}

.section-tag--left {
  box-shadow: none;
}

.section-tag__icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #111111;
  color: #ffd633;
  flex: 0 0 auto;
}

.headline-block {
  margin-top: 30px;
}

.headline-block--left {
  text-align: left;
}

.headline-block h1,
.headline-block h2 {
  margin: 0;
  font-size: clamp(2.55rem, 4.8vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
  font-weight: 800;
}

.headline-block p {
  max-width: 520px;
  margin: 14px 0 0;
  color: var(--text-soft);
  font-size: clamp(1rem, 1.65vw, 1.12rem);
  line-height: 1.4;
}

.calculator-form {
  display: grid;
  gap: 22px;
  margin-top: 28px;
  max-width: 560px;
}

.field-group {
  display: grid;
  gap: 12px;
}

.field-group > span {
  font-size: 1.08rem;
  font-weight: 700;
  color: #171717;
}

.field-group small {
  margin-top: 2px;
  color: #777777;
  font-size: 0.92rem;
}

.currency-input {
  position: relative;
}

.currency-input__prefix {
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 2px solid rgba(247, 200, 23, 0.46);
  color: var(--yellow-dark);
  background: linear-gradient(180deg, #fffef7, #fff8d7);
  font-weight: 700;
  font-size: 1.25rem;
}

.currency-input input {
  width: 100%;
  min-height: 92px;
  padding: 22px 28px 22px 90px;
  border-radius: 22px;
  border: 2px solid rgba(247, 200, 23, 0.36);
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
  font-size: clamp(2rem, 3.8vw, 3.1rem);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.04em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.currency-input input:focus {
  outline: none;
  transform: translateY(-1px);
  border-color: rgba(247, 200, 23, 0.82);
  box-shadow: 0 0 0 6px rgba(247, 200, 23, 0.12);
}

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

.toggle-button {
  min-height: 74px;
  padding: 14px 22px;
  border-radius: 18px;
  border: 1.5px solid #e5e4df;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  font-weight: 600;
  font-size: 1.05rem;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.toggle-button__icon {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  color: #181818;
}

.toggle-button:hover,
.toggle-button:focus-visible,
.primary-button:hover,
.primary-button:focus-visible,
.ghost-button:hover,
.ghost-button:focus-visible,
.whatsapp-button:hover,
.whatsapp-button:focus-visible,
.equation-card:hover,
.equation-card:focus-visible,
.summary-card:hover,
.summary-card:focus-visible {
  outline: none;
  transform: translateY(-2px);
}

.toggle-button:hover,
.toggle-button:focus-visible {
  border-color: rgba(247, 200, 23, 0.62);
  box-shadow: 0 12px 24px rgba(247, 200, 23, 0.14);
}

.toggle-button.is-active {
  border-color: rgba(247, 200, 23, 0.9);
  background: linear-gradient(180deg, #fffdf2, #fff8d9);
  box-shadow: 0 12px 26px rgba(247, 200, 23, 0.18);
}

.primary-button,
.ghost-button,
.whatsapp-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.primary-button {
  width: 100%;
  min-height: 66px;
  padding: 16px 24px;
  background: linear-gradient(180deg, #181818, #101010);
  color: var(--yellow);
  box-shadow: 0 18px 26px rgba(17, 17, 17, 0.24), 0 8px 28px rgba(247, 200, 23, 0.18);
}

.ghost-button {
  min-height: 50px;
  padding: 10px 18px;
  color: #151515;
  background: #ffffff;
  border: 1px solid #e9e7e0;
  box-shadow: 0 8px 20px rgba(19, 19, 19, 0.04);
}

.whatsapp-button {
  justify-self: center;
  min-height: 64px;
  padding: 16px 28px;
  background: linear-gradient(180deg, #ffd21d, #f4c212);
  color: #111111;
  box-shadow: 0 18px 30px rgba(247, 200, 23, 0.28);
}

.whatsapp-button.is-attention {
  animation: pulse-glow 1.4s ease-in-out 1;
}

.button-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.button-icon--ghost {
  width: 18px;
  height: 18px;
}

.form-message {
  position: relative;
  min-height: 28px;
  margin: -4px 0 0;
  padding-left: 34px;
  color: #686868;
  font-size: 0.96rem;
  line-height: 1.45;
}

.form-message::before {
  content: "✦";
  position: absolute;
  left: 0;
  top: 1px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(247, 200, 23, 0.18);
  color: #8d6900;
  font-size: 0.88rem;
  font-weight: 700;
  text-align: center;
  line-height: 24px;
}

.form-message.is-success {
  color: #356a4f;
}

.form-message.is-success::before {
  content: "✓";
  background: rgba(15, 142, 97, 0.14);
  color: var(--green);
}

.form-message.is-error {
  color: #b54c34;
}

.form-message.is-error::before {
  content: "!";
  background: rgba(229, 105, 68, 0.14);
  color: #d05739;
}

.hero-visual {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 16px;
}

.hero-visual__glow {
  position: absolute;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 212, 43, 0.78) 0%, rgba(255, 212, 43, 0.2) 42%, rgba(255, 212, 43, 0) 72%);
  right: 12px;
  bottom: 20px;
  filter: blur(2px);
}

.hero-visual__ray {
  position: absolute;
  top: 6px;
  right: 32px;
  font-size: 200px;
  color: rgba(255, 221, 80, 0.22);
  line-height: 1;
  transform: rotate(6deg);
}

.hero-spark {
  position: absolute;
  color: rgba(255, 213, 54, 0.9);
  font-size: 1.6rem;
  text-shadow: 0 10px 24px rgba(255, 213, 54, 0.24);
}

.hero-spark--one {
  top: 120px;
  left: 54px;
}

.hero-spark--two {
  top: 250px;
  right: 28px;
  font-size: 2rem;
}

.hero-spark--three {
  bottom: 72px;
  left: 102px;
  font-size: 1.1rem;
}

.hero-robot {
  position: relative;
  z-index: 1;
  width: min(100%, 304px);
  filter: drop-shadow(0 24px 35px rgba(17, 17, 17, 0.18));
}

.result-top {
  align-items: center;
}

.result-layout {
  display: grid;
  gap: 22px;
  margin-top: 22px;
}

.equation-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(290px, 1.08fr);
  gap: 12px;
  align-items: stretch;
}

.equation-operator {
  align-self: center;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #fffdf4, #fff7d2);
  color: var(--yellow);
  font-size: 2rem;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(247, 200, 23, 0.18);
}

.equation-card,
.summary-card {
  position: relative;
  border-radius: 24px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  overflow: hidden;
}

.equation-card {
  min-height: 266px;
  padding: 24px;
  border: 1px solid rgba(17, 17, 17, 0.07);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-card);
  display: grid;
  align-content: start;
  gap: 18px;
}

.equation-card::after,
.summary-card::after {
  content: "";
  position: absolute;
  inset: auto -40px -40px auto;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 211, 34, 0.14), transparent 70%);
  pointer-events: none;
}

.equation-card__media-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 138px;
  border-radius: 18px;
  background: #ffffff;
}

.equation-card__media-wrap--yellow {
  background: linear-gradient(180deg, #ffd427, #f7c817);
}

.equation-card__media {
  width: min(100%, 170px);
  max-height: 132px;
  object-fit: contain;
}

.equation-card__media--small {
  width: min(100%, 150px);
}

.equation-card__content {
  display: grid;
  gap: 10px;
  text-align: center;
}

.equation-card__eyebrow,
.summary-card__label {
  display: block;
  color: #656565;
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.equation-card strong {
  font-size: clamp(1.08rem, 1.55vw, 1.26rem);
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: -0.02em;
}

.equation-card--yellow .equation-card__content,
.equation-card--yellow .equation-card__eyebrow {
  color: #202020;
}

.equation-card--highlight {
  border-color: rgba(255, 211, 34, 0.18);
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 255, 255, 0.03), transparent 28%),
    radial-gradient(circle at 86% 88%, rgba(255, 211, 34, 0.34), transparent 20%),
    linear-gradient(180deg, #151515, #111111 64%, #191307 100%);
  color: #ffffff;
  align-content: center;
  justify-items: center;
  text-align: center;
  gap: 16px;
}

.equation-card--highlight::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 12px 12px;
  opacity: 0.28;
  pointer-events: none;
}

.equation-card--highlight .equation-card__eyebrow {
  color: rgba(255, 255, 255, 0.9);
}

.equation-card__value {
  position: relative;
  z-index: 1;
  font-size: clamp(2.5rem, 4vw, 3.35rem) !important;
  font-weight: 800 !important;
  letter-spacing: -0.05em;
  line-height: 0.95 !important;
  color: var(--yellow-strong);
  white-space: nowrap;
}

.card-icon-badge {
  position: relative;
  z-index: 1;
  width: 74px;
  height: 74px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 22px;
  border: 1px solid rgba(255, 211, 34, 0.28);
  background: rgba(255, 211, 34, 0.06);
  color: var(--yellow-strong);
}

.card-icon-badge--summary,
.card-icon-badge--success {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: none;
}

.card-icon-badge--summary {
  background: linear-gradient(180deg, #ffe36b, #f6c817);
  color: #141414;
}

.card-icon-badge--success {
  background: rgba(15, 142, 97, 0.14);
  color: var(--green);
}

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

.summary-card {
  min-height: 222px;
  padding: 22px 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 249, 235, 0.98));
  border: 1px solid rgba(247, 200, 23, 0.2);
  box-shadow: var(--shadow-card);
  display: grid;
  align-content: start;
  gap: 14px;
}

.summary-card--success {
  background: linear-gradient(180deg, #f3fcf7, #ebf7f0);
  border-color: rgba(15, 142, 97, 0.14);
}

.summary-card__top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.summary-card__label {
  text-transform: uppercase;
}

.summary-card h2 {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.summary-card strong {
  display: block;
  margin-top: 2px;
  font-size: clamp(2rem, 3.2vw, 2.45rem);
  line-height: 1;
  letter-spacing: -0.04em;
  font-weight: 800;
}

.summary-card p {
  margin: auto 0 0;
  color: #747474;
  font-size: 0.96rem;
  line-height: 1.5;
}

.summary-card--success strong {
  color: var(--green);
}

@keyframes pulse-glow {
  0% {
    transform: scale(1);
    box-shadow: 0 18px 30px rgba(247, 200, 23, 0.28);
  }

  50% {
    transform: scale(1.025);
    box-shadow: 0 24px 36px rgba(247, 200, 23, 0.36);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 18px 30px rgba(247, 200, 23, 0.28);
  }
}

@media (max-width: 960px) {
  .calculator-card {
    width: min(100%, 940px);
  }

  .hero-grid {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-copy {
    order: 1;
  }

  .hero-visual {
    order: 2;
    min-height: 360px;
    padding-top: 10px;
  }

  .hero-visual__glow {
    width: 320px;
    height: 320px;
    right: 50%;
    transform: translateX(50%);
    bottom: 20px;
  }

  .hero-visual__ray {
    top: -10px;
    right: 50%;
    transform: translateX(50%) rotate(4deg);
    font-size: 150px;
  }

  .hero-spark--one {
    left: 20%;
  }

  .hero-spark--two {
    right: 18%;
  }

  .hero-spark--three {
    left: 28%;
  }

  .equation-row {
    grid-template-columns: 1fr;
  }

  .equation-operator {
    justify-self: center;
    transform: rotate(90deg);
  }

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

@media (max-width: 640px) {
  :root {
    --container: min(100vw - 18px, 100%);
  }

  .simulator-wrap {
    padding: 10px 0;
  }

  .calculator-card {
    padding: 18px;
    border-radius: 24px;
  }

  .headline-block {
    margin-top: 24px;
  }

  .headline-block h1,
  .headline-block h2 {
    font-size: 2.3rem;
  }

  .headline-block p {
    font-size: 0.98rem;
  }

  .section-tag {
    font-size: 0.74rem;
    min-height: 38px;
    padding-right: 14px;
  }

  .currency-input input {
    min-height: 82px;
    padding: 18px 20px 18px 78px;
    font-size: 2rem;
  }

  .currency-input__prefix {
    left: 18px;
    width: 38px;
    height: 38px;
    font-size: 1.08rem;
  }

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

  .toggle-button {
    min-height: 64px;
  }

  .result-top {
    flex-direction: column;
    align-items: stretch;
  }

  .ghost-button,
  .whatsapp-button,
  .primary-button {
    width: 100%;
  }

  .equation-card,
  .summary-card {
    min-height: auto;
  }

  .hero-visual {
    min-height: 290px;
  }

  .hero-robot {
    width: min(100%, 250px);
  }
}
