/* ============================================================
   AI & Search Optimization Illustration — Claude Design
   "Services Hero - AI & Search Optimization"
   Query bar → routing paths → three surfaces (SERP / Agent Feed / LLM Answer).
   Lives under "The Shift" on /services/organic-earned-experiences/.
   All classes prefixed .so-* to avoid global conflicts.
   ============================================================ */

.so-ill-section {
    background: #FAFAF7;
    padding: clamp(2rem, 5vw, 4rem) 0;
}
.so-ill-section__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: center;
}

.so-ill {
    width: 100%;
    max-width: 1240px;
    aspect-ratio: 16 / 9;
    position: relative;
    background: #FAFAF7;
    border-radius: 18px;
    overflow: hidden;
    isolation: isolate;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(17, 24, 39, 0.06);
    color: #111827;
    font-family: var(--font-primary, 'Plus Jakarta Sans'), system-ui, sans-serif;
}
.so-ill *,
.so-ill *::before,
.so-ill *::after { box-sizing: border-box; }

.so-ill::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 50% at 50% 20%, rgba(217, 119, 6, 0.04), transparent 65%);
    pointer-events: none;
}

.so-ill__inner {
    position: absolute;
    inset: 8% 8% 14% 8%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4%;
}

/* ── Query bar ──────────────────────────────────── */
.so-q {
    width: 64%;
    align-self: center;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 22px;
    background: #FFFFFF;
    border: 1px solid rgba(17, 24, 39, 0.10);
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(17, 24, 39, 0.06);
    position: relative;
}
.so-q__icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.so-q__icon svg {
    width: 100%;
    height: 100%;
    stroke: #D97706;
    fill: none;
    stroke-width: 1.6;
}
.so-q__text {
    flex: 1;
    font-family: var(--font-primary, 'Plus Jakarta Sans'), sans-serif;
    font-weight: 300;
    font-size: 20px;
    letter-spacing: -0.4px;
    color: #111827;
    overflow: hidden;
    white-space: nowrap;
}
.so-q__text::after {
    content: 'best brass dining chandelier for a small loft';
    display: inline-block;
    animation: so-q-type 9s steps(46, end) infinite;
    white-space: nowrap;
    overflow: hidden;
    max-width: 0;
    vertical-align: bottom;
}
@keyframes so-q-type {
    0%   { max-width: 0; }
    45%  { max-width: 100%; }
    85%  { max-width: 100%; }
    100% { max-width: 0; }
}
.so-q__cursor {
    display: inline-block;
    width: 2px;
    height: 20px;
    background: #D97706;
    animation: so-q-blink 0.7s steps(2) infinite;
    vertical-align: middle;
    margin-left: 2px;
}
@keyframes so-q-blink {
    0%, 50%      { opacity: 1; }
    50.01%, 100% { opacity: 0; }
}

.so-q__route {
    align-self: center;
    margin-top: -2%;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: 2px;
    color: rgba(17, 24, 39, 0.45);
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    position: relative;
    z-index: 3;
}
.so-q__route::before,
.so-q__route::after {
    content: '';
    width: 18px;
    height: 1px;
    background: rgba(17, 24, 39, 0.15);
}

/* ── Routing SVG: fan out from query to 3 surfaces ── */
.so-routes {
    position: absolute;
    top: 18%;
    left: 0;
    right: 0;
    bottom: 36%;
    pointer-events: none;
    z-index: 1;
}
.so-routes svg { width: 100%; height: 100%; }
.so-routes path {
    fill: none;
    stroke: rgba(17, 24, 39, 0.15);
    stroke-width: 1;
    stroke-dasharray: 3 4;
}
.so-routes circle.so-travel {
    fill: #D97706;
    r: 3;
}
.so-routes .so-travel--1 { animation: so-travel 4s linear infinite; }
.so-routes .so-travel--2 { animation: so-travel 4s linear -1.3s infinite; }
.so-routes .so-travel--3 { animation: so-travel 4s linear -2.6s infinite; }
@keyframes so-travel {
    0%       { opacity: 0; }
    10%, 80% { opacity: 1; }
    100%     { opacity: 0; }
}

/* ── Three surfaces ─────────────────────────────── */
.so-surfaces {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    flex: 1;
    min-height: 0;
    margin-top: auto;
    position: relative;
    z-index: 2;
}
.so-card {
    background: #FFFFFF;
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 12px;
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 22px rgba(17, 24, 39, 0.04);
}
.so-card__head {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: 2px;
    color: rgba(17, 24, 39, 0.5);
    text-transform: uppercase;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(17, 24, 39, 0.06);
}
.so-card__head-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #D97706;
    animation: so-head-pulse 2.2s ease-in-out infinite;
}
@keyframes so-head-pulse {
    0%, 100% { opacity: 0.45; }
    50%      { opacity: 1; }
}
.so-card__head-by {
    margin-left: auto;
    color: rgba(17, 24, 39, 0.4);
    letter-spacing: 1px;
}

/* SERP surface */
.so-serp__title {
    font-family: var(--font-primary, 'Plus Jakarta Sans'), sans-serif;
    font-weight: 400;
    font-size: 18px;
    letter-spacing: -0.3px;
    color: #111827;
    line-height: 1.25;
    margin: 0;
}
.so-serp__title strong { color: #D97706; font-weight: 500; }
.so-serp__url {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11px;
    color: rgba(17, 24, 39, 0.55);
}
.so-serp__snippet {
    font-size: 13px;
    color: rgba(17, 24, 39, 0.7);
    line-height: 1.5;
    letter-spacing: -0.1px;
    margin: 0;
}
.so-serp__snippet em {
    font-style: normal;
    background: rgba(217, 119, 6, 0.12);
    padding: 0 2px;
}
.so-serp__meta {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 10px;
    color: rgba(17, 24, 39, 0.4);
    letter-spacing: 0.5px;
}
.so-serp__star {
    letter-spacing: 1px;
    color: #D97706;
}

/* Agent feed surface */
.so-feed__lines {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 12px;
    line-height: 1.7;
    color: rgba(17, 24, 39, 0.85);
}
.so-feed__lines .so-syn-k { color: #D97706; }
.so-feed__lines .so-syn-s { color: rgba(17, 24, 39, 0.6); }
.so-feed__lines .so-syn-n { color: #111827; font-weight: 500; }
.so-feed__lines .so-syn-p { color: rgba(17, 24, 39, 0.4); }
.so-feed__sig {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 10px;
    color: rgba(17, 24, 39, 0.45);
    letter-spacing: 1px;
    text-transform: uppercase;
}
.so-feed__sig-bar {
    flex: 1;
    height: 1px;
    background: rgba(17, 24, 39, 0.08);
}

/* LLM answer surface */
.so-llm__body {
    font-size: 14px;
    line-height: 1.55;
    letter-spacing: -0.1px;
    color: #111827;
    margin: 0;
}
.so-llm__body sup {
    font-size: 9px;
    color: #D97706;
    vertical-align: super;
    padding: 0 2px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-weight: 500;
}
.so-llm__cite {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(17, 24, 39, 0.06);
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 10px;
    color: rgba(17, 24, 39, 0.6);
    letter-spacing: 0.3px;
}
.so-llm__cite-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.so-llm__cite-row strong {
    color: #D97706;
    font-weight: 500;
}

/* ── Bottom corner marks ─────────────────────────── */
.so-ill__mark {
    position: absolute;
    bottom: 28px;
    left: 36px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(17, 24, 39, 0.35);
}
.so-ill__mark strong { color: #111827; font-weight: 500; }
.so-ill__mark-line {
    display: inline-block;
    width: 28px;
    height: 1px;
    background: rgba(217, 119, 6, 0.5);
    vertical-align: middle;
    margin: 0 8px;
}
.so-ill__index {
    position: absolute;
    bottom: 28px;
    right: 36px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(17, 24, 39, 0.35);
}
.so-ill__index strong { color: #D97706; font-weight: 500; }

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 920px) {
    .so-ill { aspect-ratio: 4 / 5; }
    .so-surfaces { grid-template-columns: 1fr; gap: 12px; }
    .so-q { width: 100%; }
    .so-q__text { font-size: 16px; }
    .so-routes { display: none; }
    .so-ill__mark,
    .so-ill__index { bottom: 16px; }
    .so-ill__mark { left: 20px; }
    .so-ill__index { right: 20px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .so-q__text::after {
        animation: none;
        max-width: 100%;
    }
    .so-q__cursor,
    .so-card__head-dot,
    .so-routes .so-travel--1,
    .so-routes .so-travel--2,
    .so-routes .so-travel--3 {
        animation: none;
    }
    .so-routes circle.so-travel { opacity: 1; }
}
