:root {
  color-scheme: light;
  --ink: #25372f;
  --ink-soft: #52635a;
  --muted: #788078;
  --paper: #f8f7f3;
  --white: #fffefa;
  --sage: #dce5d8;
  --sage-dark: #476653;
  --rust: #b8795b;
  --line: #e8e7df;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: "Avenir Next", Avenir, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid #bc876a;
  outline-offset: 4px;
}
.container { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.site-header { border-bottom: 1px solid rgb(37 55 47 / 6%); }
.nav { display: flex; min-height: 82px; align-items: center; justify-content: space-between; gap: 20px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: -0.035em;
}
.nav-links { display: flex; align-items: center; gap: 36px; color: var(--ink-soft); font-size: 13px; }
.auth-link:hover { color: var(--rust); }
.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
  align-items: center;
  gap: 70px;
  min-height: calc(100vh - 174px);
  padding-block: 70px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 23px;
  color: var(--sage-dark);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.eyebrow::before { width: 24px; height: 1px; background: var(--rust); content: ""; }
h1, h2, p { margin-top: 0; }
h1, h2 { font-family: var(--serif); font-weight: 400; }
h1 { margin-bottom: 21px; font-size: clamp(45px, 5.3vw, 68px); letter-spacing: -0.055em; line-height: 1.07; }
h1 em { color: var(--sage-dark); font-weight: 400; }
.intro-copy { max-width: 465px; color: var(--ink-soft); font-size: 15px; line-height: 1.8; }
.auth-card {
  padding: 31px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--white);
  box-shadow: 0 18px 50px rgb(52 63 48 / 7%);
}
.auth-card h2 { margin-bottom: 10px; font-size: 31px; letter-spacing: -0.04em; }
.form-intro { margin-bottom: 23px; color: var(--ink-soft); font-size: 13px; line-height: 1.75; }
.field { display: grid; gap: 8px; margin-bottom: 16px; }
.field label { color: var(--ink); font-size: 12px; font-weight: 600; }
.field input {
  width: 100%;
  min-height: 45px;
  padding: 0 12px;
  border: 1px solid #dcded6;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
}
.field input[aria-invalid="true"] { border-color: #9b493c; background: #f8eeea; }
.consent-field { margin-bottom: 20px; }
.consent-row { display: flex; align-items: flex-start; gap: 10px; }
.consent-row input { width: 18px; height: 18px; flex: 0 0 auto; margin: 1px 0 0; accent-color: var(--sage-dark); }
.consent-row label { color: var(--ink-soft); font-size: 12px; line-height: 1.65; }
.consent-field .field-error { margin-top: 6px; }
.field-hint, .field-error { margin: 0; font-size: 11px; line-height: 1.6; }
.field-hint { color: var(--muted); }
.field-error, .form-status { color: #9b493c; }
.field-error:empty, .form-status:empty { display: none; }
.form-status { margin: 13px 0 0; font-size: 12px; line-height: 1.6; }
.button-primary {
  display: inline-flex;
  min-height: 51px;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 0 23px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: background 160ms ease, transform 160ms ease;
}
.button-primary:hover { transform: translateY(-2px); background: #344b3f; }
.button-primary:disabled { cursor: wait; opacity: 0.7; transform: none; }
.button-secondary {
  min-height: 45px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--sage-dark);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
}
.button-secondary:disabled { cursor: not-allowed; opacity: 0.6; }
#otp-countdown { margin-bottom: 16px; }
.cross-nav { margin: 22px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.6; }
.auth-link { color: var(--sage-dark); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.site-footer { border-top: 1px solid rgb(37 55 47 / 8%); }
.footer-inner { display: flex; min-height: 92px; align-items: center; justify-content: space-between; gap: 20px; }
.footer-note { margin: 0; color: var(--muted); font-size: 11px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px 24px; color: var(--ink-soft); font-size: 11px; }
.footer-links a:hover { color: var(--rust); }
.terms-layout { max-width: 800px; padding-block: 70px; }
.terms-layout h1 { margin-bottom: 15px; }
.terms-card { margin-top: 30px; }
.terms-card section + section { margin-top: 28px; }
.terms-card h2 { margin-bottom: 10px; font-size: 26px; }
.terms-card p, .terms-card li { color: var(--ink-soft); font-size: 14px; line-height: 1.8; }
.terms-card p:last-child { margin-bottom: 0; }
.terms-card ul { padding-left: 22px; }
.terms-return { margin-top: 26px; }

@media (max-width: 800px) {
  .auth-layout { grid-template-columns: 1fr; gap: 28px; min-height: 0; padding-block: 55px; }
  .auth-card { width: min(100%, 500px); }
}
@media (max-width: 620px) {
  .container { width: min(100% - 40px, 440px); }
  .nav { min-height: 70px; flex-wrap: wrap; gap: 10px; padding: 10px 0; }
  .brand { gap: 8px; font-size: 16px; }
  .nav-links { width: 100%; justify-content: space-between; gap: 12px; }
  .auth-card { padding: 24px 21px; }
  .terms-layout { padding-block: 45px; }
  .footer-inner { min-height: 0; flex-wrap: wrap; padding-block: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .button-primary { transition: none; }
}
