/* ============================================
   Replagal Dose Calculator — Creative Layout
   ============================================ */

@font-face { font-family: gothamBold;   src: url("font/Gotham-Bold.otf"); }
@font-face { font-family: gothamBlack;  src: url("font/Gotham-Black.otf"); }
@font-face { font-family: GothamBook;   src: url("font/GothamBook.ttf"); }
@font-face { font-family: GothamMedium; src: url("font/GothamMedium.ttf"); }

:root {
  --brand:        #009CDE;
  --brand-dark:   #0077a8;
  --brand-deeper: #005a80;
  --brand-glow:   rgba(0, 156, 222, .15);
  --red:          #e30613;
  --red-dark:     #b8050f;
  --red-glow:     rgba(227, 6, 19, .18);
  --red-line:     #e8455a;
  --bg:           #f4f6f8;
  --card:         #ffffff;
  --text:         #1a2a35;
  --text-mid:     #4a6070;
  --text-light:   #8a9fad;
  --border:       #e2e8ed;

  --ff-black:  "gothamBlack", system-ui, sans-serif;
  --ff-bold:   "gothamBold", system-ui, sans-serif;
  --ff-medium: "GothamMedium", system-ui, sans-serif;
  --ff-book:   "GothamBook", system-ui, sans-serif;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--ff-book);
  background: var(--bg);
  background-image: radial-gradient(circle at 20% 50%, rgba(0,156,222,.04) 0%, transparent 50%),
                    radial-gradient(circle at 80% 80%, rgba(227,6,19,.03) 0%, transparent 50%);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }

/* ===========================
   TOP BAR
   =========================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: #ffffff;
  border-bottom: 3px solid var(--red);
  box-shadow: 0 1px 8px rgba(0,0,0,.04);
}
.topbar__takeda { height: 36px; }
.topbar__replagal { height: 40px; }

/* ===========================
   HERO
   =========================== */
.hero {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
}
.hero__skyline {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(227,6,19,.55) 0%,
    rgba(184,5,15,.6) 40%,
    rgba(100,3,8,.7) 100%
  );
}
.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 70px 24px 100px;
}
/* Decorative line pattern overlay */
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 58px,
      rgba(255,255,255,.04) 58px,
      rgba(255,255,255,.04) 60px
    );
  pointer-events: none;
}
.hero__line-accent {
  width: 80px;
  height: 4px;
  background: #ffffff;
  border-radius: 2px;
  margin: 0 auto 28px;
  animation: lineGrow .8s ease both;
  box-shadow: 0 0 20px rgba(255,255,255,.3);
}
@keyframes lineGrow {
  from { width: 0; opacity: 0; }
  to   { width: 80px; opacity: 1; }
}
.hero__title {
  font-family: var(--ff-black);
  font-size: clamp(2.4rem, 6vw + .5rem, 4.2rem);
  color: #ffffff;
  line-height: 1.1;
  letter-spacing: -1px;
  text-shadow: 0 4px 30px rgba(0,0,0,.2);
}
.hero__title sup {
  font-size: .35em;
  vertical-align: super;
  opacity: .7;
}
.hero__title span {
  display: block;
  font-family: var(--ff-book);
  font-size: clamp(1rem, 2vw + .3rem, 1.5rem);
  font-weight: 400;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: .85;
  margin-top: 6px;
}
.hero__tag {
  display: inline-block;
  margin-top: 24px;
  padding: 10px 32px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 100px;
  font-family: var(--ff-bold);
  font-size: clamp(.75rem, 1vw, .88rem);
  color: #ffffff;
  letter-spacing: 2px;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0,0,0,.1);
}
/* Campaign banner — Saving lives visual */
.campaign-banner {
  max-width: 880px;
  margin: -40px auto 0;
  padding: 0 20px;
  position: relative;
  z-index: 5;
}
.campaign-banner__inner {
  background: var(--card);
  border-radius: var(--r-xl);
  padding: 32px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 20px 60px rgba(0,0,0,.06),
    0 4px 16px rgba(0,0,0,.03);
  border: 1px solid var(--border);
}
.campaign-banner__img {
  width: 100%;
  max-width: 700px;
}
@media (max-width: 700px) {
  .campaign-banner { display: none; }
}

.hero__wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  z-index: 3;
  line-height: 0;
}
.hero__wave svg {
  width: 100%;
  height: 110px;
  display: block;
}

/* ===========================
   CALCULATOR — Split Card
   =========================== */
.calc-section {
  max-width: 880px;
  margin: 32px auto 0;
  padding: 0 20px;
  position: relative;
  z-index: 4;
}
.calc {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  background: var(--card);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow:
    0 30px 80px rgba(0,58,82,.12),
    0 8px 24px rgba(0,0,0,.06);
  animation: cardRise .6s cubic-bezier(.22,1,.36,1) both;
  border-left: 5px solid var(--red);
}
@keyframes cardRise {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.calc__left {
  padding: 44px 36px;
  background: linear-gradient(160deg, #f8fbfd 0%, #eef5f9 100%);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.calc__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--red);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.calc__icon svg { width: 24px; height: 24px; }

.calc__heading {
  font-family: var(--ff-bold);
  font-size: clamp(1.15rem, 1.8vw, 1.45rem);
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.3;
}
.calc__desc {
  font-size: clamp(.82rem, 1vw, .92rem);
  color: var(--text-mid);
  line-height: 1.7;
}

.calc__right {
  padding: 44px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.calc__label {
  display: block;
  font-family: var(--ff-medium);
  font-size: .78rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 10px;
}
.calc__field {
  display: flex;
  align-items: stretch;
  border: 2px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color .25s, box-shadow .25s;
}
.calc__field:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-glow);
}
.calc__field.is-error {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(227,6,19,.12);
  animation: shake .4s ease;
}
.calc__input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--ff-bold);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  color: var(--text);
  padding: 14px 18px;
  min-width: 0;
}
.calc__input::placeholder {
  color: var(--text-light);
  font-family: var(--ff-book);
  font-size: 1rem;
}
.calc__input::-webkit-outer-spin-button,
.calc__input::-webkit-inner-spin-button { -webkit-appearance: none; }
.calc__input[type=number] { -moz-appearance: textfield; }

.calc__unit {
  display: flex;
  align-items: center;
  padding: 0 20px;
  background: var(--brand);
  color: #ffffff;
  font-family: var(--ff-bold);
  font-size: .95rem;
  letter-spacing: 1px;
}

/* Buttons */
.calc__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}
.calc__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border: none;
  border-radius: var(--r-md);
  font-family: var(--ff-bold);
  font-size: clamp(.75rem, 1vw, .85rem);
  color: #ffffff;
  cursor: pointer;
  transition: transform .15s, box-shadow .25s;
  text-transform: uppercase;
  letter-spacing: .8px;
}
.calc__btn--primary {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  box-shadow: 0 4px 16px var(--red-glow);
}
.calc__btn--secondary {
  background: var(--brand-deeper);
  box-shadow: 0 4px 16px rgba(0,58,82,.15);
}
.calc__btn:hover {
  transform: translateY(-2px);
}
.calc__btn--primary:hover {
  box-shadow: 0 8px 24px var(--red-glow);
}
.calc__btn--secondary:hover {
  box-shadow: 0 8px 24px var(--brand-glow);
}
.calc__btn:active {
  transform: translateY(0);
}
.calc__btn-arrow {
  font-size: 1.1rem;
  transition: transform .2s;
}
.calc__btn:hover .calc__btn-arrow {
  transform: translateX(3px);
}

/* Note */
.calc__note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: #f0f8fe;
  border-left: 3px solid var(--brand);
  font-size: clamp(.72rem, .9vw, .8rem);
  color: var(--text-mid);
  line-height: 1.55;
}
.calc__note strong {
  font-family: var(--ff-bold);
  color: var(--text);
}
.calc__note-icon {
  width: 16px;
  height: 16px;
  min-width: 16px;
  color: var(--brand);
  margin-top: 1px;
}

/* ===========================
   RESULTS
   =========================== */
.results-section {
  max-width: 880px;
  margin: 0 auto;
  padding: 28px 20px 0;
}
.results-section[hidden] { display: none; }

.results {
  position: relative;
  background: linear-gradient(135deg, #0e2a3a 0%, #153d54 40%, #1a4a66 100%);
  border-radius: var(--r-xl);
  padding: 56px 48px;
  color: #ffffff;
  overflow: hidden;
  animation: resultsIn .5s cubic-bezier(.22,1,.36,1) both;
  border-top: 5px solid var(--red);
  box-shadow:
    0 30px 80px rgba(14,42,58,.2),
    0 8px 24px rgba(0,0,0,.08);
}
@keyframes resultsIn {
  from { opacity: 0; transform: scale(.95) translateY(15px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
/* Decorative circles */
.results::before,
.results::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  opacity: .08;
}
.results::before {
  width: 300px; height: 300px;
  background: var(--brand);
  top: -120px; right: -80px;
}
.results::after {
  width: 200px; height: 200px;
  background: var(--brand);
  bottom: -80px; left: -60px;
}

.results__badge {
  display: inline-block;
  padding: 5px 16px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 100px;
  font-family: var(--ff-medium);
  font-size: .7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,.7);
  margin-bottom: 28px;
}
.results__grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  position: relative;
  z-index: 1;
}
.results__block {
  text-align: center;
}
.results__block[hidden] { display: none; }
.results__number {
  display: block;
  font-family: var(--ff-black);
  font-size: clamp(3.5rem, 7vw, 5.5rem);
  line-height: 1;
  background: linear-gradient(135deg, #ffffff 0%, #b8e4f8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 8px rgba(0,156,222,.15));
}
.results__label {
  display: block;
  font-family: var(--ff-bold);
  font-size: clamp(.85rem, 1.1vw, 1rem);
  color: rgba(255,255,255,.8);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 2px;
}
.results__sub {
  display: block;
  font-family: var(--ff-book);
  font-size: clamp(.68rem, .85vw, .78rem);
  color: rgba(255,255,255,.45);
  margin-top: 4px;
}

/* Separator */
.results__separator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 80px;
}
.results__separator[hidden] { display: none; }
.results__sep-line {
  width: 1px;
  flex: 1;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,.2), transparent);
}
.results__sep-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,.3);
}

/* ===========================
   DETAILS / ACCORDION
   =========================== */
.details-section {
  max-width: 880px;
  margin: 0 auto;
  padding: 16px 20px 0;
}
.details-section[hidden] { display: none; }

.details__toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 16px 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  color: var(--text-mid);
  font-family: var(--ff-medium);
  font-size: clamp(.82rem, 1vw, .92rem);
  cursor: pointer;
  transition: all .25s;
}
.details__toggle:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.details__toggle[aria-expanded="true"] {
  background: var(--red);
  border-color: var(--red);
  color: #ffffff;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.details__toggle-icon {
  display: flex;
  width: 22px;
  height: 22px;
}
.details__toggle-icon svg { width: 100%; height: 100%; }
.details__chevron {
  width: 18px; height: 18px;
  margin-left: auto;
  transition: transform .3s;
}
.details__toggle[aria-expanded="true"] .details__chevron {
  transform: rotate(180deg);
}

.details__panel {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height .4s cubic-bezier(.4,0,.2,1), opacity .3s;
}
.details__panel.is-open {
  opacity: 1;
}
.details__inner {
  background: var(--card);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  padding: 32px 28px;
}

/* Rationale */
.rationale {
  margin-bottom: 28px;
}
.rationale__title {
  font-family: var(--ff-bold);
  font-size: clamp(.9rem, 1.1vw, 1rem);
  color: var(--text);
  margin-bottom: 16px;
}
.rationale__steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rationale__step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: #f4f8fb;
  border-radius: var(--r-sm);
  border-left: 3px solid var(--border);
  transition: border-color .2s;
}
.rationale__step--accent {
  background: rgba(0,156,222,.06);
  border-left-color: var(--brand);
}
.rationale__num {
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: 50%;
  background: var(--brand);
  color: #ffffff;
  font-family: var(--ff-bold);
  font-size: .72rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rationale__step--accent .rationale__num {
  background: var(--brand-dark);
}
.rationale__text {
  font-family: var(--ff-book);
  font-size: clamp(.78rem, .95vw, .88rem);
  color: var(--text-mid);
  line-height: 1.5;
}
.rationale__text strong {
  font-family: var(--ff-bold);
  color: var(--text);
}

/* Info cards */
.info-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.info-card {
  padding: 24px;
  border-radius: var(--r-md);
  background: #f8fbfd;
  border: 1px solid var(--border);
}
.info-card--example {
  background: linear-gradient(160deg, #f0f9ff 0%, #f4f8fb 100%);
}
.info-card__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--brand);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.info-card__icon svg { width: 18px; height: 18px; }
.info-card__title {
  font-family: var(--ff-bold);
  font-size: clamp(.78rem, .95vw, .88rem);
  color: var(--brand-dark);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}
.info-card__highlight {
  font-family: var(--ff-bold);
  font-size: clamp(.85rem, 1vw, .95rem);
  color: var(--brand);
  margin-bottom: 10px;
}
.info-card__list {
  list-style: none;
  font-size: clamp(.76rem, .9vw, .85rem);
  line-height: 2;
  color: var(--text-mid);
}
.info-card__list strong {
  font-family: var(--ff-bold);
  color: var(--text);
}
.info-card__list--steps {
  counter-reset: step;
}
.info-card__list--steps li::before {
  counter-increment: step;
  content: "Step " counter(step) ": ";
  font-family: var(--ff-medium);
  color: var(--text-light);
}

/* Reference bar */
.ref-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.ref-bar__text {
  font-size: clamp(.72rem, .85vw, .8rem);
  color: var(--text-mid);
  line-height: 1.5;
}
.ref-bar__text strong {
  font-family: var(--ff-bold);
  color: var(--text);
}
.ref-bar__qr {
  height: 52px;
  width: auto;
  flex-shrink: 0;
}

/* ===========================
   FOOTER
   =========================== */
.site-footer {
  max-width: 880px;
  margin: 48px auto 0;
  padding: 0 20px 24px;
}
.site-footer__address {
  background: #ffffff;
  border-radius: var(--r-md);
  padding: 24px;
  border: 1px solid var(--border);
  margin-bottom: 14px;
}
.site-footer__address img {
  width: 100%;
}
.site-footer__meta {
  display: flex;
  justify-content: space-between;
  font-size: clamp(.65rem, .8vw, .75rem);
  color: var(--text-light);
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* ===========================
   ANIMATIONS
   =========================== */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%  { transform: translateX(-8px); }
  40%  { transform: translateX(8px); }
  60%  { transform: translateX(-5px); }
  80%  { transform: translateX(5px); }
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 700px) {
  .calc {
    grid-template-columns: 1fr;
  }
  .calc__left {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 28px 24px;
  }
  .calc__right {
    padding: 28px 24px;
  }
  .calc__actions {
    grid-template-columns: 1fr;
  }
  .results__grid {
    flex-direction: column;
    gap: 24px;
  }
  .results__separator {
    flex-direction: row;
    height: auto;
    width: 80px;
  }
  .results__sep-line {
    width: auto;
    height: 1px;
    flex: 1;
  }
  .info-row {
    grid-template-columns: 1fr;
  }
  .hero { min-height: 320px; }
  .hero__content { padding: 50px 20px 80px; }
  .ref-bar { flex-direction: column; text-align: center; }
  .site-footer__meta {
    flex-direction: column;
    align-items: center;
    gap: 2px;
  }
}

@media (max-width: 420px) {
  .topbar { padding: 12px 16px; }
  .topbar__takeda { height: 24px; }
  .topbar__replagal { height: 22px; }
  .calc__left, .calc__right { padding: 22px 18px; }
  .results { padding: 36px 24px; }
  .details__inner { padding: 24px 18px; }
}
