/* AI hub (ai.php) and project pages (ai-*.php). Light by default; dark under html[data-theme="dark"]. */

.page-ai {
  --ai-accent: #e2725b;
  --ai-accent-soft: rgba(226, 114, 91, 0.14);
  --ai-text: #111;
  --ai-muted: #6b6b70;
  --ai-surface: #fff;
  --ai-surface-2: #f6f5f3;
  --ai-border: #e7e5e1;
  --ai-term: #141416;
}
html[data-theme="dark"] .page-ai {
  --ai-accent-soft: rgba(226, 114, 91, 0.18);
  --ai-text: #ececec;
  --ai-muted: #9a9aa0;
  --ai-surface: #18181b;
  --ai-surface-2: #131315;
  --ai-border: #2c2c31;
  --ai-term: #0b0b0c;
}

.ai { color: var(--ai-text); }
.ai section { padding-top: 40px; padding-bottom: 80px; }
.ai section h1, .ai section h2, .ai section h3 { color: var(--ai-text); margin: 0; }
.ai section p { color: var(--ai-muted); margin: 0; }
.ai a { text-decoration: none; }

.ai-eyebrow { display: inline-block; color: var(--ai-accent); font-size: 14px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.ai-h2 { font-size: 40px; line-height: 48px; font-weight: 900; margin-bottom: 24px !important; }

/* Hero */
.ai-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--ai-border); }
.ai-stats.hub { grid-template-columns: repeat(4, auto); justify-content: start; column-gap: 36px; margin-top: 8px; padding-top: 0; padding-bottom: 32px; border-top: 0; border-bottom: 1px solid var(--ai-border); }
.ai-stats.hub strong { white-space: nowrap; }
@media (min-width: 768px) { .ai-stats.hub > * + * { padding-left: 36px; border-left: 1px solid rgba(255,255,255,0.06); } html:not([data-theme="dark"]) .ai-stats.hub > * + * { border-left-color: rgba(0,0,0,0.06); } }
.ai-stats strong { display: block; font-size: 34px; line-height: 40px; font-weight: 900; }
.ai-stats span { color: var(--ai-muted); font-size: 15px; }

/* The full stack, set as one sentence; stages go from dim to lit as they scroll past */
.ai-flow { padding-top: 0 !important; padding-bottom: 24px !important; }
.ai-flow-text { margin: 0; font-size: 38px; line-height: 1.2; font-weight: 900; letter-spacing: -0.02em; color: var(--ai-text) !important; }
.ai-flow .ai-stats.hub { margin-top: 64px; }
.ai-flow-kicker { font-size: 22px !important; line-height: 30px; font-weight: 700; color: var(--ai-muted) !important; margin: 0 0 40px !important; }
.ai-flow-text span { opacity: 0.18; transition: opacity 0.5s ease; }
.ai-flow-text span.lit { opacity: 1; }
@media (min-width: 768px) { .ai-flow-text span { white-space: nowrap; } }
.ai-flow-text em { font-style: normal; color: var(--ai-accent); }
.ai-flow-text i { font-style: normal; color: var(--ai-accent); font-weight: 700; padding: 0 0.08em; }

/* Pitch input */
.ai-prompt { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 20px; background: var(--ai-surface); border: 2px solid var(--ai-text); border-radius: 14px; }
@media (min-width: 992px) { .ai-prompt, .ai-chips { max-width: 50%; } }
.ai-prompt:focus-within { border-color: var(--ai-accent); box-shadow: 0 0 0 4px var(--ai-accent-soft); }
.ai-prompt-mark { color: var(--ai-accent); font-size: 28px; font-weight: 900; line-height: 1; }
.ai-prompt input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ai-text); font: inherit; font-size: 20px; font-weight: 600; padding: 10px 0; }
.ai-prompt input::placeholder { color: var(--ai-muted); font-weight: 500; }
.ai-go, .ai-btn { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 10px; background: var(--ai-accent); color: #fff !important; font-weight: 800; font-size: 17px; padding: 14px 22px; cursor: pointer; white-space: nowrap; }
.ai-go span, .ai-btn span, .ai-next span { transition: transform 0.2s ease; }
.ai-go:hover span, .ai-btn:hover span, .ai-next:hover span { transform: translateX(4px); }
.ai-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.ai-chips button { border: 1px solid var(--ai-border); background: var(--ai-surface); color: var(--ai-text); border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.ai-chips button:hover { border-color: var(--ai-accent); color: var(--ai-accent); }


/* Products: Stories-page tiles (markup and look from theme.css); same equal-height grid as .stories */
.ai-mark { display: block; width: 56px; height: 56px; margin: 0 0 18px; color: currentColor; }
html[data-theme="dark"] .page-ai { --ai-tile-bg: var(--dm-surface); }
@media (min-width: 992px) {
  .ai-tiles.row.page-content { display: flex; flex-wrap: wrap; }
  .ai-tiles.row.page-content::before, .ai-tiles.row.page-content::after { display: none; }
  .ai-tiles.row.page-content > [class*="col-"] { display: flex; flex-direction: column; margin-bottom: 30px; }
  .ai-tiles.row.page-content > [class*="col-"] > a { display: flex; flex: 1; }
  .ai-tiles.row.page-content div.tile.case { flex: 1; margin-bottom: 0; }
}


/* Pitch dialog */
.ai-pitch { padding-bottom: 140px !important; }
.ai-dialog { width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 44px; border: 1px solid var(--ai-border); border-radius: 20px; background: var(--ai-surface); color: var(--ai-text); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.5); }
.ai-dialog::backdrop { background: rgba(10, 10, 12, 0.6); backdrop-filter: blur(4px); }
.ai-dialog[open] { animation: ai-pop 0.25s ease; }
@keyframes ai-pop { from { opacity: 0; transform: translateY(12px) scale(0.98); } }
.ai-dialog-close { position: absolute; top: 14px; right: 18px; border: 0; background: none; color: var(--ai-muted); font-size: 30px; line-height: 1; cursor: pointer; }
.ai-dialog-close:hover { color: var(--ai-text); }
.ai-dialog-idea { margin: 0 0 10px; color: var(--ai-accent); font-size: 17px; font-weight: 700; }
.ai-dialog h2 { margin: 0 0 24px; font-size: 32px; line-height: 38px; font-weight: 900; color: var(--ai-text); }
.ai-dialog textarea, .ai-dialog input[type="email"] { display: block; width: 100%; margin-bottom: 12px; padding: 14px 16px; border: 1px solid var(--ai-border); border-radius: 12px; background: var(--ai-surface-2); color: var(--ai-text); font: inherit; font-size: 17px; resize: vertical; }
.ai-dialog textarea:focus, .ai-dialog input[type="email"]:focus { outline: 0; border-color: var(--ai-accent); box-shadow: 0 0 0 4px var(--ai-accent-soft); }
.ai-dialog .ai-btn { margin-top: 8px; }
.ai-dialog .ai-btn:disabled { opacity: 0.6; cursor: default; }
.ai-dialog-error { min-height: 22px; margin: 0; color: var(--ai-accent); font-size: 15px; font-weight: 600; }
.ai-dialog-error a { color: inherit; text-decoration: underline; }
.ai-dialog-mail { display: inline-flex; gap: 8px; color: var(--ai-accent) !important; font-size: 20px; font-weight: 800; }
.ai-dialog-mail span { transition: transform 0.2s ease; }
.ai-dialog-mail:hover span { transform: translateX(4px); }
.ai-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Project pages: story-style header (markup and styles shared with the Stories pages) */
.ai-story-icon { display: block; width: 72px; height: 72px; border-radius: 17px; margin: 24px 0 20px; }
.ai-story-head { margin-bottom: 0; }
/* 40 / 60 split with a 64px gutter (the Stories pages use 4 / 1 / 7 columns) */
@media (min-width: 992px) {
  .ai-story-head > .col-md-4 { width: 40%; }
  .ai-story-head > .col-md-1 { display: none; }
  .ai-story-head > .col-md-7 { width: 60%; padding-left: 64px; }
}

/* Project pages: below the header */
.ai-project { padding-top: 20px !important; }
.ai-back { display: inline-block; color: var(--ai-muted) !important; font-weight: 700; font-size: 15px; margin-bottom: 36px; }
.ai-back:hover { color: var(--ai-accent) !important; }
.ai-project-head { display: flex; align-items: center; gap: 28px; }
.ai-project-head img { width: 112px; height: 112px; border-radius: 26px; flex: none; }
.ai-project-head h1 { font-size: 72px; line-height: 1; font-weight: 900; letter-spacing: -0.02em; }
.ai-one { font-size: 24px; line-height: 32px; font-weight: 600; color: var(--ai-text) !important; margin-top: 8px !important; }
.ai-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.ai-tags span { font-size: 13px; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: var(--ai-surface-2); color: var(--ai-muted); border: 1px solid var(--ai-border); }
.ai-points { list-style: none; margin: 56px 0 0; padding: 0; border-top: 1px solid var(--ai-border); }
.ai-points li { display: flex; align-items: baseline; gap: 24px; padding: 26px 0; border-bottom: 1px solid var(--ai-border); font-size: 32px; line-height: 40px; font-weight: 800; }
.ai-points li span { color: var(--ai-accent); font-size: 15px; font-weight: 800; min-width: 28px; }
.ai-case-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; margin-top: 56px; }
.ai-case-img { width: 100%; border-radius: 16px; display: block; }
.ai-timeline { list-style: none; margin: 0; padding: 0 0 0 26px; border-left: 2px solid var(--ai-border); }
.ai-timeline li { position: relative; padding: 0 0 26px; }
.ai-timeline li:last-child { padding-bottom: 0; }
.ai-timeline li::before { content: ""; position: absolute; left: -33px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--ai-surface); border: 2px solid var(--ai-accent); }
.ai-timeline li.now::before { background: var(--ai-accent); box-shadow: 0 0 0 6px var(--ai-accent-soft); }
.ai-timeline .when { display: block; color: var(--ai-accent); font-size: 13px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.ai-timeline strong { display: block; color: var(--ai-text); font-size: 22px; line-height: 30px; margin-top: 2px; }
.ai-shiplog { display: flex; align-items: center; gap: 16px; margin-top: 40px; padding: 14px 18px; border-radius: 12px; background: var(--ai-surface-2); border: 1px solid var(--ai-border); overflow: hidden; }
.ai-shiplog-label { flex: none; font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ai-accent); }
.ai-shiplog-track { flex: 1; min-width: 0; height: 24px; position: relative; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; line-height: 24px; color: var(--ai-text); }
.ai-shiplog-track span { position: absolute; inset: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transform: translateY(10px); transition: opacity 0.4s ease, transform 0.4s ease; }
.ai-shiplog-track span.in { opacity: 1; transform: none; }
.ai-shiplog-track span.out { opacity: 0; transform: translateY(-10px); }
.ai-next { display: inline-block; margin-top: 64px; color: var(--ai-text) !important; font-size: 24px; font-weight: 800; }
.ai-next:hover { color: var(--ai-accent) !important; }

/* Product story (Dubara first): calm, mockup-led. A line or two of copy, then the real screens */
.ai-quiet { padding-top: 48px !important; padding-bottom: 24px !important; }
.ai-quiet-line { max-width: 640px; font-size: 24px; line-height: 34px; font-weight: 600; color: var(--ai-text) !important; }
.ai-quiet-meta { max-width: 640px; margin-top: 10px !important; font-size: 16px; line-height: 25px; }
.ai-reels { display: flex; justify-content: center; gap: 80px; flex-wrap: wrap; padding-top: 56px !important; padding-bottom: 56px !important; }
.ai-reel { margin: 0; text-align: center; }
.ai-reel figcaption { margin-top: 22px; font-size: 15px; line-height: 22px; color: var(--ai-muted); }
.ai-reel figcaption strong { display: block; color: var(--ai-text); font-weight: 700; }
.ai-phone { position: relative; width: 280px; aspect-ratio: 1206 / 2622; border-radius: 48px; padding: 9px; background: var(--ai-surface); box-shadow: 0 0 0 1px var(--ai-border), 0 30px 60px -30px rgba(0, 0, 0, 0.35); }
.ai-phone-screen { position: relative; width: 100%; height: 100%; border-radius: 40px; overflow: hidden; background: #000; }
.ai-phone-screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.9s ease; }
.ai-phone-screen img.on { opacity: 1; }
.ai-phone-screen canvas.ai-shimmer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* Responsive */
@media (max-width: 991px) {
  .ai-case-grid { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .ai { text-align: left; }
  .ai section { padding-bottom: 56px; }
  .ai-stats, .ai-stats.hub { grid-template-columns: repeat(2, 1fr); }
  .ai-stats strong { font-size: 26px; line-height: 32px; }
  .ai-h2 { font-size: 32px; line-height: 38px; }
  .ai-prompt { flex-wrap: wrap; padding: 12px; }
  .ai-dialog { padding: 32px 22px 26px; }
  .ai-dialog h2 { font-size: 26px; line-height: 32px; }
  .ai-prompt-mark { display: none; }
  .ai-prompt input { flex-basis: 100%; font-size: 17px; }
  .ai-go { width: 100%; justify-content: center; }
  .ai-flow-text { font-size: 24px; line-height: 1.25; }
  .ai-quiet-line { font-size: 20px; line-height: 29px; }
  .ai-reels { gap: 48px; }
  .ai-phone { width: 240px; }
  .ai-project-head { flex-direction: column; align-items: flex-start; gap: 20px; }
  .ai-project-head img { width: 88px; height: 88px; border-radius: 20px; }
  .ai-project-head h1 { font-size: 48px !important; line-height: 1 !important; margin: 0 !important; }
  .ai-one { font-size: 20px; line-height: 28px; }
  .ai-points li { font-size: 22px; line-height: 30px; gap: 16px; padding: 20px 0; }
  .ai-timeline strong { font-size: 19px; line-height: 26px; }
  .ai-next { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
}
