/* The State of the AI Software Factory — page styles.
   Builds on index/theme.css + components/site-theme.css tokens.
   Navy/orange/teal echo the paper's banner. */
.sf-page {
  --sf-navy: #12223a;
  --sf-navy-2: #1d3557;
  --sf-orange: #f08a4b;
  --sf-orange-dark: #d9733a;
  --sf-teal: #6fd3c1;
  --sf-error: #b42318;
}

.sf-page main {
  scroll-margin-top: 80px;
}

/* Hero */
.sf-hero {
  padding: 32px 0 56px;
}
.sf-banner {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--sf-navy);
  cursor: pointer;
  box-shadow: 0 24px 48px -28px rgb(18 34 58 / 55%);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.sf-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 30px 56px -28px rgb(18 34 58 / 65%);
}
.sf-banner:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}
.sf-banner img {
  display: block;
  width: 100%;
  height: auto;
}

/* The banner carries the title on wide screens; the text version
   takes over on narrow screens where the banner text gets too small. */
.sf-hero-copy {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.sf-eyebrow {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-dark) !important;
}
body[data-site-family].sf-page main h1 {
  margin: 0;
  font-size: var(--site-hero-size) !important;
  line-height: 1.08 !important;
  font-weight: 650 !important;
  text-wrap: balance;
}
.sf-lede {
  margin: 14px 0 0;
  max-width: 62ch;
  font-size: var(--site-lede-size);
  line-height: 1.6;
  color: var(--ink-soft);
}
/* The banner has its own download button (the whole banner opens the form),
   so the HTML button row only shows on narrow screens. */
.sf-cta-row {
  display: none;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-top: 28px;
}
.sf-page .cx-btn {
  min-height: 46px;
  padding: 10px 24px;
  font-size: var(--site-button-size);
  gap: 8px;
}
.sf-page .cx-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.sf-meta {
  font-size: 15px;
  color: var(--muted);
}

/* Sections */
.sf-section {
  padding: 88px 0;
  border-top: 1px solid var(--line);
}
.sf-section h2 {
  margin: 0 0 28px;
  font-size: var(--site-section-size) !important;
  line-height: 1.1 !important;
  text-wrap: balance;
}
.sf-abstract-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 48px;
  align-items: start;
}
.sf-prose p {
  margin: 0 0 18px;
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink-soft);
}
.sf-block + .sf-block {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.sf-block p:last-child {
  margin-bottom: 0;
}
.sf-tag {
  display: inline-block;
  margin-bottom: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue-deep);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.5;
}
.sf-pull {
  margin: 28px 0 0;
  padding: 4px 0 4px 22px;
  border-left: 3px solid var(--sf-orange);
  font-size: 21px;
  line-height: 1.5;
  font-weight: 550;
  color: var(--ink);
}

.sf-learn-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 48px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: learn;
}
.sf-learn-grid li {
  position: relative;
  padding: 24px 0 24px 56px;
  border-top: 1px solid var(--line);
  counter-increment: learn;
}
.sf-learn-grid li::before {
  content: counter(learn, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 26px;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--blue-dark);
}
body[data-site-family].sf-page main .sf-learn-grid h3 {
  margin: 0 0 6px;
  font-size: 19px !important;
  line-height: 1.35;
}
.sf-learn-grid p {
  margin: 0;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-soft);
}

/* Final CTA band */
.sf-final {
  padding: 72px 0;
  background: var(--sf-navy);
  color: #f7f7f4;
}
.sf-final-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px 48px;
  flex-wrap: wrap;
}
body[data-site-family].sf-page main .sf-final h2 {
  margin: 0 0 8px;
  font-size: 36px !important;
  line-height: 1.15;
  color: #fff;
}
.sf-final p {
  margin: 0;
  max-width: 56ch;
  color: #c7d2e0;
}
.sf-btn-accent {
  background: var(--sf-orange);
  color: var(--sf-navy);
  font-weight: 600;
}
.sf-btn-accent:hover {
  background: var(--sf-orange-dark);
  transform: translateY(-2px);
}

/* Dialog */
.sf-dialog {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 32px 80px -24px rgb(18 34 58 / 45%);
}
.sf-dialog::backdrop {
  background: rgb(18 34 58 / 55%);
  backdrop-filter: blur(2px);
}
.sf-dialog[open] {
  animation: sf-pop 0.18s ease-out;
}
@keyframes sf-pop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}
.sf-dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
}
.sf-dialog-close:hover {
  background: var(--paper);
}
.sf-dialog-close svg {
  width: 20px;
  height: 20px;
}
body[data-site-family].sf-page main .sf-dialog h2 {
  margin: 0 32px 6px 0;
  font-size: 24px !important;
  line-height: 1.25;
}
.sf-dialog-intro {
  margin: 0 0 20px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.6;
}
.sf-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}
.sf-field {
  display: block;
  margin-bottom: 12px;
}
.sf-field > span {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.sf-field input {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}
.sf-field input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-glow);
}
.sf-field input[aria-invalid="true"] {
  border-color: var(--sf-error);
}
.sf-error {
  display: block;
  min-height: 1em;
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.3;
  color: var(--sf-error);
}
.sf-error:empty {
  min-height: 0;
  margin: 0;
}
.sf-form-error {
  margin: 4px 0 8px;
  font-size: 14px;
  color: var(--sf-error) !important;
}
.sf-form-error:empty {
  display: none;
}
.sf-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.sf-submit {
  width: 100%;
  margin-top: 6px;
}
.sf-submit[data-loading] {
  opacity: 0.7;
  cursor: progress;
}
.sf-submit[data-loading] span::after {
  content: "…";
}
.sf-legal {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted) !important;
}
.sf-legal a,
.sf-done a {
  color: var(--blue-dark);
}
.sf-done {
  padding: 12px 0 4px;
  text-align: center;
}
.sf-done-icon {
  width: 48px;
  height: 48px;
  color: #1f8a5b;
}
.sf-done h2:focus {
  outline: none;
}
body[data-site-family].sf-page main .sf-done h2 {
  margin: 12px 0 8px;
}
.sf-done p {
  margin: 0 0 20px;
  color: var(--ink-soft);
}

@media (max-width: 900px) {
  .sf-abstract-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .sf-learn-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .sf-hero {
    padding: 20px 0 40px;
  }
  .sf-hero-copy {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
    margin-top: 24px;
  }
  .sf-cta-row {
    display: flex;
  }
  .sf-section {
    padding: 56px 0;
  }
  .sf-final {
    padding: 52px 0;
  }
  body[data-site-family].sf-page main .sf-final h2 {
    font-size: 28px !important;
  }
  .sf-dialog {
    padding: 24px 20px;
  }
  .sf-field-row {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sf-banner,
  .sf-dialog[open] {
    transition: none;
    animation: none;
  }
}
