/* DermReserved coming soon — typography approximates Forma DJR Display
   (Adobe Fonts). Swap the wordmark font-family for an exact match. */

:root {
  --cream: #fbf4ea;
  --navy: #14213d;
  --rust: #933628;
  --rust-hover: #7c2c21;
  --rust-active: #6c261c;
  --muted: #5c5a62;
  --placeholder: #8a8680;
  --error: #8b2e22;
  --focus: #14213d;
  --font: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --space: min(7vw, 5.5rem);
}

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-var.woff") format("woff");
  font-weight: 100 900;
  font-stretch: 62.5% 125%;
  font-style: normal;
  font-display: swap;
}

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

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

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--cream);
  color: var(--navy);
  font-family: var(--font);
  font-weight: 400;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
}

a {
  color: inherit;
}

:focus {
  outline: none;
}

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

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

/* Top-left manifesto */
.corner {
  position: absolute;
  top: clamp(1.15rem, 3vw, 2rem);
  left: clamp(1.15rem, 3vw, 3.6rem);
  margin: 0;
  font-size: clamp(0.72rem, 0.35rem + 0.7vw, 0.875rem);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: var(--navy);
  z-index: 2;
}

/* Main column */
.page {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  padding: clamp(5.5rem, 12vh, 7.5rem) 1.25rem clamp(1.5rem, 3vh, 2.25rem);
  gap: 0;
}

/* Wordmark: inline SVG so the 12 tracked, scaleY(1.37) letters
   always fit and stay centered. Archivo 900 / 400, 0.19em tracking,
   scaleY(1.37) stand in for Forma DJR Display Black / Regular.
   Trailing letter-spacing is zeroed on the last glyph so the
   viewBox matches the ink and nothing overflows to the right. */
.wordmark {
  margin: 0;
  padding: 0;
  line-height: 0;
  color: var(--navy);
  width: min(42rem, 86vw);
  max-width: 100%;
  display: block;
}

.wordmark-svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
  font-synthesis: none;
}

.headline {
  margin: clamp(1.1rem, 2.4vw, 1.85rem) 0 0;
  font-family: var(--font);
  font-weight: 400;
  font-size: clamp(1.55rem, 1.15rem + 2.3vw, 3.85rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--navy);
}

/* Emblem: double ring + RD monogram + overlapping pill */
.emblem {
  position: relative;
  width: clamp(12.5rem, 11.25vw, 13.75rem);
  margin: clamp(1.4rem, 3.2vw, 2.15rem) auto 0;
}

.emblem-svg {
  width: 100%;
  height: auto;
  display: block;
}

.invite {
  margin: clamp(1.85rem, 4.2vw, 3.15rem) 0 0;
  font-size: clamp(0.8rem, 0.55rem + 0.55vw, 0.9375rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--navy);
  line-height: 1.4;
}

/* Joined email + notify control */
.notify {
  margin: clamp(0.85rem, 1.6vw, 1.15rem) auto 0;
  width: min(33.75rem, 28.125vw, 92vw);
  max-width: 100%;
}

.notify-row {
  display: flex;
  align-items: stretch;
  width: 100%;
  border: 1.5px solid var(--navy);
  background: var(--cream);
  min-height: 3.25rem;
}

.notify-row:focus-within {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
}

#email {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--navy);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 400;
  padding: 0.7rem 1.05rem;
  min-height: 3.25rem;
  appearance: none;
  border-radius: 0;
}

#email::placeholder {
  color: var(--placeholder);
  opacity: 1;
}

#email:focus {
  outline: none;
}

.notify-btn {
  flex: 0 0 auto;
  border: 0;
  border-left: 1.5px solid var(--navy);
  background: var(--rust);
  color: #fff8f4;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0 1.35rem 0 1.5rem;
  min-height: 3.25rem;
  min-width: 8.5rem;
  width: 31%;
  cursor: pointer;
  border-radius: 0;
}

.notify-btn:hover {
  background: var(--rust-hover);
}

.notify-btn:active {
  background: var(--rust-active);
}

.notify-btn:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
}

.notify-status {
  margin: 0.7rem 0 0;
  min-height: 1.25rem;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--navy);
}

.notify-status[data-state="error"] {
  color: var(--error);
}

.notify-status[data-state="success"] {
  color: var(--navy);
}

.notify.is-success .notify-row {
  display: none;
}

/* Social + copyright */
.social {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.65rem;
  margin: clamp(2.5rem, 7vh, 5.15rem) 0 0;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  min-width: 44px;
  min-height: 44px;
  color: var(--navy);
  border: 1.4px solid var(--navy);
  border-radius: 50%;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.social-link:hover {
  background: var(--navy);
  color: var(--cream);
}

.social-link svg {
  width: 1.05rem;
  height: 1.05rem;
  display: block;
}

.legal {
  margin: 1.15rem 0 0;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.01em;
  line-height: 1.4;
}

.legal a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.legal a:hover {
  color: var(--navy);
}

.legal a:focus-visible {
  outline-offset: 2px;
}

@media (max-width: 640px) {
  html, body {
    height: 100%;
    height: 100svh;
    height: 100dvh;
    max-height: 100svh;
    max-height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
  }

  .corner {
    left: 1.15rem;
    top: 1.1rem;
  }

  .page {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    padding-top: clamp(3.6rem, 8svh, 5rem);
    padding-bottom: clamp(0.55rem, 1.6svh, 1.15rem);
    justify-content: center;
  }

  .wordmark {
    width: min(42rem, 86vw);
    max-width: 100%;
    flex: 0 0 auto;
  }

  .headline {
    font-size: clamp(1.3rem, 1.05rem + 2.6svh, 1.85rem);
    margin-top: clamp(0.45rem, 1.6svh, 1.1rem);
    flex: 0 0 auto;
  }

  .emblem {
    width: min(12.5rem, 56vw, 26svh);
    margin-top: clamp(0.5rem, 1.8svh, 1.4rem);
    margin-left: auto;
    margin-right: auto;
    flex: 0 1 auto;
    align-self: center;
  }

  .invite {
    margin-top: clamp(0.7rem, 2.2svh, 1.6rem);
    flex: 0 0 auto;
  }

  .notify {
    width: min(22.5rem, 100%);
    max-width: 100%;
    margin-top: clamp(0.45rem, 1.2svh, 0.85rem);
    flex: 0 0 auto;
  }

  .notify-row {
    flex-direction: column;
    min-height: 0;
  }

  #email {
    min-height: 44px;
    border-bottom: 1.5px solid var(--navy);
  }

  .notify-btn {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    border-left: 0;
    padding-left: 1.55rem;
  }

  .notify-status {
    min-height: 0;
    margin-top: 0.35rem;
  }

  .notify-status:empty {
    display: none;
  }

  .social {
    margin-top: clamp(0.6rem, 1.8svh, 1.15rem);
    flex: 0 0 auto;
  }

  .social-link {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  .legal {
    margin-top: clamp(0.4rem, 1.1svh, 0.75rem);
    flex: 0 0 auto;
  }
}

/* Extra compaction for short phones (iPhone SE and similar). */
@media (max-width: 640px) and (max-height: 700px) {
  .page {
    padding-top: 3.5rem;
    padding-bottom: 0.5rem;
  }

  .headline {
    font-size: clamp(1.2rem, 5.2vw, 1.45rem);
    margin-top: 0.4rem;
  }

  .emblem {
    width: min(10.25rem, 52vw, 24svh);
    margin-top: 0.45rem;
  }

  .invite {
    margin-top: 0.55rem;
  }

  .notify {
    margin-top: 0.4rem;
  }

  .social {
    margin-top: 0.55rem;
  }

  .legal {
    margin-top: 0.35rem;
  }
}

@media (max-height: 800px) and (min-width: 641px) {
  .page {
    padding-top: 5rem;
    padding-bottom: 1.25rem;
  }

  .social {
    margin-top: 2.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .social-link,
  .notify-btn {
    transition: none;
  }
}
