/*
  /migrations/ · the page's sections (Site · Migrations & careers, 14 Oct). Each section's rules sit under its own
  class (.mg-hero, .mg-how, .mg-plan, .mg-faq), on top of the site's frame (/marketing/shared/site/site.css: the
  container, the type scale, the section head, the buttons). Tokens: /shared/adam-v1.css. The animation's own rules
  are rebuild.css.
*/

/* ---------------------------------------------------------------- the hero: Stacked (/home/v1/ hero L2) */
.mg-hero { padding-top: clamp(40px, 5.6vw, 80px); padding-bottom: var(--sec-gap); }   /* the site's section gap (site.css) */
.mg-hero .mg-eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 clamp(20px, 2.2vw, 32px); color: var(--muted); }
.mg-hero .mg-eyebrow i { width: 6px; height: 6px; background: var(--accent); }
.mg-hero-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: end; padding-bottom: clamp(32px, 3.9vw, 56px); }
.mg-hero .mg-h1 { grid-column: 1 / span 8; }
.mg-hero-aside { grid-column: 9 / -1; display: grid; gap: 28px; justify-items: start; padding-bottom: .5em; }
.mg-hero-aside .site-lead { font-size: clamp(17px, 1.39vw, 20px); }
.mg-hero-aside .site-btns { gap: 12px; }
.mg-hero-aside .site-btn { min-width: 0; }
/* "How it works": a quiet mono text link under the pair */
.mg-how-link { display: inline-flex; align-items: center; gap: 8px; margin-top: -8px; color: var(--muted); text-decoration: none; transition: color .2s ease; }
.mg-how-link:hover { color: var(--ink); }
.mg-how-link .ic { width: 14px; height: 14px; }
.mg-how-link:focus-visible { outline: var(--focus-ring, 2px solid var(--focus)); outline-offset: 2px; }
@media (max-width: 1279px) {
  .mg-hero .mg-h1 { grid-column: 1 / -1; }
  .mg-hero-aside { grid-column: 1 / span 7; margin-top: 32px; padding-bottom: 0; }
}
@media (max-width: 767px) {
  .mg-hero-aside { grid-column: 1 / -1; margin-top: 24px; gap: 24px; }
  .mg-hero-aside .site-btns { width: 100%; }
  .mg-hero-aside .site-btns .site-btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) { .mg-how-link { transition: none; } }

/* ---------------------------------------------------------------- 01 · how it works: three cells */
.mg-k { font-family: var(--font-mono); font-weight: 400; font-size: 12px; line-height: 18px; letter-spacing: .04em; color: var(--accent); }
.mg-how .mg-how-h2 { grid-column: 1 / span 8; }
.mg-cells { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 48px; margin: 24px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.mg-cell { position: relative; padding: 20px 0 0; }
/* the hairline between cells, in the gap's middle, so the three drawings are the same size */
.mg-cell + .mg-cell::before { content: ''; position: absolute; left: -24px; top: 0; bottom: 0; width: 1px; background: var(--line); }
/* each cell's drawing (figs.js, on the blog-figures kit: 16:10 on grid paper) above its title */
.mg-cell .mg-fig { margin-bottom: 24px; }
.mg-cell h3 { display: grid; gap: 14px; margin: 0 0 14px; font-family: var(--font-display); font-weight: var(--k-weight, 400); font-size: clamp(22px, 1.8vw, 26px); line-height: 1.15; letter-spacing: -.02em; color: var(--ink); text-wrap: balance; }
.mg-cell p { margin: 0; max-width: 380px; font-family: var(--font-body); font-size: 16px; line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }
@media (max-width: 1023px) {
  .mg-how .mg-how-h2 { grid-column: 1 / -1; }
  .mg-cells { grid-template-columns: 1fr; }
  .mg-cell + .mg-cell::before { display: none; }
  .mg-cell, .mg-cell + .mg-cell { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; padding: 24px 0 32px; border-left: 0; }
  .mg-cell + .mg-cell { border-top: 1px solid var(--line); }
  .mg-cell .mg-fig { grid-column: 1 / span 6; grid-row: 1 / span 2; margin: 0; }
  .mg-cell h3, .mg-cell p { grid-column: 7 / -1; }
  .mg-cell h3 { align-self: end; }
  .mg-cell p { max-width: none; }
}
@media (max-width: 767px) {
  .mg-cell, .mg-cell + .mg-cell { display: block; padding: 20px 0 28px; }
  .mg-cell .mg-fig { margin-bottom: 20px; }
  .mg-cell h3 { margin-bottom: 12px; }
  .mg-cell p { font-size: 15px; }
}

/* ---------------------------------------------------------------- 02 · the plan: a sticky rail beside the steps (C1) */
.mg-plan-side { grid-column: 1 / span 4; align-self: start; position: sticky; top: 96px; display: grid; gap: 40px; justify-items: start; padding-right: 24px; }
.mg-plan .mg-steps { grid-column: 5 / -1; margin: 0; padding: 0; list-style: none; }
.mg-rail { margin: 0; padding: 0; list-style: none; display: grid; gap: 0; min-width: 220px; border-top: 1px solid var(--line); }
.mg-rail li {
  position: relative; display: flex; gap: 16px; padding: 10px 0 10px 16px; border-bottom: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 12px; line-height: 18px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
  transition: color .3s ease;
}
.mg-rail li .mg-k { color: inherit; }
/* the current step: ink type and a pink tick on the left, as C1's rail */
.mg-rail li::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 2px; background: var(--accent); transform: scaleY(0); transition: transform .35s cubic-bezier(.22, 1, .36, 1); }
.mg-rail li[data-on] { color: var(--ink); }
.mg-rail li[data-on] .mg-k { color: var(--accent); }
.mg-rail li[data-on]::before { transform: scaleY(1); }
/* a step: its number, its words, its drawing; the rule over it is the grey hairline, ink while it's the one being
   read (Tong's review 6.5), the number pink with it */
.mg-step {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) minmax(0, .82fr); grid-template-areas: "n h fig" "n p fig"; column-gap: 24px; align-items: start;
  padding: 24px 0 64px; border-top: 1px solid var(--line); transition: border-color .35s cubic-bezier(.22, 1, .36, 1);
}
.mg-step:last-child { padding-bottom: 0; }
.mg-step[data-on] { border-top-color: var(--ink); }
.mg-step-n { grid-area: n; padding-top: 6px; font-family: var(--font-mono); font-size: 12px; line-height: 18px; letter-spacing: .04em; color: var(--muted); transition: color .35s ease; }
.mg-step[data-on] .mg-step-n { color: var(--accent); }
.mg-step h3 { grid-area: h; margin: 0 0 16px; font-family: var(--font-display); font-weight: var(--k-weight, 400); font-size: clamp(26px, 2.2vw, 32px); line-height: 1.1; letter-spacing: -.02em; color: var(--ink); text-wrap: balance; }
.mg-step p { grid-area: p; margin: 0; max-width: 520px; font-family: var(--font-body); font-size: 17px; line-height: 1.6; color: var(--ink-2); text-wrap: pretty; }
.mg-step .mg-fig { grid-area: fig; padding-top: 4px; }
/* below 1024 the steps follow the heading, and the rail goes */
@media (max-width: 1023px) {
  .mg-plan-side { grid-column: 1 / -1; position: static; gap: 24px; padding-right: 0; }
  .mg-plan-side .site-h2 { max-width: 640px; }
  .mg-rail { display: none; }
  .mg-plan .mg-steps { grid-column: 1 / -1; margin-top: 16px; }
  .mg-step { padding-bottom: 48px; }
}
/* phones: the drawing over the words */
@media (max-width: 767px) {
  .mg-step { grid-template-columns: 1fr; grid-template-areas: "n" "fig" "h" "p"; padding: 18px 0 36px; }
  .mg-step-n { padding: 0 0 12px; }
  .mg-step .mg-fig { padding: 0 0 18px; }
  .mg-step p { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { .mg-rail li, .mg-rail li::before, .mg-step, .mg-step-n { transition: none; } }

/* ---------------------------------------------------------------- 03 · before you migrate: /home/k/'s FAQ accordion */
.mg-faq .mg-faq-h2 { grid-column: 1 / span 4; align-self: start; }
.mg-fq { grid-column: 5 / -1; border-top: 1px solid var(--line); }
.mg-fq-item { border-bottom: 1px solid var(--line); }
.mg-fq-item h3 { margin: 0; font: inherit; }
.mg-fq-btn {
  display: grid; grid-template-columns: 36px 1fr 16px; gap: 16px; align-items: start; width: 100%; padding: 20px 0;
  border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.mg-fq-btn:focus-visible { outline: var(--focus-ring, 2px solid var(--focus)); outline-offset: 2px; }
.mg-fq-n { padding-top: 4px; font: 400 12px/18px var(--font-mono); letter-spacing: .04em; color: var(--muted); }
.mg-fq-q { font-family: var(--font-display); font-weight: 400; font-size: clamp(17px, 1.32vw, 19px); line-height: 26px; letter-spacing: -.01em; color: var(--ink); text-wrap: balance; }
.mg-fq-pm { position: relative; width: 16px; height: 16px; margin-top: 4px; color: var(--ink); transition: color .3s ease; }
.mg-fq-pm i { position: absolute; left: 3px; right: 3px; top: 7.5px; height: 1px; background: currentColor; transition: transform .45s cubic-bezier(.65, 0, .35, 1); }
.mg-fq-pm i + i { transform: rotate(90deg); }
.mg-fq-btn:hover .mg-fq-pm, .is-open .mg-fq-pm { color: var(--accent); }
.is-open .mg-fq-pm i + i { transform: rotate(0deg); }
.mg-fq-a { display: grid; grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows .45s cubic-bezier(.65, 0, .35, 1), visibility 0s linear .45s; }
.mg-fq-a > div { min-height: 0; overflow: hidden; }
.mg-fq-a p { max-width: 780px; margin: 0; padding: 0 48px 26px 52px; font-size: 16px; line-height: 24px; color: var(--muted); text-wrap: pretty; }
.is-open .mg-fq-a { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows .45s cubic-bezier(.65, 0, .35, 1), visibility 0s; }
@media (max-width: 1023px) { .mg-faq .mg-faq-h2 { grid-column: 1 / span 4; } .mg-fq { grid-column: 5 / -1; } }
@media (max-width: 767px) {
  .mg-faq .mg-faq-h2, .mg-fq { grid-column: 1 / -1; }
  .mg-fq-btn { grid-template-columns: 24px 1fr 16px; gap: 12px; padding: 18px 0; }
  .mg-fq-q { line-height: 24px; }
  .mg-fq-n { padding-top: 3px; }
  .mg-fq-a p { padding: 0 8px 22px 36px; font-size: 15px; line-height: 22px; }
}
@media (prefers-reduced-motion: reduce) { .mg-fq-a, .is-open .mg-fq-a, .mg-fq-pm, .mg-fq-pm i { transition: none; } }
