/* ===== Fonts (Stellar) ===== */
@font-face {
  font-family: "Stellar";
  src: url("../event-registration/fonts/stellar-light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Stellar";
  src: url("../event-registration/fonts/stellar-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Stellar";
  src: url("../event-registration/fonts/stellar-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "BubblyBoy";
  src: url("../assets/fonts/BubblyBoy.ttf") format("truetype");
  font-display: swap;
}

/* ===== Palette ===== */
:root {
  --blue: #3a53a4;
  --peach: #feedea;
  --white: #ffffff;
  --overlay: rgba(0, 0, 0, 0.62);
  --blush: #fde9e7;
  --coral: #f26c78;
  --indigo: #3a53a4;
  --indigo-deep: #24318f;

  --radius: 20px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);

  --flyer-w: 480px;
  --flyer-h: 780px;
}

.metabolic-body {
  min-height: 100dvh;
  font-family: "Stellar";

  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

.metabolic-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-around;
  min-height: 100dvh;

  padding: clamp(16px, 3vw, 32px) clamp(16px, 8vw, 96px);
  color: var(--white);

  background:
    linear-gradient(to top, rgba(36, 49, 143, 0.85), rgba(242, 108, 120, 0.6)),
    url("./assets/metabolic.webp");
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
}

.metabolic-section-1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 40%;
}

#metabolic_logo {
  width: 300px;
}

.metabolic-section-2 {
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 124px;
  width: 100%;
}

.metabolic-section-2 h1 {
  font-weight: bold;
  font-size: 4rem;
}

.metabolic-left-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 48px;
}

.metabolic-left-upper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
}

.metabolic-left-upper h1 {
  margin: 0 0 24px 0;
}

.metabolic-left-upper p {
  font: "Stellar";
  font-size: 2.2rem;
}

.metabolic-divider-thick {
  height: 6px;
  width: 30%;

  border: none;
  border-radius: 32px;
  background-color: var(--white);

  margin: 0;
  align-self: flex-start;
}

.metabolic-left-lower {
  width: 100%;
}

.metabolic-left-lower-text {
  font-weight: bold;
  font-size: 1.6rem;
  margin: 0;
}

.metabolic-divider-thin {
  margin: 24px 0px;
}

.metabolic-right-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  font-size: 1.6rem;
}

.metabolic-right-text-header {
  font-weight: bold;
}

.metabolic-right-middle ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.metabolic-right-middle li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 6px;
}

.metabolic-right-middle li::before {
  content: "›";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--coral);
  font-weight: 700;
}

.metabolic-right-lower {
  align-self: center;
}

.metabolic-right-lower button {
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: 24px;
  margin-top: 24px;

  font-family: "Stellar";
  font-size: 1.6rem;
  color: var(--indigo);
  font-weight: bold;

  border: none;
  outline: none;
  transition: 0.3s ease-in-out;
}

.metabolic-right-lower button:hover {
  transform: translateY(-4px);
}

@media (max-width: 768px) {
  .metabolic-section-1 {
    width: 100%;
  }
  #metabolic_logo {
    width: 200px;
  }
  #pause_logo {
    width: 75px;
  }
  .metabolic-section-2 {
    gap: 0px;
    flex-direction: column;
  }

  .metabolic-section-2 h1 {
    font-size: 2.2rem;
  }

  .metabolic-left-upper p {
    font-size: 1.6rem;
  }

  .metabolic-left-lower-text {
    font-size: 1.2rem;
  }

  .metabolic-right-section {
    font-size: 1.2rem;
  }

  .metabolic-right-lower button {
    font-size: 1.2rem;
  }

  .metabolic-left-section {
    gap: 0px;
  }
}

/* ===== Modal ===== */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 50;
}
.modal.is-open {
  display: block;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: #bdcfeb;
  backdrop-filter: blur(8px) saturate(1.1);
  -webkit-backdrop-filter: blur(8px) saturate(1.1);
}

.modal__panel {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(1024px, 92vw);
  transform: translate(-50%, -50%);

  max-height: calc(100svh - 32px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;

  background: var(--blue);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  color: var(--white);

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: start;
  padding: 22px;
}

.modal__actions--split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}

body.modal-open {
  overflow: hidden;
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 6px 6px 12px;
  border-bottom: 1px solid rgba(254, 237, 234, 0.14);
}

.modal__title {
  margin: 0;
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.modal__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px 32px;
  margin-top: 6px;
}

.modal__form {
  padding: 14px 6px 6px;
  display: grid;
  gap: 12px;
  width: 480px;
}

.form_fields_row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
}

.field {
  display: block;
}
.field__label {
  font-size: 12px;
  letter-spacing: 0.4px;
  color: rgba(254, 237, 234, 0.92);
}
.field__input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-top: 6px;
  height: 50px;
  border-radius: 12px;
  border: 0;
  outline: none;
  padding: 0 16px;

  background: #ffffff;
  color: #1a2344;
  font-family: "Stellar";
  font-weight: 400;
  font-size: 16px;
}
.field__input::placeholder {
  color: rgba(26, 35, 68, 0.45);
}
.field__input:focus {
  border-color: rgba(254, 237, 234, 0.45);
}

.field__input[type="date"] {
  color: rgba(26, 35, 68, 0.55);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}
.field__input[type="date"]:valid {
  color: #1a2344;
}

.field__input[type="date"]:empty::before {
  content: attr(data-placeholder);
  color: #999;
}

.field__input[type="date"]:focus::before,
.field__input[type="date"]:not(:placeholder-shown)::before {
  content: "";
}

.field__textarea {
  resize: vertical;
  min-height: 88px;
}

.modal__actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 6px;
}

.btn {
  appearance: none;
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  font-family: "Stellar";
  font-weight: 700;
  letter-spacing: 0.4px;
}

.centered {
  text-align: center;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn--ghost {
  height: 52px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  width: 100%;
}
.btn--primary {
  height: 52px;
  border-radius: 14px;
  border: 0;
  background: #f36b73;
  color: #fff;
  width: 100%;
  position: relative;
}

.btn__spinner {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: rgba(255, 255, 255, 0.95);
  display: none;
  animation: spin 800ms linear infinite;
}

.btn.is-loading .btn__spinner {
  display: inline-block;
}

.btn__text {
  display: inline-block;
}

/* spacing when spinner is visible */
.btn.is-loading {
  gap: 10px;
}

/* disable styles */
.btn:disabled,
.field__input:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.modal__hint {
  margin: 14px 0 0;
  text-align: center;
  font-size: 12px;
  opacity: 0.75;
}
@media (max-height: 760px) {
  .modal__form {
    width: auto;
  }
}

@media (max-width: 520px) {
  .modal__bigTitle {
    font-size: 34px;
  }
  .modal__grid {
    grid-template-columns: 1fr;
  }
  .modal__actions--split {
    grid-template-columns: 1fr;
  }
}

/* ===== Success State ===== */
.modal__success {
  display: grid;
  gap: 24px;
  place-items: center;
  text-align: center;
  padding: 18px 6px 6px;
}

.modal__success[hidden] {
  display: none !important;
}
.modal__form[hidden] {
  display: none !important;
}

.success__title {
  margin: 6px 0 0;
  font-size: 22px;
  font-weight: 700;
}

.success__sub {
  margin: 0;
  opacity: 0.85;
  font-size: 13px;
}

/* small animation */
.success__anim {
  width: 74px;
  height: 74px;
  position: relative;
}

.success__anim .ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.22);
  animation: popRing 550ms ease-out forwards;
  transform: scale(0.7);
  opacity: 0;
}

.success__anim .check {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 26px;
  height: 14px;
  border-left: 4px solid var(--peach);
  border-bottom: 4px solid var(--peach);
  transform: translate(-50%, -55%) rotate(-45deg) scale(0.6);
  opacity: 0;
  animation: drawCheck 420ms 220ms ease-out forwards;
}

@keyframes popRing {
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes drawCheck {
  to {
    transform: translate(-50%, -55%) rotate(-45deg) scale(1);
    opacity: 1;
  }
}
