/*
 * UGC Agent shared marketing UI system.
 *
 * The homepage is the visual source of truth. Legacy page families keep their
 * content structure, while this file gives them the same typography, material
 * buttons, surfaces, interaction states, and motion vocabulary.
 */

@font-face {
  font-family: "Inter Variable";
  src: url("/assets/fonts/inter-latin-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Inter Variable";
  src: url("/assets/fonts/inter-latin-variable-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Geist Variable";
  src: url("/assets/fonts/geist-latin-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --site-font-body: "Inter Variable", Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --site-font-display: "Geist Variable", Geist, var(--site-font-body);
  --site-ink: #121212;
  --site-muted: #626269;
  --site-canvas: #ffffff;
  --site-subtle: #f7f7f8;
  --site-surface: #ffffff;
  --site-line: rgb(108 111 118 / .12);
  --site-line-soft: rgb(108 111 118 / .08);
  --site-primary: #3847fe;
  --site-primary-soft: #eef0ff;
  --site-success: #087a50;
  --site-danger: #b42318;
  --site-shell: min(1160px, calc(100% - 40px));
  --site-radius-control: 12px;
  --site-radius-card: 18px;
  --site-radius-panel: 24px;
  --site-shadow-card: 0 1px 2px rgb(18 18 18 / .025), 0 18px 45px -36px rgb(18 18 18 / .24);
  --site-shadow-raised: 0 1px 2px rgb(18 18 18 / .04), 0 24px 60px -40px rgb(18 18 18 / .32);
  --site-ease-out: cubic-bezier(.23, 1, .32, 1);
  --site-ease-move: cubic-bezier(.77, 0, .175, 1);
  --site-enter-duration: 680ms;
  --site-stagger: 70ms;
  --metal-rim: linear-gradient(90deg, #8ce8ff 0%, #6878ff 33%, #3847fe 69%, #a85cff 100%);
  --metal-face: linear-gradient(180deg, #ffffff 0%, #202128 18%, #111216 100%);
  --metal-silver-rim: linear-gradient(90deg, #ffffff 0%, #aeb4c5 33%, #f9faff 67%, #8e96aa 100%);
  --metal-silver-face: linear-gradient(180deg, #ffffff 0%, #f8f8fa 20%, #e7e8ed 72%, #d3d5dc 100%);
}

html {
  overflow-x: clip;
  overscroll-behavior: none;
  scroll-padding-top: 116px;
}

body {
  overflow-x: clip;
  overscroll-behavior: none;
  font-family: var(--site-font-body);
}

body:not(.landing-page) {
  position: relative;
  color: var(--site-ink);
  background-color: var(--site-subtle);
}

/* The pill navigation is a viewport-level surface, not a document row. Keep
   page artwork beneath it and reserve breathing room inside each first section
   so the content never collides with the floating header. */
body:not(.landing-page) > .seo-breadcrumb {
  position: absolute;
  top: 112px;
  right: 0;
  left: 0;
  z-index: 2;
  padding-top: 0;
}

body:not(.landing-page) > .seo-breadcrumb + main > .seo-hero {
  padding-top: 170px;
}

body:not(.landing-page) > .seo-breadcrumb + main > .seo-article > .seo-article-hero {
  padding-top: 166px;
}

body:not(.landing-page) > main > :is(
  .industry-hero,
  .industry-hub-hero,
  .tool-page-head,
  .case-hero,
  .case-detail-hero,
  .compare-hero
) {
  padding-top: 128px;
}

.pricing-page > main > .seo-hero {
  padding-top: 142px;
}

body:not(.landing-page) :is(h1, h2, h3, h4) {
  font-family: var(--site-font-display);
  font-variation-settings: "wght" 530;
  text-wrap: balance;
}

body:not(.landing-page) :is(p, li, figcaption) {
  text-wrap: pretty;
}

body:not(.landing-page) :is(.seo-eyebrow, .eyebrow, .section-kicker, .tool-kicker, .customer-eyebrow) {
  font-family: var(--site-font-body);
  font-weight: 750;
}

body:not(.landing-page) :is(.price, [data-pricing-value], [data-early-bird-countdown], table) {
  font-variant-numeric: tabular-nums;
}

body:not(.landing-page) :is(h1, h2, h3, h4, [id]) {
  scroll-margin-top: 116px;
}

/* Shared Paper-style CTA material. Segmented controls, tabs, and switches keep
   their own semantics and only inherit focus/press timing below. */
:is(
  .landing-button,
  .site-nav-cta,
  .seo-button,
  .seo-button.primary,
  .btn-dark,
  .btn-light,
  .tool-button,
  .tool-button-secondary,
  .customer-button,
  .brand-button,
  .site-closing-cta-button
) {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  min-height: 49px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 100px;
  background: var(--metal-face) padding-box, var(--metal-rim) border-box;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / .7),
    inset 0 -1px 0 rgb(0 0 0 / .72),
    0 1px 1px rgb(0 0 0 / .2),
    0 8px 18px -10px rgb(56 71 254 / .8),
    0 15px 28px -22px rgb(112 91 255 / .9);
  color: #fff !important;
  font-family: var(--site-font-body);
  font-size: 14px;
  font-weight: 500;
  line-height: 23.8px;
  text-decoration: none;
  color-scheme: dark;
  transition:
    transform 150ms var(--site-ease-out),
    box-shadow 150ms ease,
    filter 150ms ease;
  will-change: transform;
}

.site-header .site-nav-cta {
  min-height: 43px;
  padding-block: 8px;
}

:is(
  .landing-button-secondary,
  .landing-button-inverse,
  .seo-button.secondary,
  .btn-light,
  .tool-button-secondary,
  .customer-button.light,
  .customer-button.ghost,
  .brand-button:not(.primary)
) {
  background: var(--metal-silver-face) padding-box, var(--metal-silver-rim) border-box;
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 -1px 0 rgb(82 86 99 / .22),
    0 1px 1px rgb(0 0 0 / .08),
    0 9px 20px -15px rgb(34 38 54 / .45);
  color: #15161a !important;
  color-scheme: light;
}

.landing-button-ghost {
  background:
    linear-gradient(180deg, rgb(255 255 255 / .24) 0%, rgb(21 25 74 / .48) 22%, rgb(13 18 83 / .62) 100%) padding-box,
    linear-gradient(90deg, rgb(255 255 255 / .88), #91a0ff 45%, rgb(255 255 255 / .55)) border-box;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / .38),
    inset 0 -1px 0 rgb(0 0 0 / .25),
    0 12px 22px -18px rgb(9 14 83 / .7);
  color: #fff !important;
}

@media (hover: hover) and (pointer: fine) {
  :is(
    .landing-button,
    .site-nav-cta,
    .seo-button,
    .seo-button.primary,
    .btn-dark,
    .btn-light,
    .tool-button,
    .tool-button-secondary,
    .customer-button,
    .brand-button,
    .site-closing-cta-button
  ):hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow:
      inset 0 1px 0 rgb(255 255 255 / .84),
      inset 0 -1px 0 rgb(0 0 0 / .68),
      0 2px 2px rgb(0 0 0 / .15),
      0 10px 22px -10px rgb(56 71 254 / .9),
      0 18px 34px -24px rgb(112 91 255 / .95);
  }

  :is(
    .landing-button-secondary,
    .landing-button-inverse,
    .seo-button.secondary,
    .btn-light,
    .tool-button-secondary,
    .customer-button.light,
    .customer-button.ghost,
    .brand-button:not(.primary)
  ):hover {
    box-shadow:
      inset 0 1px 0 #fff,
      inset 0 -1px 0 rgb(82 86 99 / .18),
      0 2px 2px rgb(0 0 0 / .07),
      0 12px 24px -17px rgb(34 38 54 / .5);
  }
}

:is(
  .landing-button,
  .site-nav-cta,
  .seo-button,
  .seo-button.primary,
  .btn-dark,
  .btn-light,
  .tool-button,
  .tool-button-secondary,
  .customer-button,
  .brand-button,
  .site-closing-cta-button
):active {
  filter: brightness(.97);
  transform: scale(.97);
  transition-duration: 100ms;
}

:is(
  .landing-button,
  .site-nav-cta,
  .seo-button,
  .seo-button.primary,
  .btn-dark,
  .btn-light,
  .tool-button,
  .tool-button-secondary,
  .customer-button,
  .brand-button,
  .site-closing-cta-button,
  button,
  summary,
  input,
  select,
  textarea,
  a
):focus-visible {
  outline: 3px solid rgb(56 71 254 / .3);
  outline-offset: 4px;
}

:is(
  .landing-button,
  .site-nav-cta,
  .seo-button,
  .seo-button.primary,
  .btn-dark,
  .btn-light,
  .tool-button,
  .tool-button-secondary,
  .customer-button,
  .brand-button,
  .site-closing-cta-button
):is(:disabled, [aria-disabled="true"]) {
  filter: grayscale(.3);
  cursor: not-allowed;
  opacity: .58;
  transform: none;
}

/* System surfaces: unify edge character and elevation without flattening the
   family-specific grids or customer-brand art direction. */
body:not(.landing-page) :is(
  .seo-card,
  .price-card,
  .tf,
  .tool-card,
  .industry-card,
  .industry-output,
  .brand-card,
  .partner-card,
  .customer-card,
  .customer-story-card,
  .comparison-card,
  .case-card
) {
  border-color: var(--site-line);
  border-radius: var(--site-radius-card);
  box-shadow: var(--site-shadow-card);
}

body:not(.landing-page) :is(.seo-hero, .seo-article-hero, .tool-page-head) {
  background:
    radial-gradient(circle at 50% -35%, rgb(56 71 254 / .1), transparent 48%),
    var(--site-subtle);
}

body:not(.landing-page) :is(.seo-cta-band, .compare-cta, .case-footer, .customer-cta-inner) {
  border-color: var(--site-line-soft);
  border-radius: var(--site-radius-panel);
  box-shadow: var(--site-shadow-raised);
}

body:not(.landing-page) :is(input, select, textarea) {
  font-family: var(--site-font-body);
}

body:not(.landing-page) dialog {
  overscroll-behavior: none;
}

/* Paper closing CTA. The exact composition comes from the shared Paper
   artboard: a 1060×661 stage, 869px product frame, fade beginning at 267px,
   and one centered action. The product artwork uses the same metallic-blue
   material as the landing-page screenshots. */
.site-closing-cta {
  position: relative;
  width: 100%;
  margin-top: clamp(80px, 9vw, 120px);
  padding: 0 20px 112px;
  overflow: hidden;
  background: #fff;
  color: #181818;
}

.site-closing-cta-inner {
  position: relative;
  display: flex;
  width: min(1060px, 100%);
  min-height: 661px;
  align-items: flex-end;
  justify-content: center;
  margin-inline: auto;
  isolation: isolate;
}

.site-closing-cta-stage {
  position: absolute;
  top: 0;
  left: 50%;
  width: min(960px, 94%);
  aspect-ratio: 16 / 10;
  padding: 10px;
  overflow: hidden;
  border: 1px solid rgb(112 136 255 / .3);
  border-radius: 26px;
  background:
    radial-gradient(circle at 16% 5%, rgb(160 183 255 / .86), transparent 30%),
    radial-gradient(circle at 87% 95%, rgb(74 104 255 / .72), transparent 34%),
    linear-gradient(128deg, #08163f 0%, #183b9d 22%, #7a91ff 46%, #17316f 67%, #3847fe 100%);
  box-shadow: 0 3px 26px rgb(0 0 0 / .08), 0 30px 70px -42px rgb(5 12 46 / .55), inset 0 1px 0 rgb(255 255 255 / .3);
  transform: translateX(-50%);
}

.site-closing-cta-stage picture {
  display: block;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 7px;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / .75);
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 24px 55px rgb(5 12 46 / .3), inset 0 1px 0 rgb(255 255 255 / .95);
}

.site-closing-cta-stage img {
  display: block;
  width: 100%;
  height: 100%;
  border: 1px solid rgb(15 23 42 / .1);
  border-radius: 11px;
  object-fit: contain;
  object-position: center top;
}

.site-closing-cta-fade {
  position: absolute;
  inset: 267px 0 -112px;
  z-index: 1;
  background: linear-gradient(to bottom, rgb(255 255 255 / .19) 0%, #fff 42%, #fff 100%);
  pointer-events: none;
}

.site-closing-cta-content {
  position: relative;
  z-index: 2;
  display: flex;
  width: min(760px, calc(100% - 28px));
  flex-direction: column;
  align-items: center;
  gap: 32px;
  text-align: center;
}

.site-closing-cta-mark {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
}

.site-closing-cta-mark img {
  display: block;
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.site-closing-cta-copy {
  display: grid;
  gap: 16px;
  justify-items: center;
}

.site-closing-cta .site-closing-cta-copy h2 {
  width: 100%;
  max-width: 760px;
  margin: 0;
  color: #181818;
  font-family: var(--site-font-display);
  font-size: clamp(38px, 4.15vw, 44px);
  font-weight: 500;
  font-variation-settings: "wght" 500;
  letter-spacing: -.057em;
  line-height: 52.8px;
  text-align: center;
  text-wrap: balance;
}

.site-closing-cta .site-closing-cta-copy p {
  max-width: 650px;
  margin: 0;
  color: #46484d;
  font-family: var(--site-font-body);
  font-size: 16px;
  line-height: 27.2px;
  text-align: center;
  text-wrap: pretty;
}

.site-closing-cta-button {
  min-width: 118px;
}

@media (max-width: 640px) {
  .site-closing-cta {
    margin-top: 72px;
    padding: 0 14px 80px;
  }

  .site-closing-cta-inner {
    min-height: 570px;
  }

  .site-closing-cta-stage {
    width: 100%;
    aspect-ratio: 1.08 / 1;
    padding: 6px;
    border-radius: 19px;
  }

  .site-closing-cta-stage picture {
    padding: 5px;
    border-radius: 13px;
  }

  .site-closing-cta-stage img {
    border-radius: 8px;
  }

  .site-closing-cta-fade {
    inset: 166px 0 -80px;
    background: linear-gradient(to bottom, rgb(255 255 255 / .1), #fff 38%, #fff);
  }

  .site-closing-cta-content {
    gap: 26px;
  }

  .site-closing-cta-mark,
  .site-closing-cta-mark img {
    width: 48px;
    height: 48px;
  }

  .site-closing-cta .site-closing-cta-copy h2 {
    font-size: clamp(34px, 10vw, 42px);
    letter-spacing: -.05em;
    line-height: 1.12;
  }

  .site-closing-cta .site-closing-cta-copy p {
    max-width: 34ch;
    font-size: 15px;
    line-height: 24px;
  }
}

/* Pricing uses the same connected-card composition as the homepage. The DOM
   order remains optimized for the existing semantic contract; flex ordering
   puts the action before the feature list visually, as on the landing page. */
.pricing-page .price-grid {
  gap: 0;
  align-items: stretch;
}

.pricing-page .price-card {
  position: relative;
  min-width: 0;
  min-height: 610px;
  padding: 30px;
  overflow: visible;
  border-color: var(--site-line);
  border-radius: 0;
  box-shadow: none;
}

.pricing-page .price-card:first-child {
  border-radius: 16px 0 0 16px;
}

.pricing-page .price-card:last-child {
  border-radius: 0 16px 16px 0;
  background: #fafafa;
}

.pricing-page .price-card.featured {
  z-index: 2;
  border: 1px solid var(--site-primary);
  border-radius: 16px;
  box-shadow: none;
  transform: scale(1.025);
}

.pricing-page .price-card > .seo-eyebrow {
  order: 0;
  margin: 0;
  color: var(--site-ink);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.pricing-page .price-card::after {
  position: absolute;
  top: 27px;
  right: 27px;
  padding: 6px 8px;
  border-radius: 999px;
  background: var(--site-primary-soft);
  color: var(--site-primary);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1;
  text-transform: uppercase;
}

.pricing-page .price-card.featured::after {
  content: "Most capable";
}

.pricing-page .price-card:last-child::after {
  content: "Hands-off";
}

.pricing-page .price-card > .price {
  display: flex;
  min-height: 53px;
  order: 2;
  align-items: baseline;
  gap: 6px;
  margin: 0;
  /* Matches the homepage price: Geist display at 500, not the body face at 800. */
  font-family: var(--site-font-display);
  font-size: 40px;
  font-weight: 500;
  letter-spacing: -.06em;
  line-height: 1;
}

.pricing-page .price-card > .price > [data-pricing-value] {
  font-size: inherit;
  font-weight: inherit;
}

.pricing-page .price-card > .price small {
  color: #7b7b82;
  font-family: var(--site-font-body);
  font-size: 11px;
  font-weight: 400;
}

.pricing-page .price-card > .price .annual-list-price {
  font-family: var(--site-font-body);
  font-size: 11px;
  font-weight: 400;
}

.pricing-page .price-card > p:not(.price-trial) {
  min-height: 68px;
  order: 1;
  margin: 18px 0 25px;
  color: var(--site-muted);
  font-size: 12px;
  line-height: 1.55;
}

.pricing-page .price-card > .price-trial {
  min-height: 18px;
  order: 3;
  margin: 7px 0 23px;
  color: #898990;
  font-size: 9px;
}

.pricing-page .price-card > .seo-button {
  width: 100%;
  order: 4;
  margin-top: 0;
}

.pricing-page .price-card > .seo-list {
  order: 5;
  gap: 12px;
  margin: 27px 0 0;
  padding: 25px 0 0;
  border-top: 1px solid #ededf0;
}

.pricing-page .price-card > .seo-list li {
  padding-left: 20px;
  color: #515158;
  font-size: 11px;
  line-height: 1.5;
}

.pricing-page .price-card > .seo-list li::before {
  color: var(--site-primary);
}

.pricing-page .pricing-billing-toggle {
  gap: 3px;
  border-color: var(--site-line);
  border-radius: 11px;
  background: #f7f7f8;
}

.pricing-page .pricing-billing-toggle button {
  border-radius: 8px;
  color: #74747a;
  font-size: 11px;
}

.pricing-page .pricing-billing-toggle button.is-active {
  background: #fff;
  box-shadow: 0 4px 12px rgb(18 18 18 / .07);
  color: var(--site-ink);
}

.pricing-page .pricing-billing-toggle button span,
.pricing-page .pricing-billing-toggle button.is-active span {
  background: transparent;
  color: var(--site-success);
}

@media (max-width: 900px) {
  .pricing-page .price-grid { gap: 14px; }

  .pricing-page .price-card,
  .pricing-page .price-card:first-child,
  .pricing-page .price-card:last-child,
  .pricing-page .price-card.featured {
    min-height: auto;
    border-radius: 16px;
    transform: none;
  }
}

/* Sitewide scroll and reveal motion. Classes are attached only after JS has
   loaded, so content remains visible when scripting is unavailable. */
.site-scroll-progress {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 100;
  height: 3px;
  background: var(--site-primary);
  pointer-events: none;
  transform: scaleX(0);
  transform-origin: left;
  will-change: transform;
}

.site-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity var(--site-enter-duration) var(--site-ease-out),
    transform var(--site-enter-duration) var(--site-ease-out);
  transition-delay: calc(min(var(--site-reveal-order, 0), 4) * var(--site-stagger));
  will-change: transform, opacity;
}

.site-reveal.is-visible {
  opacity: 1;
  transform: none;
}

.site-result-enter {
  animation: site-result-enter 220ms var(--site-ease-out) both;
}

@keyframes site-result-enter {
  from { opacity: 0; transform: translateY(8px); }
}

@media (max-width: 540px) {
  :root { --site-shell: min(100% - 28px, 1160px); }

  body:not(.landing-page) > .seo-breadcrumb { top: 92px; }

  body:not(.landing-page) > .seo-breadcrumb + main > .seo-hero {
    padding-top: 150px;
  }

  body:not(.landing-page) > .seo-breadcrumb + main > .seo-article > .seo-article-hero {
    padding-top: 146px;
  }

  body:not(.landing-page) > main > :is(
    .industry-hero,
    .industry-hub-hero,
    .tool-page-head,
    .case-hero,
    .case-detail-hero,
    .compare-hero
  ) {
    padding-top: 112px;
  }

  .pricing-page > main > .seo-hero { padding-top: 122px; }

  :is(
    .seo-button,
    .btn-dark,
    .btn-light,
    .tool-button,
    .tool-button-secondary,
    .customer-button,
    .brand-button
  ) {
    min-height: 47px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .site-scroll-progress { display: none; }
  .site-reveal,
  .site-reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .site-result-enter { animation: none; }
  :is(
    .landing-button,
    .site-nav-cta,
    .seo-button,
    .btn-dark,
    .btn-light,
    .tool-button,
    .tool-button-secondary,
    .customer-button,
    .brand-button
  ) {
    transition: none;
  }
}
