/* T'Nuchamu Docs — brand tokens from the main app */
:root {
  --terracotta: #a76e5a;
  --terracotta-deep: #905c49;
  --gold: #be9d55;
  --gold-soft: #d4b872;
  --slate: #3b4d61;
  --slate-deep: #2a323d;
  --slate-mid: #546173;
  --text: #3a4e63;
  --text-muted: #5c6b7a;
  --bg: #f3f4f6;
  --bg-warm: #f9f6f3;
  --bg-panel: #fafafa;
  --white: #ffffff;
  --border: rgba(59, 77, 97, 0.12);
  --radius: 0.5rem;
  --header-h: 4.25rem;
  --max: 68rem;
  --font-display: "Oswald", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-serif: "Merriweather", Georgia, serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(ellipse 120% 80% at 100% -10%, rgba(190, 157, 85, 0.16), transparent 55%),
    radial-gradient(ellipse 90% 70% at -5% 20%, rgba(167, 110, 90, 0.12), transparent 50%),
    linear-gradient(180deg, var(--bg-warm) 0%, var(--bg) 45%, var(--bg-warm) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--terracotta);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--terracotta-deep);
}

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(249, 246, 243, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 1px 0 rgba(59, 77, 97, 0.04);
  background: rgba(249, 246, 243, 0.96);
}

.header-inner {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--slate);
}

.brand img {
  height: 2.25rem;
  width: auto;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--slate);
}

.nav {
  display: none;
  align-items: center;
  gap: 1.5rem;
}

.nav a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--slate);
}

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

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 1rem;
  background: var(--gold);
  color: var(--white) !important;
  border-radius: var(--radius);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  transition: background 0.25s ease;
}

.nav-cta:hover {
  background: rgba(190, 157, 85, 0.9);
  color: var(--white) !important;
}

.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.5rem;
  border: none;
  background: transparent;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--slate);
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
  display: none;
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--bg-warm);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.25rem 1.5rem;
  flex-direction: column;
  gap: 0.85rem;
  box-shadow: 0 8px 24px rgba(42, 50, 61, 0.08);
}

.mobile-nav.is-open {
  display: flex;
}

.mobile-nav a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--slate);
  padding: 0.35rem 0;
}

.mobile-nav .nav-cta {
  justify-content: center;
  margin-top: 0.5rem;
}

@media (min-width: 900px) {
  .nav {
    display: flex;
  }

  .menu-toggle {
    display: none;
  }

  .brand img {
    height: 2.5rem;
  }
}

/* —— Layout —— */
main {
  overflow-x: clip;
}

.section {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  padding-block: 4rem;
}

.section + .section {
  border-top: 1px solid var(--border);
}

.section-label {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.75rem;
}

.section h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 3.5vw, 2.35rem);
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--slate);
  margin: 0 0 1rem;
}

.section-lead {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 40rem;
  margin: 0 0 2rem;
}

/* —— Hero (full-bleed visual plane) —— */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: flex-end;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  transform: scale(1.02);
  animation: hero-ken 18s ease-out forwards;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(100deg, rgba(42, 50, 61, 0.88) 0%, rgba(42, 50, 61, 0.72) 42%, rgba(42, 50, 61, 0.35) 70%, rgba(42, 50, 61, 0.2) 100%),
    linear-gradient(0deg, rgba(42, 50, 61, 0.75) 0%, transparent 55%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  padding-block: 4.5rem 5rem;
  max-width: none;
}

.hero-content-inner {
  max-width: 38rem;
}

.hero-brand {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(3.25rem, 10vw, 5.5rem);
  line-height: 0.98;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1.35rem;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: translateY(1.25rem);
  animation: hero-enter 0.8s ease 0.1s forwards;
}

.hero h1 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  line-height: 1.4;
  color: var(--white);
  margin: 0 0 1rem;
  opacity: 0;
  transform: translateY(1.25rem);
  animation: hero-enter 0.8s ease 0.25s forwards;
}

.hero-support {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.88);
  margin: 0 0 2rem;
  max-width: 32rem;
  opacity: 0;
  transform: translateY(1.25rem);
  animation: hero-enter 0.8s ease 0.4s forwards;
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  opacity: 0;
  transform: translateY(1.25rem);
  animation: hero-enter 0.8s ease 0.55s forwards;
}

.hero .btn-secondary {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.85);
}

.hero .btn-secondary:hover {
  background: var(--white);
  color: var(--slate);
  border-color: var(--white);
}

@keyframes hero-ken {
  to {
    transform: scale(1.08);
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.7rem 1.35rem;
  border-radius: var(--radius);
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.btn-primary {
  background: var(--gold);
  color: var(--white);
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
  background: rgba(190, 157, 85, 0.9);
  color: var(--white);
}

.btn-secondary {
  background: transparent;
  color: var(--slate);
  border: 1.5px solid var(--slate);
}

.btn-secondary:hover {
  background: var(--slate);
  color: var(--white);
}

@keyframes hero-enter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* —— Mission —— */
.mission-quote {
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 2.4vw, 1.45rem);
  font-style: italic;
  line-height: 1.55;
  color: var(--slate);
  max-width: 42rem;
  margin: 0 0 1.5rem;
  padding-left: 1.25rem;
  border-left: 3px solid var(--gold);
}

.mission-body {
  max-width: 40rem;
}

.mission-body p {
  margin: 0 0 1.15rem;
}

.mission-pillars {
  display: grid;
  gap: 2rem;
  margin-top: 2.5rem;
}

@media (min-width: 700px) {
  .mission-pillars {
    grid-template-columns: 1fr 1fr;
  }
}

.pillar h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--slate);
  margin: 0 0 0.5rem;
}

.pillar p {
  margin: 0;
  color: var(--text-muted);
}

/* —— How it works —— */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  gap: 0;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.steps li:first-child {
  padding-top: 0;
}

.steps li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.step-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--gold);
  min-width: 2.5rem;
}

.step-num::before {
  content: counter(step, decimal-leading-zero);
}

.steps h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--slate);
  margin: 0 0 0.4rem;
}

.steps p {
  margin: 0;
  color: var(--text-muted);
}

/* —— Features —— */
.features {
  display: grid;
  gap: 2.5rem 2rem;
}

@media (min-width: 700px) {
  .features {
    grid-template-columns: 1fr 1fr;
  }
}

.feature {
  padding-top: 1.25rem;
  border-top: 2px solid var(--terracotta);
}

.feature h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--slate);
  margin: 0 0 0.55rem;
}

.feature p {
  margin: 0;
  color: var(--text-muted);
}

/* —— Name meaning —— */
.name-panel {
  background: linear-gradient(135deg, var(--slate) 0%, var(--slate-deep) 100%);
  color: var(--white);
  border-radius: calc(var(--radius) + 2px);
  padding: clamp(2rem, 4vw, 3rem);
}

.name-panel .section-label {
  color: var(--gold-soft);
}

.name-panel h2 {
  color: var(--white);
}

.name-panel p {
  margin: 0 0 1rem;
  color: rgba(255, 255, 255, 0.88);
  max-width: 40rem;
}

.name-panel p:last-child {
  margin-bottom: 0;
}

.name-hebrew {
  font-family: "Times New Roman", Times, serif;
  font-size: 1.35rem;
  color: var(--gold-soft);
  margin: 0 0 1rem;
}

/* —— Get involved —— */
.involve-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 700px) {
  .involve-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.involve-item h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--slate);
  margin: 0 0 0.5rem;
}

.involve-item p {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

.involve-cta {
  margin-top: 2.5rem;
  padding: 2rem;
  background: rgba(190, 157, 85, 0.12);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.involve-cta p {
  margin: 0 0 1.25rem;
  font-size: 1.1rem;
  color: var(--slate);
}

/* —— Footer —— */
.site-footer {
  background: var(--slate-deep);
  color: rgba(255, 255, 255, 0.78);
  padding: 3rem 0 2rem;
  margin-top: 2rem;
}

.footer-inner {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.footer-brand img {
  height: 2rem;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.footer-brand span {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gold);
}

.site-footer p {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  max-width: 36rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin: 1.5rem 0;
}

.footer-links a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--gold-soft);
}

.footer-links a:hover {
  color: var(--white);
}

.footer-copy {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

/* —— Reveal motion —— */
.reveal {
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* —— API docs —— */
.api-page {
  background: var(--bg-warm);
}

.api-layout {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  padding: 2.5rem 0 4rem;
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 960px) {
  .api-layout {
    grid-template-columns: 14rem 1fr;
    gap: 3rem;
    align-items: start;
  }
}

.api-toc {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  display: none;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1rem 0;
}

@media (min-width: 960px) {
  .api-toc {
    display: flex;
  }
}

.api-toc a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--slate-mid);
}

.api-toc a:hover {
  color: var(--terracotta);
}

.api-intro h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.85rem, 3.5vw, 2.5rem);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--slate);
  margin: 0 0 1rem;
}

.api-intro p {
  margin: 0 0 1rem;
  color: var(--text-muted);
  max-width: 42rem;
}

.api-base {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.95rem;
  background: var(--slate);
  color: var(--gold-soft);
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius);
  margin: 0.5rem 0 1.5rem;
}

.api-subhead {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--slate);
  margin: 1.75rem 0 0.75rem;
}

.code-block {
  margin: 0 0 1.25rem;
  padding: 1rem 1.15rem;
  overflow-x: auto;
  background: var(--slate-deep);
  color: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.55;
}

.code-block code {
  font-family: inherit;
  white-space: pre;
}

.field-table-wrap {
  overflow-x: auto;
  margin: 0 0 1.25rem;
}

.field-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.field-table th,
.field-table td {
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.field-table th {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--slate-mid);
}

.field-table td code {
  font-size: 0.85rem;
  color: var(--slate);
}

.api-group .endpoint-desc {
  margin-bottom: 1rem;
}

.api-group {
  margin-top: 2.75rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.api-group h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--slate);
  margin: 0 0 0.5rem;
}

.api-group > p {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
}

.endpoint {
  display: grid;
  gap: 0.35rem 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}

@media (min-width: 700px) {
  .endpoint {
    grid-template-columns: 5.5rem 1fr;
    align-items: baseline;
  }
}

.endpoint:last-child {
  border-bottom: none;
}

.method {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--terracotta);
}

.method.get {
  color: #3d7a5f;
}

.method.post {
  color: var(--terracotta);
}

.method.patch,
.method.put {
  color: #8a6d2f;
}

.method.delete {
  color: #a04848;
}

.endpoint-path {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9rem;
  color: var(--slate);
  word-break: break-all;
}

.endpoint-desc {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

@media (min-width: 700px) {
  .endpoint-desc {
    grid-column: 2;
  }
}

.api-note {
  margin-top: 2.5rem;
  padding: 1.25rem 1.5rem;
  border-left: 3px solid var(--gold);
  background: rgba(190, 157, 85, 0.1);
  color: var(--slate);
}

.api-note p {
  margin: 0;
}

.docs-hero-mini {
  background: linear-gradient(135deg, var(--slate) 0%, var(--slate-deep) 100%);
  color: var(--white);
  padding: 3rem 0 2.5rem;
}

.docs-hero-mini-inner {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.docs-hero-mini .section-label {
  color: var(--gold-soft);
}

.docs-hero-mini h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.85rem, 3.5vw, 2.5rem);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--white);
  margin: 0 0 0.75rem;
}

.docs-hero-mini p {
  margin: 0;
  max-width: 36rem;
  color: rgba(255, 255, 255, 0.85);
}

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

  .hero-brand,
  .hero h1,
  .hero-support,
  .cta-group,
  .hero-media img,
  .reveal {
    opacity: 1;
    transform: none;
    animation: none;
    transition: none;
  }
}
