:root {
  --paper: #F6F1E8;
  --paper-lift: #EFE8DC;
  --ink: #1C1915;
  --ink-muted: #6B645A;
  --brass: #B08D57;
  --teal: #1F6F6A;
  --line: #D9D0C3;
  --white: #FFFDF8;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
  font-family: "Instrument Sans", system-ui, sans-serif;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 52% 8%, rgba(31, 111, 106, 0.13), transparent 360px),
    linear-gradient(180deg, var(--white), var(--paper) 78%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.site-top {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0 0;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  width: 180px;
  height: 36px;
}

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

.hero {
  position: relative;
  display: grid;
  align-items: center;
  width: min(1120px, calc(100% - 48px));
  min-height: calc(100vh - 64px);
  margin: 0 auto;
  padding: clamp(54px, 8vh, 92px) 0 clamp(80px, 11vh, 130px);
  text-align: center;
}

.signal-field {
  position: absolute;
  inset: 12% 50% auto auto;
  width: 100vw;
  height: 500px;
  transform: translateX(50%);
  pointer-events: none;
}

.signal-field span {
  position: absolute;
  left: 50%;
  width: 108vw;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(176, 141, 87, 0.18), transparent);
  transform-origin: center;
  animation: line-pulse 8s ease-in-out infinite;
}

.signal-field span:nth-child(1) {
  top: 96px;
  transform: translateX(-50%) rotate(-8deg);
}

.signal-field span:nth-child(2) {
  top: 164px;
  transform: translateX(-50%) rotate(-4deg);
  animation-delay: -1.5s;
}

.signal-field span:nth-child(3) {
  top: 238px;
  transform: translateX(-50%);
  animation-delay: -3s;
}

.signal-field span:nth-child(4) {
  top: 312px;
  transform: translateX(-50%) rotate(4deg);
  animation-delay: -4.5s;
}

.signal-field span:nth-child(5) {
  top: 380px;
  transform: translateX(-50%) rotate(8deg);
  animation-delay: -6s;
}

.signal-field::before,
.signal-field::after {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  content: "";
  background: var(--teal);
  opacity: 0.75;
  box-shadow:
    180px -72px 0 rgba(31, 111, 106, 0.55),
    320px 52px 0 rgba(176, 141, 87, 0.72),
    490px -10px 0 rgba(31, 111, 106, 0.58);
  animation: dot-float 4.8s ease-in-out infinite;
}

.signal-field::before {
  top: 250px;
  left: 3vw;
}

.signal-field::after {
  top: 255px;
  right: 42vw;
  transform: scaleX(-1);
  animation-delay: -2.4s;
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: min(860px, 100%);
  margin: 0 auto;
}

.eyebrow {
  margin: 0;
  color: var(--teal);
  font-size: clamp(0.72rem, 1vw, 0.82rem);
  font-weight: 900;
  letter-spacing: 0.13em;
  line-height: 1.2;
  text-transform: uppercase;
}

h1 {
  max-width: 7.2ch;
  margin: 12px auto 0;
  color: var(--ink);
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(5rem, 13vw, 11rem);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 0.76;
}

.lede {
  max-width: 39rem;
  margin: 28px auto 0;
  color: var(--ink-muted);
  font-size: clamp(1.35rem, 2.3vw, 2.05rem);
  font-weight: 800;
  line-height: 1.18;
}

.site-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  width: min(610px, 100%);
  margin: 38px auto 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--white);
  padding: 10px;
  box-shadow: 0 22px 70px rgba(28, 25, 21, 0.14);
}

.site-entry input {
  min-width: 0;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0 16px;
  outline: none;
  font-size: 1.04rem;
  font-weight: 800;
}

.site-entry input::placeholder {
  color: var(--ink-muted);
}

.site-entry button {
  min-height: 56px;
  border: 0;
  border-radius: 14px;
  background: var(--ink);
  color: var(--paper);
  padding: 0 28px;
  font-weight: 900;
  cursor: pointer;
}

.auth-shell {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.auth-shell.is-open {
  opacity: 1;
  pointer-events: auto;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(28, 25, 21, 0.28);
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.auth-panel {
  position: relative;
  display: grid;
  gap: 18px;
  width: min(520px, 100%);
  max-height: min(860px, calc(100vh - 32px));
  overflow-y: auto;
  color: var(--ink);
  animation: auth-rise 260ms ease both;
}

.auth-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(176, 141, 87, 0.35);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.75);
  color: var(--ink-muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.auth-card {
  display: grid;
  gap: 18px;
  border: 1px solid rgba(176, 141, 87, 0.35);
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 0%, rgba(31, 111, 106, 0.13), transparent 280px),
    var(--white);
  padding: clamp(22px, 4vw, 32px);
  box-shadow: 0 30px 70px rgba(28, 25, 21, 0.18);
}

.auth-heading {
  text-align: center;
}

.auth-heading h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.35rem);
  line-height: 1.05;
}

.auth-heading p,
.auth-note,
.auth-terms {
  margin: 8px 0 0;
  color: var(--ink-muted);
}

.website-pill {
  display: none;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid rgba(31, 111, 106, 0.22);
  border-radius: 999px;
  background: rgba(31, 111, 106, 0.08);
  color: var(--teal);
  padding: 8px 12px;
  font-size: 0.9rem;
  font-weight: 700;
}

.website-pill:not(:empty) {
  display: block;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 750;
}

.auth-form input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  padding: 0 14px;
  outline: none;
}

.auth-form input:focus {
  border-color: rgba(31, 111, 106, 0.65);
  box-shadow: 0 0 0 4px rgba(31, 111, 106, 0.12);
}

.auth-form input::placeholder {
  color: var(--ink-muted);
}

.password-row {
  position: relative;
  display: block;
}

.password-row input {
  padding-right: 48px;
}

.password-row button {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 30px;
  height: 30px;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.label-row a,
.auth-switch button,
.auth-terms a {
  border: 0;
  background: transparent;
  color: var(--teal);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.remember-row {
  display: flex !important;
  grid-template-columns: none;
  align-items: center;
  gap: 10px;
  color: var(--ink-muted) !important;
  font-weight: 650 !important;
}

.remember-row input {
  width: 22px;
  min-height: 22px;
  accent-color: var(--teal);
}

.auth-submit {
  min-height: 54px;
  border-radius: 14px;
  font-weight: 850;
  cursor: pointer;
}

.auth-submit {
  border: 0;
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 16px 34px rgba(28, 25, 21, 0.18);
}

.auth-note {
  min-height: 1.2em;
  text-align: center;
  font-size: 0.9rem;
}

.contact-block,
.next-steps {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.contact-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.contact-heading h3,
.next-steps h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.05rem;
}

.contact-heading a {
  border: 1px solid rgba(31, 111, 106, 0.28);
  border-radius: 999px;
  color: var(--teal);
  background: rgba(31, 111, 106, 0.08);
  padding: 8px 12px;
  font-size: 0.9rem;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.contact-form {
  display: grid;
  gap: 10px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  padding: 13px 14px;
  outline: none;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: rgba(31, 111, 106, 0.65);
  box-shadow: 0 0 0 4px rgba(31, 111, 106, 0.12);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--ink-muted);
}

.contact-form button {
  min-height: 48px;
  border: 1px solid rgba(176, 141, 87, 0.35);
  border-radius: 14px;
  background: var(--paper-lift);
  color: var(--ink);
  font-weight: 850;
  cursor: pointer;
}

.next-steps ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.auth-terms {
  margin: 0;
  text-align: center;
  font-size: 0.9rem;
}

body.auth-open {
  overflow: hidden;
}

.legal-page {
  width: min(780px, calc(100% - 48px));
  margin: 0 auto;
  padding: clamp(70px, 12vh, 120px) 0;
}

.legal-page h1 {
  max-width: none;
  margin: 12px 0 24px;
  font-size: clamp(3.4rem, 10vw, 7.5rem);
  line-height: 0.86;
}

.legal-page p:not(.eyebrow) {
  color: var(--ink-muted);
  font-size: 1.08rem;
  font-weight: 650;
  line-height: 1.65;
}

.legal-page a {
  color: var(--teal);
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@keyframes auth-rise {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes line-pulse {
  0%, 100% {
    opacity: 0.46;
  }
  50% {
    opacity: 1;
  }
}

@keyframes dot-float {
  0%, 100% {
    opacity: 0.42;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-12px);
  }
}

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

@media (max-width: 700px) {
  .site-top,
  .hero {
    width: min(100% - 28px, 1120px);
  }

  .hero {
    align-items: start;
    min-height: auto;
    padding-top: 74px;
  }

  h1 {
    font-size: clamp(4.4rem, 24vw, 7.4rem);
  }

  .site-entry {
    grid-template-columns: 1fr;
  }

  .site-entry button {
    width: 100%;
  }

  .auth-shell {
    padding: 14px;
  }

  .auth-card {
    border-radius: 18px;
  }
}
