/* AEC landing page (Figma "Home Desktop" 60:1806, mobile 49:140 with hero 51:941, lead form 49:343).
   Builds on styles.css tokens and components. */

:root {
  --aec-night: #291732;
  --text-muted: #635E72;
}

/* ---------- Buttons ---------- */
.btn--accent { background: var(--brand-accent); color: var(--text-inverse); gap: 16px; }
.btn--accent:hover { background: var(--brand-accent-text); }
.btn--link-inverse { color: var(--text-inverse); text-decoration: underline; text-underline-offset: 3px; }
.btn--link-inverse:hover { color: var(--brand-primary-subtle); }

/* ---------- Navigation over the dark hero ---------- */
.site-nav--dark { position: absolute; inset: 0 0 auto; background: transparent; }
.site-nav--dark .site-nav__inner { height: 96px; }
.site-nav--dark .site-nav__links > a:not(.btn) { color: var(--brand-primary-subtle); }
.site-nav--dark .site-nav__links > a:not(.btn):hover { color: var(--text-inverse); }
.site-nav--dark .btn { height: 48px; padding-block: 0; gap: 16px; }
.menu-bars { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; width: 28px; }
.menu-bars b { display: block; height: 2px; width: 100%; background: var(--text-inverse); }
.menu-bars b + b { width: 20px; }

/* ---------- Hero ---------- */
.aec-hero { position: relative; overflow: hidden; background: var(--aec-night); color: var(--text-inverse); }
.aec-hero__media {
  position: absolute; top: -124px; left: calc(50% + 303.5px); width: 1483px; height: 929px;
  transform: translateX(-50%); border-radius: var(--radius); overflow: hidden;
}
.aec-hero__media img { width: 100%; height: 100%; max-width: none; object-fit: cover; }
.aec-hero__media::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(50% 50% at 50% 50%, rgba(0, 0, 0, 0) 63%, rgba(21, 12, 25, .5) 82%, var(--aec-night) 100%),
    rgba(41, 23, 50, .3);
}
.aec-hero__inner { position: relative; display: flex; flex-direction: column; padding: 152px 0 64px; }
.aec-hero__copy { display: flex; flex-direction: column; gap: 24px; max-width: 800px; }
.aec-hero__title { font-size: 64px; line-height: 1.02; font-weight: 600; letter-spacing: -2.24px; }
.aec-hero__lede { max-width: 542px; font-size: 19px; line-height: 1.6; letter-spacing: -0.095px; }
.aec-hero__actions { display: flex; gap: 24px; }
.format-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 48px; }
.format-tags li {
  padding: 4px 12px; background: var(--brand-secondary);
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.45; letter-spacing: 0.25px;
}

/* ---------- File cards ---------- */
.files { display: flex; flex-direction: column; align-items: center; gap: 64px; }
.files__intro { align-self: stretch; display: flex; flex-direction: column; gap: 16px; max-width: 834px; }
.file-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; align-items: center; width: 100%; }
.file-card {
  display: flex; flex-direction: column; gap: 16px; padding-bottom: 24px; overflow: hidden;
  background: var(--bg-elevated); border: 1.5px solid var(--border-standard); border-radius: var(--radius);
}
.file-card__media { position: relative; height: 181px; padding: 24px 16px; border-radius: var(--radius); overflow: hidden; }
.file-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.file-card__media--top img { object-position: center 26%; }
.file-card__media--shade::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .2); }
.file-card__title {
  position: relative; z-index: 1; max-width: 210px;
  font-size: 33px; line-height: 1.06; font-weight: 600; letter-spacing: -0.99px; color: var(--text-inverse);
}
.file-card__body { display: flex; flex-direction: column; gap: 8px; padding-inline: 16px; }
.file-card__formats { font-size: 14.5px; line-height: 1.6; color: var(--brand-accent); }
.files__cta { padding-inline: 48px; height: 52px; }

/* ---------- Why AI developers need design data ---------- */
.why { display: flex; flex-direction: column; gap: 48px; }
.why__intro { display: flex; justify-content: space-between; align-items: flex-start; gap: 48px; }
.why__intro .h1 { flex: 0 1 540px; }
.why__intro .body { flex: 0 1 456px; }
.why__sequence { display: flex; align-items: center; gap: 78px; }
.why-tile {
  position: relative; flex: 1 1 0; min-width: 0; height: 246px; border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.why-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.why-tile--2d img { object-position: center 30%; }
.why-tile::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .1), rgba(0, 0, 0, 0)); }
.why-tile span {
  position: relative; padding: 8px 16px; background: var(--brand-primary);
  font-size: 21px; line-height: 1.3; font-weight: 600; letter-spacing: -0.315px; color: var(--text-inverse);
}
.why-tile + .why-tile::after {
  content: ""; position: absolute; left: -54px; top: 50%; width: 30px; height: 15px; margin-top: -7.5px;
  background: url("assets/aec/why-arrow.svg") no-repeat center / contain;
}
.why-tile + .why-tile { overflow: visible; }
.why-tile + .why-tile img, .why-tile + .why-tile::before { border-radius: var(--radius); }
.why__uses {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--border-standard);
}
.why__uses li {
  display: flex; align-items: center; gap: 10px; padding-block: 24px;
  border-bottom: 1px solid var(--border-standard);
}
.why__uses li > img { flex: none; width: 50px; height: 50px; }
.why__uses li > div { display: flex; flex-direction: column; gap: 12px; }
.why__uses .body { line-height: 1.6; }

/* ---------- More than a file ---------- */
.project-context {
  display: flex; flex-direction: column; align-items: center; gap: 48px; padding: 32px;
  background: #FEFEFE; border-radius: var(--radius); text-align: center;
}
.project-context__lede { max-width: 834px; }
.project-context__figure { position: relative; width: 100%; height: 595px; margin: 0; }
.project-context__art { position: absolute; left: 50%; top: 0; width: 579px; height: 595px; transform: translateX(-50%); }
.project-context__art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.project-records li {
  position: absolute; left: var(--x); top: var(--y);
  display: flex; align-items: center; gap: 8px; width: 280px; height: 51px; padding: 12px 16px;
  background: rgba(239, 239, 239, .05); border: 1.5px solid var(--border-strong); border-radius: var(--radius);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  font-size: 19px; line-height: 1.3; font-weight: 600; letter-spacing: -0.285px; color: var(--brand-primary); text-align: left;
}
.project-records span { width: 28px; color: var(--brand-accent-text); }
.project-context__figure figcaption { position: absolute; left: 0; bottom: -4px; }

/* ---------- Process (extends homepage .steps) ---------- */
.aec-process__lede { max-width: 586px; }
.reassurance { display: none; }
.step__art--narrow img { width: 198px; height: 198px; }

/* ---------- Bridge ---------- */
.bridge {
  display: flex; flex-direction: column; gap: 24px; padding: 32px;
  background: var(--brand-primary-subtle); border-radius: var(--radius);
}
.bridge__intro { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.bridge__intro .h1 { flex: 1 1 auto; max-width: 655px; }
.bridge__intro .body { flex: 0 1 422px; }
.bridge__body { display: flex; align-items: center; gap: 64px; padding-block: 32px; }
.bridge__art { flex: 0 1 433px; min-width: 0; height: auto; aspect-ratio: 433 / 523; object-fit: cover; border-radius: var(--radius); }
.bridge__list { flex: 0 1 616px; display: flex; flex-direction: column; gap: 32px; }
.bridge__list li {
  display: flex; align-items: center; gap: 10px; padding: 20px 16px;
  background: var(--bg-surface); border-radius: var(--radius);
  font-size: 21px; line-height: 1.3; font-weight: 600; letter-spacing: -0.315px; color: var(--text-primary);
}
.bridge__list img { flex: none; width: 32px; height: 32px; }
.bridge__cta { display: none; }

/* ---------- Final CTA ---------- */
.aec-cta__title { max-width: 672px; }
.aec-cta__lede { max-width: 586px; }
.aec-cta__caveat { width: min(580px, 100%); text-align: left; color: var(--text-muted); }

/* ---------- Lead form dialog ---------- */
.lead-dialog {
  width: min(560px, 100% - 32px); max-height: min(92vh, 1100px); padding: 0;
  border: 0; border-radius: var(--radius); background: var(--bg-page); color: var(--text-primary);
  box-shadow: 0 1px 2px rgba(24, 21, 31, .06), 0 8px 24px rgba(24, 21, 31, .08);
}
.lead-dialog::backdrop { background: rgba(24, 21, 31, .55); }
.lead-form { position: relative; padding: 32px 24px; }
.lead-form__fields, .lead-form__done { display: flex; flex-direction: column; gap: 24px; }
.lead-form__fields[hidden], .lead-form__done[hidden] { display: none; }
.lead-form__done:focus { outline: none; }
.lead-form__title { padding-right: 48px; font-size: 33px; line-height: 1.06; font-weight: 600; letter-spacing: -0.99px; color: var(--brand-primary); }
.lead-form__close {
  position: absolute; top: 20px; right: 16px; width: 44px; height: 44px;
  display: grid; place-items: center; border: 0; background: transparent; color: var(--brand-primary); cursor: pointer;
}
.lead-form__close:hover { color: var(--brand-secondary); }
.field { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field__label { padding: 0; font-size: 16.5px; line-height: 1.65; color: var(--text-primary); }
.field__row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.field__hint { font-size: 14.5px; line-height: 1.6; color: var(--text-secondary); }
.field__control {
  width: 100%; padding: 16px; border: 1px solid var(--border-standard); border-radius: var(--radius);
  background: var(--bg-surface); font: 400 14.5px/1.6 var(--font-sans); color: var(--text-primary);
  transition: border-color var(--dur) var(--ease);
}
.field__control::placeholder { color: var(--text-muted); opacity: 1; }
.field__control:hover { border-color: var(--border-strong); }
.field__control:focus { outline: 2px solid var(--brand-secondary); outline-offset: 0; border-color: var(--brand-secondary); }
textarea.field__control { min-height: 140px; resize: vertical; }
.field__select { position: relative; }
.field__select select { appearance: none; -webkit-appearance: none; padding-right: 48px; cursor: pointer; }
.field__select select:invalid, .field__select select.is-placeholder { color: var(--text-muted); }
.field__select::after {
  content: ""; position: absolute; right: 16px; top: 50%; width: 14px; height: 9px; margin-top: -4.5px; pointer-events: none;
  background: url("assets/aec/chevron.svg") no-repeat center / contain;
}
.check {
  display: flex; align-items: center; gap: 16px; padding: 8px 16px; cursor: pointer;
  background: var(--bg-surface); border: 1px solid var(--border-standard); border-radius: var(--radius);
  font-size: 14.5px; line-height: 1.6; color: var(--text-muted);
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.check:hover { border-color: var(--border-strong); }
.check input {
  appearance: none; -webkit-appearance: none; flex: none; width: 24px; height: 24px; margin: 0;
  border: 1.5px solid var(--border-standard); border-radius: var(--radius); background: var(--bg-surface);
  display: grid; place-items: center; cursor: pointer;
}
.check input::after {
  content: ""; width: 12px; height: 7px; margin-top: -3px;
  border: solid var(--text-inverse); border-width: 0 0 2px 2px; transform: rotate(-45deg) scale(0);
  transition: transform var(--dur) var(--ease);
}
.check input:checked { background: var(--brand-primary); border-color: var(--brand-primary); }
.check input:checked::after { transform: rotate(-45deg) scale(1); }
.check input:focus-visible { outline: 2px solid var(--brand-secondary); outline-offset: 2px; }
.check:has(input:checked) { color: var(--text-primary); border-color: var(--brand-primary); }
.field__error { font-size: 14.5px; line-height: 1.6; color: var(--fn-error, #A32B23); }
.field.is-invalid .field__control, .field.is-invalid .check { border-color: var(--fn-error, #A32B23); }
.lead-form__status { padding: 12px 16px; border-left: 2px solid var(--fn-error, #A32B23); background: var(--bg-surface); font-size: 14.5px; line-height: 1.6; color: var(--text-primary); }
.lead-form__submit { height: 52px; }
.lead-form__submit[aria-busy="true"] { opacity: .7; cursor: progress; }
body.has-dialog { overflow: hidden; }

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
  .aec-hero__media { left: 70%; }
  .project-records li { width: 240px; }
  .why-tile span { font-size: 18px; }
}

/* ---------- Mobile (Figma 49:140 / hero 51:941 / form 49:343) ---------- */
@media (max-width: 767px) {
  .site-nav--dark .site-nav__inner { height: 64px; }
  .site-nav--dark .site-nav__inner::after {
    content: ""; position: absolute; left: 0; right: 0; top: 63px; height: 1px; background: var(--border-standard);
  }
  .site-nav--dark .site-nav__inner { position: relative; }

  .aec-hero { min-height: 0; }
  .aec-hero__inner { min-height: 0; padding: 105px 0 0; align-items: stretch; text-align: center; }
  .aec-hero__copy { gap: 8px; }
  .aec-hero__title { font-size: 33px; line-height: 1.06; letter-spacing: -0.99px; }
  .aec-hero__lede { max-width: none; font-size: 14.5px; color: var(--text-inverse-secondary); letter-spacing: 0; }
  .aec-hero__actions { flex-direction: column; gap: 12px; margin-top: 8px; }
  .aec-hero__actions .btn { width: 100%; }
  .aec-hero__actions .btn--accent { height: 52px; }
  .format-tags { justify-content: center; margin-top: 8px; }
  .format-tags li { padding: 8px 12px; }
  .aec-hero__media {
    position: relative; top: auto; left: 50%; width: 684px; height: 429px; margin-top: -40px; margin-bottom: 16px;
  }
  .aec-hero__media::after {
    background:
      radial-gradient(50% 50% at 50% 50%, rgba(0, 0, 0, 0) 63%, rgba(21, 12, 25, .5) 82%, var(--aec-night) 100%),
      linear-gradient(to bottom, var(--aec-night), rgba(41, 23, 50, 0) 30%),
      rgba(41, 23, 50, .3);
  }
  .aec-hero { display: flex; flex-direction: column-reverse; }


  .files { align-items: stretch; gap: 24px; }
  .file-cards { grid-template-columns: 1fr; gap: 24px; }
  .file-card__body .small { font-size: 14.5px; }
  .files__cta { width: 100%; }

  .why { gap: 24px; }
  .why__intro { flex-direction: column; gap: 24px; }
  .why__intro .h1, .why__intro .body { flex: none; }
  .why__sequence { flex-direction: column; align-items: stretch; gap: 54px; padding: 24px 16px; }
  .why-tile { flex: none; height: 246px; }
  .why-tile + .why-tile::after { left: 50%; top: -42px; margin: 0 0 0 -15px; transform: rotate(90deg); }
  .why__uses { grid-template-columns: 1fr; }
  .why__uses li { align-items: flex-start; padding-block: 20px; }
  .why__uses li > img { margin-top: 20px; }

  .project-context { padding: 0; background: transparent; align-items: stretch; text-align: left; gap: 24px; }
  .project-context__figure { height: auto; display: flex; flex-direction: column; align-items: center; padding-bottom: 26px; background: #FEFEFE; }
  .project-context__art { position: relative; left: auto; transform: none; width: 100%; max-width: 350px; height: auto; aspect-ratio: 350 / 359; }
  .project-records { position: relative; width: 280px; margin-top: -124px; display: flex; flex-direction: column; gap: 16px; }
  .project-records li { position: relative; left: auto; top: auto; width: 100%; }
  .project-records li + li::before {
    content: ""; position: absolute; left: 24px; top: -17.5px; width: 1px; height: 16px; background: var(--brand-accent);
  }
  .project-context__figure figcaption { position: static; align-self: flex-start; margin-top: 8px; }

  .reassurance {
    display: flex; align-items: flex-start; gap: 12px; padding: 16px; margin-top: 8px;
    background: var(--brand-primary-subtle); text-align: left;
    font-size: 14.5px; line-height: 1.6; color: var(--text-primary);
  }
  .reassurance img { flex: none; }
  .aec-process__lede { display: none; }
  .process .section-intro { align-items: center; text-align: center; }
  .page-aec .step__art { height: 145px; }
  .page-aec .step__art img { width: 185px; height: 185px; }
  .page-aec .step__art--narrow img { width: 145px; height: 145px; }
  .page-aec .process__title span { display: block; color: var(--brand-secondary); }

  .bridge { padding: 56px var(--gutter); margin-inline: calc(-1 * var(--gutter)); border-radius: 0; }
  .bridge__intro { flex-direction: column; align-items: stretch; gap: 24px; }
  .bridge__intro .h1, .bridge__intro .body { flex: none; }
  .bridge__body { flex-direction: column; align-items: stretch; gap: 24px; padding-block: 0; }
  .bridge__art { flex: none; width: 100%; }
  .bridge__list { flex: none; gap: 8px; }
  .bridge__list li { align-items: flex-start; font-size: 19px; }
  .bridge__cta { display: inline-flex; height: 52px; }
  .page-aec .bridge { margin-block: calc(-1 * var(--section-rhythm)); }

  .aec-cta__caveat { color: var(--text-muted); }

  .lead-dialog { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; border-radius: 0; }
  .lead-form { padding: 32px 16px; }
}
