/* Nango Rango Coffee Co. — "something is brewing" landing page */

:root {
  --bean: #1b100a;
  --espresso: #3d251a;
  --crema: #efe0c8;
  --mocha: #c9ae8d;
  --gold: #d8ab4e;
  --gold-soft: rgba(216, 171, 78, 0.28);
  --ember: #e2745a;
}

* {
  box-sizing: border-box;
}

.body-coffee {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  padding: 48px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  position: relative;
  isolation: isolate;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--crema);
  background-color: var(--bean);
}

/* The wood plank from the logo art, reused as a dark room texture.
   Scaled up and blurred so the emblem itself is unrecognisable. */
.body-coffee::before {
  content: "";
  position: fixed;
  inset: -40px;
  z-index: -2;
  background-image: url("../assets/logo.png");
  background-size: 320% auto;
  background-position: 4% 6%;
  filter: blur(16px) saturate(0.75) brightness(0.32);
  transform: scale(1.06);
}

/* Vignette so the centre column always reads. */
.body-coffee::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(
      120% 90% at 50% 0%,
      rgba(27, 16, 10, 0) 0%,
      rgba(27, 16, 10, 0.55) 55%,
      rgba(15, 9, 5, 0.92) 100%
    ),
    linear-gradient(rgba(27, 16, 10, 0.45), rgba(27, 16, 10, 0.6));
}

/* Warm hanging-lamp glow spilling from above. */
.lamp {
  position: fixed;
  top: -32vh;
  left: 50%;
  width: min(120vw, 1100px);
  height: 90vh;
  transform: translateX(-50%);
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    closest-side,
    rgba(255, 196, 110, 0.3) 0%,
    rgba(255, 176, 84, 0.13) 42%,
    rgba(255, 170, 80, 0) 72%
  );
  animation: lamp-flicker 7s ease-in-out infinite;
}

/* Content ------------------------------------------------------------ */

.hero {
  position: relative;
  width: 100%;
  max-width: 620px;
  text-align: center;
  animation: rise 0.9s cubic-bezier(0.22, 0.68, 0.34, 1) both;
}

/* Steam sits above the badge and is allowed to overlap it slightly. */
.steam {
  position: relative;
  height: clamp(48px, 9vw, 76px);
  margin-bottom: -14px;
  pointer-events: none;
}

.wisp {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 12px;
  height: clamp(48px, 9vw, 76px);
  border-radius: 50%;
  background: linear-gradient(
    to top,
    rgba(239, 224, 200, 0) 0%,
    rgba(239, 224, 200, 0.5) 45%,
    rgba(239, 224, 200, 0) 100%
  );
  filter: blur(7px);
  opacity: 0;
  animation: steam-rise 4.6s ease-in-out infinite;
}

.wisp-1 {
  margin-left: -46px;
  animation-delay: 0s;
}

.wisp-2 {
  margin-left: -6px;
  height: clamp(58px, 11vw, 92px);
  animation-delay: 1.5s;
}

.wisp-3 {
  margin-left: 34px;
  animation-delay: 2.9s;
}

/* The emblem is centred inside a wide wood-plank image, so it gets
   cropped to a circle here rather than in an image editor.
   Source art: 1024x559, emblem centre ~(511, 286), diameter ~510px. */
.badge {
  width: clamp(180px, 42vw, 260px);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
  background-image: url("../assets/logo.png");
  background-size: 209% auto;
  background-position: 49.8% 59.4%;
  box-shadow:
    0 0 0 2px rgba(216, 171, 78, 0.55),
    0 0 0 9px rgba(27, 16, 10, 0.7),
    0 0 44px 10px rgba(255, 180, 90, 0.18),
    0 26px 60px rgba(0, 0, 0, 0.62);
}

.wordmark {
  margin: 30px 0 0;
  font-size: clamp(0.7rem, 2.2vw, 0.82rem);
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--mocha);
}

.headline {
  margin: 14px 0 0;
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-weight: 500;
  font-size: clamp(2.1rem, 8vw, 3.6rem);
  line-height: 1.14;
  letter-spacing: -0.01em;
  color: var(--crema);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.5);
}

.headline em {
  font-style: italic;
  font-weight: 600;
  color: var(--gold);
}

.tagline {
  margin: 18px auto 0;
  max-width: 30rem;
  font-size: clamp(0.95rem, 2.6vw, 1.05rem);
  font-weight: 300;
  line-height: 1.7;
  color: var(--mocha);
}

/* Signup ------------------------------------------------------------- */

.signup {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 34px auto 0;
  max-width: 27rem;
}

.signup.is-done {
  display: none;
}

.signup-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 14px 18px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--crema);
  background: rgba(61, 37, 26, 0.5);
  border: 1px solid rgba(216, 171, 78, 0.3);
  border-radius: 999px;
  backdrop-filter: blur(6px);
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}

.signup-input::placeholder {
  color: rgba(201, 174, 141, 0.65);
}

.signup-input:hover {
  border-color: rgba(216, 171, 78, 0.5);
}

.signup-input:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(61, 37, 26, 0.75);
}

.signup-input:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.signup-input[aria-invalid="true"] {
  border-color: var(--ember);
}

.signup-button {
  flex: 0 0 auto;
  padding: 14px 24px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  color: #2a1710;
  background: linear-gradient(180deg, #eec572 0%, var(--gold) 100%);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.42);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease;
}

.signup-button:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5);
}

.signup-button:active {
  transform: translateY(0);
}

.signup-button:focus-visible {
  outline: 2px solid var(--crema);
  outline-offset: 3px;
}

.signup-button[disabled] {
  cursor: default;
  filter: saturate(0.6) brightness(0.9);
  transform: none;
}

.form-message {
  min-height: 1.4em;
  margin: 14px 0 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--mocha);
}

.form-message.is-error {
  color: var(--ember);
}

.form-message.is-success {
  color: var(--gold);
  font-size: 1rem;
}

/* Footer ------------------------------------------------------------- */

.hero-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid rgba(216, 171, 78, 0.16);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(201, 174, 141, 0.7);
}

.hero-footer .dot {
  opacity: 0.5;
}

.footer-link {
  color: rgba(201, 174, 141, 0.7);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}

.footer-link:hover {
  color: var(--gold);
  border-bottom-color: var(--gold-soft);
}

.footer-link:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Utilities ---------------------------------------------------------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes steam-rise {
  0% {
    opacity: 0;
    transform: translateY(14px) scaleX(0.8);
  }
  25% {
    opacity: 0.7;
  }
  60% {
    opacity: 0.35;
  }
  100% {
    opacity: 0;
    transform: translateY(-34px) scaleX(1.5);
  }
}

@keyframes lamp-flicker {
  0%,
  100% {
    opacity: 1;
  }
  45% {
    opacity: 0.86;
  }
  70% {
    opacity: 0.94;
  }
}

/* Small screens: stack the form so the button keeps a comfortable target. */
@media (max-width: 520px) {
  .body-coffee {
    padding: 36px 18px;
  }

  .signup {
    flex-direction: column;
  }

  .signup-button {
    width: 100%;
    padding: 15px 24px;
  }

  .hero-footer {
    font-size: 0.72rem;
  }

  /* The footer wraps to two lines here — the separator would dangle. */
  .hero-footer .dot {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero,
  .lamp,
  .wisp {
    animation: none;
  }

  .wisp {
    opacity: 0.4;
  }

  .signup-button:hover {
    transform: none;
  }
}
