@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800;900&family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --white: #FFFFFF;
  --black: #111111;
  --primary-red: #FF1D25;

  /* ─────────────────────────────────────────────────────────────
     FLOATING JAR KNOBS  —  move / resize each jar by editing these.
     All values are % of the product box.
       x    = horizontal distance from the jar's anchored edge
       y    = height above the bottom   (bigger  → jar moves UP)
       size = jar width                 (bigger  → jar gets BIGGER)
     ───────────────────────────────────────────────────────────── */

  /* LEFT jar  — x measured from the LEFT edge  (bigger x → moves RIGHT) */
  --jar-left-x: 11%;
  --jar-left-y: 53%;
  --jar-left-size: 32%;

  /* CENTER jar — x measured from the LEFT edge (bigger x → moves RIGHT) */
  --jar-center-x: 35.5%;
  --jar-center-y: 40%;
  --jar-center-size: 36%;

  /* RIGHT jar — x measured from the RIGHT edge (bigger x → moves LEFT) */
  --jar-right-x: 5%;
  --jar-right-y: 51%;
  --jar-right-size: 32%;

  /* BOX background image position (shift from its centered spot)
       bigger x → moves RIGHT      bigger y → moves DOWN
     Use % (of the box's own size) so it scales on every screen. */
  --box-x: 0%;
  --box-y: 6%;
  /* BOX size — 1 = original, 1.2 = 20% bigger, 0.8 = 20% smaller */
  --box-scale: 1.2;
}

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

/* UPDATED: Allow scrolling */
html {
  height: auto;
  overflow-y: auto;
  overflow-x: hidden;
}

body {
  width: 100%;
  height: auto;
  font-family: var(--font-family);
  color: var(--black);
}

.app-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: auto;
}

.app-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.product-showcase {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  position: relative;
  height: auto;
  aspect-ratio: 9 / 16;
  width: 100%;
}

.showcase-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
  position: relative;
}

.showcase-typo {
  width: 90%;
  max-width: min(420px, 35vh);
  margin-top: 1.5rem;
  z-index: 5;
}

/* Launch countdown — sits above the GIVEAWAY title image */
.countdown {
  position: relative;
  z-index: 8;                 /* above the box image (auto) and jars (z-index 6/7) */
  margin-top: 1.25rem;
  text-align: center;
  color: #111;                /* black fonts */
  font-family: 'Montserrat', sans-serif;
}

.countdown-date {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.countdown-timer {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.cd-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 38px;
}

.cd-num {
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1;
}

.cd-label {
  font-size: 0.55rem;
  font-weight: 600;
  text-transform: uppercase;
  opacity: 0.7;
}

.product-stage-custom {
  position: absolute;
  top: 0;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 9 / 16;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.box-bg-img {
  height: 100%;
  max-width: 100%;
  pointer-events: none;
  /* Move (--box-x/--box-y) and resize (--box-scale) via the knobs in :root */
  transform: translate(var(--box-x), var(--box-y)) scale(var(--box-scale));
  /* Fade the bottom of the box image so it melts into the white page */
  -webkit-mask-image: linear-gradient(to bottom, #000 92%, transparent 96%);
  mask-image: linear-gradient(to bottom, #000 92%, transparent 96%);
}

.jar-float {
  position: absolute;
  pointer-events: none;
  /* Above the GIVEAWAY headline (.showcase-typo is z-index: 5) so the
     jars overlap the text. */
  z-index: 6;
}

.jar-left {
  left: var(--jar-left-x);
  bottom: var(--jar-left-y);
  width: var(--jar-left-size);
  animation: float-left 6s ease-in-out infinite alternate;
}

.jar-right {
  right: var(--jar-right-x);
  bottom: var(--jar-right-y);
  width: var(--jar-right-size);
  animation: float-right 7s ease-in-out infinite alternate;
}

.jar-center {
  left: var(--jar-center-x);
  bottom: var(--jar-center-y);
  width: var(--jar-center-size);
  z-index: 7;
  animation: float-center 5s ease-in-out infinite alternate;
}

/* Register Button */
.register-btn {
  position: absolute;
  bottom: 15%;
  z-index: 10;
  background-color: #FF131B;
  color: var(--white);
  border: none;
  border-radius: 100px;
  padding: 0.75rem 2rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
}

/* NEW FORM STYLES */
.form-wrapper {
  width: 90%;
  max-width: 400px;
  /* Pull the form up so it rises over the bottom of the hero section */
  position: relative;
  z-index: 20;
  margin: -20svh auto 1rem;
  padding: 2rem;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.giveaway-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.giveaway-form input,
.giveaway-form select {
  width: 100%;
  padding: 12px;
  border: 2px solid #eee;
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--black);
  background: #fff;
  transition: border-color 0.15s ease;
}

.giveaway-form input:focus,
.giveaway-form select:focus {
  outline: none;
  border-color: var(--primary-red);
}

/* Custom dropdown caret so selects match the inputs on all browsers */
.giveaway-form select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%23999' d='M1.4 0L6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
  cursor: pointer;
}

.giveaway-form select:disabled {
  background-color: #f7f7f7;
  color: #aaa;
  cursor: not-allowed;
}

/* "Select State / City" placeholder option appears muted */
.giveaway-form select:invalid {
  color: #999;
}

/* Wraps each input + its inline error message */
.field {
  display: flex;
  flex-direction: column;
}

.field-error {
  color: var(--primary-red);
  font-size: 0.75rem;
  font-weight: 600;
  min-height: 0;
  margin-top: 4px;
}

.field-error:empty {
  display: none;
}

/* Honeypot — visually hidden, off-screen, skipped by keyboard & screen readers */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.flavor-label {
  font-weight: 700;
  font-size: 0.9rem;
}

.radio-group {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.radio-option {
  padding: 10px 5px;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  border: 2px solid #ddd;
  font-size: 0.75rem;
  font-weight: 700;
}

.radio-option input {
  display: none;
}

.radio-option .servings {
  display: block;
  margin-top: 3px;
  font-size: 0.65rem;
  font-weight: 600;
  opacity: 0.7;
}

.radio-option:has(input:checked).fruit-fusion {
  background: #FF1D25;
  color: white;
  border-color: #FF1D25;
}

.radio-option:has(input:checked).orange {
  background: #FF8C00;
  color: white;
  border-color: #FF8C00;
}

.radio-option:has(input:checked).unflavored {
  background: #333;
  color: white;
  border-color: #333;
}

.submit-btn {
  background: #111;
  color: #fff;
  padding: 15px;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.05s ease;
}

.submit-btn:hover:not(:disabled) {
  opacity: 0.9;
}

.submit-btn:active:not(:disabled) {
  transform: translateY(1px);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

/* Network / server error shown above the button */
.form-error-banner {
  color: var(--primary-red);
  background: #ffeaeb;
  border: 1px solid #ffc9cc;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
}

.form-error-banner[hidden] {
  display: none;
}

/* Success panel — replaces the form once an entry is recorded */
.form-success {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
  padding: 1rem 0;
}

.form-success.visible {
  display: flex;
}

.form-success-icon {
  font-size: 3rem;
  line-height: 1;
}

.form-success h2 {
  color: var(--primary-red);
}

.form-success p {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.5;
}

.form-success-step {
  color: #333;
}

.form-success-step a {
  color: var(--primary-red);
  font-weight: 700;
  text-decoration: none;
}

.form-success-step a:hover {
  text-decoration: underline;
}

.form-success .form-success-goodluck {
  font-weight: 700;
  color: var(--black);
}

/* Privacy note under the submit button */
.privacy-note {
  margin-top: 0.35rem;
  font-size: 0.7rem;
  line-height: 1.5;
  color: #8a8a8a;
  text-align: center;
}

/* Terms & Conditions link below the form box */
.terms-line {
  text-align: center;
  margin: 0.9rem auto 2.5rem;
}

.terms-link {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary-red);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.terms-link:hover {
  opacity: 0.8;
}

/* Terms & Conditions popup */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;               /* center the dialog within the viewport */
  overflow-y: auto;            /* the overlay itself scrolls if terms are long */
  padding: 1.5rem 1.25rem;
  background: rgba(0, 0, 0, 0.55);
}

.modal-overlay[hidden] {
  display: none;
}

.modal {
  box-sizing: border-box;
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: auto;               /* center both axes; collapses to scroll when taller than the screen */
  background: #fff;
  border-radius: 16px;
  padding: 1.5rem 1.5rem 1.75rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.7rem;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  font-size: 1.7rem;
  line-height: 1;
  color: #999;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--black);
}

.modal-title {
  margin-bottom: 0.85rem;
  padding-right: 1.5rem;
  font-size: 1.15rem;
  color: var(--primary-red);
}

.terms-list {
  margin: 0;
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.terms-list li {
  font-size: 0.85rem;
  line-height: 1.45;
  color: #444;
}

/* Lock background scrolling while the popup is open */
html.modal-open {
  overflow: hidden;
}

/* Animations */
@keyframes float-left {
  0% {
    transform: translateY(0) rotate(0deg);
  }

  100% {
    transform: translateY(-8px) rotate(0deg);
  }
}

@keyframes float-center {
  0% {
    transform: translateY(0) rotate(0deg);
  }

  100% {
    transform: translateY(-14px) rotate(0deg);
  }
}

@keyframes float-right {
  0% {
    transform: translateY(0) rotate(0deg);
  }

  100% {
    transform: translateY(-7px) rotate(0deg);
  }
}

/* ============================================================
   TABLET ONLY (768px–1023px)
   Push the countdown + GIVEAWAY heading down so they aren't
   cramped at the top of the tall hero. Phones (<768px) and
   desktops (>=1024px) are intentionally left untouched.
   ============================================================ */
@media (min-width: 768px) and (max-width: 1023.98px) {
  .countdown {
    margin-top: 8vh;
  }
}

/* ============================================================
   DESKTOP LAYOUT (>= 1024px)
   Two columns / one row: hero images on the left, form + terms
   on the right. Below 1024px the original single-column mobile
   layout is used unchanged.
   ============================================================ */

/* Transparent to layout on mobile so nothing changes there;
   becomes a real flex column only on desktop. */
.form-column {
  display: contents;
}

@media (min-width: 1024px) {
  /* No page scroll on desktop — everything fits within the viewport. */
  html,
  body {
    overflow: hidden;
    height: 100%;
  }

  .app-main {
    display: grid;
    grid-template-columns: 1fr 1fr;   /* two columns, one row */
    align-items: center;              /* vertically center both sides */
    gap: 0;
    max-width: none;
    width: 100%;
    height: 100vh;                    /* exactly the viewport — no scrolling */
    box-sizing: border-box;
    overflow: hidden;
    margin-inline: auto;
    padding: 0;
  }

  /* Left column — fills the entire left half, edge to edge. */
  .product-showcase {
    position: relative;
    height: 100vh;
    width: 100%;
    max-width: none;
    aspect-ratio: auto;           /* drop the 9/16 letterbox so it fills the column */
    margin: 0;
    overflow: visible;            /* let the scaled box spill past the column instead of being cut */
  }

  /* ONLY the box image is scaled — rendered as a full-cover background layer
     so the jars / heading / countdown keep their original size on top of it. */
  .product-showcase::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: url("new assets/ChatGPT Image Jun 24, 2026, 01_10_23 AM.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* Box position/size FROZEN for desktop, independent of :root (mobile uses :root). */
    --box-x: 10%;
    --box-y: 6%;
    --box-scale: 1.2;
    transform: translate(var(--box-x), var(--box-y)) scale(var(--box-scale));
    /* Vertical fade on the RIGHT edge so the image blends into the form side */
    -webkit-mask-image: linear-gradient(to right, #000 65%, transparent 100%);
    mask-image: linear-gradient(to right, #000 65%, transparent 100%);
  }

  /* The inline box <img> is replaced by the scaled background above */
  .box-bg-img {
    display: none;
  }

  /* Keep the foreground composition above the background box, anchored to the
     top so the countdown + GIVEAWAY heading sit above the jars. */
  .showcase-container {
    position: relative;
    z-index: 1;
    justify-content: flex-start;
    /* Slide the GIVEAWAY heading + countdown right together (desktop only).
       Bigger value -> moves further RIGHT. */
    --hero-shift-x: 7rem;
  }

  /* Move the heading + countdown collectively to the right, without touching
     the jars (which are positioned separately in .product-stage-custom). */
  .countdown,
  .showcase-typo {
    transform: translateX(var(--hero-shift-x));
  }

  /* Jars: keep the 9/16 stage height-driven (its original width) and centered
     in the column. Bigger jar sizes here apply to DESKTOP ONLY — phones keep
     the :root values. (Jars inherit these vars from this parent.) */
  .product-stage-custom {
    /* Frozen desktop arrangement (captured from the tuned :root values).
       Mobile uses the baseline values in :root instead. */
    --jar-left-x: 10%;
    --jar-left-y: 35%;
    --jar-left-size: 50%;
    --jar-center-x: 50%;
    --jar-center-y: 27%;
    --jar-center-size: 50%;
    --jar-right-x: -40%;
    --jar-right-y: 35%;
    --jar-right-size: 50%;
    height: calc(100vh - 2rem);
    width: auto;
    aspect-ratio: 9 / 16;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  /* Right column — form box with the Terms link stacked below it. */
  .form-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
  }

  /* Undo the mobile "pull the form up over the hero" trick. */
  .form-wrapper {
    margin: 0;
    z-index: auto;
  }

  .terms-line {
    margin: 1rem auto 0;
  }
}