/* Feature pages: The AI Website (/website) and Inside the AI (/inside-the-ai).
   Loaded only on those two pages, after styles.css. The illustrations are built in HTML and CSS,
   so they stay sharp, cost no image downloads and are hidden from screen readers (aria-hidden). */

:root {
  --pool: #2f8fb0;           /* water blue, used only inside illustrations */
  --pool-soft: #d8eef5;
  --ok: #1f7a4d;             /* check marks on white (4.5:1) */
  --warn: #9a5b00;           /* flagged items on white (4.5:1) */
  --glass: rgba(255, 255, 255, 0.78);
  --glass-line: rgba(255, 255, 255, 0.95);
  --shadow-art: 0 18px 40px rgba(15, 28, 44, 0.16);
}

/* ---------- Hero ---------- */
.f-hero { position: relative; isolation: isolate; overflow: hidden; background: var(--navy-deep); color: var(--white); padding: 170px 0 110px; }
.f-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 70% at 85% 30%, rgba(235, 95, 82, 0.28), transparent 70%),
    radial-gradient(50% 60% at 10% 90%, rgba(47, 143, 176, 0.25), transparent 70%);
}
.f-hero-grid { display: grid; grid-template-columns: 1fr 560px; gap: 70px; align-items: center; }
.f-hero h1 { color: var(--white); font-size: 60px; font-weight: 600; line-height: 1.2; margin: 0 0 26px; }
.f-hero-lead { font-size: 21px; margin-bottom: 18px; }
.f-hero-sub { color: var(--white-77); max-width: 640px; margin-bottom: 36px; }
.f-hero .btn { width: 290px; }
.f-checks { margin-top: 34px; display: grid; gap: 12px; }
.f-checks li { display: flex; gap: 12px; align-items: center; color: var(--white); }
.f-checks li::before { content: "✓"; flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(240, 118, 106, 0.18); color: var(--coral-on-dark); font-weight: 700; font-size: 14px; }

/* ---------- Stat strip ---------- */
.f-stats { background: var(--navy); color: var(--white); padding: 44px 0; }
.f-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.f-stat-num { font-family: var(--font-head); font-size: 40px; font-weight: 700; line-height: 1.2; color: var(--white); }
.f-stat-num span { font-size: 20px; color: var(--salmon); }
.f-stat p:last-child { color: var(--white-77); font-size: 16px; }

/* ---------- Section heads ---------- */
.f-section { padding: 130px 0; }
.f-section.alt { background: var(--cream); }
.f-head { max-width: 860px; margin: 0 auto 80px; text-align: center; }
.f-head .eyebrow { color: var(--coral-ink); margin-bottom: 14px; }
.f-head h2 { margin-bottom: 20px; }
.f-head p { color: var(--navy); }

/* ---------- Numbered steps ---------- */
.f-steps { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); gap: 32px; }
.f-step { text-align: center; }
.f-step-num {
  width: 120px; height: 120px; margin: 0 auto 26px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-head); font-size: 48px; font-weight: 700; color: var(--coral-ink);
  background: radial-gradient(circle at 30% 25%, var(--white), var(--cream) 60%, #f9d9c9);
  border: 3px solid var(--coral); box-shadow: 0 0 0 10px rgba(235, 95, 82, 0.1), var(--shadow-art);
}
.f-step h3 { font-size: 22px; margin-bottom: 10px; }
.f-step p { color: var(--navy); max-width: 360px; margin: 0 auto; }

/* ---------- Feature rows ---------- */
.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 90px; align-items: center; }
.f-row + .f-row { margin-top: 130px; }
.f-row.flip .f-art { order: -1; }
.f-copy .eyebrow { color: var(--coral-ink); margin-bottom: 12px; font-size: 16px; }
.f-copy h2, .f-copy h3 { font-size: 38px; font-weight: 700; line-height: 1.25; margin-bottom: 18px; }
.f-copy > p { color: var(--navy); margin-bottom: 26px; }
.f-list li { position: relative; padding: 14px 0 14px 40px; border-top: 1px solid var(--border-light); color: var(--navy); }
.f-list li:last-child { border-bottom: 1px solid var(--border-light); }
.f-list li::before { content: "✓"; position: absolute; left: 4px; top: 13px; color: var(--coral-ink); font-weight: 700; }
.f-note { margin-top: 18px; font-size: 15px; color: var(--muted); }

/* ---------- Cards grid ---------- */
.f-cards { display: grid; grid-template-columns: repeat(var(--cols, 4), 1fr); gap: 24px; }
.f-card { background: var(--white); border-radius: var(--radius-card); padding: 30px 26px; box-shadow: 0 6px 24px rgba(15, 28, 44, 0.08); }
.f-card h3 { font-size: 20px; margin: 18px 0 8px; }
.f-card p { color: var(--navy); font-size: 17px; }
.f-icon { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; color: var(--white); background: linear-gradient(135deg, var(--coral), var(--coral-btn)); box-shadow: 0 8px 20px rgba(207, 70, 57, 0.3); }
.f-icon svg { width: 30px; height: 30px; }
.f-icon.blue { background: linear-gradient(135deg, #4aa8c8, var(--pool)); box-shadow: 0 8px 20px rgba(47, 143, 176, 0.3); }
.f-icon.navy { background: linear-gradient(135deg, #2c4866, var(--navy)); box-shadow: 0 8px 20px rgba(26, 46, 68, 0.3); }

/* Tech grid: plain text tiles on navy. */
.f-tech { background: var(--navy); color: var(--white); }
.f-tech .f-head .eyebrow { color: var(--salmon); }
.f-tech .f-head h2 { color: var(--white); }
.f-tech .f-head h2 .accent-coral { color: var(--coral-on-dark); }
.f-tech .f-head p { color: var(--white-77); }
.f-tech .f-card { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12); box-shadow: none; }
.f-tech .f-card h3 { color: var(--salmon); margin-top: 0; }
.f-tech .f-card p { color: var(--white-77); }

/* =================================================================
   Illustrations
   ================================================================= */
.f-art {
  position: relative; aspect-ratio: 1.07; border-radius: 28px; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(70% 60% at 15% 10%, #ffffff, transparent 60%),
    radial-gradient(60% 70% at 95% 95%, rgba(235, 95, 82, 0.38), transparent 70%),
    radial-gradient(60% 60% at 90% 10%, rgba(47, 143, 176, 0.28), transparent 70%),
    linear-gradient(160deg, var(--cream), #fbe0d3);
  font-family: var(--font-body); font-size: 15px; color: var(--navy-deep); line-height: 1.35;
}
.f-art::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: repeating-radial-gradient(circle at 50% 55%, transparent 0 70px, rgba(255, 255, 255, 0.35) 70px 72px);
}
.f-art.dark {
  background:
    radial-gradient(60% 60% at 80% 15%, rgba(235, 95, 82, 0.35), transparent 70%),
    radial-gradient(60% 60% at 10% 90%, rgba(47, 143, 176, 0.35), transparent 70%),
    linear-gradient(160deg, #22405e, var(--navy-deep));
  color: var(--white);
}
.f-art.dark::before { background: repeating-radial-gradient(circle at 50% 50%, transparent 0 70px, rgba(255, 255, 255, 0.06) 70px 72px); }

.glass {
  position: absolute; background: var(--glass); border: 1px solid var(--glass-line); border-radius: 16px;
  box-shadow: var(--shadow-art); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.solid { position: absolute; background: var(--white); border-radius: 16px; box-shadow: var(--shadow-art); }
.chip {
  position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px;
  background: var(--white); border-radius: 999px; box-shadow: var(--shadow-art);
  font-weight: 600; font-size: 14px; color: var(--navy-deep); white-space: nowrap;
}
.chip i { font-style: normal; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--coral-btn); color: var(--white); font-size: 12px; }
.chip i.blue { background: var(--pool); }
.chip i.green { background: var(--ok); }
.bar { display: block; height: 9px; border-radius: 5px; background: rgba(26, 46, 68, 0.14); }
.bar.c { background: var(--coral); }
.bar.s { background: var(--salmon); }
.bar.w { background: rgba(255, 255, 255, 0.85); }

/* Browser window */
.win { overflow: hidden; }
.win-top { display: flex; gap: 6px; align-items: center; padding: 10px 14px; background: rgba(26, 46, 68, 0.06); }
.win-top b { width: 9px; height: 9px; border-radius: 50%; background: var(--salmon); }
.win-top b:nth-child(2) { background: #f3c26b; }
.win-top b:nth-child(3) { background: #8fcf9f; }
.win-top span { margin-left: 10px; flex: 1; height: 16px; border-radius: 8px; background: var(--white); font-size: 11px; line-height: 16px; padding-left: 10px; color: var(--muted); }
.win-hero { position: relative; height: 200px; background-size: cover; background-position: center; }
.win-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15, 28, 44, 0.75), rgba(15, 28, 44, 0.1)); }
.win-hero div { position: absolute; z-index: 1; left: 20px; top: 34px; width: 55%; display: grid; gap: 8px; }
.win-hero strong { font-family: var(--font-head); color: var(--white); font-size: 19px; line-height: 1.2; }
.win-hero em { font-style: normal; justify-self: start; margin-top: 6px; padding: 7px 12px; border-radius: 5px; background: var(--coral-btn); color: var(--white); font-size: 11px; font-weight: 700; }
.win-body { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 14px; }
.win-body span { height: 54px; border-radius: 8px; background-size: cover; background-position: center; }

/* Phone */
.phone {
  position: absolute; width: 230px; aspect-ratio: 0.5; border-radius: 34px; padding: 12px;
  background: var(--navy-deep); box-shadow: 0 30px 60px rgba(15, 28, 44, 0.35);
}
.phone-screen { height: 100%; border-radius: 24px; background: #f4f6f8; overflow: hidden; display: flex; flex-direction: column; gap: 10px; padding: 34px 10px 12px; position: relative; }
.phone-screen::before { content: ""; position: absolute; top: 9px; left: 50%; width: 70px; height: 18px; margin-left: -35px; border-radius: 10px; background: var(--navy-deep); }
.phone-title { text-align: center; font-weight: 700; font-size: 13px; color: var(--navy); padding-bottom: 6px; border-bottom: 1px solid var(--border-light); }
.note { background: var(--white); border-radius: 12px; padding: 10px 12px; font-size: 12.5px; box-shadow: 0 2px 8px rgba(15, 28, 44, 0.08); }
.note b { display: block; font-size: 11px; color: var(--coral-ink); letter-spacing: .04em; text-transform: uppercase; margin-bottom: 2px; }
.bub { max-width: 84%; padding: 9px 12px; border-radius: 16px; font-size: 12.5px; }
.bub.me { align-self: flex-end; background: var(--pool); color: var(--white); border-bottom-right-radius: 4px; }
.bub.ai { align-self: flex-start; background: var(--white); border-bottom-left-radius: 4px; box-shadow: 0 2px 8px rgba(15, 28, 44, 0.08); }
.bub.photo { padding: 4px; background: var(--pool); }
.bub.photo span { display: block; width: 120px; height: 74px; border-radius: 12px; background-size: cover; background-position: center; }

/* Gauge */
.gauge { position: absolute; width: 190px; height: 190px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--coral) 0 353deg, rgba(26, 46, 68, 0.12) 353deg 360deg); box-shadow: var(--shadow-art); }
.gauge::before { content: ""; position: absolute; inset: 14px; border-radius: 50%; background: var(--white); }
.gauge div { position: relative; text-align: center; }
.gauge strong { display: block; font-family: var(--font-head); font-size: 52px; line-height: 1; color: var(--navy); }
.gauge span { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--navy); }

/* Rows inside panels (fact sheet, checks, versions) */
.rows { display: grid; }
.rows > div { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border-light); font-size: 13.5px; }
.rows > div:first-child { border-top: 0; }
.rows small { display: block; color: var(--muted); font-size: 11.5px; }
.tag { font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px; white-space: nowrap; }
.tag.ok { background: #e3f3ea; color: var(--ok); }
.tag.warn { background: #fdf0d9; color: var(--warn); }
.tag.c { background: #fde7e3; color: var(--coral-ink); }
.panel-h { font-family: var(--font-head); font-weight: 700; font-size: 15px; margin-bottom: 6px; display: flex; justify-content: space-between; align-items: center; }

/* Swatches */
.swatches { display: flex; gap: 8px; }
.swatches b { width: 34px; height: 34px; border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06); }

/* Highlighted copy */
.hl { background: linear-gradient(transparent 55%, rgba(246, 169, 149, 0.6) 55%); font-weight: 600; }

/* Score bars */
.score { display: grid; grid-template-columns: 96px 1fr 18px; gap: 10px; align-items: center; font-size: 12.5px; padding: 5px 0; }
.score i { height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--coral), var(--salmon)); }
.score b { text-align: right; }

/* Buttons inside art */
.mini-btns { display: flex; gap: 8px; margin-top: 12px; }
.mini-btns span { flex: 1; text-align: center; padding: 9px 6px; border-radius: 6px; font-size: 12px; font-weight: 700; background: var(--coral-btn); color: var(--white); }
.mini-btns span + span { background: transparent; color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--navy); }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .f-hero-grid { grid-template-columns: 1fr 460px; gap: 40px; }
  .f-hero h1 { font-size: 50px; }
  .f-row { gap: 50px; }
}
@media (max-width: 900px) {
  .f-hero { padding: 110px 0 60px; }
  .f-hero-grid, .f-row { grid-template-columns: 1fr; }
  .f-hero h1 { font-size: 38px; }
  .f-hero-lead { font-size: 19px; }
  .f-hero .btn { width: 100%; max-width: 320px; }
  .f-hero .f-art { max-width: 520px; width: 100%; margin: 0 auto; }
  .f-row.flip .f-art { order: 0; }
  .f-row + .f-row { margin-top: 80px; }
  .f-section { padding: 70px 0; }
  .f-head { margin-bottom: 44px; }
  .f-copy h2, .f-copy h3 { font-size: 30px; }
  .f-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 16px; }
  .f-stat-num { font-size: 32px; }
  .f-steps, .f-cards { grid-template-columns: 1fr; }
  .f-step-num { width: 96px; height: 96px; font-size: 38px; }
}
@media (max-width: 1100px) and (min-width: 901px) {
  .f-cards { grid-template-columns: repeat(2, 1fr); }
}
/* Illustrations are laid out on a fixed 540px canvas and scaled down on narrow screens,
   so nothing inside them wraps or collides. */
.f-art > .canvas { position: absolute; left: 0; top: 0; width: 540px; height: 505px; transform-origin: 0 0; transform: scale(var(--s, 1)); }
@media (max-width: 1200px) and (min-width: 901px) { .f-art { --s: 0.8; } .f-hero .f-art { --s: 0.852; } }
@media (max-width: 900px) { .f-art { --s: 0.95; } }
@media (max-width: 560px) { .f-art { --s: 0.64; } }
@media (max-width: 400px) { .f-art { --s: 0.58; } }
@media (max-width: 350px) { .f-art { --s: 0.53; } }

/* Icons on the dark tech cards */
.f-tech .f-card .f-icon { width: 56px; height: 56px; border-radius: 16px; box-shadow: none; }
.f-tech .f-card .f-icon svg { width: 26px; height: 26px; }
.f-tech .f-card .f-icon + h3 { margin-top: 18px; }

/* ---------- Inside the AI hero: a website being built from your sources ---------- */
.ai-pills { position: absolute; left: 0; right: 0; display: flex; justify-content: center; gap: 10px; z-index: 2; }
.ai-pills.top { top: 22px; }
.ai-pills.bottom { top: 440px; }
.ai-pills .chip { position: relative; }
/* Short dashed leads from each source into the site */
.ai-pills .chip::after { content: ""; position: absolute; left: 50%; height: 22px; border-left: 1.5px dashed rgba(246, 169, 149, 0.7); }
.ai-pills.top .chip::after { top: 100%; }
.ai-pills.bottom .chip::after { bottom: 100%; }
.ai-frame { left: 56px; top: 86px; width: 428px; z-index: 1; color: var(--navy-deep); }
.ai-frame .win-hero { height: 214px; }
.ai-frame .win-hero > div { top: 44px; }
.ai-frame .win-body span { height: 70px; position: relative; }
.ai-box { position: absolute; z-index: 2; left: 12px; top: 22px; width: 58%; height: 128px; margin: 0; border: 1.5px dashed var(--salmon); border-radius: 8px; }
.ai-box .tag, .ai-thumb .tag { position: absolute; left: 8px; top: -11px; box-shadow: 0 4px 10px rgba(15, 28, 44, 0.2); }
.ai-thumb { outline: 1.5px dashed var(--salmon); outline-offset: 3px; }
.ai-thumb .tag { font-style: normal; top: -14px; left: 50%; transform: translateX(-50%); }
.ai-status {
  position: absolute; z-index: 2; right: 12px; top: 12px; margin: 0; display: flex; align-items: center; gap: 7px;
  padding: 6px 11px; border-radius: 999px; background: rgba(15, 28, 44, 0.72); color: var(--white); font-size: 11.5px; font-weight: 600;
}
.ai-status b { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); animation: ai-pulse 1.8s ease-in-out infinite; }
.ai-scan {
  position: absolute; z-index: 3; left: 0; right: 0; top: 34px; height: 2px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--coral) 20%, var(--salmon) 80%, transparent);
  box-shadow: 0 0 12px 2px rgba(235, 95, 82, 0.45);
  animation: ai-scan 4.5s ease-in-out infinite;
}
@keyframes ai-scan { 0%, 100% { transform: translateY(0); opacity: 0; } 10%, 85% { opacity: 1; } 50% { transform: translateY(270px); } }
@keyframes ai-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.8); } }

/* ---------- Engine steps as illustrated tiles ---------- */
.f-steps.linked { position: relative; }
.f-step-art {
  position: relative; isolation: isolate; overflow: hidden; width: 100%; max-width: 230px; aspect-ratio: 1; margin: 0 auto 26px;
  border-radius: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  background:
    radial-gradient(70% 60% at 15% 10%, #ffffff, transparent 60%),
    radial-gradient(60% 70% at 95% 95%, rgba(235, 95, 82, 0.3), transparent 70%),
    linear-gradient(160deg, var(--cream), #fbe0d3);
  box-shadow: var(--shadow-art);
}
.f-step-art::before { content: ""; position: absolute; inset: 0; z-index: -1; background: repeating-radial-gradient(circle at 50% 45%, transparent 0 40px, rgba(255, 255, 255, 0.45) 40px 42px); }
.f-step-n {
  position: absolute; left: 16px; top: 6px; font-family: var(--font-head); font-size: 56px; font-weight: 700; line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px var(--coral-ink);
}
.f-step-art .chip { position: static; font-size: 13px; padding: 8px 12px; }
.step-mini { display: grid; gap: 7px; width: 62%; padding: 10px 12px; background: var(--white); border-radius: 10px; box-shadow: 0 2px 8px rgba(15, 28, 44, 0.08); }
.step-mini .swatches b { width: 20px; height: 20px; border-radius: 6px; }
.step-fix { display: flex; gap: 6px; align-items: center; }
.step-fix .tag.warn { text-decoration: line-through; }
/* Dashed line linking the tiles (desktop) */
@media (min-width: 901px) {
  .f-steps.linked::before { content: ""; position: absolute; z-index: -1; left: 12%; right: 12%; top: 115px; border-top: 2px dashed var(--salmon); }
  .f-steps.linked .f-step { position: relative; }
}
@media (max-width: 900px) {
  .f-steps.linked { grid-template-columns: repeat(2, 1fr); gap: 36px 16px; }
  .f-steps.linked .f-step { text-align: left; }
  .f-step-art { max-width: none; border-radius: 18px; gap: 12px; }
  .f-step-n { font-size: 40px; left: 12px; }
  .f-step-art .f-icon { width: 52px; height: 52px; border-radius: 14px; }
  .f-step-art .f-icon svg { width: 24px; height: 24px; }
  .f-step-art .chip { font-size: 12px; padding: 6px 10px; }
  .step-fix { flex-direction: column; gap: 4px; }
  .f-steps.linked .f-step h3 { font-size: 19px; }
  .f-steps.linked .f-step p { font-size: 16px; }
}

/* Phones: lay the hero art out naturally instead of shrinking it, so labels stay readable */
@media (max-width: 560px) {
  .f-art.ai-hero { aspect-ratio: auto; }
  .f-art.ai-hero > .canvas { position: relative; width: auto; height: auto; transform: none; padding: 20px 14px; display: flex; flex-direction: column; gap: 16px; }
  .ai-pills { position: static; flex-wrap: wrap; gap: 8px; }
  .ai-pills .chip { font-size: 13px; padding: 7px 11px; }
  .ai-pills .chip::after { display: none; }
  .ai-frame { position: relative; left: auto; top: auto; width: 100%; }
  .ai-frame .win-hero { height: 190px; }
  .ai-status { top: auto; bottom: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .ai-scan { animation: none; transform: translateY(110px); opacity: .8; }
  .ai-status b { animation: none; }
}

/* Call to action under a feature row's bullets */
.f-copy .f-cta { margin-top: 24px; }

/* Pool Visualizer illustration: option pills and the running estimate */
.viz-label { margin: 12px 0 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.viz-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.viz-opts span { padding: 5px 11px; border-radius: 999px; border: 1px solid rgba(26,46,68,.18); font-size: 12px; font-weight: 600; color: var(--navy); }
.viz-opts span.on { background: var(--navy); border-color: var(--navy); color: var(--white); }
.viz-est { margin-top: 16px; padding: 10px 14px; border-radius: 12px; background: #f4f6f8; }
.viz-est small { display: block; font-size: 11px; color: var(--muted); }
.viz-est strong { font-family: var(--font-head); font-size: 20px; color: var(--navy); }
