/* AI tool pages (ghost mannequin, colorways, pose, background, model swap, upscale): the V3 tool page,
   with the homepage's interactive demo (.show-media, data-compare / data-variants) in the hero. */

/* hero: copy and upload on the left, the live demo on the right */
.ai-hero { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: clamp(36px, 4.5vw, 72px); align-items: center; padding-block: 26px 48px; }
.ai-hero-copy { max-width: 540px; }
.ai-hero h1 { margin: 16px 0 18px; font-size: clamp(38px, 4vw, 54px); font-weight: 600; line-height: 1.05; letter-spacing: -.045em; text-wrap: balance; }
.ai-hero .tv3-kicker .pill-new { margin-left: 4px; }
.ai-hero .tv3-lede { font-size: 16.5px; }
.ai-hero .tv3-upload.t-up { margin-top: 22px; }
.ai-hero-demo .tv3-shoot-label { padding-right: 0; }
.ai-hero-demo .tv3-shoot-label a { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-2); font-weight: 500; }
.ai-hero-demo .tv3-shoot-label a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.ai-hero-demo .tv3-shoot-label a svg { width: 13px; height: 13px; }
.ai-demo.show-media { width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: 24px; box-shadow: 0 24px 50px -28px #35261966; }

/* examples: each set is a card, the input photo first */
.ai-set { padding: 28px; border: 1px solid var(--line); border-radius: 28px; background: var(--card); }
.ai-set + .ai-set { margin-top: 20px; }
.ai-set-head { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr) auto; gap: 16px 40px; align-items: end; margin-bottom: 22px; }
.ai-set-head h3 { font-size: 21px; font-weight: 600; line-height: 1.25; letter-spacing: -.025em; }
.ai-set-head > p { color: var(--ink-2); font-size: 14.5px; line-height: 1.65; }
.ai-set-head .tv3-ex-count { margin-bottom: 10px; }
.ai-set-grid { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 14px; }
.ai-page .ai-fig .tv3-fig-img { aspect-ratio: var(--r, 4 / 3); border-radius: 14px; }
.ai-fig .px { image-rendering: pixelated; }
.ai-badge { position: absolute; top: 10px; left: 10px; padding: 3px 10px; border-radius: 999px; background: rgba(21, 20, 19, .74); color: #fff; font-size: 11px; font-style: normal; font-weight: 600; }
.ai-fig.is-before .tv3-fig-img { box-shadow: inset 0 0 0 2px #fff, 0 0 0 1.5px var(--line-2); }

/* what stays, what changes */
.ai-keeps { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.ai-keep { padding: 32px; border: 1px solid var(--line); border-radius: 24px; background: var(--card); }
.ai-keep.is-change { border-color: var(--ink); background: var(--ink); color: #fff; }
.ai-keep h3 { margin-bottom: 14px; color: var(--ink-2); font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.ai-keep.is-change h3 { color: #d8d2c7; }
.ai-keep ul { margin: 0; padding: 0; list-style: none; }
.ai-keep li { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); font-size: 16px; }
.ai-keep.is-change li { border-color: #ffffff22; }
.ai-keep li svg { flex: none; width: 18px; height: 18px; padding: 3px; border-radius: 50%; background: var(--new-bg); color: var(--new); }
.ai-keep.is-change li svg { background: #ffffff1f; color: #fff; }

/* related AI tools: a 4:3 picture in the 3:4 thumbnail */
.ai-page .tv3-related-sec .tv3-head p.tv3-display { max-width: none; color: var(--ink); font-size: clamp(28px, 3vw, 40px); }
.ai-rel-img img { object-position: 50% 30%; }
.ai-page .tv3-related + .ft-sub { margin-top: 30px; }

@media (max-width: 1080px) {
  .ai-hero { grid-template-columns: 1fr; gap: 28px; }
  .ai-hero-copy { max-width: 640px; }
  .ai-set-head { grid-template-columns: 1fr; gap: 10px; }
  .ai-set-head .tv3-link { justify-self: start; }
}
@media (max-width: 760px) {
  .ai-hero { padding-block: 18px 34px; }
  .ai-hero h1 { font-size: 34px; margin-block: 12px 14px; }
  .ai-hero .tv3-lede { font-size: 15.5px; }
  .ai-demo.show-media { border-radius: 18px; }
  .ai-set { padding: 18px; border-radius: 22px; }
  .ai-set-head h3 { font-size: 18px; }
  .ai-set-grid { display: flex; gap: 10px; margin: 0 -18px; padding: 0 18px 4px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 18px; scrollbar-width: none; }
  .ai-set-grid::-webkit-scrollbar { display: none; }
  .ai-set-grid .ai-fig { flex: none; width: 78%; scroll-snap-align: start; }
  .ai-keeps { grid-template-columns: 1fr; gap: 12px; }
  .ai-keep { padding: 22px; border-radius: 20px; }
  .ai-keep li { font-size: 15px; padding: 11px 0; }
}

/* ---------------------------------------------------------------- the hub: /ai-tools/ */
.hub-hero { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(28px, 4vw, 56px); align-items: center; padding-block: 26px 48px; }
.hub-hero h1 { margin: 16px 0 18px; font-size: clamp(38px, 3.8vw, 52px); font-weight: 600; line-height: 1.03; letter-spacing: -.045em; text-wrap: balance; }
.hub-hero .tv3-kicker .pill-new { margin-left: 4px; }
.hub-hero .tv3-lede { max-width: 33em; font-size: 17px; }
.hub-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.hub-hero .tv3-proof { margin-top: 20px; }
.hub-mosaic { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 14px; }
.hub-tile { display: block; min-width: 0; border-radius: 14px; }
.hub-tile-image { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #e9e3dc; }
.hub-tile-image > img { width: 100%; height: 100%; object-fit: contain; transition: transform .6s ease; }
.hub-tile:is(:hover, :focus-visible) .hub-tile-image > img { transform: scale(1.04); }
.hub-tile-before { position: absolute; bottom: 12px; left: 10px; width: 34%; min-width: 48px; border: 1.5px solid #fff; border-radius: 6px; overflow: hidden; box-shadow: 0 3px 10px #15141338; transform: rotate(-6deg); transition: transform .3s ease; }
.hub-tile-before img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #e9e3dc; }
.hub-tile-before.is-pixelated img { image-rendering: pixelated; }
.hub-tile:is(:hover, :focus-visible) .hub-tile-before { transform: translateY(-2px) rotate(-3deg); }
.hub-tile-copy { display: block; padding-top: 9px; }
.hub-tile-name { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.hub-tile-name b { font-size: 13px; font-weight: 600; line-height: 1.35; }
.hub-tile-name svg { width: 12px; height: 12px; color: var(--ink-2); }
.hub-tile small { display: block; margin-top: 3px; color: var(--ink-2); font-size: 11.5px; line-height: 1.4; }

.hub-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }
.hub-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 26px; background: var(--card); overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.hub-card:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.hub-card-media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #e9e3dc; }
.hub-card-media > img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.hub-card:hover .hub-card-media > img { transform: scale(1.03); }
.hub-inset { position: absolute; left: 12px; bottom: 12px; width: 28%; padding: 3px; border-radius: 12px; background: #fff; box-shadow: 0 8px 18px -10px #15141380; }
.hub-inset img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 9px; }
.hub-inset img.px { image-rendering: pixelated; }
.hub-inset i { position: absolute; top: 7px; left: 7px; padding: 0 6px; border-radius: 999px; background: rgba(21, 20, 19, .72); color: #fff; font-size: 9.5px; font-style: normal; font-weight: 600; }
.hub-dots { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, .9); }
.hub-dots i, .hub-dots img { width: 22px; height: 22px; border-radius: 50%; background: var(--c); object-fit: cover; object-position: 50% 20%; }
.hub-card-body { display: flex; flex: 1; flex-direction: column; padding: 22px 24px 24px; }
.hub-card h3 { font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
.hub-card h3 a { display: inline-flex; align-items: center; gap: 9px; }
.hub-card h3 svg { width: 20px; height: 20px; }
.hub-card h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.hub-card p { margin-top: 8px; color: var(--ink-2); font-size: 14.5px; line-height: 1.6; }
.hub-card ul { display: grid; gap: 6px; margin: 16px 0 20px; padding: 0; list-style: none; }
.hub-card li { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 13.5px; }
.hub-card li svg { width: 14px; height: 14px; color: var(--new); }
.hub-card .tv3-link { margin-top: auto; }

.hub-need .ft-table { min-width: 0; }
.hub-need td { font-size: 15px; }
.hub-need td:last-child { white-space: nowrap; }
.hub-need td a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-weight: 600; }
.hub-need td a:hover { text-decoration: underline; text-underline-offset: 3px; }
.hub-need td a svg { width: 13px; height: 13px; }

.hub-how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin: 0 0 40px; padding: 0; list-style: none; }
.hub-how li { padding-top: 22px; border-top: 1px solid var(--line-2); }
.hub-how span { color: #b0a799; font-size: 26px; letter-spacing: -.04em; }
.hub-how h3 { margin-top: 12px; font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.hub-how p { margin-top: 8px; color: var(--ink-2); font-size: 15px; line-height: 1.7; }
.hub-trust .t-ic svg { width: 18px; height: 18px; }
.hub-page .tv3-related-sec .tv3-head p.tv3-display { max-width: none; color: var(--ink); font-size: clamp(28px, 3vw, 40px); }
.hub-page .tv3-related + .ft-sub { margin-top: 30px; }

.hub-prose p:first-child { color: var(--ink); font-size: 18px; line-height: 1.7; }
.hub-prose a, .hub-vs a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 761px) { .hub-vs .ft-table { min-width: 760px; } }
.hub-vs th[scope="row"] { font-weight: 600; white-space: nowrap; }
.hub-vs thead th:nth-child(2), .hub-vs td:nth-child(2) { background: var(--new-bg); }
.hub-vs td:nth-child(2) { color: var(--ink); font-weight: 500; }
@media (max-width: 760px) { .hub-vs td:nth-child(2) { background: none; } }

@media (max-width: 1080px) {
  .hub-hero { gap: 28px; }
  .hub-hero-copy { max-width: 680px; }
  .hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .hub-hero { grid-template-columns: 1fr; padding-block: 12px 32px; gap: 22px; }
  .hub-hero h1 { margin-block: 10px 12px; font-size: 32px; }
  .hub-hero .tv3-lede { font-size: 14px; line-height: 1.5; }
  .hub-acts { margin-top: 16px; }
  .hub-acts .btn { flex: 1; height: 40px; padding-inline: 12px; font-size: 12px; }
  .hub-hero .tv3-proof { margin-top: 12px; gap: 6px 12px; }
  .hub-mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
  .hub-tile-image { aspect-ratio: 4 / 3; }
  .hub-tile-copy { padding-top: 8px; }
  .hub-tile-name b { font-size: 12px; }
  .hub-tile-name svg { display: none; }
  .hub-tile small { margin-top: 2px; font-size: 10.5px; }
  .hub-grid { grid-template-columns: 1fr; gap: 14px; }
  .hub-how { grid-template-columns: 1fr; gap: 18px; }
  .hub-need td:last-child { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) { .hub-tile img, .hub-tile-before { transition: none; } }
