:root {
  --blue: #1B4F7B;
  --blue-deep: #143D5E;
  --red: #C23A2E;
  --yellow: #E8A627;
  --green: #3A7D44;
  --cream: #F8F8E8;
  --cream-mid: #F0F0DC;
  --cream-dark: #E4E4D0;
  --text: #2C2416;
  --text-mid: #5C5244;
  --text-soft: #8A8070;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--cream);
  color: var(--text);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* ── Grain texture overlay ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  opacity: 0.028;
  pointer-events: none;
  z-index: 100;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

/* ── Layout ── */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  position: relative;
}

/* ── Top accent stripe ── */
.accent-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg,
      var(--red) 0%,
      var(--red) 25%,
      var(--yellow) 25%,
      var(--yellow) 50%,
      var(--green) 50%,
      var(--green) 75%,
      var(--blue) 75%,
      var(--blue) 100%);
  z-index: 50;
}

/* ── Content wrapper ── */
.content {
  max-width: 520px;
  width: 100%;
  text-align: center;
}

/* ── Logo ── */
.logo-wrap {
  margin-bottom: 3rem;
  animation: reveal 1.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.logo {
  width: 240px;
  max-width: 50vw;
  height: auto;
  mix-blend-mode: multiply;
}

/* ── Tagline ── */
.tagline {
  font-family: 'Fraunces', serif;
  font-optical-sizing: auto;
  font-weight: 320;
  font-style: italic;
  font-size: clamp(1.4rem, 4vw, 1.75rem);
  color: var(--blue);
  line-height: 1.55;
  letter-spacing: -0.01em;
  margin-bottom: 2.5rem;
  animation: reveal 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

/* ── Horizontal rule ── */
.rule {
  width: 48px;
  height: 1.5px;
  background: var(--yellow);
  border: none;
  margin: 0 auto 2.5rem;
  animation: reveal 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

/* ── Opener — the personality line ── */
.opener {
  font-family: 'Fraunces', serif;
  font-optical-sizing: auto;
  font-weight: 360;
  font-size: clamp(1.05rem, 2.8vw, 1.2rem);
  line-height: 1.7;
  color: var(--text);
  max-width: 500px;
  margin: 0 auto 3rem;
  animation: reveal 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
}

/* ── Description ── */
.description {
  font-size: 0.95rem;
  line-height: 1.85;
  color: var(--text-mid);
  max-width: 450px;
  margin: 0 auto 3.5rem;
  animation: reveal 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.4s both;
}

/* ── Email signup ── */
.signup {
  animation: reveal 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
  width: 100%;
  margin: 0 auto;
}

.signup-leadin {
  font-size: 0.95rem;
  line-height: 1.85;
  color: var(--text-mid);
  margin-bottom: 1.25rem;
}

.signup-form {
  display: flex;
  max-width: 400px;
  margin: 0 auto;
  border: 1.5px solid var(--cream-dark);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.signup-form:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(27, 79, 123, 0.08);
}

.signup-input {
  flex: 1;
  padding: 0.8rem 1rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9rem;
  border: none;
  background: transparent;
  color: var(--text);
  outline: none;
  min-width: 0;
}

.signup-input::placeholder {
  color: #B8B0A0;
}

.signup-btn {
  font-family: 'Fraunces', serif;
  font-optical-sizing: auto;
  font-weight: 500;
  font-size: 0.85rem;
  padding: 0.8rem 1.4rem;
  background: var(--blue);
  color: var(--cream);
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
  white-space: nowrap;
}

.signup-btn:hover {
  background: var(--blue-deep);
}

/* ── Back link ── */
.back-link {
  font-family: 'Fraunces', serif;
  font-optical-sizing: auto;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--blue);
  text-decoration: none;
  border-bottom: 1px solid var(--cream-dark);
  padding-bottom: 2px;
  transition: border-color 0.2s ease;
  animation: reveal 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
}

.back-link:hover {
  border-color: var(--blue);
}

/* ── Footer ── */
.footer {
  margin-top: 4rem;
  animation: reveal 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.65s both;
}

.footer-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 0.75rem;
}

.footer-mark span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.footer-mark span:nth-child(1) {
  background: var(--red);
}

.footer-mark span:nth-child(2) {
  background: var(--yellow);
}

.footer-mark span:nth-child(3) {
  background: var(--green);
}

.footer-mark span:nth-child(4) {
  background: var(--blue);
}

.footer-text {
  font-size: 0.75rem;
  color: var(--text-soft);
  letter-spacing: 0.02em;
}

/* ── Animations ── */
@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .page {
    padding: 3.5rem 1.5rem;
  }

  .logo {
    width: 200px;
  }

  .logo-wrap {
    margin-bottom: 2.5rem;
  }

  .signup-form {
    flex-direction: column;
  }

  .signup-input {
    text-align: center;
    border-bottom: 1px solid var(--cream-dark);
  }

  .signup-btn {
    padding: 0.85rem;
  }
}

@media (min-width: 768px) {
  .page {
    padding: 5rem 2rem;
  }
}
