/* ============================================================
   Horizon Search — horizonsearch.com
   Identity: deep green-black, daylight, warm stone.
   Tokens live here; page copy lives in the HTML.
   ============================================================ */

/* ---------- Fonts (self-hosted, OFL — licenses in /assets/fonts/) */
@font-face {
  font-family: "Bodoni Moda";
  src: url("/assets/fonts/bodoni-moda-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/source-sans-3-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/source-sans-3-latin-400-italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/source-sans-3-latin-600-normal.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}

/* ---------- Tokens */
:root {
  --forest: #172825;        /* main dark field */
  --forest-deep: #11201c;   /* footer, dark hovers */
  --warm-white: #f6f3ed;    /* light reading surface, text on dark */
  --charcoal: #20211e;      /* body text on light */
  --stone: #d6c6ae;         /* occasional supporting tone */
  --paper: #fcfaf5;         /* document sheet */
  --band: #efe9dd;          /* document section field */
  --muted: #565b54;         /* secondary text on light */
  --on-dark-muted: rgba(246, 243, 237, 0.78);
  --line: rgba(32, 33, 30, 0.18);
  --line-on-dark: rgba(246, 243, 237, 0.22);
  --link: #244b41;          /* interactive green, light surfaces */

  --serif: "Bodoni Moda", "Didot", "Bodoni MT", serif;
  --sans: "Source Sans 3", "Source Sans Pro", system-ui, sans-serif;

  --container: 1120px;
  --gutter: clamp(20px, 4vw, 32px);
  --radius: 2px;
}

/* ---------- Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.125rem;            /* 18px desktop */
  line-height: 1.65;
  color: var(--charcoal);
  background: var(--warm-white);
}
@media (max-width: 719px) {
  body { font-size: 1.0625rem; }  /* 17px phones */
}
h1, h2, h3, p, dl, dd, figure { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
ul { margin: 0; padding: 0; list-style: none; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
main a:not(.btn):hover { color: var(--link); }
:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
  border-radius: var(--radius);
}
.on-dark :focus-visible, .site-header :focus-visible, .site-footer :focus-visible {
  outline-color: var(--warm-white);
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute; left: var(--gutter); top: -100px;
  background: var(--warm-white); color: var(--charcoal);
  padding: 10px 16px; z-index: 50; border-radius: var(--radius);
}
.skip-link:focus { top: 12px; }

/* Section headings: quiet sans, not display serif */
.section-h {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.375rem;
  line-height: 1.3;
  letter-spacing: 0;
}

/* Display serif — reserved for a small number of moments */
.display {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: 0.005em;
}

/* ---------- Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 10px 26px;
  font: 600 1rem/1.2 var(--sans);
  text-decoration: none;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}
.btn-light { background: var(--warm-white); color: var(--forest); }
.btn-light:hover { background: #ffffff; }
.btn-forest { background: var(--forest); color: var(--warm-white); }
.btn-forest:hover { background: var(--forest-deep); }
.btn-outline-light { border-color: rgba(246,243,237,0.7); color: var(--warm-white); }
.btn-outline-light:hover { border-color: var(--warm-white); background: rgba(246,243,237,0.1); }

/* ---------- Header */
.site-header {
  position: absolute; inset: 0 auto auto 0; width: 100%;
  z-index: 10;
  color: var(--warm-white);
}
.site-header.solid { position: static; background: var(--forest); }
.header-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  padding-block: 20px;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none; color: inherit;
}
.brand img { width: 30px; height: 30px; }
.brand .wordmark {
  font-family: var(--serif);
  font-size: 1.3125rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.site-nav ul { display: flex; align-items: center; gap: clamp(20px, 3vw, 36px); }
.site-nav a {
  font-size: 0.9375rem;
  text-decoration: none;
  color: var(--on-dark-muted);
  padding-block: 10px;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--warm-white); }
.site-nav .nav-cta {
  color: var(--warm-white);
  font-weight: 600;
}
.site-nav .nav-cta:hover { text-decoration: underline; text-underline-offset: 4px; }

.nav-close { display: none; }
.nav-toggle {
  display: none;
  background: none; border: 1px solid rgba(246,243,237,0.55);
  border-radius: var(--radius);
  color: var(--warm-white);
  font: 600 0.9375rem var(--sans);
  padding: 9px 16px;
  min-height: 44px;
  cursor: pointer;
}
@media (max-width: 859px) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .site-nav {
    display: none;
    position: fixed; inset: 0;
    background: var(--forest);
    z-index: 40;
    padding: 96px var(--gutter) 40px;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: flex-start; gap: 8px; }
  .site-nav a { font-size: 1.375rem; padding-block: 12px; }
  .site-nav .nav-cta { margin-top: 8px; }
  .site-nav.open .nav-close {
    display: inline-flex;
    position: absolute; top: 20px; right: var(--gutter);
  }
  body.nav-open { overflow: hidden; }
}

/* ---------- Hero (homepage) */
.hero {
  position: relative;
  background: var(--forest);
  color: var(--warm-white);
}
.hero-media { position: absolute; inset: 0; overflow: hidden; }
.hero-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 42% 64%;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(auto, 30rem);
  min-height: 600px;
  padding-top: 96px;
  padding-bottom: 72px;
  align-items: center;
}
.hero-copy { grid-column: 2; }
.hero-copy h1 {
  font-size: clamp(2.375rem, 3.4vw, 3.125rem);
  line-height: 1.12;
  margin-bottom: 20px;
  text-wrap: balance;
}
.hero-copy p {
  font-size: 1.125rem;
  color: var(--on-dark-muted);
  max-width: 28rem;
  margin-bottom: 32px;
}
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: hero-in 600ms ease-out both; }
  .hero-copy > p { animation-delay: 80ms; }
  .hero-copy > .btn { animation-delay: 140ms; }
  @keyframes hero-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
  }
}
@media (max-width: 1023px) {
  /* below full desktop, the header sits on a solid bar instead of the artwork */
  .site-header { position: static; background: var(--forest); }
}
@media (max-width: 1023px) and (min-width: 720px) {
  .hero-inner {
    min-height: 480px;
    grid-template-columns: minmax(0,1fr) minmax(auto, 25rem);
    padding-top: 56px; padding-bottom: 56px;
  }
  /* keep the architectural opening left of the copy at compressed widths */
  .hero-media img { object-position: 62% 64%; }
}
@media (max-width: 719px) {
  .hero { background: var(--forest); }
  .hero-media {
    position: relative;
    height: clamp(230px, 46vw, 320px);
  }
  .hero-media img { object-position: 50% 60%; }
  .hero-inner {
    display: block;
    min-height: 0;
    padding-top: 36px;
    padding-bottom: 44px;
  }
  .hero-copy h1 { font-size: 2rem; }
  .hero-copy p { margin-bottom: 26px; }
}

/* ---------- Service directory */
.work { padding-block: 84px 72px; }
.work .section-h { margin-bottom: 36px; }
.dir-row {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 6fr) minmax(0, 2fr);
  gap: 24px 40px;
  padding-block: 30px;
  border-top: 1px solid var(--line);
  align-items: baseline;
}
.dir-row h3 { font-size: 1.1875rem; font-weight: 600; line-height: 1.35; }
.dir-row p { color: var(--muted); font-size: 1.0625rem; max-width: 34rem; }
.dir-row .dir-link {
  justify-self: end; white-space: nowrap;
  font-weight: 600; font-size: 1rem;
  display: inline-block; padding-block: 8px;
}
.dir-note {
  margin-top: 26px;
  font-size: 0.9375rem;
  color: var(--muted);
}
@media (max-width: 859px) {
  .work { padding-block: 60px 52px; }
  .dir-row { grid-template-columns: 1fr; gap: 8px; padding-block: 26px; }
  .dir-row .dir-link { justify-self: start; margin-top: 6px; }
}

/* ---------- Working document */
.doc-band { background: var(--band); padding-block: 76px; }
.doc-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 48px 72px;
  align-items: start;
}
.doc-side .section-h { margin-bottom: 18px; }
.doc-side p { color: var(--charcoal); max-width: 26rem; }
.doc-side .doc-more { margin-top: 22px; font-size: 1rem; }
.doc-sheet {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 40px 40px;
}
.doc-head {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: 8px 24px;
  padding-bottom: 20px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.doc-title { font-weight: 600; font-size: 1.0625rem; }
.doc-flag { font-size: 0.875rem; color: var(--muted); font-style: italic; }
.doc-fields div { padding-block: 18px; }
.doc-fields div + div { border-top: 1px solid rgba(32,33,30,0.1); }
.doc-fields dt { font-weight: 600; font-size: 0.9375rem; margin-bottom: 4px; }
.doc-fields dd { color: var(--charcoal); font-size: 1.0625rem; }
.doc-fields ul { list-style: disc; padding-left: 20px; display: grid; gap: 6px; }
@media (max-width: 1023px) {
  .doc-grid { grid-template-columns: 1fr; gap: 36px; }
  .doc-side p { max-width: 38rem; }
}
@media (max-width: 719px) {
  .doc-band { padding-block: 56px; }
  .doc-sheet { padding: 26px 22px 28px; }
}

/* ---------- Selected work */
.selwork .section-h { margin-bottom: 30px; }
.selwork-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px 72px;
  border-top: 1px solid var(--line);
  padding-top: 40px;
}
.selwork-item h3 { font-size: 1.1875rem; font-weight: 600; line-height: 1.35; margin-bottom: 6px; }
.selwork-item p { font-size: 1.0625rem; max-width: 30rem; }
.selwork-role { color: var(--muted); margin-bottom: 18px; }
.selwork-item .selwork-role { font-size: 0.9375rem; }
.selwork-link { margin-top: 20px; }
.selwork-item .selwork-link { font-size: 1rem; }
.selwork-link a { font-weight: 600; }
@media (max-width: 859px) {
  .selwork-grid { grid-template-columns: 1fr; gap: 0; padding-top: 4px; }
  .selwork-item { padding-block: 28px; }
  .selwork-item + .selwork-item { border-top: 1px solid var(--line); }
}

/* ---------- Approach + principal (dark band) */
.appr {
  background: var(--forest);
  color: var(--warm-white);
  padding-block: 84px;
}
.appr-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: 48px 96px;
  align-items: start;
}
.appr h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.875rem;
  line-height: 1.2;
  margin-bottom: 18px;
}
.appr p { color: var(--on-dark-muted); max-width: 30rem; }
.principal { border-left: 1px solid var(--line-on-dark); padding-left: clamp(24px, 4vw, 48px); }
.principal .who { font-weight: 600; font-size: 1.1875rem; color: var(--warm-white); margin-bottom: 10px; }
.principal p { margin-bottom: 22px; }
.principal a { font-size: 1rem; color: var(--warm-white); }
@media (max-width: 859px) {
  .appr { padding-block: 60px; }
  .appr-grid { grid-template-columns: 1fr; gap: 40px; }
  .principal { border-left: 0; padding-left: 0; border-top: 1px solid var(--line-on-dark); padding-top: 36px; }
}

/* ---------- Closing invitation */
.invite { padding-block: 96px 104px; }
.invite-inner { max-width: 34rem; margin-left: clamp(0px, 16%, 180px); }
.invite h2 {
  text-wrap: balance;
  font-size: clamp(1.875rem, 3vw, 2.375rem);
  line-height: 1.15;
  margin-bottom: 16px;
}
.invite p { color: var(--muted); margin-bottom: 30px; }
@media (max-width: 719px) {
  .invite { padding-block: 64px 72px; }
  .invite-inner { margin-left: 0; }
}

/* ---------- Footer */
.site-footer {
  background: var(--forest-deep);
  color: var(--on-dark-muted);
  padding-block: 56px 48px;
  font-size: 0.9375rem;
}
.footer-top {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 24px 48px;
  padding-bottom: 32px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--line-on-dark);
}
.site-footer .brand { color: var(--warm-white); }
.site-footer .brand img { width: 26px; height: 26px; }
.site-footer .brand .wordmark { font-size: 1.1875rem; }
.footer-nav ul { display: flex; flex-wrap: wrap; gap: 12px 32px; }
.footer-nav a { text-decoration: none; color: var(--on-dark-muted); padding-block: 8px; }
.footer-nav a:hover { color: var(--warm-white); }
.footer-legal { display: grid; gap: 6px; font-size: 0.875rem; color: rgba(246,243,237,0.62); }

/* ---------- Subpage head */
.page-head {
  background: var(--forest);
  color: var(--warm-white);
  padding-block: 64px 72px;
}
.page-head h1 {
  font-size: clamp(2.125rem, 3.2vw, 2.875rem);
  line-height: 1.12;
  max-width: 22ch;
  margin-bottom: 20px;
  text-wrap: balance;
}
.page-head .lede {
  font-size: 1.1875rem;
  color: var(--on-dark-muted);
  max-width: 38rem;
}
@media (max-width: 719px) {
  .page-head { padding-block: 44px 52px; }
}

/* ---------- Prose pages (about, AI) */
.prose-block { padding-block: 72px; }
.prose { max-width: 42rem; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 1.375rem; font-weight: 600; margin-top: 2em; }
.prose .scope-note { color: var(--muted); font-size: 1rem; }

/* AI page: offer + outputs */
.offer { padding-block: 76px 0; }
.offer-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 40px 72px;
}
.offer-name { font-size: 1.5rem; font-weight: 600; line-height: 1.3; margin-bottom: 14px; }
.offer-desc { color: var(--charcoal); max-width: 26rem; }
.offer-qs { margin-top: 4px; }
.offer-qs li {
  padding-block: 16px;
  border-top: 1px solid var(--line);
  font-size: 1.0625rem;
}
.offer-qs li:last-child { border-bottom: 1px solid var(--line); }
.outputs { padding-block: 56px 0; }
.outputs .section-h { margin-bottom: 10px; }
.outputs-list { max-width: 42rem; }
.outputs-list div { padding-block: 20px; }
.outputs-list div + div { border-top: 1px solid var(--line); }
.outputs-list dt { font-weight: 600; margin-bottom: 4px; }
.outputs-list dd { color: var(--muted); font-size: 1.0625rem; }
@media (max-width: 859px) {
  .offer-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* AI page: full example document */
.example { padding-block: 72px; margin-top: 72px; }
.offer-qs-h { font-size: 1.0625rem; font-weight: 600; margin-bottom: 6px; }
.cta-row { margin-top: 2.2em; }
.example .section-h { margin-bottom: 10px; }
.example .example-intro { color: var(--muted); max-width: 40rem; margin-bottom: 36px; }
.example .doc-sheet { max-width: 46rem; }

/* ---------- Contact */
.contact-block { padding-block: 72px 88px; }
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: 48px 96px;
  align-items: start;
}
.form-status {
  background: var(--band);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 0.9375rem;
  margin-bottom: 36px;
  max-width: 36rem;
}
.field { margin-bottom: 26px; max-width: 36rem; }
.field label { display: block; font-weight: 600; font-size: 1rem; margin-bottom: 8px; }
.field .hint { font-weight: 400; color: var(--muted); font-size: 0.9375rem; }
.field input, .field select, .field textarea {
  width: 100%;
  font: 400 1.0625rem/1.5 var(--sans);
  color: var(--charcoal);
  background: var(--paper);
  border: 1px solid rgba(32,33,30,0.35);
  border-radius: var(--radius);
  padding: 12px 14px;
  min-height: 48px;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 2px solid var(--link); outline-offset: 1px; border-color: var(--link);
}
.form-note { font-size: 0.9375rem; color: var(--muted); max-width: 36rem; margin-block: 4px 28px; }
.contact-aside h2 { font-size: 1.1875rem; font-weight: 600; margin-bottom: 12px; }
.contact-aside p { color: var(--muted); font-size: 1.0625rem; }
button.btn { cursor: pointer; }
button.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
@media (max-width: 859px) {
  .contact-grid { grid-template-columns: 1fr; gap: 44px; }
}

/* ---------- 404 */
.nf {
  background: var(--forest); color: var(--warm-white);
  padding-block: 112px 128px;
}
.nf h1 { font-size: clamp(2.125rem, 3.2vw, 2.75rem); margin-bottom: 16px; }
.nf p { color: var(--on-dark-muted); max-width: 32rem; margin-bottom: 30px; }

/* ---------- Motion discipline */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
