/* DysnomiaAI — editorial corporate presence */

:root {
  --bg: #f4f1eb;
  --bg-alt: #ebe6dd;
  --text: #141414;
  --text-muted: #4a4a4a;
  --rule: #c8c0b4;
  --accent: #8b3a2a;
  --focus: #141414;
  --font-display: "Newsreader", "Georgia", serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --max-width: 40rem;
  --wide-width: 56rem;
  --nav-height: 3.75rem;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

ul {
  list-style: none;
}

/* ── Layout ── */

.page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.container {
  width: min(100% - 2.5rem, var(--max-width));
  margin-inline: auto;
}

.container--wide {
  width: min(100% - 2.5rem, var(--wide-width));
}

.rule {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 0;
}

/* ── Header ── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-height);
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  width: min(100% - 2.5rem, var(--wide-width));
  margin-inline: auto;
}

.wordmark {
  font-size: 0.9375rem;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand {
  display: inline-flex;
  align-items: baseline;
}

.brand__dysnomia {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.brand__ai {
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.brand--display {
  font-size: clamp(1.625rem, 3.5vw, 2.25rem);
}

.brand--display .brand__dysnomia {
  font-weight: 500;
}

.brand--footer {
  font-size: 0.875rem;
}

.site-nav {
  display: flex;
  gap: 2rem;
}

.site-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--text-muted);
  transition: color 0.15s;
}

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

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--rule);
  padding: 0.4rem 0.6rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  color: var(--text);
}

/* ── Sections ── */

.section {
  padding-block: clamp(3.5rem, 8vw, 5.5rem);
}

.section--hero {
  padding-block: clamp(4rem, 12vw, 8rem) clamp(3.5rem, 8vw, 5.5rem);
}

.section--compact {
  padding-block: clamp(2.5rem, 6vw, 4rem);
}

.section__label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* ── Hero ── */

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.02em;
  max-width: 18ch;
  margin-bottom: 1.75rem;
}

.hero__lead {
  font-size: clamp(1.0625rem, 2vw, 1.1875rem);
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 38ch;
}

.hero__link {
  display: inline-block;
  margin-top: 2.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  color: var(--text);
}

.hero__link:hover {
  color: var(--accent);
}

/* ── Typography blocks ── */

.prose h2,
.prose-heading {
  font-family: var(--font-display);
  font-size: clamp(1.625rem, 3.5vw, 2.25rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin-bottom: 1.75rem;
}

.prose h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

.prose p {
  margin-bottom: 1.25rem;
  max-width: 38rem;
}

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

.prose--wide p {
  max-width: 42rem;
}

/* ── Perspective questions ── */

.question-list {
  margin: 2rem 0 2.5rem;
  padding-left: 0;
}

.question-list li {
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 2.5vw, 1.375rem);
  font-weight: 400;
  line-height: 1.45;
  color: var(--text);
  padding-block: 0.65rem;
  border-bottom: 1px solid var(--rule);
}

.question-list li:first-child {
  border-top: 1px solid var(--rule);
}

/* ── Principles ── */

.principles {
  display: grid;
  gap: 0;
}

.principle {
  padding-block: 2.25rem;
  border-bottom: 1px solid var(--rule);
}

.principle:first-child {
  border-top: 1px solid var(--rule);
}

.principle h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 0.875rem;
}

.principle p {
  color: var(--text-muted);
  max-width: 38rem;
  margin: 0 0 0.875rem;
}

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

/* ── Company block ── */

.company-block {
  margin-top: 1.75rem;
}

.company-block p {
  margin-bottom: 0;
  line-height: 1.75;
}

.company-block a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.company-block a:hover {
  color: var(--accent);
}

.company-block__phone {
  margin-top: 1rem;
}

/* ── Footer ── */

.site-footer {
  margin-top: auto;
  padding-block: 2.5rem 2rem;
  background: var(--bg-alt);
  border-top: 1px solid var(--rule);
}

.site-footer__inner {
  width: min(100% - 2.5rem, var(--wide-width));
  margin-inline: auto;
  display: grid;
  gap: 2rem;
}

.site-footer__brand {
  font-size: 0.875rem;
}

.site-footer__details {
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--text-muted);
}

.site-footer__details a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2rem;
}

.site-footer__nav a {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--text-muted);
}

.site-footer__nav a:hover {
  color: var(--text);
}

.site-footer__copy {
  font-size: 0.8125rem;
  color: var(--text-muted);
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

/* ── 404 ── */

.error-page {
  flex: 1;
  display: flex;
  align-items: center;
  padding-block: 4rem;
}

.error-page h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 500;
  margin-bottom: 1rem;
}

.error-page p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.error-page a {
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* ── Load transition ── */

@media (prefers-reduced-motion: no-preference) {
  body {
    animation: page-in 0.4s ease;
  }
}

@keyframes page-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── Mobile ── */

@media (max-width: 640px) {
  .site-nav {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 1rem 1.25rem 1.25rem;
    background: var(--bg);
    border-bottom: 1px solid var(--rule);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    padding-block: 0.75rem;
    border-bottom: 1px solid var(--rule);
  }

  .site-nav a:last-child {
    border-bottom: none;
  }

  .nav-toggle {
    display: block;
  }

  .site-header {
    position: relative;
  }
}

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

  body {
    animation: none;
  }
}
