/* ChatGPT carousel prompt kit. Same look as the /resources hub (resources.css): white canvas, system type, quiet colour.
   This page has its own navbar markup (.site-nav), styled here to match the hub's frosted bar.
   carousels.js reads .prompt-code, .copy-toast (+ .visible), [data-copy-target] / [data-copy-all] (+ .copied) and the
   [data-newsletter-*] hooks (+ .is-error on the status line): keep them. */

:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-soft: #f5f5f7;
  --card: #ffffff;
  --ink: #1d1d1f;
  --soft: #6e6e73;
  --faint: #86868b;
  --line: #d2d2d7;
  --hair: rgba(0, 0, 0, 0.08);
  --accent: #0071e3;
  --accent-ink: #0066cc;
  --accent-on-dark: #2997ff;
  --kicker: #bf4800;
  /* The input focus ring. test/carousels-page.test.js pins this token's name; its value is the blue accent. */
  --teal: #0071e3;
  --radius: 24px;
  --ease: cubic-bezier(0.28, 0.11, 0.32, 1);
  --maxw: 1040px;
  --gutter: max(clamp(20px, 5vw, 40px), calc((100% - var(--maxw)) / 2));
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.47 var(--font);
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

button {
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--font);
  text-wrap: balance;
}

.paper-noise,
.tape,
.video-tape,
.final-tape {
  display: none;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 980px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  transform: translateY(-180%);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

/* Navbar: this page's own markup, made to look like the hub's thin frosted bar */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px clamp(16px, 4vw, 40px);
  border-bottom: 1px solid var(--hair);
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  font-size: 13px;
  line-height: 1.47;
  letter-spacing: -0.187px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-dot {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ink);
}

.site-nav nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.site-nav nav a {
  color: var(--ink);
  font-size: 13px;
  opacity: 0.8;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.site-nav nav a:hover {
  opacity: 1;
}

/* "All resources": the small black pill */
.site-nav nav a:last-child {
  padding: 7px 14px;
  border-radius: 980px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  opacity: 1;
  transition: background 0.2s;
}

.site-nav nav a:last-child:hover {
  background: #000;
}

/* Kickers, headlines, buttons */
.eyebrow,
.section-kicker {
  margin-bottom: 0;
  color: var(--soft);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.eyebrow span {
  display: none;
}

.hero h1,
.section-head h2,
.reel-copy h2,
.prompt-intro h2,
.newsletter h2,
.final-cta h2 {
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.07;
}

.hero h1 em,
.section-head h2 em,
.reel-copy h2 em,
.prompt-intro h2 em,
.newsletter h2 em,
.final-cta h2 em {
  color: var(--faint);
  font-style: normal;
}

.section-head h2,
.reel-copy h2,
.prompt-intro h2,
.newsletter h2 {
  margin: 8px 0 0;
  font-size: clamp(31px, 5.4vw, 56px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 26px;
}

.hero-actions-center {
  justify-content: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 0;
  border-radius: 980px;
  font-size: 17px;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.2s;
}

.button-ink,
.button-accent,
.newsletter-submit,
.final-cta .button-paper {
  background: var(--accent);
  color: #fff;
}

.button-ink:hover,
.button-accent:hover,
.newsletter-submit:hover,
.final-cta .button-paper:hover {
  background: #0077ed;
}

.button-paper,
.button-ghost {
  padding-inline: 0;
  border-radius: 6px;
  color: var(--accent-ink);
}

.final-cta .button-paper {
  padding-inline: 22px;
  border-radius: 980px;
}

.button-paper:hover,
.button-ghost:hover {
  text-decoration: underline;
}

.final-cta .button-paper:hover {
  text-decoration: none;
}

.button-ghost {
  color: var(--accent-on-dark);
}

/* Hero */
.hero {
  padding: clamp(64px, 11vw, 132px) var(--gutter) clamp(48px, 7vw, 84px);
  text-align: center;
}

.hero h1 {
  margin: 14px auto 0;
  font-size: clamp(44px, 8.4vw, 96px);
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.hero-lede {
  max-width: 660px;
  margin: 22px auto 0;
  color: var(--soft);
  font-size: clamp(18px, 2.1vw, 22px);
  line-height: 1.42;
  letter-spacing: -0.012em;
}

.hero .hero-actions {
  justify-content: center;
  margin-top: 30px;
}

.hero-note {
  margin: 20px 0 0;
  color: var(--faint);
  font-size: 14px;
}

/* The sample carousel: three slides side by side */
.carousel-stage {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 1.4vw, 16px);
  margin-top: clamp(40px, 6vw, 72px);
  padding: clamp(14px, 2vw, 22px);
  border-radius: 28px;
  background: var(--bg-soft);
  text-align: left;
}

.stage-note {
  grid-column: 1 / -1;
  margin: 4px 0 2px 6px;
  color: var(--soft);
  font-size: 15px;
  font-weight: 600;
}

.sample-slide {
  display: flex;
  aspect-ratio: 4 / 5;
  flex-direction: column;
  overflow: hidden;
  padding: clamp(18px, 2.2vw, 28px);
  border-radius: 18px;
  background: var(--card);
}

.sample-slide-front {
  order: 1;
}

.sample-slide-middle {
  order: 2;
  background: var(--ink);
  color: #f5f5f7;
}

.sample-slide-back {
  order: 3;
}

.sample-slide-back span,
.sample-slide-middle span {
  color: var(--faint);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.sample-slide-back strong,
.sample-slide-middle strong {
  margin-top: auto;
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.slide-topline {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  gap: 8px;
  color: var(--faint);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.slide-topline strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.slide-kicker {
  margin: auto 0 8px;
  padding-top: 20px;
  color: var(--kicker);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.sample-slide-front h2 {
  margin: 0;
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: wrap;
}

.sample-slide-front h2 em {
  color: var(--faint);
  font-style: normal;
}

.slide-deck {
  margin: 10px 0 0;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: 0;
}

.slide-progress {
  height: 3px;
  margin-top: 16px;
  overflow: hidden;
  border-radius: 3px;
  background: #e8e8ed;
}

.slide-progress span {
  display: block;
  width: 16%;
  height: 100%;
  border-radius: 3px;
  background: var(--ink);
}

.sample-slide-front small {
  display: block;
  margin-top: 10px;
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 0;
}

/* The Reel: the black band */
.reel-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.44fr);
  align-items: center;
  gap: clamp(36px, 7vw, 96px);
  padding: clamp(64px, 9vw, 112px) var(--gutter);
  background: #000;
  color: #f5f5f7;
}

.reel-section .section-kicker {
  color: #a1a1a6;
}

.reel-copy > p:not(.section-kicker) {
  max-width: 560px;
  margin: 18px 0 0;
  color: #a1a1a6;
  font-size: clamp(17px, 1.8vw, 19px);
  line-height: 1.47;
}

.checklist {
  max-width: 560px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.checklist li {
  position: relative;
  padding: 13px 0 13px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  color: #f5f5f7;
  font-size: 16px;
}

.checklist li:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.checklist li::before {
  position: absolute;
  left: 2px;
  color: var(--accent-on-dark);
  content: "\2713";
}

.video-polaroid {
  justify-self: center;
  width: min(320px, 100%);
  margin: 0;
}

.video-polaroid video {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius);
  background: #1d1d1f;
  object-fit: cover;
}

.video-polaroid figcaption {
  margin-top: 14px;
  color: #a1a1a6;
  font-size: 14px;
  text-align: center;
}

.video-transcript {
  margin-top: 8px;
  font-size: 14px;
}

.video-transcript summary {
  width: fit-content;
  margin-inline: auto;
  padding: 4px 2px;
  border-radius: 6px;
  color: var(--accent-on-dark);
  cursor: pointer;
}

.video-transcript summary:hover {
  text-decoration: underline;
}

.video-transcript p {
  margin: 12px 0 0;
  color: #a1a1a6;
  line-height: 1.5;
}

/* Ingredients, prompts, workflow */
.ingredients,
.prompt-section,
.workflow {
  padding: clamp(56px, 8vw, 104px) var(--gutter);
  scroll-margin-top: 52px;
}

.prompt-section {
  background: var(--bg-soft);
}

.section-head {
  max-width: 800px;
  margin-bottom: clamp(28px, 4vw, 48px);
}

.ingredient-grid,
.workflow-grid {
  display: grid;
  gap: clamp(14px, 1.8vw, 22px);
}

.ingredient-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.workflow-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ingredient-grid article,
.workflow-grid article {
  padding: 24px 24px 26px;
  border-radius: var(--radius);
  background: var(--bg-soft);
}

.ingredient-grid span,
.workflow-grid span,
.prompt-index > span {
  color: var(--faint);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.ingredient-grid h3,
.workflow-grid h3 {
  margin: 10px 0 0;
  font-size: clamp(21px, 2.1vw, 24px);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.022em;
}

.ingredient-grid p,
.workflow-grid p {
  margin: 8px 0 0;
  color: var(--soft);
  font-size: 16px;
  line-height: 1.42;
}

.prompt-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: end;
  gap: clamp(20px, 5vw, 72px);
  margin-bottom: clamp(28px, 4vw, 48px);
}

.prompt-intro-copy > p {
  margin-bottom: 0;
  color: var(--soft);
  font-size: clamp(17px, 1.8vw, 19px);
  line-height: 1.45;
}

.copy-all {
  margin-top: 20px;
}

.prompt-list {
  display: grid;
  gap: clamp(14px, 1.8vw, 22px);
}

.prompt-card {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) auto;
  align-items: start;
  gap: clamp(16px, 2.4vw, 28px);
  padding: clamp(22px, 2.8vw, 30px);
  border-radius: var(--radius);
  background: var(--card);
}

.prompt-index small {
  display: block;
  margin-top: 4px;
  color: var(--kicker);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.prompt-content h3 {
  margin: 0 0 8px;
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.022em;
}

.prompt-content > p {
  max-width: 660px;
  margin-bottom: 20px;
  color: var(--soft);
  font-size: 16px;
  line-height: 1.42;
}

.prompt-code {
  max-height: 355px;
  margin: 0;
  padding: 20px 22px;
  overflow: auto;
  border-radius: 16px;
  background: var(--bg-soft);
  color: var(--ink);
  font: 13px/1.65 var(--mono);
  letter-spacing: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.copy-button {
  position: sticky;
  top: 68px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 16px;
  border: 0;
  border-radius: 980px;
  background: var(--bg-soft);
  color: var(--accent-ink);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.copy-button:hover {
  background: #e8e8ed;
}

.copy-button.copied,
.copy-all.copied {
  background: var(--ink);
  color: #fff;
}

.workflow-note {
  display: grid;
  grid-template-columns: minmax(200px, 0.5fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(14px, 3vw, 40px);
  margin-top: clamp(14px, 1.8vw, 22px);
  padding: 26px;
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px var(--hair);
}

.workflow-note strong {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.19;
  letter-spacing: -0.02em;
}

.workflow-note p {
  margin: 0;
  color: var(--soft);
}

/* Newsletter: the grey band with a white form card */
.newsletter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  align-items: center;
  gap: 18px clamp(32px, 6vw, 80px);
  padding: clamp(56px, 8vw, 104px) var(--gutter);
  background: var(--bg-soft);
  scroll-margin-top: 52px;
}

.newsletter-stamp {
  display: inline-flex;
  grid-column: 1 / -1;
  align-items: baseline;
  justify-self: start;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 980px;
  background: var(--card);
  color: var(--soft);
  font-size: 13px;
}

.newsletter-stamp strong {
  color: var(--ink);
  font-weight: 600;
}

.newsletter-copy > p:not(.section-kicker) {
  max-width: 540px;
  margin: 16px 0 0;
  color: var(--soft);
  font-size: clamp(17px, 1.8vw, 19px);
  line-height: 1.45;
}

.newsletter-copy ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.newsletter-copy li {
  padding: 6px 12px;
  border-radius: 980px;
  background: var(--card);
  font-size: 13px;
}

.newsletter-form {
  padding: clamp(22px, 3vw, 30px);
  border-radius: var(--radius);
  background: var(--card);
}

.newsletter-form > label {
  display: block;
  margin-bottom: 14px;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.19;
  letter-spacing: -0.02em;
}

.newsletter-field {
  display: grid;
  gap: 10px;
}

.newsletter-field input {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  letter-spacing: inherit;
}

.newsletter-field input::placeholder {
  color: var(--faint);
}

.newsletter-field input:focus { outline: 3px solid var(--teal); outline-offset: 2px; }

.newsletter-submit {
  width: 100%;
  min-height: 48px;
}

.newsletter-submit:disabled {
  cursor: wait;
  opacity: 0.6;
}

.newsletter-consent {
  margin: 14px 0 0;
  color: var(--soft);
  font-size: 12px;
  line-height: 1.5;
}

.newsletter-consent a {
  color: var(--accent-ink);
}

.newsletter-consent a:hover {
  text-decoration: underline;
}

.newsletter-status {
  min-height: 20px;
  margin: 10px 0 -6px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.newsletter-status.is-error {
  color: var(--kicker);
}

.newsletter-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Closing statement: the black band */
.final-cta {
  padding: clamp(64px, 10vw, 120px) var(--gutter);
  background: #000;
  color: #f5f5f7;
  text-align: center;
}

.final-cta .section-kicker {
  color: #a1a1a6;
  font-size: clamp(18px, 2vw, 21px);
  font-weight: 400;
}

.final-cta h2 {
  margin: 12px auto 0;
  font-size: clamp(34px, 6vw, 64px);
}

.final-cta > p:not(.section-kicker) {
  max-width: 620px;
  margin: 20px auto 30px;
  color: #a1a1a6;
  font-size: clamp(17px, 1.8vw, 19px);
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 22px var(--gutter) 40px;
  color: var(--soft);
  font-size: 13px;
}

footer .brand {
  gap: 8px;
  font-size: 13px;
  letter-spacing: 0;
}

footer > a:last-child {
  color: var(--accent-ink);
}

footer > a:last-child:hover {
  text-decoration: underline;
}

.copy-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 90;
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 12px 20px;
  border-radius: 980px;
  background: rgba(29, 29, 31, 0.94);
  color: #fff;
  font-size: 15px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 0.2s ease, transform 0.2s var(--ease);
}

.copy-toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 980px) {
  .ingredient-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .prompt-card {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .copy-button {
    position: static;
    grid-column: 2;
    justify-self: start;
  }

  .newsletter {
    grid-template-columns: 1fr;
    row-gap: 26px;
  }

  .newsletter-stamp {
    margin-bottom: -8px;
  }

  .newsletter-copy {
    max-width: 650px;
  }
}

@media (max-width: 900px) {
  /* The cover slide takes the full row; the next two sit under it. */
  .carousel-stage {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sample-slide-front {
    grid-column: 1 / -1;
    aspect-ratio: auto;
    padding: 24px;
  }

  .slide-kicker {
    margin-top: 0;
    padding-top: 56px;
  }

  .sample-slide-front h2 {
    font-size: clamp(28px, 6vw, 40px);
  }

  .slide-deck {
    max-width: 420px;
    font-size: 14px;
  }

  .sample-slide-back,
  .sample-slide-middle {
    aspect-ratio: 1 / 1;
  }
}

@media (max-width: 700px) {
  body {
    font-size: 16px;
  }

  .site-nav nav {
    gap: 18px;
  }

  .site-nav nav a:first-child,
  .site-nav nav a:nth-child(2) {
    display: none;
  }

  .sample-slide-back strong,
  .sample-slide-middle strong {
    font-size: clamp(18px, 5.2vw, 26px);
  }

  .reel-section {
    grid-template-columns: 1fr;
  }

  .ingredient-grid,
  .workflow-grid {
    grid-template-columns: 1fr;
  }

  .prompt-intro {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .prompt-card {
    grid-template-columns: 1fr;
    gap: 14px;
    border-radius: 20px;
  }

  .prompt-index {
    display: flex;
    align-items: baseline;
    gap: 10px;
  }

  .prompt-index small {
    margin-top: 0;
  }

  .prompt-code {
    max-height: 420px;
    padding: 16px;
    font-size: 12px;
  }

  .copy-button {
    grid-column: auto;
  }

  .workflow-note {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 360px) {
  /* Only the brand and the "All resources" pill fit on the narrowest phones. */
  .site-nav nav a:nth-child(3) {
    display: none;
  }

  .newsletter-stamp { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
