/* Generator pages (advertorial, listicle, bridge). Loads after site.css and
   home.css (hero, section, step and FAQ styles). */

/* Hero: same frame as the homepage, with a page being written and numbered tiles */
.gen-hero .home-hero-lead {
  max-width: max(520px, calc(790 * var(--hu)));
}

.gen-stage {
  --u: calc(var(--hu) * 0.75);
  top: calc(-10 * var(--hu));
  width: calc(730 * var(--u));
  height: calc(690 * var(--u));
}

.gen-paper {
  position: absolute;
  top: calc(10 * var(--u));
  left: calc(132 * var(--u));
  width: calc(400 * var(--u));
  height: calc(640 * var(--u));
  padding: calc(10 * var(--u));
  border-radius: calc(24 * var(--u));
  background: #fff;
  box-shadow: 0 calc(30 * var(--u)) calc(80 * var(--u)) rgba(0, 0, 0, 0.5);
  color: var(--lg-slate);
  transform: rotate(3deg);
}

.gen-paper img {
  display: block;
  width: 100%;
  height: calc(489 * var(--u));
  object-fit: cover;
  object-position: top;
  border-radius: calc(16 * var(--u));
}

/* The form page capture is wide and short: show its middle, where the form is. */
.gen-paper.is-form img {
  object-position: 56% 0;
}

.gen-paper-status {
  display: flex;
  align-items: center;
  gap: calc(8 * var(--u));
  margin: calc(20 * var(--u)) calc(14 * var(--u)) 0;
  font-size: calc(13 * var(--u));
  line-height: calc(16 * var(--u));
}

.gen-paper-status::before {
  content: "";
  width: calc(8 * var(--u));
  height: calc(8 * var(--u));
  border-radius: 50%;
  background: var(--lg-coral);
}

.gen-paper .home-stage-lines {
  gap: calc(12 * var(--u));
  margin: calc(18 * var(--u)) calc(14 * var(--u)) 0;
}

.gen-paper .home-stage-lines i {
  height: calc(10 * var(--u));
}

.gen-paper .home-stage-lines i:nth-child(2) {
  width: 91%;
}

.gen-paper .home-stage-lines .home-stage-writing {
  width: 67%;
}

.gen-stage .home-stage-quill {
  top: calc(237 * var(--u));
  left: calc(392 * var(--u));
}

.gen-tile {
  --fan-x: calc(70 * var(--u));
  --fan-y: 0px;
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  width: calc(104 * var(--u));
  height: calc(104 * var(--u));
  border-radius: calc(26 * var(--u));
  background: var(--lg-gradient);
  box-shadow: 0 calc(18 * var(--u)) calc(40 * var(--u)) rgba(0, 0, 0, 0.35);
  color: #fff;
  font-family: var(--lg-display);
  font-size: calc(62 * var(--u));
  line-height: 1;
  transition: transform 0.6s cubic-bezier(0.2, 0.85, 0.3, 1.25);
  animation: home-fan-open 0.8s cubic-bezier(0.2, 0.8, 0.25, 1.1) backwards;
}

.gen-tile:nth-of-type(1) {
  top: calc(60 * var(--u));
  left: calc(38 * var(--u));
  animation-delay: 0.15s;
}

.gen-tile:nth-of-type(2) {
  top: calc(202 * var(--u));
  left: calc(8 * var(--u));
  animation-delay: 0.27s;
}

.gen-tile:nth-of-type(3) {
  top: calc(344 * var(--u));
  left: calc(42 * var(--u));
  animation-delay: 0.39s;
}

/* Word tiles (advertorial and bridge pages) hug the paper from the left. */
.gen-tile.is-word {
  left: auto;
  width: auto;
  height: calc(64 * var(--u));
  padding: 0 calc(20 * var(--u));
  border-radius: calc(20 * var(--u));
  font-size: calc(38 * var(--u));
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.gen-tile.is-word:nth-of-type(1) {
  top: calc(80 * var(--u));
  right: calc(588 * var(--u));
}

.gen-tile.is-word:nth-of-type(2) {
  top: calc(222 * var(--u));
  right: calc(618 * var(--u));
}

.gen-tile.is-word:nth-of-type(3) {
  top: calc(364 * var(--u));
  right: calc(584 * var(--u));
}

.home-stage.is-waiting .gen-tile {
  opacity: 0;
  transform: translate(var(--fan-x), var(--fan-y)) scale(0.86);
  transition: none;
  animation: none;
}

@media (hover: hover) {
  .gen-stage:hover .gen-tile:nth-of-type(1) {
    transform: translate(calc(-16 * var(--u)), calc(-8 * var(--u))) rotate(-9deg);
  }

  .gen-stage:hover .gen-tile:nth-of-type(2) {
    transform: translateX(calc(-6 * var(--u))) rotate(6deg) scale(1.06);
    transition-delay: 0.05s;
  }

  .gen-stage:hover .gen-tile:nth-of-type(3) {
    transform: translate(calc(-16 * var(--u)), calc(8 * var(--u))) rotate(-7deg);
    transition-delay: 0.1s;
  }
}

/* Section headings */
.gen-title-md {
  font-size: clamp(36px, 5vw, 72px);
  line-height: 1.085;
}

.gen-title-sm {
  font-size: clamp(34px, 4.6vw, 66px);
  line-height: 1.12;
}

/* A section that continues the one above on the same background */
.gen-section-follow {
  padding-top: 0;
}

/* What you get */
.gen-gets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px 32px;
  margin: 54px 0 0;
  padding: 0;
  list-style: none;
}

.gen-gets li {
  padding: 28px 32px 34px;
  border-radius: 28px;
  background: #fff;
}

.gen-gets h3 {
  display: flex;
  align-items: center;
  gap: 26px;
  font-family: var(--lg-serif);
  font-size: 24px;
  font-weight: 900;
  line-height: 32px;
}

.gen-gets h3 span {
  background: var(--lg-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-family: var(--lg-display);
  font-size: 38px;
  font-weight: 400;
  line-height: 44px;
}

.gen-gets p {
  margin-top: 16px;
  color: var(--lg-slate);
  font-size: 16px;
  line-height: 25px;
}

/* List types */
.gen-type {
  min-height: 290px;
  padding: 32px 36px 40px;
  border-radius: 32px;
  background: var(--lg-night);
  color: #fff;
}

.gen-type:nth-child(2) {
  background: var(--lg-cobalt);
}

.gen-type:nth-child(3) {
  /* Deeper coral than the token keeps the white text above 4.5:1 (WCAG AA), as on the home steps. */
  background: #dc2f46;
}

.gen-type .home-card-title {
  font-size: 38px;
  line-height: 49px;
}

.gen-type-example {
  margin-top: 11px;
  font-family: var(--lg-serif);
  font-size: 20px;
  font-style: italic;
  font-weight: 900;
  line-height: 28px;
}

.gen-type-text {
  margin-top: 40px;
  font-size: 16.5px;
  line-height: 26px;
}

.gen-type:first-child .gen-type-text {
  color: var(--lg-mist);
}

/* Real example */
.gen-example {
  overflow: hidden;
  padding-bottom: 0;
}

.gen-example-inner {
  display: grid;
  grid-template-columns: minmax(0, 560px) minmax(0, 656px);
  justify-content: space-between;
  gap: 48px;
}

.gen-browser {
  position: relative;
  container-type: inline-size;
}

.gen-browser-window {
  height: 100%;
  max-height: 904px;
  overflow: hidden;
  border-radius: 20px 20px 0 0;
  background: #fff;
  box-shadow: 0 30px 80px rgba(11, 16, 38, 0.18);
}

.gen-browser-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  background: var(--lg-night);
}

.gen-browser-bar i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--lg-mist);
}

.gen-browser-bar i:first-child {
  background: var(--lg-coral);
}

.gen-browser-bar span {
  flex: 0 1 320px;
  margin-left: 22px;
  padding: 5px 14px 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--lg-night-2);
  color: var(--lg-mist);
  font-size: 12.5px;
  line-height: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gen-browser-window img {
  display: block;
  width: 100%;
}

.gen-pin {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--lg-gradient);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.gen-browser .gen-pin {
  position: absolute;
  right: -20px;
  box-shadow: 0 0 0 4px var(--lg-cloud);
}

.gen-browser .gen-pin:nth-of-type(1) {
  top: calc(44px + 19cqw);
}

.gen-browser .gen-pin:nth-of-type(2) {
  top: calc(44px + 89.5cqw);
}

.gen-browser .gen-pin:nth-of-type(3) {
  top: calc(44px + 101cqw);
}

.gen-browser.is-advertorial .gen-pin:nth-of-type(1),
.gen-browser.is-bridge .gen-pin:nth-of-type(1) {
  top: calc(44px + 15.4cqw);
}

.gen-browser.is-advertorial .gen-pin:nth-of-type(2) {
  top: calc(44px + 31.8cqw);
}

.gen-browser.is-advertorial .gen-pin:nth-of-type(3) {
  top: calc(44px + 100cqw);
}

.gen-browser.is-bridge .gen-pin:nth-of-type(2) {
  top: calc(44px + 80cqw);
}

.gen-browser.is-bridge .gen-pin:nth-of-type(3) {
  top: calc(44px + 112cqw);
}

.gen-browser.is-product .gen-pin:nth-of-type(1) {
  top: calc(44px + 13.9cqw);
}

.gen-browser.is-product .gen-pin:nth-of-type(2) {
  top: calc(44px + 68.7cqw);
}

.gen-browser.is-product .gen-pin:nth-of-type(3) {
  top: calc(44px + 91cqw);
}

.gen-browser.is-pre-checkout .gen-pin:nth-of-type(1) {
  top: calc(44px + 10cqw);
}

.gen-browser.is-pre-checkout .gen-pin:nth-of-type(2) {
  top: calc(44px + 30cqw);
}

.gen-browser.is-pre-checkout .gen-pin:nth-of-type(3) {
  top: calc(44px + 81cqw);
}

.gen-browser.is-form .gen-pin:nth-of-type(1) {
  top: calc(44px + 8cqw);
}

.gen-browser.is-form .gen-pin:nth-of-type(2) {
  top: calc(44px + 20cqw);
}

.gen-browser.is-form .gen-pin:nth-of-type(3) {
  top: calc(44px + 39cqw);
}

.gen-example-copy {
  padding-bottom: 100px;
}

/* The text column is narrow, so the gradient phrase may wrap instead of leaving the column. */
.gen-example-copy .home-title em {
  white-space: normal;
}

.gen-example-lead {
  max-width: 600px;
  margin-top: 26px;
  color: var(--lg-slate);
  font-size: 19px;
  line-height: 30px;
}

.gen-notes {
  display: grid;
  gap: 20px;
  margin: 26px 0 34px;
  padding: 0;
  list-style: none;
}

.gen-notes li {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 26px 28px;
  border-radius: 24px;
  background: #fff;
}

.gen-notes strong {
  display: block;
  font-size: 18px;
  font-weight: 600;
  line-height: 23px;
}

.gen-notes p {
  margin-top: 6px;
  color: var(--lg-slate);
  font-size: 15.5px;
  line-height: 20px;
}

.gen-example-copy .lg-btn {
  min-height: 64px;
  padding: 0 40px;
}

/* Keep reading */
.gen-reading {
  padding: 88px 0 80px;
}

.gen-reading .home-grid-3 {
  margin-top: 40px;
}

.gen-read-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 220px;
  padding: 32px;
  border-radius: 28px;
  background: var(--lg-cloud);
  color: var(--lg-night);
  text-decoration: none;
  transition: transform 0.2s ease;
}

.gen-read-card:hover {
  transform: translateY(-4px);
}

.gen-read-card small {
  color: var(--lg-cobalt);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 14px;
  text-transform: uppercase;
}

.gen-read-card strong {
  font-family: var(--lg-serif);
  font-size: 24px;
  font-weight: 700;
  line-height: 32px;
}

.gen-read-card span {
  margin-top: auto;
  font-size: 14.5px;
  font-weight: 600;
}

/* FAQ on a tinted section: white rows, tinted toggles */
.gen-faq .home-faq-list details {
  background: #fff;
}

.gen-faq .home-faq-list summary::after {
  background: var(--lg-cloud);
}

.gen-faq .home-faq-list details[open] summary::after {
  background: var(--lg-gradient);
}

@media (max-width: 1199px) {
  .gen-gets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .gen-type {
    min-height: 0;
    padding: 28px 28px 34px;
  }

  .gen-type-text {
    margin-top: 28px;
  }

  .gen-example-inner {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  }
}

@media (max-width: 991px) {
  .gen-stage {
    --u: calc(var(--hu) * 0.92);
    top: auto;
  }

  .gen-gets {
    margin-top: 40px;
  }

  .gen-example {
    padding-bottom: 76px;
  }

  .gen-example-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .gen-example-copy {
    order: -1;
    padding-bottom: 0;
  }

  .gen-browser {
    max-width: 560px;
  }

  .gen-browser-window {
    max-height: 640px;
    border-radius: 20px;
  }

  .gen-reading {
    padding: 72px 0 68px;
  }

  .gen-read-card {
    min-height: 0;
  }
}

@media (max-width: 599px) {
  /* "Reasons" is wider than the homepage's "Words", so the phone size steps down. */
  .gen-hero .home-hero-title {
    font-size: min(19vw, 120px);
  }

  .gen-gets {
    grid-template-columns: minmax(0, 1fr);
  }

  .gen-gets li,
  .gen-read-card {
    padding: 24px;
  }

  .gen-browser .gen-pin {
    right: -8px;
    width: 36px;
    height: 36px;
    font-size: 15px;
  }

  .gen-notes li {
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
  }

  .gen-example-copy .lg-btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gen-tile {
    transition: none;
    animation: none;
  }
}
