/* baag & co. — Coming soon
   Palette: sage background, deep earthy brown text, warm white surface.
   Type: Fraunces (display) + Instrument Sans (text), self-hosted in /fonts,
   with system fallbacks if the files fail to load. */

@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-latin-opsz-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-latin-opsz-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --sage: #A9BE8B;
  --ink: #3F2B20;          /* primary text */
  --ink-soft: #4A3426;     /* secondary text, darker for contrast on sage */
  --paper: #F8F6EF;        /* warm white surfaces */
  --error: #5E1A0E;        /* validation text */

  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-text: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--sage);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1rem;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.page {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: clamp(1rem, 3vw, 2.5rem) clamp(1.25rem, 5vw, 3rem) 1.25rem;
}

.composition {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  /* Asymmetric padding nudges the group slightly below the geometric
     centre, which reads as more balanced against the footer. */
  padding-top: clamp(2rem, 9vh, 5rem);
  padding-bottom: clamp(1rem, 3vh, 2rem);
}

/* ---------- Wordmark ---------- */

.wordmark {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(3rem, min(11vw, 14vh), 6.75rem);
  line-height: 0.95;
  letter-spacing: -0.025em;
  white-space: nowrap;
  font-variation-settings: "opsz" 144;
}

.wordmark__baag,
.wordmark__co {
  font-weight: 500;
}

.wordmark__amp {
  display: inline-block;
  font-style: italic;
  font-weight: 400;
  font-size: 0.92em;
  margin: 0 0.12em;
  transform: translateY(-0.02em);
}

/* ---------- Positioning line ---------- */

.positioning {
  margin: clamp(1rem, 2.5vh, 1.5rem) 0 0;
  font-size: clamp(0.95rem, 0.9rem + 0.4vw, 1.125rem);
  font-weight: 500;
  letter-spacing: 0.005em;
  max-width: 28rem;
  text-wrap: balance;
}

/* ---------- Hero: status, headline, supporting copy ---------- */

.hero {
  margin-top: clamp(2.5rem, 7vh, 4.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.launch {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(3rem, min(12.5vw, 16vh), 8rem);
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
  font-variation-settings: "opsz" 144;
}

.headline {
  margin: clamp(1.25rem, 3vh, 1.75rem) 0 0;
  max-width: 24ch;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.25rem, min(2.6vw, 3.8vh), 1.75rem);
  line-height: 1.25;
  letter-spacing: -0.005em;
  text-wrap: balance;
  font-variation-settings: "opsz" 36;
}

.support {
  margin: clamp(0.75rem, 2vh, 1rem) 0 0;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  color: var(--ink-soft);
}

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

/* ---------- Email signup ---------- */

.signup {
  width: 100%;
  max-width: 30rem;
  margin-top: clamp(2rem, 5vh, 3rem);
}

.signup__row {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 0.25rem;
  padding: 0.3rem;
  background: var(--paper);
  border-radius: 999px;
  outline: 2px solid transparent;
  outline-offset: 3px;
  transition: outline-color 0.2s ease;
}

.signup__row:focus-within {
  outline-color: var(--ink);
}

.signup__row.is-invalid {
  outline-color: var(--error);
}

.signup__input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  padding: 0.8rem 1rem 0.8rem 1.1rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  border-radius: 999px;
}

.signup__input::placeholder {
  color: #7A6A5C;
  opacity: 1;
}

.signup__input:focus {
  outline: none;
}

.signup__button {
  flex: 0 0 auto;
  padding: 0.8rem 1.35rem;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.signup__button:hover {
  background: #2A1B13;
}

.signup__button:focus-visible,
.signup__input:focus-visible {
  outline: none;
}

.signup__button:focus-visible {
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--ink);
}

.signup__message {
  margin: 0.75rem 0 0;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink);
}

.signup__message.is-error {
  color: var(--error);
}

.signup__message[hidden] {
  display: none;
}

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

.footer {
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(63, 43, 32, 0.22);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem 1.5rem;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  color: var(--ink-soft);
}

.footer p {
  margin: 0;
}

/* ---------- Entrance motion (disabled for reduced motion) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .composition > * {
    animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .composition > .positioning { animation-delay: 0.08s; }
  .composition > .hero { animation-delay: 0.16s; }
  .composition > .signup { animation-delay: 0.24s; }

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Small screens and short viewports ---------- */

@media (max-width: 480px) {
  .signup__button {
    padding-inline: 1.1rem;
  }

}

/* Very narrow phones: stack the field above a full-width button so the
   address and placeholder are never clipped. */
@media (max-width: 360px) {
  .signup__row {
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.35rem;
    border-radius: 1.5rem;
  }

  .signup__input {
    text-align: center;
  }

  .signup__button {
    width: 100%;
    padding-block: 0.9rem;
  }
}

@media (max-height: 640px) and (min-width: 600px) {
  .hero {
    margin-top: 1.75rem;
  }

  .signup {
    margin-top: 1.5rem;
  }
}
