/* Al-kimi — base styles
   ============================================================
   PALETTE (locked)
   Ground:       #F5F1E8
   Ink:          #2C1810
   Burgundy:     #6B1D36   — CTA / primary action
   Gold:         #C9A882   — dark-background accent only (fails AA on ground)
   Deep Indigo:  #2E4057   — secondary action / links / cool counterpoint
   Deep Ochre:   #8B6914   — highlight text on light ground (gold-family,
                              usable where Gold isn't; passes AA but with
                              little margin — prefer 18px+/bold contexts)

   TYPOGRAPHY (locked)
   Display:  Fraunces        — headings, hero lockup
   Body:     Source Serif 4  — paragraph text
   Arabic:   Markazi Text    — every [lang="ar"] element, site-wide
   Mono:     JetBrains Mono  — small technical accents only (figures,
                                dates, footer copyright) — NOT primary body
   ============================================================
   NOTE: the octagram tile (al-kimi-tile.py) runs its own independent
   palette keyed off the ground color. It is intentionally NOT unified
   with the UI palette above — see design-review history.
*/

:root {
  --ground: #F5F1E8;
  --ink: #2C1810;
  --burgundy: #6B1D36;
  --gold: #C9A882;
  --indigo: #2E4057;
  --ochre: #8B6914;
  --rule: rgba(44, 24, 16, 0.15);

  --display: "Fraunces", Georgia, serif;
  --body: "Source Serif 4", Georgia, serif;
  --arabic: "Markazi Text", serif;
  --mono: "JetBrains Mono", "Courier New", monospace;

  /* Spacing scale — 8px base with a 4px half-step. Every padding/margin/
     gap in this file should reference one of these rather than a raw
     px value, so vertical rhythm stays consistent as the site grows. */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;
  --space-9: 48px;
  --space-10: 64px;
  --space-11: 96px;

  /* Corner radius — square by design, echoing the octagram tile's
     angular geometry rather than defaulting to soft rounded corners. */
  --radius: 0;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  background-color: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
  position: relative;
  z-index: 0;
}

main::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(to bottom, transparent 0%, rgba(245, 241, 232, 0.5) 100%),
    url("/images/tile.svg");
  background-repeat: no-repeat, repeat;
  background-size: 100% 100%, 144.8528px 144.8528px;
}

/* Arabic — site-wide fix: every [lang="ar"] element now gets Markazi
   Text explicitly, rather than falling back to whatever Arabic font
   the visitor's OS happens to have installed. */
[lang="ar"] {
  font-family: var(--arabic);
}

main {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-7) 0 var(--space-11);
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 500;
  margin: 0 0 0.5em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

.page-kicker {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 var(--space-5);
}

a { color: var(--indigo); transition: color 120ms ease; }
a:hover, a:focus-visible { color: var(--burgundy); }

/* Every top-level content block is its own opaque "card" floating over
   the tile, with a gap between cards so the pattern shows through in
   the space between content — not one continuous solid column. */
main > section {
  background: var(--ground);
  padding: var(--space-7) var(--space-6);
  margin-bottom: var(--space-7);
}

main > section:last-child {
  margin-bottom: 0;
}

/* The hero lockup lives outside the opaque-card system on purpose — a
   plain div (not a section), so it isn't caught by the rule above and
   sits directly on the tile like a mark/logo rather than inside a card. */
.hero-mark {
  padding: 0 var(--space-6);
  margin-bottom: var(--space-7);
}

/* Same technique as .hero-mark: a plain div (not a section), so it sits
   outside the opaque-card system and floats directly on the tile. Used
   for the page title on About/Portfolio/Consulting instead of nesting it
   inside the first content card. */
.page-title-wrap {
  padding: 0 var(--space-6);
  margin-bottom: var(--space-7);
}

.page-title-wrap .page-kicker {
  margin: 0;
}

/* ============================================================
   COMPONENTS
   Buttons: .btn (base) + .btn-primary / .btn-secondary modifiers.
   Every interactive element shares one transition timing and one
   focus-ring treatment so hover/focus feels consistent site-wide.
   ============================================================ */

.btn {
  display: inline-block;
  font-family: var(--body);
  font-weight: 600;
  font-size: 1rem;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.btn-primary {
  background: var(--burgundy);
  color: var(--ground);
  border-color: var(--burgundy);
}

.btn-primary:hover:not(:disabled),
.btn-primary:focus-visible:not(:disabled) {
  background: var(--ink);
  border-color: var(--ink);
}

.btn-secondary {
  background: transparent;
  color: var(--indigo);
  border-color: var(--indigo);
}

.btn-secondary:hover:not(:disabled),
.btn-secondary:focus-visible:not(:disabled) {
  background: var(--indigo);
  color: var(--ground);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  width: 100%;
  background: rgba(245, 241, 232, 0.82);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}

.site-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-7);
  gap: var(--space-4);
  flex-wrap: wrap;
}

.site-header-mark {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--ink);
  text-decoration: none;
}

.site-header-mark [lang="ar"] {
  font-weight: 600;
  font-size: 1.6rem; /* 1.1rem x 1.45 — same ratio as the hero lockup */
  color: var(--burgundy);
}

.site-nav {
  display: flex;
  gap: var(--space-5);
}

.site-nav a {
  color: var(--burgundy);
  text-decoration: none;
  font-size: 1.15rem;
  font-weight: 400;
  transition: font-weight 120ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  font-weight: 600;
}

/* Hero */

.hero-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: 2.75rem;
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: var(--space-5);
  flex-wrap: wrap;
}

.hero-title-ar {
  color: var(--burgundy);
  font-weight: 600;
  font-size: 3.625rem; /* 58px — Fraunces stays at 2.75rem/44px */
}

.hero-gloss {
  max-width: 46ch;
  color: var(--ink);
  font-style: italic;
  margin: 0;
}

/* Intro */

.intro {
  box-shadow: 0 1px 3px rgba(44, 24, 16, 0.12);
}

.intro p {
  max-width: 65ch;
}

.intro p:last-child {
  margin: 0;
}

/* Routing cards */

/* Home page hero: full-bleed image with the wordmark and gloss overlaid
   on its left side (the image's own composition leaves that area open).
   A real <img> (rather than a CSS background) so the mobile breakpoint
   can restack it as normal in-flow content instead of just cropping a
   background-image, which is what previously made it unreadable on
   small screens. */
.home-hero {
  position: relative;
  overflow: hidden;
  padding: 0;
  margin-bottom: var(--space-7);
  background: none;
}

.home-hero-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1672 / 941;
  object-fit: cover;
  object-position: left center;
  position: relative;
  z-index: 1;
}

.home-hero-overlay {
  position: absolute;
  z-index: 2;
  top: 14%;
  left: 0;
  padding: 0 var(--space-8);
  max-width: 480px;
}

.home-hero-overlay .hero-title {
  margin: 0 0 var(--space-4);
}

.home-hero-overlay .hero-gloss {
  margin: 0;
}

.home-hero-overlay .hero-gloss em {
  background: rgba(245, 241, 232, 0.72);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  padding: 0.15em 0.4em;
  line-height: 1.8;
}

.hero-gloss-definition {
  color: var(--indigo);
}

.home-hero-overlay .hero-title-en,
.home-hero-overlay .hero-title-ar {
  background: rgba(245, 241, 232, 0.72);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  padding: 0.05em 0.3em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.home-hero-overlay .hero-origin {
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-2);
  margin: var(--space-3) 0 0;
  background: rgba(245, 241, 232, 0.72);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  padding: 0.15em 0.5em;
}

@media (max-width: 700px) {
  .home-hero {
    display: flex;
    flex-direction: column;
  }
  .home-hero-overlay {
    position: static;
    order: -1;
    max-width: 100%;
    padding: var(--space-6);
    background: none;
  }
  .home-hero-img {
    aspect-ratio: 4 / 3;
    object-position: 30% center;
  }
  .home-hero-overlay .hero-title {
    gap: var(--space-2);
  }
}

.route-card-cta {
  margin: var(--space-3) 0 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--indigo);
  transition: color 120ms ease;
}

.intro-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.intro-text {
  flex: 1 1 420px;
}

.intro-btn-col {
  flex: 0 0 320px;
  display: flex;
  justify-content: center;
}

.intro-btn {
  flex: 0 0 auto;
}

.route-card-arrow {
  display: inline-block;
  transition: transform 120ms ease;
}

a:hover .route-card-arrow {
  transform: translate(2px, -2px);
}

.route-card:hover .route-card-cta {
  color: var(--burgundy);
}

.route-card:hover .route-card-arrow {
  transform: translate(2px, -2px);
}

.route-card .icon-bg,
.route-card .icon-dot {
  transition: fill 120ms ease;
}

.route-card:hover .icon-bg {
  fill: var(--burgundy);
}

.route-card:hover .icon-dot {
  fill: var(--ochre);
}

.routes {
  background: transparent;
  padding: 0;
  margin-bottom: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

@media (max-width: 900px) {
  .routes {
    grid-template-columns: 1fr;
    gap: var(--space-7);
  }
}

.route-card {
  display: block;
  padding: var(--space-7) var(--space-6);
  background: var(--ground);
  box-shadow: 0 1px 3px rgba(44, 24, 16, 0.12);
  text-decoration: none;
  color: inherit;
}

.route-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.route-card-icon {
  flex-shrink: 0;
  width: 1.3rem;
  height: 1.3rem;
}

.route-card-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.route-card-title {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 500;
  margin: 0;
  line-height: 1;
  color: var(--ink);
  transition: color 120ms ease;
}

.route-card:hover .route-card-title,
.route-card:focus-visible .route-card-title {
  color: var(--burgundy);
}

.route-card-text {
  margin: 0;
  color: var(--ink);
  font-size: 0.95rem;
  max-width: 55ch;
}

/* Prose (Consulting, general markdown content) */

.prose p {
  max-width: 65ch;
}

.prose .btn {
  margin: 0 0 var(--space-2);
}

.prose h2 {
  margin-top: 2em;
  border-top: 1px solid var(--rule);
  padding-top: 1em;
}
.prose h2:first-child {
  margin-top: 0;
  border-top: none;
  padding-top: 0;
}

/* Consulting prose hero */

.prose {
  box-shadow: 0 1px 3px rgba(44, 24, 16, 0.12);
}

.prose-hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: var(--space-7);
  align-items: center;
}

.prose-hero .prose-hero-btn {
  display: block;
  width: fit-content;
  margin: var(--space-7) auto 0;
}

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

.prose-hero-image {
  max-width: 320px;
  margin: 0 auto;
}

/* Jump nav */

.jump-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-5);
  padding: 0 var(--space-6);
  margin-bottom: var(--space-7);
}

.jump-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--indigo);
  text-decoration: none;
}

.jump-nav a:hover,
.jump-nav a:focus-visible {
  color: var(--burgundy);
}

.jump-arrow {
  display: inline-block;
}

.back-to-top {
  text-align: center;
  margin: 0;
}

.back-to-top a {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--indigo);
  text-decoration: none;
}

.back-to-top a:hover,
.back-to-top a:focus-visible {
  color: var(--burgundy);
}

/* Offer cards (Consulting / Advisory) side by side */

.offer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  background: none;
  padding: 0;
}

.offer-card {
  background: var(--ground);
  box-shadow: 0 1px 3px rgba(44, 24, 16, 0.12);
  padding: var(--space-7) var(--space-6);
  text-align: center;
}

.offer-card p {
  max-width: 65ch;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.offer-card-btn {
  display: block;
  width: fit-content;
  margin: var(--space-4) auto 0;
}

.advisory-img {
  display: block;
  max-width: 260px;
  width: 100%;
  height: auto;
  margin: var(--space-4) auto;
}

/* Background + Expertise: single card, two columns, delineated the
   same way the verse quote is delineated on About (left border rule). */

.bg-expertise-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-7);
  align-items: start;
}

.bg-expertise-expertise {
  border-left: 3px solid var(--burgundy);
  padding-left: 20px;
}

/* Good Fit + CTA: two separate cards side by side */

.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  background: none;
  padding: 0;
}

.split-card {
  background: var(--ground);
  box-shadow: 0 1px 3px rgba(44, 24, 16, 0.12);
  padding: var(--space-7) var(--space-6);
}

/* Anchor targets: offset for the sticky header so jumped-to headings
   aren't hidden underneath it. */
#top,
#consulting,
#advisory,
#background,
#expertise,
#good-fit,
#cta {
  scroll-margin-top: 100px;
}

@media (max-width: 700px) {
  .prose-hero-grid {
    grid-template-columns: 1fr;
  }
  .prose-hero-image {
    max-width: 260px;
  }
  .offer-grid {
    grid-template-columns: 1fr;
  }
  .bg-expertise-grid {
    grid-template-columns: 1fr;
  }
  .bg-expertise-expertise {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--rule);
    padding-top: var(--space-6);
    margin-top: var(--space-6);
  }
  .split-grid {
    grid-template-columns: 1fr;
  }
}

/* Etymology / About */

.etymology {
  box-shadow: 0 1px 3px rgba(44, 24, 16, 0.12);
}

.etymology-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-7);
  align-items: center;
}

.etymology-text-col .verse-text {
  margin-top: var(--space-5);
}

.values-block {
  margin-top: var(--space-8);
  padding-top: var(--space-7);
  border-top: 1px solid var(--rule);
}

@media (max-width: 640px) {
  .etymology-grid {
    grid-template-columns: 1fr;
  }
}

.etymology-word {
  font-family: var(--display);
  font-weight: 500;
  font-size: 2rem;
  margin: 0 0 var(--space-1);
}

.etymology-pron {
  font-style: italic;
  color: var(--ink);
  margin: 0 0 var(--space-3);
}

.etymology-gloss {
  max-width: 50ch;
  margin: 0 0 var(--space-4);
}

.etymology-origin {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  font-size: 0.9rem;
  color: var(--ink);
}

.etymology-origin [lang="ar"] {
  color: var(--burgundy);
  font-size: 1.3rem;
}

.manuscript-img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto var(--space-3);
}

.manuscript-caption {
  font-family: var(--body);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--ink);
  text-align: center;
  margin: 0;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.value {
  text-align: center;
}

.value-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto var(--space-3);
}

.value-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.value-name {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.15rem;
  margin: 0 0 var(--space-1);
}

.value-line {
  margin: 0;
  color: var(--ink);
}

.verse-text {
  margin: 0 0 var(--space-5);
  border-left: 3px solid var(--burgundy);
  padding-left: 20px;
}

.verse-text-below {
  margin: var(--space-8) 0 0;
  width: 100%;
  max-width: none;
  text-align: center;
  border-left: 3px solid var(--indigo);
  padding-left: 24px;
}

.verse-text p {
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.6;
}

.verse-text cite {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--indigo);
  font-style: normal;
}

/* Portfolio */

.portfolio-group-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.6rem;
  margin: 0 0 var(--space-4);
}

.portfolio-group-note {
  font-style: italic;
  color: var(--ink);
  margin: 0 0 var(--space-5);
}

.venture-grid {
  display: grid;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.portfolio-section {
  box-shadow: 0 1px 3px rgba(44, 24, 16, 0.12);
}

.portfolio-section .portfolio-group-label-wrap {
  padding: 0;
}

.portfolio-section .venture-grid {
  margin-bottom: 0;
}

.venture-collab {
  display: inline-block;
  margin: var(--space-3) 0 0;
  padding: 0.4em 0.9em;
  background: var(--burgundy);
  color: var(--ground);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius);
}

.venture.venture-launched {
  background: none;
  box-shadow: none;
  padding: 0;
}

.venture-grid-2col {
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-7);
}

.venture-grid-3col {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
  .venture-grid-2col,
  .venture-grid-3col {
    grid-template-columns: 1fr;
  }
  .venture-grid-2col .venture-launched:not(:first-child) {
    border-top: 1px solid var(--rule);
    padding-top: var(--space-7);
  }
}

.venture {
  background: var(--ground);
  box-shadow: 0 1px 3px rgba(44, 24, 16, 0.12);
  padding: var(--space-5);
}

.venture.venture-incubating {
  box-shadow: none;
}

.venture-image {
  display: block;
  width: 240px;
  height: 240px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--rule);
  margin: 0 auto var(--space-5);
}

.venture-name {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.1rem;
  margin: 0 0 var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 3px solid var(--rule);
}

.venture-launched .venture-name {
  border-bottom-color: var(--indigo);
}

.venture-incubating .venture-name {
  border-bottom-color: var(--ochre);
}

.venture-description,
.venture-link {
  margin: 0 0 var(--space-1);
  color: var(--ink);
}

.venture-redacted .venture-name {
  font-style: italic;
  font-weight: 500;
  color: var(--ochre);
}

.portfolio-group-label-wrap {
  padding: 0 var(--space-6);
  margin-bottom: var(--space-4);
}

.portfolio-group-label-wrap .portfolio-group-title {
  margin-bottom: var(--space-2);
}

.portfolio-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  background: var(--burgundy);
  padding: var(--space-7) var(--space-7);
}

.portfolio-cta-text {
  flex: 1 1 360px;
}

.portfolio-cta h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.6rem;
  color: var(--ground);
  margin: 0 0 var(--space-2);
}

.portfolio-cta p {
  font-style: italic;
  color: var(--ground);
  margin: 0;
}

.portfolio-cta .btn {
  flex: 0 0 auto;
}

.portfolio-cta .btn-primary {
  background: var(--ground);
  color: var(--indigo);
  border-color: var(--ground);
}

.portfolio-cta .btn-primary:hover:not(:disabled),
.portfolio-cta .btn-primary:focus-visible:not(:disabled) {
  background: var(--indigo);
  color: var(--ground);
  border-color: var(--indigo);
}

/* Consulting: expertise / good-fit sections */

.expertise-list {
  color: var(--ink);
  line-height: 1.8;
}

.good-fit ul {
  padding-left: 1.2em;
  margin: 0 0 var(--space-4);
}

.good-fit li {
  margin-bottom: 8px;
}

.not-fit {
  color: var(--ink);
  font-size: 0.95rem;
}

/* Contact form */

.contact-section {
  box-shadow: 0 1px 3px rgba(44, 24, 16, 0.12);
}

.contact-intro p {
  max-width: 65ch;
  margin: 0 0 var(--space-6);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  max-width: 480px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  color: var(--ink);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  font-family: var(--body);
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  transition: border-color 120ms ease;
}

.field input:hover,
.field textarea:hover,
.field select:hover {
  border-color: var(--indigo);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: 2px solid var(--indigo);
  outline-offset: 1px;
}

/* Honeypot field — hidden from sighted users via off-screen positioning
   rather than display:none/visibility:hidden, since unsophisticated bots
   often skip fields hidden that way but still fill in off-screen ones. */
.field-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form button[type="submit"] {
  align-self: flex-start;
}

.form-status {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink);
}

/* Footer */

.site-footer {
  width: 100%;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.85rem;
  border-top: 1px solid var(--rule);
}

.site-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-7) var(--space-7) var(--space-9);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.site-footer-copyright {
  margin: 0;
}

.site-footer-sitemap {
  display: flex;
  gap: var(--space-5);
  flex-wrap: wrap;
}

/* Accessibility */

a:focus-visible,
.route-card:focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2.1rem; }
  .etymology-word { font-size: 1.6rem; }
  .values-grid { grid-template-columns: 1fr; gap: var(--space-5); }
  .site-nav { gap: var(--space-3); }
  .site-nav a { font-size: 0.95rem; }
}
