/* Anapoly AI Labs site styles. Shared by every page. */

:root {
  --ground: #FAF9F6;
  --ground-tint: #F1EFE9;
  --ink: #1C1917;
  --ink-soft: #44403C;
  --ink-faint: #A8A29E;
  --paper-on-dark: #E7E5E4;
  --accent: #0F766E;
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: 'Public Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --header-height: 83px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.6;
}

a {
  color: var(--ink);
  text-decoration-color: rgba(28, 25, 23, 0.3);
  text-underline-offset: 3px;
}
a:hover { text-decoration-color: var(--ink); }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  background: var(--ink);
  color: var(--ground);
  padding: 10px 16px;
}
.skip-link:focus { left: 8px; top: 8px; z-index: 10; }

/* Header. Pinned to the top of the window so the menu stays to hand
   while the reader is deep in the page. The anchor sections make room
   for it through scroll-margin-top, which uses --header-height below;
   the value is the header's measured height and is set per width. */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--ground);
  border-bottom: 1px solid var(--ground-tint);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 24px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 500;
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 28px;
  font-size: 1rem;
}
.site-nav a { text-decoration: none; }
.site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 5px; }

.button {
  display: inline-block;
  background: var(--accent);
  color: var(--ground);
  padding: 12px 24px;
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
}
.button:hover { filter: brightness(0.92); }

/* Hero */

.hero {
  padding-top: 72px;
  padding-bottom: 72px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  font-weight: 400;
  line-height: 1.15;
  margin: 0;
  max-width: 20ch;
  text-wrap: pretty;
}

.hero .lede {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  color: var(--ink-soft);
  margin: 0;
  max-width: 52ch;
}

.hero .actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px 28px;
}

/* Photograph bands. The hero and the two section openings carry the
   photographs from the WordPress site, full width, with the heading set
   over a dark gradient at the foot of the picture so it reads on any
   image. Heights are capped so a photograph never fills a tall screen. */

.hero-image {
  position: relative;
  isolation: isolate;
  background: var(--ink);
  color: var(--paper-on-dark);
}

.hero-image img {
  display: block;
  width: 100%;
  height: min(72vh, 640px);
  object-fit: cover;
}

.hero-text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding-top: 120px;
  background: linear-gradient(to top, rgba(28, 25, 23, 0.82) 0%, rgba(28, 25, 23, 0.55) 55%, rgba(28, 25, 23, 0) 100%);
}

.hero-image .hero { padding-top: 0; padding-bottom: 48px; gap: 20px; }
.hero-image .hero .lede { color: var(--paper-on-dark); }
.hero-image .hero a:not(.button) { color: var(--paper-on-dark); text-decoration-color: rgba(231, 229, 228, 0.5); }
.hero-image .hero a:not(.button):hover { text-decoration-color: var(--paper-on-dark); }

.banner {
  position: relative;
  isolation: isolate;
  background: var(--ink);
}

.banner img {
  display: block;
  width: 100%;
  height: min(48vh, 420px);
  object-fit: cover;
}

/* The beach photograph has its figures in the upper part of the frame. */
#about .banner img { object-position: 50% 28%; }

/* Inside a section reached by anchor, the prose and the lab stages sit
   closer together than they would as separate pages. */
.anchor .prose { padding-top: 40px; padding-bottom: 24px; }
.anchor .section { padding-top: 24px; padding-bottom: 40px; }
.anchor .prose h2 { margin-top: 32px; }

.banner-text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 72px 0 28px 0;
  background: linear-gradient(to top, rgba(28, 25, 23, 0.8) 0%, rgba(28, 25, 23, 0) 100%);
}

.banner-text h2 {
  font-family: var(--serif);
  font-size: clamp(1.875rem, 4vw, 2.75rem);
  font-weight: 400;
  line-height: 1.15;
  margin: 0;
  color: #FFFFFF;
}

/* Sections reached from the menu by anchor: room for the pinned header
   and a little headroom above the picture when the page scrolls to them. */
.anchor { scroll-margin-top: calc(var(--header-height) + 16px); }

/* Tinted band */

.band { background: var(--ground-tint); }

.band-inner {
  padding-top: 56px;
  padding-bottom: 56px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.band .statement {
  font-family: var(--serif);
  font-size: clamp(1.375rem, 2.5vw, 1.75rem);
  line-height: 1.4;
  margin: 0;
  max-width: 44ch;
}

.band .follow-up {
  margin: 0;
  color: var(--ink-soft);
  max-width: 60ch;
}

/* Sections */

.section {
  padding-top: 72px;
  padding-bottom: 72px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.section h2 {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 400;
  margin: 0;
}

.section .intro {
  margin: 0;
  color: var(--ink-soft);
  max-width: 66ch;
}

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

.stage {
  border-top: 2px solid var(--accent);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stage .kicker {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.stage h3 { font-size: 1.1875rem; margin: 0; }
.stage p { font-size: 0.9375rem; line-height: 1.55; color: var(--ink-soft); margin: 0; }

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding-bottom: 88px;
}

.card {
  background: var(--ground-tint);
  border-radius: 6px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card h2 {
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 400;
  margin: 0;
}

.card p { margin: 0; color: var(--ink-soft); font-size: 1rem; max-width: 60ch; }
.card a { font-weight: 500; align-self: start; }

/* Footer */

.site-footer { background: var(--ink); color: var(--paper-on-dark); }

.footer-inner {
  padding-top: 44px;
  padding-bottom: 44px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px 40px;
}

.footer-inner .wordmark { color: var(--paper-on-dark); font-size: 1.25rem; }
.footer-inner a.wordmark:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-inner .imprint { font-size: 0.875rem; color: var(--ink-faint); margin-top: 6px; }

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  font-size: 0.9375rem;
}
.footer-nav a { color: var(--paper-on-dark); text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; }
.footer-nav a.quiet { color: var(--ink-faint); }

/* Prose pages */

.prose {
  padding-top: 48px;
  padding-bottom: 88px;
}

/* The text column keeps its reading measure but lines up with the
   header's left edge rather than centring itself. */
.prose > * { max-width: 760px; }

.prose h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 24px 0;
  text-wrap: pretty;
}

.prose h2 {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  font-weight: 400;
  margin: 48px 0 12px 0;
}

.prose h3 {
  font-size: 1.1875rem;
  margin: 36px 0 8px 0;
}

.prose p { margin: 0 0 20px 0; }
.prose .kicker {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.prose figure { margin: 32px 0; }
.prose figure img { max-width: 100%; height: auto; border-radius: 4px; }
.prose figcaption { font-size: 0.875rem; color: var(--ink-soft); margin-top: 8px; }

.prose hr {
  border: none;
  border-top: 1px solid var(--ground-tint);
  margin: 40px 0;
}

/* Forms */

.form { display: flex; flex-direction: column; gap: 24px; max-width: 560px; }
.form .field { display: flex; flex-direction: column; gap: 6px; }
.form label, .form legend { font-weight: 500; font-size: 1rem; }
.form .hint { font-size: 0.875rem; color: var(--ink-soft); }

.form input[type="text"],
.form input[type="email"],
.form textarea {
  font: inherit;
  color: var(--ink);
  background: #FFFFFF;
  border: 1px solid var(--ink-faint);
  border-radius: 4px;
  padding: 10px 12px;
}

.form input:focus, .form textarea:focus, .form input[type="radio"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.form textarea { min-height: 140px; resize: vertical; }
.form .narrow { max-width: 120px; }

.form fieldset {
  border: 1px solid var(--ground-tint);
  border-radius: 4px;
  padding: 14px 16px;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
}

.form fieldset label { font-weight: 400; display: inline-flex; align-items: center; gap: 8px; }
.form button.button { border: none; font: inherit; font-weight: 600; cursor: pointer; align-self: flex-start; }

.honeypot { position: absolute; left: -9999px; }

/* Narrow screens */

@media (max-width: 900px) {
  .stages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Below 680px the menu wraps under the wordmark and the header is two or
   three rows deep, too much of a phone screen to pin, so it scrolls away
   with the page and the anchors need only their own headroom. The
   threshold is the header's measured single-row width, 663px at 1280. */
@media (max-width: 679px) {
  .site-header { position: static; border-bottom: none; }
  .anchor { scroll-margin-top: 16px; }
}

@media (max-width: 620px) {
  .stages { grid-template-columns: 1fr; }
  .hero { padding-top: 48px; padding-bottom: 48px; }
  .hero-image img { height: min(80vh, 560px); }
  .hero-image .hero { padding-top: 0; padding-bottom: 32px; }
  .banner img { height: 260px; }
  .section { padding-top: 48px; padding-bottom: 48px; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
