/* ==========================================================================
   The Charlotte Arms — coming soon
   ========================================================================== */

:root {
  --green:      #455847;
  --green-deep: #3E5744;
  --cream:      #FFFCF3;
  --gold:       #F4D59A;
  --gold-dark:  #E4BE79;

  --serif: "georgia", Georgia, "Times New Roman", serif;
}

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

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

body {
  margin: 0;
  background: var(--green);
  color: var(--cream);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.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;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6vh 24px;
  background-color: var(--green);
  background-image: url("../assets/banner-mobile.jpg");
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
}

@media (min-width: 700px) {
  .hero {
    background-image: url("../assets/banner-desktop.jpg");
    background-position: center center;
  }
}

.hero__inner {
  width: 100%;
  max-width: 880px;
  text-align: center;
  animation: rise 900ms cubic-bezier(.22,.61,.36,1) both;
}

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

/* --------------------------------------------------------------------------
   Logo + tagline
   -------------------------------------------------------------------------- */

.logo {
  margin: 0 auto;
  width: min(620px, 74vw);
}

.logo img {
  display: block;
  width: 100%;
  height: auto;
}

.tagline {
  margin: clamp(28px, 5vh, 56px) auto clamp(26px, 4.5vh, 48px);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.125rem, 2.1vw, 1.875rem);
  line-height: 1.3;
  letter-spacing: .01em;
  color: var(--cream);
  text-shadow: 0 1px 14px rgba(30, 44, 33, .28);
}

/* --------------------------------------------------------------------------
   Sign-up form
   -------------------------------------------------------------------------- */

.signup {
  margin: 0 auto;
  max-width: 560px;
}

.signup__row {
  display: flex;
  align-items: stretch;
  box-shadow: 0 10px 34px rgba(28, 40, 31, .22);
}

.signup__input {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 16px 22px;
  border: 0;
  border-radius: 0;
  background: var(--cream);
  color: var(--green-deep);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.4;
  appearance: none;
}

.signup__input::placeholder { color: rgba(62, 87, 68, .62); opacity: 1; }

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

.signup__button {
  flex: 0 0 auto;
  margin: 0;
  padding: 16px 34px;
  border: 0;
  border-radius: 0;
  background: var(--gold);
  color: var(--green-deep);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.4;
  cursor: pointer;
  transition: background-color 180ms ease, opacity 180ms ease;
}

.signup__button:hover { background: var(--gold-dark); }

.signup__button:focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: 3px;
}

.signup__button[disabled] { opacity: .65; cursor: default; }

/* honeypot */
.signup__trap {
  position: absolute !important;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

.signup__message {
  min-height: 1.3em; /* reserved, so nothing shifts when a message appears */
  margin: 13px 0 0;
  font-size: 1rem;
  font-style: italic;
  line-height: 1.45;
  color: var(--cream);
  opacity: 0;
  transition: opacity 220ms ease;
  text-shadow: 0 1px 12px rgba(30, 44, 33, .3);
}

.signup__message.is-visible { opacity: 1; }
.signup__message.is-error   { color: var(--gold); }

.signup__privacy {
  margin: 2px 0 0;
  font-size: .875rem;
  line-height: 1.5;
  letter-spacing: .015em;
  color: rgba(255, 252, 243, .86);
  text-shadow: 0 1px 10px rgba(30, 44, 33, .55);
}

/* Success: form is swapped out for a note in its place */
.signup.is-done .signup__row,
.signup.is-done .signup__privacy { display: none; }

.signup.is-done .signup__message {
  font-size: clamp(1.0625rem, 1.7vw, 1.375rem);
  margin-top: 0;
}

/* --------------------------------------------------------------------------
   Small screens
   -------------------------------------------------------------------------- */

@media (max-width: 560px) {
  .hero { padding: 5vh 20px; }

  .signup__row {
    flex-direction: column;
    gap: 12px;
    box-shadow: none;
  }

  .signup__input,
  .signup__button {
    width: 100%;
    padding: 15px 20px;
    box-shadow: 0 8px 26px rgba(28, 40, 31, .2);
  }
}

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