* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --espresso: #211d19;
  --espresso-soft: #332b25;
  --ink: #28231f;
  --stone: #e8e0d5;
  --stone-deep: #d8cdbf;
  --ivory: #f8f4ed;
  --paper: #fffdf8;
  --gold: #9d744a;
  --gold-dark: #72502f;
  --muted: #5f554c;
  --line: #cfc3b4;
  --error: #8e393d;
  --success: #35634b;
  --physical: #a65d67;
  --social: #47768d;
  --career: #745789;
  --wealth: #6f8158;
}

html {
  background: var(--stone);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 4% 8%, rgba(255, 253, 248, 0.82), transparent 28rem),
    linear-gradient(135deg, #f1ebe2 0%, var(--stone) 52%, #dcd1c3 100%);
  color: var(--ink);
  font-family: "Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  z-index: 10000;
  top: 8px;
  left: 8px;
  padding: 11px 16px;
  background: var(--paper);
  color: var(--espresso);
  border: 2px solid var(--gold-dark);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
.site-footer,
.access-layout {
  width: min(1240px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(114, 80, 47, 0.25);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-seal {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold-dark);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 25px;
  font-style: italic;
  line-height: 1;
}

.brand-wordmark {
  color: var(--espresso);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 27px;
  font-style: italic;
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}

.text-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
  text-underline-offset: 5px;
}

.audit-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  border: 1px solid var(--espresso);
  background: var(--espresso);
  color: var(--ivory);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.audit-link:hover {
  background: var(--espresso-soft);
}

.access-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 540px);
  gap: clamp(48px, 7vw, 104px);
  align-items: center;
  padding-block: clamp(52px, 8vw, 104px);
}

.access-intro {
  max-width: 610px;
}

.eyebrow,
.card-kicker,
.note-label {
  margin: 0 0 14px;
  color: var(--gold-dark);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 24px;
  color: var(--espresso);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(54px, 6vw, 86px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 0.93;
}

h1 em {
  color: var(--gold-dark);
  font-weight: 400;
}

.intro-copy {
  max-width: 570px;
  margin-bottom: 28px;
  color: #514942;
  font-size: clamp(18px, 1.7vw, 21px);
  line-height: 1.65;
}

.capital-rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 34px;
}

.capital-rail span {
  min-height: 48px;
  display: flex;
  align-items: flex-end;
  padding: 18px 10px 4px 0;
  border-top: 4px solid var(--capital);
  color: #4e463f;
  font-size: 13px;
  font-weight: 500;
}

.capital-rail .physical { --capital: var(--physical); }
.capital-rail .social { --capital: var(--social); }
.capital-rail .career { --capital: var(--career); }
.capital-rail .wealth { --capital: var(--wealth); }

.new-member-note {
  padding: 24px 26px;
  border-left: 3px solid var(--gold);
  background: rgba(255, 253, 248, 0.55);
}

.new-member-note h2 {
  margin-bottom: 8px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.15;
}

.new-member-note p:not(.note-label) {
  margin-bottom: 15px;
  color: var(--muted);
}

.new-member-note a,
.pending-state a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--gold-dark);
  font-weight: 600;
  text-underline-offset: 5px;
}

.brand-signature {
  margin: 28px 0 0;
  color: var(--muted);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 18px;
  font-style: italic;
}

.access-card {
  overflow: hidden;
  border: 1px solid rgba(86, 70, 55, 0.28);
  background: rgba(255, 253, 248, 0.94);
  box-shadow: 0 28px 70px rgba(69, 53, 38, 0.13);
}

.card-heading {
  padding: 36px 40px 30px;
}

.card-heading h2 {
  margin-bottom: 9px;
  color: var(--espresso);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 39px;
  font-weight: 500;
  line-height: 1;
}

.card-heading > p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-block: 1px solid var(--line);
  background: #f0e9df;
}

.tab {
  min-height: 54px;
  padding: 12px 16px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}

.tab + .tab {
  border-left: 1px solid var(--line);
}

.tab:hover {
  background: rgba(255, 253, 248, 0.62);
  color: var(--espresso);
}

.tab.is-active {
  border-bottom-color: var(--gold);
  background: var(--paper);
  color: var(--espresso);
}

.tab-panel {
  padding: 32px 40px 40px;
}

.tab-panel[hidden],
.message[hidden],
.pending-state[hidden] {
  display: none;
}

.field {
  margin-bottom: 19px;
}

.field label {
  display: block;
  margin-bottom: 7px;
  color: var(--espresso);
  font-size: 14px;
  font-weight: 600;
}

.field label span {
  margin-left: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.field input,
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid #a99b8b;
  border-radius: 0;
  background: var(--paper);
  color: var(--espresso);
  font-size: 16px;
  line-height: 1.5;
}

.field textarea {
  min-height: 108px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #7b7066;
  opacity: 1;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--gold-dark);
  outline: 3px solid rgba(157, 116, 74, 0.2);
  outline-offset: 1px;
}

.primary-button,
.secondary-button,
.quiet-button {
  width: 100%;
  min-height: 50px;
  border-radius: 0;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}

.primary-button {
  border: 1px solid var(--espresso);
  background: var(--espresso);
  color: var(--ivory);
}

.primary-button:hover {
  background: var(--espresso-soft);
}

.secondary-button {
  border: 1px solid var(--gold-dark);
  background: transparent;
  color: var(--gold-dark);
}

.secondary-button:hover,
.quiet-button:hover {
  background: #f1e9df;
}

.quiet-button {
  border: 0;
  background: transparent;
  color: var(--espresso);
  text-decoration: underline;
  text-underline-offset: 5px;
}

button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.account-help {
  display: grid;
  gap: 5px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 21px 0;
  color: var(--muted);
  font-size: 12px;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.security-note {
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.message {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid currentColor;
  font-size: 14px;
  line-height: 1.5;
}

.error-message {
  background: #fff4f2;
  color: var(--error);
}

.success-message {
  background: #f0f7f1;
  color: var(--success);
}

.review-intro {
  margin-bottom: 23px;
}

.review-intro h3,
.pending-state h3 {
  margin-bottom: 7px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.15;
}

.review-intro p,
.pending-state p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.inline-audit-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  margin: 0 0 18px;
  color: var(--gold-dark);
  font-size: 14px;
  font-weight: 600;
  text-underline-offset: 5px;
}

.consent-row {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  background: #f5efe7;
  cursor: pointer;
}

.consent-row input {
  width: 19px;
  height: 19px;
  margin: 2px 0 0;
  accent-color: var(--gold-dark);
}

.consent-row span {
  color: #5c534b;
  font-size: 13px;
  line-height: 1.55;
}

.consent-row a {
  color: var(--gold-dark);
  font-weight: 600;
  text-underline-offset: 3px;
}

.pending-state {
  padding: 30px 10px 18px;
  text-align: center;
}

.pending-seal {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold-dark);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 30px;
  font-style: italic;
}

.pending-state p {
  max-width: 370px;
  margin: 0 auto 18px;
}

.site-footer {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid rgba(114, 80, 47, 0.25);
  color: var(--muted);
  font-size: 13px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}

.site-footer a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  text-underline-offset: 4px;
}

.site-footer button {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--gold-dark);
  outline-offset: 3px;
}

@media (max-width: 920px) {
  .access-layout {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .access-intro,
  .access-card {
    width: min(100%, 650px);
    margin-inline: auto;
  }

  .brand-signature {
    display: none;
  }
}

@media (max-width: 640px) {
  .site-header,
  .site-footer,
  .access-layout {
    width: min(100% - 28px, 1240px);
  }

  .site-header {
    min-height: 76px;
  }

  .header-actions .text-link {
    display: none;
  }

  .audit-link {
    padding-inline: 12px;
    font-size: 13px;
  }

  .brand-seal {
    width: 38px;
    height: 38px;
  }

  .brand-wordmark {
    font-size: 24px;
  }

  .access-layout {
    gap: 36px;
    padding-block: 42px 56px;
  }

  h1 {
    font-size: clamp(49px, 16vw, 68px);
  }

  .intro-copy {
    font-size: 18px;
  }

  .capital-rail {
    grid-template-columns: repeat(2, 1fr);
  }

  .new-member-note {
    padding: 21px;
  }

  .card-heading,
  .tab-panel {
    padding-inline: 23px;
  }

  .card-heading {
    padding-block: 28px 24px;
  }

  .tab-panel {
    padding-block: 26px 32px;
  }

  .site-footer {
    display: block;
    padding-block: 24px 34px;
  }

  .site-footer nav {
    margin-top: 12px;
    gap: 0 18px;
  }
}

@media (max-width: 380px) {
  .site-header,
  .site-footer,
  .access-layout {
    width: min(100% - 20px, 1240px);
  }

  .brand-wordmark {
    display: none;
  }

  .tab {
    padding-inline: 10px;
    font-size: 13px;
  }

  .card-heading,
  .tab-panel {
    padding-inline: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
