/* ==========================================================================
   How I AI page. Loaded after styles.css, which provides the tokens, nav,
   section titles, cards, media frame, contact links, and footer.
   ========================================================================== */

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

/* ---------- Intro ---------- */
.hai-hero {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: calc(var(--nav-h) + 96px) var(--gutter) 40px;
}
.hai-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.hai-eyebrow__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 158, 97, 0.18);
}
.hai-hero__title {
  margin-left: -0.04em;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: min(24vw, 360px);
  line-height: 0.82;
  letter-spacing: -0.02em;
  color: var(--accent);
  text-transform: uppercase;
}
.hai-hero__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.hai-hero__lede {
  max-width: 720px;
  font-family: var(--font-body);
  font-size: 28px;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--text-soft);
}
.hai-meta {
  display: flex;
  flex-shrink: 0;
  gap: 32px;
  margin: 0;
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.5;
}
.hai-meta dt {
  color: var(--icon-muted);
}
.hai-meta dd {
  margin: 0;
  color: var(--white);
}

/* ---------- Sections ---------- */
.hai-section {
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding: 120px var(--gutter) 0;
}

/* ---------- Workflow overview ---------- */
.flow {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.flow__steps {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
}
.flow a {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  padding: 16px;
  border-radius: 14px;
  background: var(--card);
  transition: background-color 0.2s ease;
}
/* Connector into the next phase */
.flow__steps li {
  position: relative;
}
.flow__steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -12px;
  width: 12px;
  height: 1px;
  background: rgba(255, 158, 97, 0.5);
}
.flow a:hover,
.flow a:focus-visible {
  background: #2a2a2a;
}
.flow a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.flow__index {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 13px;
  line-height: 1.3;
  color: var(--accent);
}
.flow__name {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1.05;
  color: var(--white);
  text-transform: uppercase;
}
.flow__tools {
  margin-top: auto;
  padding-top: 10px;
  font-family: var(--font-ui);
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-muted);
}
.flow .flow__always {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 16px;
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(255, 158, 97, 0.35);
}
.flow .flow__always:hover,
.flow .flow__always:focus-visible {
  background: rgba(255, 158, 97, 0.06);
}
.flow__always .flow__tools {
  margin: 0 0 0 auto;
  padding: 0;
}

/* ---------- Phases: sticky label on the left, steps and media on the right ---------- */
.phases {
  display: flex;
  flex-direction: column;
}
.phase {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  padding: 80px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.phase:first-child {
  margin-top: 32px;
}
.phase__aside {
  position: sticky;
  top: var(--sticky-top);
  flex: 0 0 300px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.phase__index {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.03em;
  color: var(--accent);
}
.phase__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 56px;
  line-height: 1;
  color: var(--white);
  text-transform: uppercase;
}
.phase__summary {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--text-muted);
}
.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.tools li {
  padding: 6px 12px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.2;
  color: var(--text-soft);
}

.phase__content {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.steps {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 760px;
  counter-reset: step;
}
.steps li {
  position: relative;
  padding-left: 48px;
  counter-increment: step;
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: 6px;
  left: 0;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 13px;
  line-height: 1;
  color: var(--icon-muted);
}
.step__title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 28px;
  line-height: 1.1;
  color: var(--white);
  text-transform: uppercase;
}
.steps p {
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: var(--text-muted);
}

/* ---------- Figures (screens, recordings, placeholders) ---------- */
.shots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--media-gap);
}
.shot {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.shot figcaption {
  max-width: 760px;
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}
.shot figcaption strong {
  margin-right: 8px;
  font-weight: 600;
  color: var(--accent);
}
/* Stand-in for a screenshot or recording. Its frame is capped in height so
   the empty frames don't dominate the page; real media isn't capped. */
.media:has(> .placeholder) {
  max-height: 440px;
}
.placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 100%;
  border-radius: calc(var(--frame-radius) - var(--frame-pad));
  background-color: #161616;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 18px 18px;
  outline: 1px solid rgba(255, 255, 255, 0.08);
  outline-offset: -1px;
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.2;
  color: var(--icon-muted);
}
.placeholder svg {
  width: 32px;
  height: 32px;
}

/* ---------- Toolkit ---------- */
.toolkit {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.toolkit li {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 260px;
  gap: 24px;
  align-items: baseline;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.toolkit__name {
  font-family: var(--font-display);
  font-size: 36px;
  line-height: 1.1;
  color: var(--white);
  text-transform: uppercase;
}
.toolkit__use {
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: var(--text-soft);
}
.toolkit__phase {
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-muted);
  text-align: right;
}

/* ---------- Honest note + updates ---------- */
.hai-closing {
  flex-direction: row;
  gap: 40px;
}
.hai-quote {
  flex: 2 1 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 40px;
  border-radius: 16px;
  background: var(--card);
}
.hai-quote__label {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 13px;
  line-height: 1.3;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: uppercase;
}
.hai-quote blockquote {
  margin: 0;
  font-family: var(--font-body);
  font-size: 32px;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--white);
}
.updates {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 40px 0;
}
.updates__list li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 16px;
  border-left: 2px solid var(--accent);
}
.updates__list time {
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.4;
  color: var(--white);
}
.updates__list p {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: var(--text-muted);
}
.updates__list a {
  color: var(--white);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.35);
  text-underline-offset: 3px;
}
.updates__list a:hover {
  color: var(--accent);
}

/* ---------- Contact ---------- */
.contact .section-head {
  max-width: none;
}

/* ==========================================================================
   Small desktop: 1200 – 1439px
   ========================================================================== */
@media (max-width: 1439.98px) {
  .phase__aside {
    flex-basis: 260px;
  }
  .flow__steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .flow__steps li:nth-child(4)::after {
    display: none;
  }
}

/* ==========================================================================
   Tablet: 810 – 1199px
   ========================================================================== */
@media (max-width: 1199.98px) {
  .hai-hero__foot {
    flex-direction: column;
    align-items: flex-start;
  }
  .hai-hero__lede {
    font-size: 24px;
  }
  .phase {
    gap: 24px;
  }
  .phase__aside {
    flex-basis: 220px;
  }
  .phase__title {
    font-size: 44px;
  }
  .toolkit li {
    grid-template-columns: 200px minmax(0, 1fr);
  }
  .toolkit__phase {
    grid-column: 2;
    text-align: left;
  }
  .hai-closing {
    flex-direction: column;
  }
  .updates {
    padding: 0;
  }
}

/* ==========================================================================
   Phone: < 810px
   ========================================================================== */
@media (max-width: 809.98px) {
  .hai-hero {
    padding-top: calc(var(--nav-h) + 56px);
  }
  .hai-hero__title {
    font-size: 36vw;
  }
  .hai-hero__lede {
    font-size: 20px;
  }
  .hai-meta {
    gap: 24px;
  }
  .hai-section {
    gap: 32px;
    padding-top: 96px;
  }

  .flow__steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .flow__steps li::after {
    display: none;
  }
  .flow__name {
    font-size: 22px;
  }
  .flow__always .flow__tools {
    margin-left: 0;
    flex-basis: 100%;
  }

  .phase {
    flex-direction: column;
    align-items: stretch;
    gap: 32px;
    padding: 56px 0;
  }
  .phase__aside {
    position: relative;
    top: auto;
    flex-basis: auto;
  }
  .phase__title {
    font-size: 48px;
  }
  .steps li {
    padding-left: 36px;
  }
  .shots {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
  .step__title {
    font-size: 24px;
  }
  .steps p {
    font-size: 18px;
  }

  .toolkit li {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
  .toolkit__name {
    font-size: 30px;
  }
  .toolkit__use {
    font-size: 18px;
  }
  .toolkit__phase {
    grid-column: auto;
  }

  .hai-quote {
    padding: 24px;
  }
  .hai-quote blockquote {
    font-size: 24px;
  }
}
