/* welp.fit coming-soon page.
 *
 * Three explicit layouts, no fluid type between them:
 *   base            the mobile design (mobile.dc.html, 390x844) exactly
 *   >= 641px        the same shape, roomier, on a fluid container
 *   >= 1024px       the desktop design (desktop.dc.html, 1440x900) exactly
 *
 * The tile copy is shorter on the narrow layouts, so both sentences ship in the
 * markup and one is hidden per breakpoint. display:none also takes the hidden
 * one out of the accessibility tree, so nothing is read twice.
 *
 * One deliberate departure from mobile.dc.html, decided by the founder: every
 * vertical gap and padding below 641px is 2-4px tighter than the design file.
 * That file is a fixed 844x844 canvas with overflow:hidden, which assumes 844px
 * of VISIBLE viewport — more than iPhone Safari ever grants once its toolbar is
 * drawn. At the design's own spacing the page was 772px tall and scrolled on a
 * real phone. Font sizes, colours, radii and the tile structure are untouched;
 * only the air between things moved, and only on the narrow layout.
 */

:root {
  --ink: #1A0F0A;
  --ink-60: rgba(26, 15, 10, 0.60);
  --cream: #FFFDF5;
  --mango: #FF9F1C;
  --teal: #06D6A0;
  --hairline: rgba(0, 0, 0, 0.05);
  --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

* { box-sizing: border-box; }

/* The form and the confirmation are both display:flex, and a display rule beats
   the hidden attribute. Without this the success message is on screen from the
   first paint. */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--cream);
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(255, 159, 28, 0.2); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- the two blurred glows ---------- */

.glows {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.glow {
  position: absolute;
  display: block;
  border-radius: 999px;
  filter: blur(90px);
}

.glow-mango {
  top: -60px;
  left: -80px;
  width: 320px;
  height: 240px;
  background: rgba(255, 159, 28, 0.10);
}

.glow-teal {
  bottom: -60px;
  right: -80px;
  width: 260px;
  height: 200px;
  background: rgba(6, 214, 160, 0.05);
}

/* ---------- frame ---------- */

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 22px 20px 20px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  width: 84px;
  height: auto;
}

.eyebrow {
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-60);
}

/* ---------- hero ---------- */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}

.headline {
  margin: 0;
  text-wrap: balance;
  font-size: 36px;
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.accent {
  font-family: Fraunces, Georgia, serif;
  font-style: italic;
  font-weight: 400;
  color: var(--mango);
}

/* ---------- the four tiles ---------- */

.tiles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  text-align: left;
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #FFFFFF;
  border: 1px solid var(--hairline);
  box-shadow: var(--card-shadow);
}

.tile-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tile-icon svg { width: 18px; height: 18px; }

.tile-icon-mango { background: rgba(255, 159, 28, 0.10); color: var(--mango); }
.tile-icon-teal { background: rgba(6, 214, 160, 0.10); color: var(--teal); }

.tile-text { display: contents; }

.tile-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--ink);
}

.tile-desc {
  font-size: 12px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--ink-60);
}

.wide-copy { display: none; }
.narrow-copy { display: inline; }

/* ---------- the form ---------- */

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

.join-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.phone-input {
  width: 100%;
  padding: 15px 18px;
  border: 1px solid var(--hairline);
  border-radius: 16px;
  background: #FFFFFF;
  box-shadow: var(--card-shadow);
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.phone-input::placeholder { color: var(--ink-60); }

/* The design system's input ring: mango border, mango/20 halo. */
.phone-input:focus {
  border-color: var(--mango);
  box-shadow: 0 0 0 2px rgba(255, 159, 28, 0.20), var(--card-shadow);
}

.cta {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 15px 32px;
  border: 0;
  border-radius: 12px;
  background: var(--mango);
  color: #FFFFFF;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
}

.cta svg { transition: transform 0.3s ease; }
.cta:hover svg { transform: translateX(4px); }

.cta:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

@keyframes cta-sheen {
  0%, 55% { transform: translateX(-140%) skewX(-20deg); }
  100% { transform: translateX(260%) skewX(-20deg); }
}

.cta-shimmer::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 40%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.35) 50%, rgba(255, 255, 255, 0) 100%);
  animation: cta-sheen 4.5s ease-in-out infinite;
  pointer-events: none;
}

.cta-shimmer:hover {
  filter: brightness(0.96);
  box-shadow: 0 10px 30px rgba(255, 159, 28, 0.30);
}

.cta:disabled {
  cursor: default;
  opacity: 0.75;
}

/* A disabled button that still shimmers reads as live. */
.cta:disabled::after { animation: none; opacity: 0; }
.cta:disabled:hover { filter: none; box-shadow: none; }
.cta:disabled:hover svg { transform: none; }

/* Zero height while empty, so the note below it does not move until there is
   something to say. */
.form-message {
  margin: 0;
  font-size: 12px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--ink-60);
}

.form-message:not(:empty) { margin-top: 8px; }

.joined {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--ink);
  outline: none;
}

.joined-check {
  flex-shrink: 0;
  color: var(--teal);
}

.note {
  margin: 0;
  font-size: 12px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--ink-60);
}

/* ---------- footer ---------- */

.footer {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding-top: 12px;
  border-top: 1px solid var(--hairline);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-60);
}

/* One centred row of three on the phone: the two groups dissolve. */
.footer-left, .footer-right { display: contents; }

/* ---------- >= 641px: same shape, more room ---------- */

@media (min-width: 641px) {
  .page {
    width: 100%;
    max-width: 1152px;
    margin: 0 auto;
    padding: 32px 24px 28px 24px;
  }

  .logo { width: 96px; }

  .hero { gap: 20px; }

  .headline {
    max-width: 800px;
    font-size: 44px;
    letter-spacing: -0.045em;
  }

  .tiles {
    max-width: 720px;
    gap: 14px;
  }

  .tile { padding: 18px; }

  .tile-title { font-size: 15px; }
  .tile-desc { font-size: 13px; }

  .join-form { max-width: 420px; }

  .form-message, .note, .joined { font-size: 14px; line-height: 1.625; }

  .footer {
    justify-content: space-between;
    gap: 32px;
    padding-top: 20px;
  }

  .footer-left { display: flex; gap: 32px; }
  .footer-right { display: block; }
}

/* ---------- >= 1024px: the desktop design ---------- */

@media (min-width: 1024px) {
  .page { padding: 44px 24px 40px 24px; }

  .logo { width: 112px; }

  .topbar .eyebrow { letter-spacing: 0.3em; }

  .hero { gap: 24px; }

  .headline {
    max-width: 1000px;
    font-size: 60px;
    line-height: 1;
    letter-spacing: -0.05em;
  }

  .tiles {
    width: 1000px;
    max-width: 100%;
    gap: 16px;
    margin-top: 8px;
  }

  .tile {
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding: 20px;
  }

  .tile-icon {
    width: auto;
    height: auto;
    padding: 12px;
    border-radius: 12px;
  }

  .tile-icon svg { width: 22px; height: 22px; }

  .tile-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .tile-title {
    font-size: 16px;
    line-height: normal;
  }

  .tile-desc {
    font-size: 14px;
    line-height: 1.625;
  }

  .wide-copy { display: inline; }
  .narrow-copy { display: none; }

  .signup {
    width: auto;
    margin-top: 8px;
  }

  .join-form {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    max-width: none;
    width: auto;
  }

  .phone-input {
    width: 360px;
    padding: 16px 20px;
    font-size: 15px;
  }

  .cta {
    width: auto;
    padding: 16px 32px;
  }

  .footer { padding-top: 24px; }

  .glow { filter: blur(120px); }

  .glow-mango {
    top: -90px;
    left: -144px;
    width: 720px;
    height: 450px;
  }

  .glow-teal {
    bottom: -90px;
    right: -144px;
    width: 576px;
    height: 360px;
  }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .cta-shimmer::after {
    animation: none;
    display: none;
  }

  .cta, .cta svg, .phone-input { transition: none; }
  .cta:hover svg { transform: none; }
}
