/* The page for sellers who want AI shoppers to find them (/ai, docs/AI-PAGE.md): what 0cean does the day they join, where
   it is open, and what nobody can promise. Built on the page kit (kit.css) and the site's colours (base.css): the only
   colours of its own are the drawn candle's, which is a photograph's stand-in and the same in light and dark. */

.ai { display: grid; gap: clamp(40px, 6vw, 76px); padding-bottom: clamp(30px, 5vw, 60px); }

/* --- First screen: the promise on the left; one product, 0cean and the assistants it reaches on the right --- */
.ai-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(28px, 4vw, 56px);
  padding: clamp(28px, 5vw, 64px) clamp(20px, 5vw, 64px);
  background:
    radial-gradient(86% 130% at 100% 0%, var(--glow-a), transparent 62%),
    radial-gradient(70% 100% at 0% 100%, var(--glow-b), transparent 60%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: clamp(24px, 3vw, 36px);
  box-shadow: var(--shadow-2);
}
.ai-hero-text { display: grid; gap: 20px; justify-items: start; min-width: 0; }
.ai-hero-text > * { max-width: 100%; }
.ai-h1 { margin: 0; font-size: clamp(38px, 5.6vw, 68px); line-height: 1.02; letter-spacing: -0.052em; font-weight: 680; color: var(--ink); text-wrap: balance; }
.ai-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.ai-cta .buy { min-height: 54px; padding: 0 28px; font-size: 17px; border-radius: 16px; }
.ai .ai-cta a.buy { color: var(--btn-ink); }
.ai-ghost { display: inline-flex; align-items: center; min-height: 54px; padding: 0 22px; font-size: 16.5px; font-weight: 600; color: var(--ink); text-decoration: none; background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: var(--shadow-1); transition: border-color 0.15s ease, color 0.15s ease; }
.ai a.ai-ghost { color: var(--ink); }
.ai a.ai-ghost:hover { color: var(--brand-ink); border-color: var(--brand-line); }
.ai-facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 4px 0 0; padding: 0; list-style: none; font-size: 15px; color: var(--muted); }
.ai-facts b { color: var(--ink); font-weight: 650; }

/* Where each assistant stands: one colour for each state, the same in the figure, the board and the steps. */
.is-open, .is-ours { --st: var(--good); }
.is-ready { --st: var(--brand-ink); }
.is-applied, .is-theirs { --st: var(--warn); }
.is-next { --st: var(--muted); }

/* The figure: a product, the line to 0cean, and the six it reaches. */
.ai-hub { margin: 0; display: grid; gap: 12px; min-width: 0; }
.ai-card { display: grid; justify-items: center; min-width: 0; padding: clamp(16px, 2.4vw, 24px); background: var(--surface-solid); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-3); }
.ai-item { width: 100%; display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.ai-item-pic { position: relative; width: 56px; height: 56px; overflow: hidden; border-radius: 12px; background: linear-gradient(150deg, #f3eefc 0%, #dcd2f4 100%); }
.ai-item-pic::before { content: ""; position: absolute; left: 29%; right: 29%; top: 34%; bottom: 16%; background: linear-gradient(180deg, #fdfbff 0%, #ece5fa 100%); border-radius: 4px 4px 7px 7px; box-shadow: inset 0 -7px 0 rgba(122, 98, 190, 0.2), inset 0 6px 0 rgba(122, 98, 190, 0.12), 0 5px 9px -5px rgba(60, 40, 120, 0.45); }
.ai-item-pic::after { content: ""; position: absolute; left: 44%; width: 12%; top: 12%; height: 19%; background: radial-gradient(circle at 50% 72%, #fff3c4 0%, #ffc94a 45%, #f39c12 100%); border-radius: 50% 50% 46% 46% / 62% 62% 38% 38%; box-shadow: 0 0 10px 2px rgba(255, 190, 70, 0.55); }
.ai-item-text { display: grid; gap: 2px; min-width: 0; font-size: 14.5px; }
.ai-item-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-weight: 640; }
.ai-item-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 13px; }
.ai-item-tag { padding: 3px 10px; font-size: 12px; font-weight: 620; white-space: nowrap; color: var(--brand-ink); background: var(--brand-soft); border: 1px solid var(--brand-line); border-radius: 999px; }

/* The line between: a short stroke down, with its words on it; under 0cean it splits into three. */
.ai-link { position: relative; display: grid; place-items: center; width: 100%; height: 42px; margin: 0; }
.ai-link::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; transform: translateX(-50%); background: linear-gradient(180deg, var(--brand-line), var(--brand)); border-radius: 2px; }
.ai-link span { position: relative; padding: 2px 11px; font-size: 12.5px; font-weight: 620; color: var(--brand-ink); background: var(--surface-solid); border: 1px solid var(--brand-line); border-radius: 999px; }
.ai-link-fan { height: 32px; }
.ai-link-fan::before { bottom: 50%; background: var(--brand); }
.ai-link-fan::after { content: ""; position: absolute; left: calc((100% - 20px) / 6); right: calc((100% - 20px) / 6); top: calc(50% - 1px); height: 2px; background: var(--brand-line); border-radius: 2px; }

.ai-core { display: flex; align-items: center; gap: 12px; max-width: 100%; padding: 10px 20px 10px 10px; background: linear-gradient(180deg, var(--surface), var(--brand-soft)), var(--surface-solid); border: 1px solid var(--brand-line); border-radius: 18px; box-shadow: var(--shadow-2); }
.ai-core-mark { flex: none; display: grid; place-items: center; width: 48px; height: 48px; }
.ai-core-mark svg { width: 48px; height: 48px; filter: var(--mark-shadow); }
.ai-core-text { display: grid; gap: 1px; min-width: 0; }
.ai-core-text b { font-size: 19px; line-height: 1.2; letter-spacing: -0.025em; font-weight: 680; color: var(--ink); }
.ai-core-text span { font-size: 13px; line-height: 1.35; color: var(--muted); }

.ai-doors { width: 100%; margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ai-doors li { position: relative; display: grid; gap: 4px; justify-items: start; min-width: 0; padding: 11px 12px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.ai-doors li.is-open { border-color: color-mix(in srgb, var(--good) 38%, var(--line)); background: color-mix(in srgb, var(--good) 5%, var(--surface-solid)); }
.ai-doors li:nth-child(-n + 3)::before { content: ""; position: absolute; left: 50%; top: -17px; width: 2px; height: 17px; transform: translateX(-50%); background: var(--brand-line); }
.ai-doors b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 640; letter-spacing: -0.012em; color: var(--ink); }
.ai-doors span { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 620; color: var(--st); }
.ai-doors span::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ai-cap { justify-self: center; margin: 0; font-size: 12.5px; line-height: 1.5; text-align: center; color: var(--muted); }
.ai .ai-cap a { color: var(--brand-ink); text-decoration: none; }
.ai .ai-cap a:hover { text-decoration: underline; }

/* --- What happens, and when: four steps, each saying whether 0cean does it or someone else decides --- */
.ai-time { counter-reset: step; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.ai-time li { counter-increment: step; display: grid; grid-template-rows: auto auto 1fr auto; gap: 10px; min-width: 0; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-1); }
.ai-when { display: inline-flex; align-items: center; gap: 9px; width: fit-content; max-width: 100%; font-size: 13.5px; font-weight: 640; letter-spacing: -0.005em; color: var(--ink); }
.ai-when::before { content: counter(step); flex: none; display: grid; place-items: center; width: 28px; height: 28px; font-size: 13px; font-weight: 660; font-variant-numeric: tabular-nums; color: var(--brand-ink); background: var(--brand-soft); border: 1px solid var(--brand-line); border-radius: 50%; }
.ai-time h3 { margin: 2px 0 0; font-size: 18px; line-height: 1.25; letter-spacing: -0.022em; font-weight: 640; color: var(--ink); text-wrap: balance; }
.ai-time p { margin: 0; font-size: 15px; line-height: 1.58; color: var(--ink-2); text-wrap: pretty; overflow-wrap: anywhere; }
.ai-who { display: inline-flex; align-items: center; gap: 8px; width: fit-content; margin-top: 4px; padding: 4px 11px 4px 9px; font-size: 13px; font-weight: 640; color: var(--st); background: color-mix(in srgb, var(--st) 10%, transparent); border-radius: 999px; }
.ai-who::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* --- Where 0cean is open: one line for each assistant, its state on the right --- */
.ai-open { scroll-margin-top: 96px; }
.ai-board { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ai-board li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 14px; min-width: 0; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-1); }
.ai-dot { width: 10px; height: 10px; margin: 8px 2px 0; border-radius: 50%; background: var(--st); box-shadow: 0 0 0 4px color-mix(in srgb, var(--st) 18%, transparent); }
.ai-board h3 { margin: 0 0 4px; font-size: 17px; line-height: 1.3; letter-spacing: -0.02em; font-weight: 640; color: var(--ink); }
.ai-board p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }
.ai-board em { padding: 4px 11px; font-size: 13px; font-style: normal; font-weight: 640; white-space: nowrap; color: var(--st); background: color-mix(in srgb, var(--st) 11%, transparent); border-radius: 999px; }

/* --- What nobody can promise --- */
.ai-honest { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: start; padding: clamp(20px, 3vw, 32px); background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 22px; box-shadow: var(--shadow-1); }
.ai-honest > div { display: grid; gap: 12px; min-width: 0; }
.ai-honest p { margin: 0; max-width: 62em; font-size: 15.5px; line-height: 1.65; color: var(--ink-2); text-wrap: pretty; }
.ai-honest p.ai-honest-big { font-size: clamp(18px, 2vw, 22px); line-height: 1.35; letter-spacing: -0.02em; font-weight: 620; color: var(--ink); }

.ai-fine { margin: 0; max-width: 70em; font-size: 13px; line-height: 1.6; color: var(--muted); }

/* --- Narrower screens --- */
@media (max-width: 1240px) {
  /* the product's name and its line keep the room; the words on the line under it say it is yours */
  .ai-item { grid-template-columns: 56px minmax(0, 1fr); }
  .ai-item-tag { display: none; }
}
@media (max-width: 1100px) {
  .ai-time { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .ai-hero { grid-template-columns: minmax(0, 1fr); }
  .ai-board { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
  .ai-cta { width: 100%; }
  .ai-cta .buy, .ai-cta .ai-ghost { flex: 1 1 100%; justify-content: center; }
  .ai-card { padding: 14px; border-radius: 22px; }
  .ai-item { grid-template-columns: 48px minmax(0, 1fr); gap: 12px; padding: 10px; }
  .ai-item-pic { width: 48px; height: 48px; }
  .ai-item-tag { display: none; }
  .ai-doors { gap: 8px; }
  .ai-doors li { padding: 10px 9px 9px; }
  .ai-doors b { font-size: 14px; }
  .ai-doors span { font-size: 12px; }
  .ai-link-fan::after { left: calc((100% - 16px) / 6); right: calc((100% - 16px) / 6); }
  .ai-time { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .ai-time li { padding: 18px; border-radius: 20px; }
  .ai-board li { grid-template-columns: auto minmax(0, 1fr); padding: 16px; }
  .ai-board em { grid-column: 2; justify-self: start; margin-top: -2px; }
  .ai-honest { grid-template-columns: minmax(0, 1fr); padding: 18px; }
}
@media (max-width: 520px) {
  /* Six names in two columns, so that a long one ("Perplexity") is read whole; the line splits into two. */
  .ai-doors { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ai-doors b { font-size: 14.5px; }
  .ai-doors li:nth-child(3)::before { display: none; }
  .ai-link-fan::after { left: calc((100% - 8px) / 4); right: calc((100% - 8px) / 4); }
}
