/* GJ Calculadora — mobile first */
:root {
  --bg: #0e0e0e;
  --bg-2: #161616;
  --card: #1b1b1b;
  --card-2: #232323;
  --line: #2e2e2e;
  --text: #f5f5f5;
  --muted: #a3a3a3;
  --orange: #ff6200;
  --orange-2: #ff8a3d;
  --orange-soft: rgba(255, 98, 0, .14);
  --green: #25d366;
  --green-2: #1ebe5a;
  --warn: #ffb020;
  --radius: 16px;
  --radius-sm: 12px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Anton', 'Impact', 'Arial Narrow', sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background:
    radial-gradient(120% 60% at 100% 0%, rgba(255, 98, 0, .16), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.45;
  padding-bottom: calc(84px + var(--safe-b));
  -webkit-tap-highlight-color: transparent;
}
svg { width: 1em; height: 1em; flex: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 520px; margin: 0 auto; padding: 0 16px; }

/* Topbar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(14, 14, 14, .86);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner { display: flex; align-items: center; gap: 10px; padding-top: 10px; padding-bottom: 10px; }
.topbar__logo { width: 34px; height: auto; }
.topbar__brand { white-space: nowrap; display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.topbar__brand strong { font-family: var(--display); font-weight: 400; letter-spacing: .04em; font-size: 18px; }
.topbar__brand span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.slogan-pill {
  margin-left: auto; display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  color: var(--orange); background: var(--orange-soft); border: 1px solid rgba(255, 98, 0, .35);
  padding: 6px 10px; border-radius: 999px; white-space: nowrap;
}

.admin-link {
  flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card); color: var(--muted); font-size: 18px;
  transition: color .15s, border-color .15s;
}
.admin-link:hover, .admin-link:focus-visible { color: var(--orange); border-color: var(--orange); }
@media (max-width: 419px) {
  .topbar__inner { gap: 8px; }
  .slogan-pill { font-size: 10px; padding: 5px 8px; letter-spacing: .02em; }
  .slogan-pill svg { display: none; }
}
@media (max-width: 359px) { .slogan-pill { display: none; } .admin-link { margin-left: auto; } }

/* Hero */
.hero { padding: 26px 0 18px; }
.hero__kicker {
  margin: 0 0 8px; display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; color: var(--orange); text-transform: uppercase; letter-spacing: .12em;
}
.hero__kicker svg { font-size: 16px; }
.hero__title {
  margin: 0; font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(34px, 10vw, 46px); line-height: 1.02; letter-spacing: .01em;
}
.hero__title em { font-style: normal; color: var(--orange); }
.hero__sub { margin: 10px 0 0; color: var(--muted); font-size: 15px; }

/* Séries */
.calc { display: grid; gap: 12px; }
.set {
  margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); min-width: 0;
}
.set__head { float: left; display: flex; align-items: center; gap: 10px; padding: 0; margin-bottom: 12px; width: 100%; }
.set__head + * { clear: both; }
.set__num {
  font-family: var(--display); font-size: 15px; letter-spacing: .04em;
  background: var(--orange); color: #111; border-radius: 8px; padding: 2px 7px; line-height: 1.3;
}
.set__title { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: 15px; }
.set__title svg { color: var(--orange); font-size: 18px; }

.chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.chips[data-target="water"] { grid-template-columns: repeat(3, 1fr); }
.chips--sm { grid-template-columns: repeat(4, 1fr); margin-top: 10px; }
.chips--sm:empty { display: none; }
.chip {
  min-height: 44px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--card-2); font-weight: 700; font-size: 15px;
  transition: transform .08s ease, background .15s, border-color .15s;
}
.chip:active { transform: scale(.96); }
.chip.is-active { background: var(--orange); border-color: var(--orange); color: #111; }
.chips--sm .chip { min-height: 38px; font-size: 13px; }

.field {
  position: relative; display: flex; align-items: center; margin-top: 10px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s;
}
.field:focus-within { border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); }
.field input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  padding: 12px 14px; font-size: 16px; font-weight: 600;
}
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.field input::placeholder { color: #6b6b6b; font-weight: 500; }
.field__unit { padding: 0 14px; color: var(--muted); font-weight: 700; font-size: 14px; }
.field--dose { margin-top: 0; padding-right: 4px; }
.field--dose input { font-size: 22px; padding: 12px 14px; }

.seg { display: inline-flex; background: var(--card-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 3px; }
.seg__btn {
  border: 0; background: transparent; border-radius: 8px; padding: 8px 12px;
  font-weight: 700; font-size: 14px; color: var(--muted); min-height: 38px;
}
.seg__btn.is-active { background: var(--orange); color: #111; }
.seg--wide { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
.seg--wide .seg__btn { display: flex; flex-direction: column; align-items: center; line-height: 1.15; padding: 8px 4px; }
.seg--wide small { font-size: 11px; font-weight: 600; opacity: .8; }

.tip { display: flex; gap: 6px; align-items: flex-start; margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.tip svg { color: var(--orange); margin-top: 2px; }
.tip button {
  border: 0; background: none; padding: 0; color: var(--orange); font-weight: 700; text-decoration: underline;
}

.syringe-pick { padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.syringe-pick__label { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 14px; margin-bottom: 10px; }
.syringe-pick__label svg { color: var(--orange); font-size: 18px; }

/* Resultado */
.result {
  margin-top: 16px; border-radius: 20px; padding: 20px 16px;
  background: linear-gradient(160deg, #241307 0%, #161616 55%);
  border: 1px solid rgba(255, 98, 0, .45);
  box-shadow: 0 10px 40px -18px rgba(255, 98, 0, .6);
}
.result__empty { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
.result__empty svg { font-size: 34px; color: var(--orange); }
.result__empty p { margin: 0; }
.result__label {
  margin: 0; text-align: center; font-size: 12px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .14em; color: var(--orange);
}
.result__big {
  margin: 2px 0 0; text-align: center; font-family: var(--display); font-size: 72px; line-height: 1;
  display: flex; align-items: baseline; justify-content: center; gap: 8px;
}
.result__big small { font-family: var(--font); font-size: 16px; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.result__ml { margin: 4px 0 16px; text-align: center; color: var(--muted); font-weight: 600; }

/* Seringa visual */
.syringe { display: flex; align-items: center; height: 46px; }
.syringe__body {
  position: relative; flex: 1; height: 100%;
  border: 2px solid #d9d9d9; border-radius: 6px 3px 3px 6px; overflow: hidden;
  background: rgba(255, 255, 255, .04);
}
.syringe__body::before { /* êmbolo */
  content: ''; position: absolute; left: -2px; top: 6px; bottom: 6px; width: 6px; background: #d9d9d9; border-radius: 2px; z-index: 2;
}
.syringe__fill {
  position: absolute; inset: 0 auto 0 0; width: 0;
  background: linear-gradient(90deg, var(--orange), var(--orange-2));
  transition: width .45s cubic-bezier(.2, .8, .2, 1);
}
.syringe__fill.is-over { background: repeating-linear-gradient(45deg, #c0392b 0 8px, #e74c3c 8px 16px); }
.syringe__ticks { position: absolute; inset: 0; display: flex; justify-content: space-between; pointer-events: none; }
.syringe__ticks i { width: 1px; background: rgba(255, 255, 255, .35); height: 35%; }
.syringe__ticks i.major { height: 60%; background: rgba(255, 255, 255, .7); }
.syringe__needle { width: 34px; height: 3px; background: linear-gradient(90deg, #d9d9d9, #888); border-radius: 0 2px 2px 0; position: relative; }
.syringe__needle::before { content: ''; position: absolute; left: 0; top: -6px; width: 8px; height: 15px; background: #d9d9d9; border-radius: 2px; }
.syringe__scale {
  display: flex; justify-content: space-between; margin: 6px 34px 0 0;
  font-size: 11px; color: var(--muted); font-weight: 600;
}

.alert {
  display: flex; gap: 8px; align-items: flex-start; margin-top: 14px; padding: 10px 12px;
  border-radius: var(--radius-sm); background: rgba(255, 176, 32, .1); border: 1px solid rgba(255, 176, 32, .4);
  color: var(--warn); font-size: 13px; font-weight: 600;
}
.alert svg { margin-top: 2px; font-size: 16px; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.stat { background: rgba(0, 0, 0, .35); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; }
.stat__k { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.stat__v { display: block; margin-top: 2px; font-weight: 800; font-size: 16px; }

.btn-ghost {
  margin-top: 14px; width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: transparent;
  color: var(--muted); font-weight: 600; font-size: 14px;
}

/* Comunidade */
.community {
  margin-top: 16px; padding: 16px; border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(37, 211, 102, .14), rgba(37, 211, 102, .03));
  border: 1px solid rgba(37, 211, 102, .35);
  display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center;
}
.community__icon {
  width: 46px; height: 46px; border-radius: 14px; background: var(--green); color: #fff;
  display: grid; place-items: center; font-size: 26px;
}
.community__txt h2 { margin: 0; font-size: 17px; font-weight: 800; }
.community__txt p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.btn-whats {
  grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; border-radius: var(--radius-sm); background: var(--green); color: #fff;
  font-weight: 800; text-decoration: none; font-size: 16px; text-transform: uppercase; letter-spacing: .03em;
}
.btn-whats:active { background: var(--green-2); }
.btn-whats svg { font-size: 20px; }

.disclaimer {
  display: flex; gap: 8px; align-items: flex-start; margin: 18px 0 0; font-size: 12px; color: #7d7d7d;
}
.disclaimer svg { margin-top: 2px; }

.footer { text-align: center; padding: 28px 16px 20px; color: var(--muted); }
.footer img { opacity: .9; }
.footer p { margin: 6px 0 0; }
.footer strong { font-family: var(--display); font-weight: 400; color: var(--text); font-size: 20px; letter-spacing: .04em; }
.footer__small { font-size: 12px; }

/* CTA fixo */
.sticky-cta {
  position: fixed; z-index: 30; left: 16px; right: 16px; bottom: calc(14px + var(--safe-b));
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; border-radius: 999px; background: var(--green); color: #fff;
  font-weight: 800; font-size: 16px; text-decoration: none; text-transform: uppercase; letter-spacing: .03em;
  box-shadow: 0 10px 30px -8px rgba(37, 211, 102, .65);
  transition: transform .25s ease, opacity .25s ease;
}
.sticky-cta svg { font-size: 22px; }
.sticky-cta.is-hidden { transform: translateY(140%); opacity: 0; pointer-events: none; }

@media (min-width: 560px) {
  .chips { grid-template-columns: repeat(8, 1fr); }
  .chips[data-target="water"] { grid-template-columns: repeat(6, 1fr); }
  .sticky-cta { left: 50%; right: auto; transform: translateX(-50%); padding: 0 28px; }
  .sticky-cta.is-hidden { transform: translate(-50%, 140%); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
