/* ==========================================================================
   Bota — section layout: hero, outcomes, direction, craft, ship, FAQ, close.
   The miniature websites live in sites.css, the generation canvas in
   canvas.css, and the interactive demonstrations in demos.css.
   ========================================================================== */

/* ══════════════════════════════ Hero ══════════════════════════════
   Left-weighted type, one input, then the canvas at full measure underneath
   it. The type block stops well short of the right edge on purpose: the empty
   third is what makes a headline read as set rather than as centred.
   ═══════════════════════════════════════════════════════════════════ */
.hero {
  padding-top: calc(var(--nav-h) + clamp(48px, 7vw, 108px));
  padding-bottom: var(--s7);
  position: relative;
}

/* The only background treatment on the page: a barely-there column grid that
   fades out downwards, so the hero feels like an artboard the site is drawn
   on. One repeating gradient — no blobs, no blur. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    to right,
    var(--rule) 0 1px,
    transparent 1px calc(100% / 6)
  );
  opacity: 0.5;
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 46%);
  mask-image: linear-gradient(to bottom, black, transparent 46%);
}

.hero__inner {
  position: relative;
  margin-bottom: clamp(40px, 5vw, 72px);
}

/* Smaller than `--t-display`, on purpose. The display scale is set for a page
   whose hero is type alone; here the canvas below is the argument, and a
   headline that fills the first screen on its own would push the only proof
   the page has under the fold. */
.hero__title {
  font-size: clamp(2.375rem, 1.15rem + 3.7vw, 4.125rem);
  line-height: 1.01;
  letter-spacing: -0.038em;
  max-width: 21ch;
  margin-bottom: var(--s5);
}

.hero__lede {
  max-width: 54ch;
  margin-bottom: var(--s6);
}

/* ── The prompt field ─────────────────────────────────────────────────────
   The page's signature object, so it gets the most attention: an inset caret,
   a real focus ring in the brand colour, and a button that sits inside the
   field rather than beside it.
   ------------------------------------------------------------------------ */
.prompt {
  display: flex;
  align-items: center;
  gap: var(--s2);
  max-width: 700px;
  padding: 5px 5px 5px 14px;
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: border-color var(--dur-base) var(--ease-crisp),
    box-shadow var(--dur-base) var(--ease-crisp);
}

.prompt:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-subtle), var(--shadow-md);
}

.prompt__caret {
  flex: none;
  display: grid;
  place-items: center;
  color: var(--faint);
}

.prompt__caret svg {
  width: 15px;
  height: 15px;
}

.prompt__input {
  flex: 1;
  min-width: 0;
  padding: 11px 2px;
  border: 0;
  background: transparent;
  color: var(--foreground);
  font: inherit;
  font-size: var(--t-sm);
  letter-spacing: -0.012em;
}

.prompt__input:focus {
  outline: none;
}

.prompt__input::placeholder {
  color: var(--faint);
}

.prompt__go {
  flex: none;
}

.prompt--lg {
  max-width: 720px;
  padding: 7px 7px 7px 18px;
}

.prompt--lg .prompt__input {
  padding-block: 14px;
  font-size: var(--t-body);
}

.hero__note {
  margin-top: var(--s5);
  font-size: var(--t-xs);
  color: var(--faint);
}

.hero__note .link {
  color: var(--brand);
}

/* ── Colophon rail ───────────────────────────────────────────────────────── */
.hero__rail {
  position: relative;
  margin-top: clamp(40px, 5vw, 72px);
  padding-top: var(--s5);
  border-top: 1px solid var(--rule);
}

.hero__rail dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s3) clamp(24px, 4vw, 64px);
  margin: 0;
}

.hero__rail dt {
  margin-bottom: 7px;
}

.hero__rail dd {
  margin: 0;
  font-size: var(--t-sm);
  color: var(--muted-foreground);
  letter-spacing: -0.012em;
  max-width: 30ch;
}

/* ══════════════════════════ 01 · Outcomes ══════════════════════════
   Three finished sites, at three different sizes and on three different
   axes of the grid. Equal thirds would say "here are three cards"; this says
   "here are three sites", which is the actual claim.
   ═══════════════════════════════════════════════════════════════════ */
.outcomes {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(48px, 6vw, 104px) var(--col-gap);
}

.outcome {
  margin: 0;
  grid-column: span 6;
}

/* The wide one carries its caption in the margin beside it, sat on the
   baseline of the frame — the layout a printed plate would use. */
.outcome--wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr);
  gap: clamp(24px, 3vw, 56px);
  align-items: end;
}

.outcome--wide .outcome__cap {
  margin-top: 0;
  padding-bottom: var(--s3);
}

/* The last plate drops half a step, so the second row reads as two objects
   placed rather than as a row of two. */
.outcome:last-child {
  margin-top: clamp(0px, 5vw, 72px);
}

/* No fixed aspect. Each composition is as tall as it needs to be, which is
   the difference between three websites and three crops of one — and it means
   nothing is ever cut off at a ratio chosen before the page was written. */
.outcome__frame {
  position: relative;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-window);
  overflow: hidden;
}

.outcome__cap {
  margin-top: var(--s5);
  display: grid;
  gap: var(--s3);
  max-width: 40ch;
}

.outcome__cap p {
  font-size: var(--t-sm);
  color: var(--muted-foreground);
  text-wrap: pretty;
}

.outcome__cap b {
  color: var(--foreground);
  font-weight: 560;
}

/* ══════════════════════════ 03 · Direction ══════════════════════════ */

/* Recipes as an index, not a gallery of six equal tiles — the section's whole
   argument is that six equal tiles is what everyone else ships. */
.recipes {
  margin-top: clamp(56px, 7vw, 112px);
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(24px, 4vw, 72px);
  align-items: start;
  padding-top: clamp(32px, 4vw, 56px);
  border-top: 1px solid var(--rule);
}

.recipes__copy {
  display: grid;
  gap: var(--s4);
  align-content: start;
}

.recipes__title {
  font-size: var(--t-h4);
  font-weight: 560;
  max-width: 18ch;
}

.recipes__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(24px, 4vw, 64px);
}

.recipes__list li {
  display: flex;
  align-items: baseline;
  gap: var(--s3);
  padding-block: 11px;
  border-bottom: 1px solid var(--rule);
  font-size: var(--t-sm);
}

.recipes__list b {
  font-weight: 520;
  flex: none;
}

.recipes__list i {
  font-style: normal;
  color: var(--faint);
  font-size: var(--t-xs);
  margin-left: auto;
  text-align: right;
}

.recipes__note {
  font-size: var(--t-sm);
  color: var(--muted-foreground);
  max-width: 42ch;
  text-wrap: pretty;
}

/* ── Imagery and Motion Lab ──────────────────────────────────────────────── */
.media {
  margin-top: clamp(48px, 6vw, 96px);
  padding-top: clamp(32px, 4vw, 56px);
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 4vw, 72px);
  align-items: center;
}

.media__copy h3 {
  font-size: var(--t-h3);
  margin-bottom: var(--s4);
  max-width: 20ch;
}

.media__copy .lede {
  font-size: var(--t-body);
  max-width: 46ch;
}

.media__fine {
  margin-top: var(--s4);
  font-size: var(--t-xs);
  color: var(--faint);
  max-width: 46ch;
}

.media__strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 1.4vw, 18px);
}

/* ══════════════════════════ 04 · Craft ══════════════════════════ */
.craft {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: center;
  padding-block: clamp(44px, 6vw, 88px);
  border-top: 1px solid var(--rule);
}

.craft:last-child {
  border-bottom: 1px solid var(--rule);
}

.craft--flip {
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
}

.craft--flip .craft__copy {
  order: 2;
}

.craft__copy h3 {
  margin-bottom: var(--s4);
  max-width: 20ch;
}

.craft__copy .lede {
  font-size: var(--t-body);
  max-width: 46ch;
}

.craft__fine {
  margin-top: var(--s4);
  font-size: var(--t-xs);
  color: var(--faint);
  max-width: 44ch;
}

.craft__copy code,
.ship__item code {
  font-size: 0.86em;
  padding: 1px 5px;
  border-radius: var(--radius-xs);
  background: var(--muted);
  border: 1px solid var(--rule);
}

/* ══════════════════════════ 05 · Ship ══════════════════════════
   Four statements on a shared hairline grid. Cards would make them four
   products; quadrants make them four properties of one.
   ═══════════════════════════════════════════════════════════════ */
.ship {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
}

.ship__item {
  padding-block: clamp(28px, 3.2vw, 48px);
  border-bottom: 1px solid var(--rule);
}

.ship__item:nth-child(odd) {
  padding-right: clamp(24px, 4vw, 72px);
  border-right: 1px solid var(--rule);
}

.ship__item:nth-child(even) {
  padding-left: clamp(24px, 4vw, 72px);
}

.ship__item h3 {
  font-size: var(--t-h4);
  font-weight: 560;
  margin-bottom: var(--s3);
}

.ship__item p {
  font-size: var(--t-sm);
  color: var(--muted-foreground);
  max-width: 46ch;
  text-wrap: pretty;
}

.ship__item p + p {
  margin-top: var(--s4);
}

.ship__keys {
  display: flex;
  gap: var(--s2);
  flex-wrap: wrap;
}

.ship__keys span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 4px 9px;
  border: 1px solid var(--rule-strong);
  border-radius: 100px;
  color: var(--faint);
}

/* ══════════════════════════ FAQ ══════════════════════════ */
.faq__shell {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.faq__head h2 {
  margin-top: var(--s4);
}

.faq__item {
  border-top: 1px solid var(--rule);
}

.faq__item:last-child {
  border-bottom: 1px solid var(--rule);
}

.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s5);
  padding-block: var(--s5);
  cursor: pointer;
  list-style: none;
  font-size: var(--t-h4);
  font-weight: 520;
  letter-spacing: -0.017em;
  transition: color var(--dur-fast) var(--ease-crisp);
}

.faq__item summary::-webkit-details-marker {
  display: none;
}

.faq__item summary:hover {
  color: var(--brand);
}

/* A plus that becomes a minus. Two pseudo-elements, one rotation — cheaper
   and more precise than swapping an icon. */
.faq__sign {
  position: relative;
  flex: none;
  width: 13px;
  height: 13px;
}

.faq__sign::before,
.faq__sign::after {
  content: "";
  position: absolute;
  inset: 50% 0 auto 0;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transform: translateY(-50%);
  transition: transform var(--dur-base) var(--ease-out);
}

.faq__sign::after {
  transform: translateY(-50%) rotate(90deg);
}

.faq__item[open] .faq__sign::after {
  transform: translateY(-50%) rotate(0deg);
}

.faq__body {
  padding-bottom: var(--s5);
  max-width: 62ch;
}

.faq__body p {
  color: var(--muted-foreground);
  font-size: var(--t-sm);
  text-wrap: pretty;
}

/* ══════════════════════════ Closing ══════════════════════════ */
.close {
  padding-block: clamp(96px, 12vw, 176px);
  border-top: 1px solid var(--rule);
  position: relative;
  overflow: clip;
}

/* The same artboard grid as the hero, mirrored — the page ends where it
   began, on a blank sheet. */
.close::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    to right,
    var(--rule) 0 1px,
    transparent 1px calc(100% / 6)
  );
  opacity: 0.5;
  -webkit-mask-image: linear-gradient(to top, black, transparent 76%);
  mask-image: linear-gradient(to top, black, transparent 76%);
}

.close__inner {
  position: relative;
}

.close__title {
  font-size: var(--t-display);
  line-height: var(--lh-display);
  letter-spacing: var(--ls-display);
  font-weight: 620;
  margin-bottom: var(--s7);
}

/* ══════════════════════════ Responsive ══════════════════════════
   Mobile is re-composed rather than shrunk: two-column editorial splits
   become stacked, the outcome plates go full width in document order, and the
   quadrant grid becomes a single column of hairline-separated statements.
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 1000px) {
  .outcome,
  .outcome--wide {
    grid-column: 1 / -1;
    display: block;
  }

  .outcome:last-child {
    margin-top: 0;
  }

  .outcome--wide .outcome__cap {
    margin-top: var(--s5);
    padding-bottom: 0;
  }

  .recipes,
  .media,
  .craft,
  .craft--flip,
  .faq__shell {
    grid-template-columns: 1fr;
  }

  .craft--flip .craft__copy {
    order: 0;
  }

  .ship {
    grid-template-columns: 1fr;
  }

  .ship__item:nth-child(odd) {
    padding-right: 0;
    border-right: 0;
  }

  .ship__item:nth-child(even) {
    padding-left: 0;
  }
}

@media (max-width: 720px) {
  .hero__rail dl {
    grid-template-columns: 1fr;
    gap: var(--s4);
  }

  .hero__rail dd {
    max-width: none;
  }

  .recipes__list {
    grid-template-columns: 1fr;
  }

  .prompt {
    flex-wrap: wrap;
    padding: 10px;
  }

  .prompt__caret {
    display: none;
  }

  .prompt__input {
    flex: 1 0 100%;
    padding-inline: 4px;
  }

  .prompt__go {
    width: 100%;
    margin-top: var(--s2);
  }
}
