/* ChatGPT page: "Inner Weather". Warm and emotional, like the golden light in the film.
   The page moves through the sky: dusk at the top, deep plum through the chapters, a warmer
   "feelings" chapter, and golden hour for the final note. Fraunces italic + Inter.
   Loads after page.css (which still provides the Back button and the bottom bar). */

@font-face {
  font-family: "Fraunces";
  src: url("assets/fonts/fraunces-italic-latin.woff2") format("woff2");
  font-weight: 300 500;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("assets/fonts/inter-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

.cg-page {
  --plum: #1c1022;
  --plum-2: #24152c;
  --wine: #5b2c3b;
  --ember: #b4623f;
  --gold: #e7a865;
  --cream: #fff4e6;
  --soft: rgba(255, 244, 230, 0.8);
  --quiet: rgba(255, 244, 230, 0.58);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

body.cg-page {
  color: var(--cream);
  background: var(--plum);
  font-family: var(--body);
  overflow-x: hidden;
}

/* page.css centers everything in <main>; let sections run full width in every browser */
.cg-page .chatgpt-project {
  display: block;
  width: 100%;
  min-height: 100vh;
  justify-items: normal;
  background: var(--plum);
}

.cg-page em {
  font-style: italic;
}

/* ---------- shared ---------- */

.cg-label {
  margin: 0;
  color: var(--quiet);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  line-height: 1.4;
  text-transform: uppercase;
}

.cg-text {
  max-width: 44rem;
  margin: 0 0 1.1rem;
  color: var(--soft);
  font-size: clamp(1.02rem, 1.2vw, 1.12rem);
  line-height: 1.7;
  text-wrap: pretty;
}

.cg-text-strong {
  color: var(--cream);
  font-weight: 500;
}

.cg-text-after {
  margin-top: 1.6rem;
}

.cg-sub {
  margin: 3.4rem 0 0.4rem;
  color: var(--cream);
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2vw, 1.75rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.2;
}

.cg-small {
  margin: 0 0 1.4rem;
  color: var(--quiet);
  font-size: 0.92rem;
}

.cg-note {
  max-width: 44rem;
  margin: 1.4rem 0 0;
  color: var(--quiet);
  font-size: 0.98rem;
  line-height: 1.6;
}

/* ---------- Opening: dusk ---------- */

.cg-open {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 4rem;
  min-height: 100svh;
  padding: 6rem 5vw 4.5rem;
  background: linear-gradient(160deg, var(--plum-2) 0%, var(--wine) 45%, var(--ember) 80%, var(--gold) 100%);
}

.cg-logo {
  display: block;
  width: 2.4rem;
  height: auto;
  margin-bottom: 1.8rem;
  filter: invert(1);
  opacity: 0.92;
}

.cg-label-gap {
  margin-top: 0.4rem;
}

.cg-title {
  margin: 0.8rem 0 0;
  color: var(--cream);
  font-family: var(--serif);
  font-size: clamp(3.6rem, 7.6vw, 7.4rem);
  font-style: italic;
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.cg-open-still {
  margin: 0;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 30px 70px rgba(36, 21, 44, 0.5);
}

.cg-open-still img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 40% center;
}

@media (prefers-reduced-motion: no-preference) {
  html:has(.cg-page) {
    scroll-behavior: smooth;
  }

  .cg-open-copy > *,
  .cg-open-still {
    animation: cg-rise 1s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .cg-open-copy .cg-title {
    animation-delay: 0.12s;
  }

  .cg-open-still {
    animation-delay: 0.3s;
  }
}

@keyframes cg-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- The insight ---------- */

.cg-insight {
  padding: 6rem 5vw 5.5rem;
  background: radial-gradient(900px 420px at 0% 0%, rgba(180, 98, 63, 0.22), transparent 70%), var(--plum);
}

.cg-statement {
  max-width: 62rem;
  margin: 1rem 0 0;
  color: var(--cream);
  font-family: var(--serif);
  font-size: clamp(1.9rem, 3.6vw, 3.2rem);
  font-style: italic;
  font-weight: 300;
  line-height: 1.22;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}

.cg-campaign {
  max-width: 44rem;
  margin: 2.6rem 0 0;
  color: var(--soft);
  font-size: 1.1rem;
  line-height: 1.7;
}

.cg-campaign em {
  color: var(--cream);
  font-family: var(--serif);
  font-size: 1.15em;
}

.cg-campaign a {
  padding: 0.35rem 0;
  color: var(--gold);
  text-decoration: underline;
  text-decoration-color: rgba(231, 168, 101, 0.45);
  text-underline-offset: 0.2em;
}

.cg-campaign a:hover,
.cg-campaign a:focus-visible {
  text-decoration-color: var(--gold);
}

/* ---------- Chapters ---------- */

.cg-chapter {
  padding: 5.5rem 5vw 6rem;
  background: radial-gradient(1000px 500px at 100% 0%, rgba(91, 44, 59, 0.55), transparent 70%), var(--plum);
}

.cg-chapter-warm {
  background:
    radial-gradient(1100px 600px at 0% 0%, rgba(180, 98, 63, 0.3), transparent 70%),
    linear-gradient(180deg, #24131f, #2c1620);
}

.cg-head {
  margin-bottom: 2rem;
}

.cg-head h2 {
  margin: 0.6rem 0 0;
  color: var(--cream);
  font-family: var(--serif);
  font-size: clamp(2.8rem, 5.6vw, 5rem);
  font-style: italic;
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.02em;
}

.cg-made {
  margin: 1rem 0 0;
  color: var(--soft);
  font-family: var(--serif);
  font-size: clamp(1.3rem, 1.9vw, 1.6rem);
  font-style: italic;
  font-weight: 300;
}

.cg-made strong {
  color: var(--gold);
  font-weight: 500;
}

.cg-format {
  display: inline-block;
  margin: 1.1rem 0 0;
  padding: 0.45rem 0.8rem;
  color: var(--cream);
  border: 1px solid rgba(255, 244, 230, 0.22);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* film */
.cg-film {
  margin: 2.6rem 0 0;
}

.cg-film video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.cg-film figcaption {
  margin-top: 0.9rem;
  color: var(--quiet);
  font-size: 0.92rem;
}

/* rows of pieces, all the same height */
.cg-row {
  display: flex;
  gap: 1rem;
  margin-top: 1.2rem;
}

.cg-row figure {
  flex: var(--r) 1 0;
  min-width: 0;
  margin: 0;
}

.cg-row img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  background: var(--plum-2);
}

.cg-row figcaption {
  margin-top: 0.7rem;
  color: var(--soft);
  font-family: var(--serif);
  font-size: 1.05rem;
  font-style: italic;
}

/* social carousel */
.cg-carousel {
  display: grid;
  grid-auto-columns: minmax(13rem, 17rem);
  grid-auto-flow: column;
  gap: 0.9rem;
  margin: 0 -5vw;
  padding: 0 5vw 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 5vw;
  scrollbar-color: rgba(255, 244, 230, 0.35) transparent;
  scrollbar-width: thin;
}

.cg-carousel img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 639 / 1100;
  border-radius: 12px;
  background: #000;
  scroll-snap-align: start;
}

.cg-carousel:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

/* creators */
.cg-creators {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4rem;
  margin-top: 1.2rem;
}

.cg-creator {
  padding: 1rem 1rem 1.4rem;
  background: rgba(255, 244, 230, 0.05);
  border: 1px solid rgba(255, 244, 230, 0.08);
  border-radius: 16px;
}

.cg-creator img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.cg-creator p {
  margin: 1.1rem 0.3rem 0;
  color: var(--soft);
  font-size: 1rem;
  line-height: 1.65;
}

.cg-creator strong {
  color: var(--cream);
  font-family: var(--serif);
  font-size: 1.2em;
  font-style: italic;
  font-weight: 500;
}

/* From Feeling to Form */
.cg-story {
  max-width: 56rem;
  margin: 4rem 0 0;
  padding-top: 3rem;
  border-top: 1px solid rgba(255, 244, 230, 0.12);
}

.cg-story-title {
  margin: 0 0 0.3rem;
  color: var(--cream);
  font-family: var(--serif);
  font-size: clamp(2rem, 3.4vw, 2.8rem);
  font-style: italic;
  font-weight: 300;
}

.cg-question {
  max-width: 44rem;
  margin: 1.4rem 0 0;
  color: var(--cream);
  font-size: clamp(1.15rem, 1.6vw, 1.35rem);
  font-weight: 600;
  line-height: 1.5;
}

.cg-small-gap {
  margin-top: 2rem;
  margin-bottom: 0.6rem;
}

.cg-quote {
  margin: 0 0 2rem;
}

.cg-quote p {
  margin: 0;
  color: var(--gold);
  font-family: var(--serif);
  font-size: clamp(2rem, 4.2vw, 3.6rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.cg-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 1.2rem;
  max-width: 56rem;
  margin-top: 1.4rem;
}

.cg-pair img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.cg-pair-arrow {
  color: var(--gold);
  font-size: 1.6rem;
}

/* ---------- Final note: golden hour ---------- */

.cg-final {
  display: grid;
  justify-items: center;
  padding: 6.5rem 5vw 6rem;
  color: #2a1428;
  background: linear-gradient(180deg, #c9784a 0%, var(--gold) 45%, #f4cf98 100%);
  text-align: center;
}

.cg-final .cg-label {
  color: rgba(42, 20, 40, 0.65);
}

.cg-final-text {
  max-width: 44rem;
  margin: 1.4rem 0 0;
  color: rgba(42, 20, 40, 0.85);
  font-size: 1.12rem;
  line-height: 1.7;
}

.cg-final-line {
  max-width: 50rem;
  margin: 2.6rem 0 0;
  color: #2a1428;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.cg-final-logo {
  width: 2.8rem;
  height: auto;
  margin-top: 3rem;
  opacity: 0.85;
}

/* ---------- bottom bar ---------- */

.cg-page .project-footer {
  background: var(--plum);
  border-top-color: rgba(255, 244, 230, 0.08);
  font-family: var(--body);
}

.cg-page .project-footer p {
  color: var(--quiet);
}

.cg-page .project-footer a {
  color: var(--gold);
  font-family: var(--serif);
  font-size: 1.1rem;
  font-style: italic;
  font-weight: 400;
}

/* ---------- Tablets and phones ---------- */

@media (max-width: 900px) {
  .cg-open {
    grid-template-columns: 1fr;
    gap: 2.4rem;
  }

  .cg-creators {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .cg-open {
    padding: 5.2rem 1.2rem 3.2rem;
  }

  .cg-insight {
    padding: 4.2rem 1.2rem 4rem;
  }

  .cg-chapter {
    padding: 4rem 1.2rem 4.4rem;
  }

  .cg-row {
    flex-direction: column;
  }

  .cg-row figure {
    flex: none;
  }

  .cg-carousel {
    grid-auto-columns: 72vw;
    margin: 0 -1.2rem;
    padding: 0 1.2rem 1rem;
    scroll-padding: 0 1.2rem;
  }

  .cg-pair {
    gap: 0.6rem;
  }

  .cg-pair-arrow {
    font-size: 1.2rem;
  }

  .cg-final {
    padding: 4.6rem 1.2rem 4.4rem;
  }
}
