:root {
  color-scheme: light;
  --bg: #f7f5ef;
  --surface: #ffffff;
  --surface-muted: #eef3f0;
  --text: #18231f;
  --muted: #5f6f68;
  --line: #d8dfd9;
  --accent: #23443c;
  --accent-2: #946b2d;
  --accent-soft: #dfeae4;
  --danger: #8a3a2f;
  --shadow: 0 20px 45px rgba(24, 35, 31, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 56px);
  background: rgba(247, 245, 239, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
  color: var(--muted);
  font-size: 0.95rem;
}

.top-nav a {
  text-decoration: none;
}

.top-nav a:hover {
  color: var(--text);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.55fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  min-height: calc(100svh - 68px);
  padding: clamp(36px, 8vw, 96px) clamp(18px, 6vw, 84px);
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 900px;
  font-size: clamp(2.4rem, 7vw, 5.4rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 10px;
  font-size: 1.15rem;
}

.hero-copy > p:not(.eyebrow),
.section-heading > p:not(.eyebrow) {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
}

.button.primary {
  background: var(--accent);
  color: #fff;
}

.button.secondary {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
}

.button:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(148, 107, 45, 0.45);
  outline-offset: 3px;
}

.hero-panel,
.access-card,
.access-panel,
.contact-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: clamp(20px, 4vw, 32px);
}

.panel-label {
  display: block;
  margin-bottom: 14px;
  color: var(--accent-2);
  font-weight: 700;
}

.hero-panel ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 20px;
}

.section {
  padding: clamp(44px, 8vw, 90px) clamp(18px, 6vw, 84px);
}

.section.muted {
  background: var(--surface-muted);
}

.section-heading {
  margin-bottom: 28px;
}

.text-grid,
.module-grid,
.access-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.text-grid article,
.module-card {
  padding: 22px;
  border-top: 1px solid var(--line);
}

.text-grid p,
.module-card p,
.access-card p {
  color: var(--muted);
}

.module-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.module-card {
  min-height: 190px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(216, 223, 217, 0.9);
  border-radius: 8px;
}

.module-card span {
  display: block;
  margin-bottom: 24px;
  color: var(--accent-2);
  font-weight: 700;
}

.access-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.access-card {
  padding: 24px;
}

.access-panel {
  margin-top: 18px;
  padding: 22px;
}

.private-section {
  background: #fbfcfa;
  border-top: 1px solid var(--line);
}

.private-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.private-card {
  display: grid;
  align-content: start;
  gap: 18px;
  min-height: 210px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.private-card.locked {
  background: #f4f1ea;
}

.private-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.private-card-head h3 {
  margin-bottom: 0;
}

.private-card-head span {
  flex: 0 0 auto;
  max-width: 44%;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}

.private-card p {
  margin: 0;
  color: var(--muted);
}

.private-card .button {
  align-self: end;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.hidden {
  display: none !important;
}

.stacked-form,
.contact-form {
  display: grid;
  gap: 16px;
}

.auth-mode-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.auth-panel-forms {
  display: grid;
  gap: 18px;
}

#memberPanel[data-mode="login"] [data-register-form],
#memberPanel[data-mode="register"] [data-login-form] {
  display: none;
}

.contact-form {
  max-width: 720px;
  padding: 24px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  padding: 12px 13px;
}

textarea {
  resize: vertical;
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.form-status {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.form-status[data-tone="success"] {
  color: var(--accent);
}

.form-status[data-tone="warning"] {
  color: var(--danger);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 26px clamp(18px, 6vw, 84px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

@media (max-width: 920px) {
  .hero,
  .text-grid,
  .module-grid,
  .access-grid,
  .private-grid {
    grid-template-columns: 1fr;
  }

  .hero,
  .private-card {
    min-height: auto;
  }

  .module-card {
    min-height: auto;
  }
}

@media (max-width: 680px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .top-nav {
    justify-content: flex-start;
    width: 100%;
  }

  .top-nav a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .hero-panel,
  .access-card,
  .access-panel,
  .private-card,
  .contact-form {
    box-shadow: none;
  }

  .private-card-head {
    display: grid;
  }

  .private-card-head span {
    max-width: 100%;
    justify-self: start;
  }
}
