/* ==========================================================================
   hintl.ai — Human in the Loop
   Editorial stylesheet. Single source of truth for the design system.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */

:root {
  /* Colour */
  --bg:          #F3EEE1;  /* warm cream page ground */
  --bg-card:     #FAF7EF;  /* lifted card surface */
  --ink:         #1C1A15;  /* near-black, warm */
  --ink-soft:    #5B5748;  /* body copy, secondary */
  --ink-mute:    #9A9481;  /* meta, captions */
  --green:       #1E3B2C;  /* primary accent */
  --green-deep:  #12271B;  /* pressed / hover */
  --green-pale:  #CFE0D2;  /* accent text on green */
  --green-line:  #3C5946;  /* hairline on green */
  --line:        #DCD4BE;  /* hairline rule */
  --line-soft:   #E8E1CE;
  --danger:      #8A3B2C;

  /* Type */
  --font-display: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --font-body:    'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Spacing */
  --gutter:      clamp(1.5rem, 5vw, 6rem);
  --section-y:   clamp(3rem, 6vw, 4.5rem);
  --max-width:   1440px;

  /* Motion */
  --ease:        cubic-bezier(0.2, 0.6, 0.35, 1);
  --speed:       180ms;
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-deep); text-decoration: underline; }

ul { margin: 0; padding: 0; list-style: none; }

button { font: inherit; cursor: pointer; }

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

/* The header is sticky, so anchor targets (#waitlist, #latest) need room or
   they land underneath it. */
[id] { scroll-margin-top: 7rem; }

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

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.rule {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}

/* --------------------------------------------------------------------------
   3. Typographic utilities
   -------------------------------------------------------------------------- */

/* Monospace eyebrow with the diamond mark — the signature of the brand */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  margin: 0;
}

.eyebrow::before {
  content: '';
  width: 0.4em;
  height: 0.4em;
  background: currentColor;
  transform: rotate(45deg);
  flex: none;
}

.eyebrow--pale { color: var(--green-pale); }
.eyebrow--mute { color: var(--ink-mute); }

.label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.meta {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
}

.lede {
  font-size: 1.125rem;
  color: var(--ink-soft);
  line-height: 1.55;
}

.body-copy {
  color: var(--ink-soft);
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   4. Buttons and controls
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 48px;
  padding: 0.875rem 1.75rem;
  border: 1px solid transparent;
  border-radius: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-align: center;
  transition: background var(--speed) var(--ease),
              color var(--speed) var(--ease),
              border-color var(--speed) var(--ease);
}

.btn:hover { text-decoration: none; }

.btn--primary {
  background: var(--green);
  border-color: var(--green);
  color: var(--bg);
}
.btn--primary:hover {
  background: var(--green-deep);
  border-color: var(--green-deep);
  color: var(--bg);
}

.btn--ghost {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn--ghost:hover {
  background: var(--ink);
  color: var(--bg);
}

.btn--cream {
  background: var(--bg);
  border-color: var(--bg);
  color: var(--green-deep);
}
.btn--cream:hover {
  background: #fff;
  border-color: #fff;
  color: var(--green-deep);
}

.btn--sm {
  min-height: 40px;
  padding: 0.6rem 1.25rem;
  font-size: 0.7rem;
}

.btn--block { width: 100%; }

/* Inline "read more" link */
.more {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--green);
}
.more:hover { color: var(--green-deep); text-decoration: none; }
.more::after {
  content: '→';
  transition: transform var(--speed) var(--ease);
}
.more:hover::after { transform: translateX(3px); }

/* --------------------------------------------------------------------------
   5. Site header
   -------------------------------------------------------------------------- */

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

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 88px;
}

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

.brand__mark { flex: none; }

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.2;
}

.brand__name {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: 0.01em;
}

.brand__tagline {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 2.125rem;
}

.site-nav a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-block: 0.5rem;
}
.site-nav a:hover { color: var(--green); text-decoration: none; }

.site-nav a[aria-current='page'] {
  color: var(--green);
  box-shadow: inset 0 -1px 0 0 currentColor;
}

/* Mobile menu button — hidden until the nav collapses */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-right: -0.5rem;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}
.nav-toggle:hover { border-color: var(--green); color: var(--green); }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded='true'] .icon-close { display: block; }
.nav-toggle[aria-expanded='true'] .icon-menu { display: none; }

/* --------------------------------------------------------------------------
   6. Sections and page headers
   -------------------------------------------------------------------------- */

.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(2rem, 4vw, 3rem); }
.section--flush-top { padding-top: 0; }

.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.25rem;
}

.section__title { font-size: clamp(1.375rem, 2.2vw, 1.625rem); }

/* Note: .page-head and .hero are also .container elements, so a max-width here
   would fight the container's `margin-inline: auto` and centre the whole block.
   Constrain the children instead — the block stays flush with the gutter. */
.page-head {
  padding-block: clamp(3rem, 5vw, 4.5rem) 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.875rem;
}

.page-head > * { max-width: 46rem; }

.page-head__title { font-size: clamp(2.25rem, 5vw, 2.75rem); }

/* --------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */

.hero {
  padding-block: clamp(3.5rem, 7vw, 5.5rem);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
}

.hero > * { max-width: 52rem; }

.hero__title {
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  line-height: 1.06;
}

.hero__lede { max-width: 38rem; }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}

/* --------------------------------------------------------------------------
   8. Featured article
   -------------------------------------------------------------------------- */

.featured {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}

.featured__body {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
  align-items: flex-start;
}

.featured__title { font-size: clamp(1.75rem, 3vw, 2.125rem); line-height: 1.18; }

.featured__figure {
  background: var(--green);
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  padding: clamp(1.5rem, 3vw, 2rem);
  margin: 0;
}

.featured__figure svg { width: 100%; height: 100%; }

/* --------------------------------------------------------------------------
   9. Cards and grids
   -------------------------------------------------------------------------- */

.grid {
  display: grid;
  gap: 1.5rem;
}

.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 1.75rem;
  background: var(--bg-card);
  border: 1px solid var(--line);
  transition: border-color var(--speed) var(--ease),
              transform var(--speed) var(--ease);
}

.card:hover {
  border-color: var(--green);
  transform: translateY(-2px);
}

.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

.card__title { font-size: 1.1875rem; line-height: 1.3; }

.card__excerpt { font-size: 0.875rem; }

/* Pin the trailing link / tag to the bottom so a row of cards lines up */
.card > .more,
.card > .tag { margin-top: auto; }

/* Card that is entirely a link target */
.card__link::after {
  content: '';
  position: absolute;
  inset: 0;
}
.card--linked { position: relative; }

/* --------------------------------------------------------------------------
   10. Filter tabs
   -------------------------------------------------------------------------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  padding: 0;
  border: 0;
  margin: 0;
}

.filter {
  min-height: 44px;
  padding: 0.625rem 1.125rem;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background var(--speed) var(--ease),
              border-color var(--speed) var(--ease),
              color var(--speed) var(--ease);
}

.filter:hover { border-color: var(--green); color: var(--green); }

.filter[aria-pressed='true'] {
  background: var(--green);
  border-color: var(--green);
  color: var(--bg);
}

.filters__status { margin-top: 1.5rem; }

/* --------------------------------------------------------------------------
   11. Quotes and members
   -------------------------------------------------------------------------- */

.pullquote {
  margin: 0;
  max-width: 48rem;
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
}

.pullquote__text {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.375rem, 3vw, 1.875rem);
  line-height: 1.35;
}

.pullquote__source {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  font-style: normal;
}

.member {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.member__avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--green);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--green);
  flex: none;
}

.member__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.3;
}

.member__role {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
  border: 1px solid var(--green);
  padding: 0.25rem 0.625rem;
}

.interview {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  background: var(--bg-card);
  border: 1px solid var(--line);
}

.callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  border: 1px solid var(--line);
}

.callout__body { display: flex; flex-direction: column; gap: 0.5rem; }

/* --------------------------------------------------------------------------
   12. Green panels (AI Drinks)
   -------------------------------------------------------------------------- */

.panel {
  background: var(--green);
  color: var(--bg);
  padding: clamp(2rem, 4vw, 3rem);
}

.panel h1, .panel h2, .panel h3 { color: var(--bg); }
.panel .body-copy { color: #D8DFD6; }
.panel .label { color: #9AB3A2; }

.panel--split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 3rem);
  align-items: start;
}

.panel--cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.panel__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.875rem;
  max-width: 28rem;
}

/* Date chips */
.dates {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  border: 0;
  padding: 0;
  margin: 0;
}

.date-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.625rem 1.25rem;
  border: 1px solid var(--green-line);
  color: var(--green-pale);
  font-family: var(--font-mono);
  font-size: 0.78125rem;
  letter-spacing: 0.05em;
  background: transparent;
  cursor: pointer;
  transition: background var(--speed) var(--ease),
              color var(--speed) var(--ease),
              border-color var(--speed) var(--ease);
}

.date-chip:hover { border-color: var(--bg); color: var(--bg); }

.date-chip input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.date-chip:has(input:checked),
.date-chip.is-selected {
  background: var(--bg);
  border-color: var(--bg);
  color: var(--green-deep);
}

.date-chip:has(input:focus-visible) {
  outline: 2px solid var(--bg);
  outline-offset: 3px;
}

/* Static chip (non-interactive, e.g. the home page teaser) */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.4375rem 0.875rem;
  border: 1px solid var(--green-line);
  color: var(--green-pale);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.05em;
}

/* --------------------------------------------------------------------------
   13. Forms
   -------------------------------------------------------------------------- */

.form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--bg);
}

.form__legend {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.field__label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.input {
  width: 100%;
  min-height: 48px;
  padding: 0.8125rem 1rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--ink);
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 0;
  transition: border-color var(--speed) var(--ease);
}

.input::placeholder { color: #A39D87; }
.input:focus { outline: none; border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.input[aria-invalid='true'] { border-color: var(--danger); }

.form__error {
  font-family: var(--font-mono);
  font-size: 0.71875rem;
  color: var(--danger);
}

.form__note {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--ink-mute);
  line-height: 1.5;
}

/* Confirmation panel swapped in after a successful submit */
.confirm {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--bg-card);
  border: 1px solid var(--green);
}

.confirm__title { font-size: 1.375rem; }

[hidden] { display: none !important; }

/* --------------------------------------------------------------------------
   14. Footer
   -------------------------------------------------------------------------- */

.site-footer { background: var(--bg); }

.newsletter {
  background: var(--green);
  color: var(--bg);
  padding-block: clamp(2.5rem, 5vw, 3.25rem);
}

.newsletter__inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 3rem;
  flex-wrap: wrap;
}

.newsletter__body {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  max-width: 29rem;
}

.newsletter__title { font-size: clamp(1.5rem, 3vw, 1.875rem); color: var(--bg); }

.newsletter__copy { color: #D8DFD6; font-size: 0.96875rem; }

.newsletter__form {
  display: flex;
  gap: 0.625rem;
  flex-wrap: wrap;
  align-items: flex-start;
}

.newsletter__field { flex: 1 1 17.5rem; }

.newsletter__input {
  width: 100%;
  min-height: 48px;
  padding: 0.8125rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--green-line);
  border-radius: 0;
}
.newsletter__input::placeholder { color: #8A8570; }
.newsletter__input:focus { outline: none; border-color: var(--bg); box-shadow: 0 0 0 1px var(--bg); }

.newsletter__error {
  display: block;
  margin-top: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.71875rem;
  color: #F0C9BE;
}

.newsletter__confirm {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.03em;
  color: var(--bg);
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}

.footer__links {
  display: flex;
  gap: 4rem;
  flex-wrap: wrap;
  padding-block: 2.75rem 1.75rem;
  border-bottom: 1px solid var(--line);
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.footer__heading {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.footer__link {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.footer__link:hover { color: var(--ink); }

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-block: 1.375rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
}

/* --------------------------------------------------------------------------
   15. Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 960px) {
  .featured,
  .panel--split { grid-template-columns: minmax(0, 1fr); }

  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .interview { padding: 1.75rem; }
}

@media (max-width: 800px) {
  .nav-toggle { display: inline-flex; }

  .header__inner { flex-wrap: wrap; }

  .header__cta { display: none; }

  .site-nav {
    display: none;
    order: 3;
    width: 100%;
    padding-block: 0.5rem 1.25rem;
    border-top: 1px solid var(--line);
  }

  .site-nav.is-open { display: block; }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-nav li + li { border-top: 1px solid var(--line-soft); }

  .site-nav a {
    display: block;
    padding-block: 0.9375rem;
  }

  .site-nav a[aria-current='page'] { box-shadow: none; }
}

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

  .footer__links { gap: 2rem 3rem; }

  .newsletter__inner { gap: 2rem; }

  .newsletter__form { width: 100%; }

  .callout { align-items: flex-start; }

  .btn { width: 100%; }

  .hero__actions,
  .panel--cta { width: 100%; }

  .panel--cta .btn { width: 100%; }
}

@media (max-width: 420px) {
  .brand__tagline { display: none; }
}

/* --------------------------------------------------------------------------
   16. Preferences
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .card:hover { transform: none; }
}

@media print {
  .site-header, .nav-toggle, .newsletter, .hero__actions { display: none; }
  body { background: #fff; }
}
