/* Wild West home page: index.html and its translations (scripts/pseo/ww-i18n.mjs). Tokens come from ww.css. */

.home { --x: 1246px; }
.home .wx { max-width: var(--x); margin: 0 auto; padding: 0 var(--gutter); }
.home section { padding: 64px 0; }
.home h2 { font: 400 clamp(36px, 4.4vw, 56px)/1.02 var(--serif); letter-spacing: -0.02em; margin: 0 0 18px; color: var(--ink); }
.home .sub { color: var(--muted); font-size: 17px; line-height: 1.5; margin: 0; }
.home .more { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; font: 500 13px/1 var(--sans); letter-spacing: 0.02em; text-transform: uppercase; color: var(--ink); }
.home .more::after { content: ''; width: 12px; height: 12px; background: currentColor; -webkit-mask: var(--arrow) center / contain no-repeat; mask: var(--arrow) center / contain no-repeat; }
.home .more:hover { text-decoration: none; color: var(--accent); }

/* The hero card: copy on the left, the cartoon on the right. */
.h-hero { padding: 40px 0 24px !important; }
.h-card { --cut: 22px; --cut-bg: #fff; display: grid; grid-template-columns: minmax(0, 0.89fr) minmax(0, 1.11fr); min-height: 640px; }
.h-copy { display: flex; flex-direction: column; justify-content: center; padding: 56px 48px; }
.h-badge { align-self: flex-start; display: inline-flex; align-items: center; gap: 9px; padding: 5px 14px 5px 5px; margin-bottom: 26px; color: #fff; background: var(--accent); font: 600 14px/1 var(--sans); --cut: 7px; clip-path: var(--cut-path); }
.h-badge:hover { text-decoration: none; background: #d9561f; }
.h-badge img { width: 26px; height: 26px; padding: 4px; background: #fff; clip-path: polygon(5px 0, calc(100% - 5px) 0, 100% 5px, 100% calc(100% - 5px), calc(100% - 5px) 100%, 5px 100%, 0 calc(100% - 5px), 0 5px); }
.h-badge i { font: 600 10px/1 var(--sans); font-style: normal; letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 6px; background: rgba(255, 255, 255, .22); }
.h-badge::after { content: ''; width: 12px; height: 12px; background: currentColor; -webkit-mask: var(--arrow) center / contain no-repeat; mask: var(--arrow) center / contain no-repeat; }
.h-copy h1 { font: 400 clamp(48px, 5.4vw, 74px)/0.98 var(--serif); letter-spacing: -0.025em; margin: 0 0 22px; color: var(--ink); max-width: 9em; }
.h-copy h1 em { font-style: italic; color: var(--accent); }
.h-copy .sub { max-width: 470px; }
/* Shown only while recording is off: the Worker takes [data-zdr] out of the page otherwise (src/zdr.ts). */
.h-zdr { margin: 22px 0 0; font: 400 14.5px/1.4 var(--sans); color: var(--ink); }
.h-zdr::before { content: ''; display: inline-block; width: 9px; height: 9px; margin-right: 10px; background: var(--accent); }
.h-zdr b { font-weight: 600; }
.h-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-top: 30px; }
.h-ctas .btn { padding: 16px 30px; }
.h-ctas .more { margin: 0; }
.h-art { position: relative; overflow: hidden; background: #f6c49a; min-height: 420px; }
.ww-scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ww-scene .sc-smoke circle { fill: #fff; stroke: #5a3a26; stroke-width: 1.3; stroke-opacity: .25; }

/* The chat over the sky: a prompt, the answer here, and what other models say. */
.h-demo { position: absolute; left: 4%; top: 4.5%; width: min(390px, 53%); z-index: 2; display: grid; gap: 8px; }
.h-ask, .h-ans { --cut: 12px; clip-path: var(--cut-path); background: rgba(255, 255, 255, .78); -webkit-backdrop-filter: blur(10px) saturate(140%); backdrop-filter: blur(10px) saturate(140%); padding: 13px 16px; font-size: 14px; line-height: 1.45; color: var(--ink); }
.h-ask { justify-self: end; max-width: 92%; background: rgba(255, 248, 240, .7); }
.h-ans b { display: flex; align-items: center; gap: 8px; font: 600 13px/1 var(--sans); margin-bottom: 8px; }
.h-ans b img { width: 16px; height: 16px; }
.h-ans p { margin: 0; }
.h-ans.no { display: flex; align-items: center; gap: 10px; padding: 9px 14px; background: rgba(255, 255, 255, .6); }
.h-ans.no b { margin: 0; flex: none; color: var(--muted); font-weight: 500; font-size: 12.5px; }
.h-ans.no p { flex: 1; min-width: 0; color: #b4321b; font-size: 12.5px; line-height: 1.35; }
.h-ans.no s { flex: none; text-decoration: none; font: 600 9.5px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: #c2410c; background: #ffedd5; padding: 4px 6px; }
.h-tabs { position: absolute; left: 50%; bottom: 5%; transform: translateX(-50%); z-index: 2; display: flex; gap: 2px; padding: 4px; --cut: 9px; clip-path: var(--cut-path); background: rgba(255, 255, 255, .72); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.h-tabs button { font: 500 13px/1 var(--sans); color: var(--muted); background: none; border: 0; padding: 9px 13px; cursor: pointer; white-space: nowrap; }
.h-tabs button:hover { color: var(--ink); }
.h-tabs button[aria-selected="true"] { color: #fff; background: var(--ink); --cut: 6px; clip-path: var(--cut-path); }
.h-demo [data-fade] { transition: opacity .25s ease; }
.h-demo.swap [data-fade] { opacity: 0; }

/* Built for: the claim on the left, four facts in a card on the right. */
.b-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 48px; align-items: center; }
.b-grid { --cut: 18px; --cut-bg: #fff; display: grid; grid-template-columns: 1fr 1fr; gap: 40px 36px; padding: 44px; }
.b-grid h3 { font: 500 17px/1.3 var(--sans); margin: 16px 0 8px; color: var(--ink); }
.b-grid p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.b-ico { width: 34px; height: 34px; display: block; color: var(--ink); }

/* What people use it for: four pictures. */
.t-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 32px; align-items: end; margin-bottom: 44px; }
.t-head h2 { margin: 0; }
.t-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.t-grid a { color: var(--ink); display: block; }
.t-grid a:hover { text-decoration: none; }
.t-art { aspect-ratio: 4 / 3; --cut: 10px; clip-path: var(--cut-path); overflow: hidden; background: #efede8; }
.t-art svg { display: block; width: 100%; height: 100%; }
.t-grid h3 { font: 500 16px/1.3 var(--sans); margin: 16px 0 6px; }
.t-grid p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.t-grid .more { margin-top: 14px; font-size: 12px; }
.t-grid a:hover .more { color: var(--accent); }

/* Change one URL: a code card on a desert backdrop. */
.u-row { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 48px; align-items: center; }
.u-list { list-style: none; padding: 0; margin: 20px 0 0; font: 400 13px/1.9 var(--mono); color: var(--ink-2); }
.u-row .h-ctas { margin-top: 26px; }
.u-art { --cut: 18px; clip-path: var(--cut-path); padding: 44px 40px; background: linear-gradient(180deg, #e9d6c2 0%, #e6b58a 55%, #c9804f 100%); }
.u-code { --cut: 12px; --cut-bg: #fff; padding: 0; }
.u-tabs { display: flex; gap: 2px; padding: 12px 12px 0; flex-wrap: wrap; }
.u-tabs button { font: 500 13px/1 var(--sans); color: var(--muted); background: none; border: 0; padding: 8px 11px; cursor: pointer; }
.u-tabs button[aria-selected="true"] { color: #fff; background: var(--ink); --cut: 5px; clip-path: var(--cut-path); }
.u-code pre { margin: 0; padding: 18px 22px 20px; font: 400 13.5px/1.75 var(--mono); color: var(--ink); overflow-x: auto; min-height: 196px; }
.u-code pre .k { color: #ad3da4; font-weight: 600; }
.u-code pre .s { color: #c41a16; }
.u-code pre .c { color: var(--muted); font-style: italic; }
.u-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); padding: 12px 16px; font-size: 13px; color: var(--muted); }
.u-foot code { font-size: 12.5px; }
.u-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.u-chips span { font: 500 12px/1 var(--sans); color: var(--ink-2); background: rgba(255, 255, 255, .8); padding: 7px 10px; --cut: 5px; clip-path: var(--cut-path); }

/* Models: dark pictures with the name on them, prices underneath. */
.m-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px 32px; margin-bottom: 36px; }
.m-head h2 { margin: 0; max-width: 11em; }
.m-head .sub { font-size: 15px; }
.m-head .sub a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.m-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.m-card { color: var(--ink); display: block; }
.m-card:hover { text-decoration: none; }
.m-art { position: relative; aspect-ratio: 1 / 1; --cut: 12px; clip-path: var(--cut-path); overflow: hidden; color: #fff; }
.m-art svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; transition: transform .6s ease; }
.m-card:hover .m-art svg { transform: scale(1.04); }
.m-art .m-top { position: absolute; left: 16px; right: 16px; top: 16px; display: flex; align-items: center; gap: 8px; }
.m-art .m-top img { width: 22px; height: 22px; padding: 3px; background: #fff; clip-path: polygon(4px 0, calc(100% - 4px) 0, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 0 calc(100% - 4px), 0 4px); }
.m-art .m-top i { font: 600 10px/1 var(--sans); font-style: normal; letter-spacing: 0.06em; text-transform: uppercase; padding: 5px 7px; background: rgba(255, 255, 255, .92); color: var(--ink); }
.m-art strong { position: absolute; left: 16px; right: 16px; top: 52px; font: 400 26px/1.05 var(--serif); letter-spacing: -0.01em; color: #fff; text-shadow: 0 1px 12px rgba(0, 0, 0, .35); }
.m-meta { display: flex; justify-content: space-between; gap: 8px; margin: 12px 2px 0; font-size: 12.5px; color: var(--muted); }
.m-price { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 8px 2px 0; padding-top: 10px; border-top: 1px solid var(--line); }
.m-price span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.m-price b { display: block; font: 500 15px/1.3 var(--sans); color: var(--ink); font-variant-numeric: tabular-nums; margin-top: 2px; text-transform: none; letter-spacing: 0; }

/* Questions: the heading left, a numbered list on the right; the open one sits on a grey card. */
.q-row { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: 48px; align-items: start; }
.q-row .sub a { color: var(--accent); }
.q-list .faq { counter-reset: q; }
.q-list .faq details { counter-increment: q; border: 0; padding: 0 18px; }
.q-list .faq details[open] { background: #f1f0ed; --cut: 10px; clip-path: var(--cut-path); margin: 2px 0; }
.q-list .faq summary { display: flex; align-items: baseline; gap: 20px; font: 400 15.5px/1.45 var(--sans); letter-spacing: -0.005em; padding: 15px 40px 15px 0; color: var(--ink); }
.q-list .faq summary::before { content: counter(q, decimal-leading-zero); flex: none; min-width: 18px; font: 400 12px/1 var(--mono); color: #a8a29e; }
.q-list .faq summary::after { top: 50%; right: 0; transform: translateY(-50%); font-size: 22px; color: var(--ink); }
.q-list .faq details[open] summary::after { content: "\2212"; transform: translateY(-50%); }
.q-list .faq details > div { padding: 0 0 18px 38px; color: var(--muted); font-size: 15px; max-width: none; }

/* The send-off: the line with the model logos set into it, tiles drifting round it. */
.c-end { position: relative; text-align: center; padding: 150px 0 150px !important; overflow: hidden; }
.c-end h2 { margin: 0 auto 30px; font-size: clamp(40px, 5vw, 64px); line-height: 1.04; }
.c-logos { display: inline-flex; gap: 8px; vertical-align: -0.12em; margin-left: 6px; }
.c-logos i { display: grid; place-items: center; width: 1.02em; height: 1.02em; background: #ecebe7; --cut: 8px; clip-path: var(--cut-path); }
.c-logos i::before { content: ''; width: 58%; height: 58%; background: var(--accent); -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat; }
.c-end .h-ctas { justify-content: center; }
.c-float { position: absolute; width: 96px; height: 96px; display: grid; place-items: center; background: #ecebe7; --cut: 14px; clip-path: var(--cut-path); animation: c-bob 8s ease-in-out infinite; }
.c-f1 { left: 12%; top: 16%; rotate: -8deg; }
.c-f2 { right: 12%; top: 12%; rotate: 7deg; animation-delay: -2s; }
.c-f3 { left: 20%; bottom: 14%; rotate: 5deg; width: 76px; height: 76px; animation-delay: -4s; }
.c-f4 { right: 21%; bottom: 18%; rotate: -6deg; width: 76px; height: 76px; animation-delay: -5.5s; }
@keyframes c-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* The cartoon's motion. All of it stops for anyone who asks for less. */
.ww-scene .sc-orbit { animation: sc-orbit 22s linear infinite; }
.ww-scene .sc-orbit-b { animation-duration: 28s; animation-direction: reverse; }
@keyframes sc-orbit { to { transform: rotate(360deg); } }
.ww-scene .sc-flap { transform-box: fill-box; transform-origin: center; animation: sc-flap 1.6s ease-in-out infinite; }
@keyframes sc-flap { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.55); } }
.ww-scene .sc-breathe { animation: sc-breathe 4.8s ease-in-out infinite; transform-origin: 540px 660px; }
@keyframes sc-breathe { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-2px) scale(1.004); } }
.ww-scene .sc-head { transform-box: view-box; transform-origin: 500px 330px; animation: sc-nod 9.6s ease-in-out infinite; }
@keyframes sc-nod { 0%, 100% { transform: rotate(0); } 40% { transform: rotate(-1.4deg); } 55% { transform: rotate(-1.4deg); } 70% { transform: rotate(.4deg); } }
.ww-scene .sc-eye { transform-box: fill-box; transform-origin: center; animation: sc-blink 5.2s infinite; }
@keyframes sc-blink { 0%, 93%, 100% { transform: scaleY(1); } 95.5% { transform: scaleY(.1); } }
.ww-scene .sc-tail-far, .ww-scene .sc-tail-far2 { transform-box: fill-box; transform-origin: 100% 0; animation: sc-tail 2.8s ease-in-out infinite; }
.ww-scene .sc-tail-far2 { animation-duration: 3.4s; animation-delay: -1s; }
@keyframes sc-tail { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(18deg); } }
.ww-scene .sc-ember-glow { transform-box: fill-box; transform-origin: center; animation: sc-drag 7s ease-in-out infinite; }
.ww-scene .sc-ember { animation: sc-ember 7s ease-in-out infinite; }
@keyframes sc-drag { 0%, 100% { opacity: .55; transform: scale(.85); } 8%, 16% { opacity: 1; transform: scale(1.35); } 26% { opacity: .6; transform: scale(.9); } }
@keyframes sc-ember { 0%, 100% { fill: #ff7a2a; } 8%, 16% { fill: #ffe9a8; } 26% { fill: #ff7a2a; } }
@media (prefers-reduced-motion: reduce) {
  .ww-scene *, .c-float { animation: none !important; }
}

@media (max-width: 1080px) {
  .h-card { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .h-art { aspect-ratio: 680 / 660; min-height: 0; }
  /* minmax(0, 1fr), not 1fr: a bare 1fr column grows to its widest child, and the code card pushed "Change one URL" to 615px on a 390px phone (7 Nov 2026). */
  .b-row, .u-row, .q-row, .t-head { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .t-grid, .m-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .home section { padding: 44px 0; }
  .h-hero { padding: 16px 0 8px !important; }
  .h-copy { padding: 34px 22px 30px; }
  .h-card { --cut: 14px; }
  .h-demo, .h-tabs { display: none; }
  .b-grid { grid-template-columns: 1fr; padding: 28px 24px; gap: 28px; }
  .t-grid, .m-grid { grid-template-columns: 1fr; }
  .u-art { padding: 22px 14px; }
  .q-list .faq details { padding: 0 12px; }
  .q-list .faq details > div { padding-left: 0; }
  .c-logos i { width: .9em; height: .9em; }
  .c-float { display: none; }
  .c-end { padding: 80px 0 90px !important; }
}

/* Right to left (the Arabic home page): the questions mirror, and arrows point the way the line reads. */
[dir="rtl"] .home .more::after, [dir="rtl"] .h-badge::after { transform: scaleX(-1); }
[dir="rtl"] .h-badge { padding: 5px 5px 5px 14px; }
[dir="rtl"] .q-list .faq summary { padding: 15px 0 15px 40px; }
[dir="rtl"] .q-list .faq summary::after { right: auto; left: 0; }
[dir="rtl"] .q-list .faq details > div { padding: 0 38px 18px 0; }
[dir="rtl"] .c-logos { margin: 0 6px 0 0; }
@media (max-width: 640px) {
  [dir="rtl"] .q-list .faq details > div { padding-right: 0; }
}

/* Devanagari and Thai stack marks above and below the line, so their headings need the room. */
:is([lang="hi"], [lang="th"]) .home :is(h1, h2) { line-height: 1.24; }
