/*
  Coming Soon — WeAreChangeMerch.com
  Implements ComingSoon.dc.html from the "YPI Merchandise Shop Mockup" project.

  Theme tokens live in css/theme.css, shared with the shop pages.

  Everything here is expressed in YPI design-system tokens. The literal pixel
  values that remain (80/40 padding, 14/28 button padding, the 40px lede gap)
  are the ones the mockup specifies that have no matching token — they are
  wrapped in clamp() so the fixed-canvas layout survives small screens.
*/

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

body {
  background: var(--color-bg);
}

.page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh; /* excludes mobile browser chrome */
  padding: clamp(48px, 10vw, 80px) clamp(20px, 6vw, 40px);
}

.hero {
  max-width: 720px;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Brand mark
   The mockup pins the wordmark absolutely at (353, 70) against a fixed canvas.
   In flow, centred above the headline, is the equivalent placement for a
   centred single-column page. The source PNG carries its own transparent clear
   space, so the optical gap below reads larger than the 24px margin.
   -------------------------------------------------------------------------- */

.hero__logo {
  display: block;
  width: clamp(112px, 34vw, 160px);
  height: auto;
  margin: 0 auto var(--space-5);
}

/* --------------------------------------------------------------------------
   Copy
   -------------------------------------------------------------------------- */

.hero__title {
  /* text-5xl (5.5rem) is the mockup size; floors at text-3xl so it never
     overflows a phone. base.css supplies the uppercase, weight and tracking. */
  font-size: clamp(var(--text-3xl), 11vw, var(--text-5xl));
  color: var(--ypi-green-500);
  margin-bottom: var(--space-5);
  text-wrap: balance;
}

.hero__lede {
  font-family: var(--font-body);
  font-size: clamp(var(--text-md), 3.2vw, var(--text-lg));
  line-height: var(--leading-relaxed);
  color: var(--color-text-muted);
  margin-bottom: 40px;
  text-wrap: pretty;
}

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

.notify {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  max-width: 400px;
  margin: 0 auto;
}

.notify__input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: border-color var(--duration-fast) var(--ease-standard);
}

.notify__input::placeholder {
  color: var(--color-text-muted);
  opacity: 1; /* Firefox dims placeholders by default */
}

.notify__input:hover {
  border-color: var(--color-primary);
}

.notify__input[aria-invalid="true"] {
  border-color: var(--status-error);
}

/* Chromium paints its own autofill background, which breaks the dark theme. */
.notify__input:-webkit-autofill,
.notify__input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--color-text);
  box-shadow: inset 0 0 0 100px var(--color-surface);
}

.notify__submit {
  width: 100%;
  padding: 14px 28px;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--color-text-on-green);
  /*
    Mockup ships --color-primary (#2CA837) here, but white text on that fill
    is 3.1:1 — fails WCAG AA for 14px bold (needs 4.5:1). Forest Green
    (--color-primary-hover, #148324) is 4.88:1 and passes; hover/active step
    down to --color-primary-active (#0F6B1D) since it's the darkest step the
    DS defines.
  */
  background: var(--color-primary-hover);
  border: var(--border-width) solid var(--color-primary-hover);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition:
    background-color var(--duration-fast) var(--ease-standard),
    border-color var(--duration-fast) var(--ease-standard);
}

.notify__submit:hover,
.notify__submit:active {
  background: var(--color-primary-active);
  border-color: var(--color-primary-active);
}

.notify__submit[disabled] {
  cursor: default;
  opacity: 0.6;
}

.notify__status {
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--color-text-muted);
}

.notify__status:empty {
  display: none;
}

.notify__status--ok {
  color: var(--status-ok);
  font-weight: var(--weight-bold);
}

.notify__status--error {
  color: var(--status-error);
}

/* --------------------------------------------------------------------------
   Focus
   Not specified in the mockup; --color-focus-ring is the DS's own token.
   -------------------------------------------------------------------------- */

.notify__input:focus-visible,
.notify__submit:focus-visible,
a:focus-visible {
  outline: var(--border-width) solid var(--color-focus-ring);
  outline-offset: var(--space-1);
}

.notify__input:focus-visible {
  border-color: var(--color-primary);
}

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

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

.u-hidden {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
