/**
 * Solutions catalog (.alg-sol) — /solutions/ listing.
 * Scoped under .alg-sol so it sits between theme header/footer.
 */

  /* ---------- template ---------- */
  .alg-sol {
    --navy: #0e2742; --navy-2: #0a1d33; --blue: #3b7ddd; --blue-d: #2a6aa8; --ink: #122a40;
    --muted: #5a6578; --line: #e6edf5; --soft: #f4f8fd; --white: #fff; --gold: #f3c32b; --gold-d: #a07c0a;
    --radius: 22px; --shadow: 0 12px 32px rgb(30 90 150 / .10); --shadow-lg: 0 24px 60px rgb(14 39 66 / .16);
    --font: "Manrope", "Plus Jakarta Sans", system-ui, sans-serif;
    font-family: var(--font); color: var(--ink); line-height: 1.6; -webkit-font-smoothing: antialiased;
  }
  .alg-sol *, .alg-sol *::before, .alg-sol *::after { box-sizing: border-box; }
  .alg-sol .wrap { max-width: 1180px; margin: 0 auto; padding-inline: 16px; }
  .alg-sol h1, .alg-sol h2, .alg-sol h3 { color: var(--navy); line-height: 1.15; margin: 0; letter-spacing: -.02em; text-wrap: balance; }
  .alg-sol p { margin: 0; }
  .alg-sol a { color: inherit; }
  .alg-sol :focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 8px; }

  /* buttons */
  .alg-sol .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 46px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
    font: 700 15px/1 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap;
    transition: transform .2s ease, background-color .2s ease, border-color .2s ease, color .2s ease;
  }
  .alg-sol .btn svg { width: 16px; height: 16px; flex: none; transition: transform .2s ease; }
  .alg-sol .btn:hover { transform: translateY(-2px); }
  .alg-sol .btn:hover svg { transform: translateX(3px); }
  .alg-sol .btn-primary { background: var(--navy); color: var(--white); box-shadow: 0 8px 20px rgb(14 39 66 / .25); }
  .alg-sol .btn-primary:hover { background: #163a60; }
  .alg-sol .btn-ghost { background: var(--white); color: var(--navy); border-color: var(--line); }
  .alg-sol .btn-ghost:hover { border-color: var(--blue); color: var(--blue-d); }
  .alg-sol .link { display: inline-flex; align-items: center; gap: 6px; color: var(--blue-d); font-weight: 800; text-decoration: none; }
  .alg-sol .link svg { width: 16px; height: 16px; transition: transform .2s ease; }
  .alg-sol .link:hover svg { transform: translateX(4px); }

  /* hero */
  .alg-sol .hero {
    position: relative; overflow: hidden; isolation: isolate;
    padding: clamp(56px, 9vw, 112px) 0 clamp(48px, 7vw, 88px);
    background: radial-gradient(60% 80% at 90% 0%, rgb(59 125 221 / .18), transparent 60%),
                radial-gradient(40% 60% at 0% 100%, rgb(243 195 43 / .12), transparent 70%), var(--soft);
  }
  .alg-sol .hero::after {
    content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
    background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 44px 44px; mask-image: radial-gradient(70% 70% at 70% 30%, #000, transparent 75%);
  }
  .alg-sol .eyebrow {
    display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
    background: var(--white); border: 1px solid var(--line); color: var(--blue-d);
    font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  }
  .alg-sol .eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px rgb(59 125 221 / .2); }
  .alg-sol .hero h1 { margin-top: 20px; font-size: clamp(34px, 5.4vw, 60px); font-weight: 800; max-width: 17ch; }
  .alg-sol .hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--blue), #6aa6f0); -webkit-background-clip: text; background-clip: text; color: transparent; }
  .alg-sol .hero .lede { margin-top: 18px; max-width: 60ch; font-size: clamp(16px, 1.6vw, 19px); color: var(--muted); }
  .alg-sol .hero .actions { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }
  .alg-sol .pillars { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 10px; }
  .alg-sol .pillars a {
    display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px 10px 10px; border-radius: 14px;
    background: var(--white); border: 1px solid var(--line); text-decoration: none; font-weight: 700; color: var(--navy);
    transition: border-color .2s ease, transform .2s ease;
  }
  .alg-sol .pillars a:hover { border-color: var(--blue); transform: translateY(-2px); }
  .alg-sol .pillars b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--soft); color: var(--blue-d); font-size: 13px; }

  /* section heads */
  .alg-sol section.block { padding: clamp(56px, 8vw, 96px) 0 0; scroll-margin-top: 72px; }
  .alg-sol .sec-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 32px; margin-bottom: 32px; }
  .alg-sol .sec-head h2 { font-size: clamp(26px, 3.2vw, 38px); font-weight: 800; }
  .alg-sol .sec-head p { color: var(--muted); max-width: 52ch; }
  .alg-sol .kicker { display: block; margin-bottom: 8px; color: var(--blue-d); font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

  /* IBM tabs */
  .alg-sol .ibm { display: grid; grid-template-columns: 280px 1fr; gap: 24px; }
  .alg-sol .tablist { display: flex; flex-direction: column; gap: 8px; }
  .alg-sol .tab {
    display: flex; align-items: center; gap: 12px; width: 100%; padding: 16px 18px; border-radius: 16px;
    border: 1px solid var(--line); background: var(--white); color: var(--navy); text-align: left;
    font: 700 16px/1.3 var(--font); cursor: pointer; transition: all .2s ease;
  }
  .alg-sol .tab:hover { border-color: var(--blue); }
  .alg-sol .tab[aria-selected="true"] { background: var(--navy); border-color: var(--navy); color: var(--white); box-shadow: 0 10px 24px rgb(14 39 66 / .22); }
  .alg-sol .tab .n { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--soft); color: var(--blue-d); font-size: 12px; font-weight: 800; }
  .alg-sol .tab[aria-selected="true"] .n { background: rgb(255 255 255 / .12); color: #9cc2f5; }
  .alg-sol .panel {
    display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: center;
    padding: clamp(24px, 4vw, 40px); border-radius: var(--radius); background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow);
    animation: alg-fade .4s ease;
  }
  .alg-sol .panel[hidden] { display: none; }
  .alg-sol .panel h3 { font-size: clamp(22px, 2.6vw, 28px); font-weight: 800; }
  .alg-sol .panel .desc { margin-top: 10px; color: var(--muted); }
  .alg-sol .feats { list-style: none; margin: 20px 0 24px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; font-size: 15px; }
  .alg-sol .feats li { display: flex; gap: 10px; align-items: flex-start; }
  .alg-sol .feats li::before {
    content: ""; flex: none; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%;
    background: #e8f1fc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232a6aa8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 11px no-repeat;
  }
  .alg-sol .visual { aspect-ratio: 4 / 3; border-radius: 18px; background: linear-gradient(135deg, var(--soft), #e6effb); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
  .alg-sol .visual img { width: 82%; height: 82%; object-fit: contain; }
  @keyframes alg-fade { from { opacity: 0; transform: translateY(8px); } }
  @media (max-width: 900px) {
    .alg-sol .ibm { grid-template-columns: 1fr; }
    .alg-sol .tablist { flex-direction: row; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding: 2px 16px 6px; }
    .alg-sol .tab { width: auto; white-space: nowrap; padding: 12px 16px; }
    .alg-sol .panel { grid-template-columns: 1fr; }
    .alg-sol .visual { order: -1; aspect-ratio: 16 / 9; }
  }
  @media (max-width: 480px) { .alg-sol .feats { grid-template-columns: 1fr; } }

  /* partner band */
  .alg-sol .partner {
    margin-top: 28px; display: grid; grid-template-columns: auto 1fr; gap: 20px 28px; align-items: center;
    padding: clamp(22px, 3.5vw, 32px); border-radius: var(--radius);
    background: linear-gradient(135deg, #fffaf0, #fff4d6); border: 1px solid #f3df94;
  }
  .alg-sol .medal { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffe48a, var(--gold) 55%, #c49b12); box-shadow: 0 8px 20px rgb(196 155 18 / .35), inset 0 -4px 0 rgb(0 0 0 / .08); color: #5a4300; }
  .alg-sol .medal svg { width: 34px; height: 34px; }
  .alg-sol .partner h3 { font-size: 20px; font-weight: 800; }
  .alg-sol .partner p { margin-top: 4px; color: #6b5a24; }
  @media (max-width: 560px) { .alg-sol .partner { grid-template-columns: 1fr; } }

  /* custom projects */
  .alg-sol .caps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 20px; }
  .alg-sol .cap {
    --accent: var(--blue);
    padding: 26px; border-radius: var(--radius); background: var(--white); border: 1px solid var(--line);
    transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s ease, border-color .3s ease;
  }
  .alg-sol .cap:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
  .alg-sol .cap .icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, white); margin-bottom: 18px; }
  .alg-sol .cap .icon svg { width: 26px; height: 26px; }
  .alg-sol .cap h3 { font-size: 19px; font-weight: 800; }
  .alg-sol .cap p { margin-top: 8px; color: var(--muted); font-size: 15px; }

  .alg-sol .work-title { margin: clamp(40px, 6vw, 64px) 0 20px; font-size: 22px; font-weight: 800; }
  .alg-sol .work { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 20px; }
  .alg-sol .case {
    display: flex; flex-direction: column; gap: 12px; padding: 26px; border-radius: var(--radius);
    background: var(--soft); border: 1px dashed #c8d6e6;
  }
  .alg-sol .case .meta { display: flex; flex-wrap: wrap; gap: 6px; }
  .alg-sol .case .meta span { padding: 4px 10px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--muted); }
  .alg-sol .case h4 { margin: 0; font-size: 18px; color: var(--navy); }
  .alg-sol .case p { color: var(--muted); font-size: 15px; }
  .alg-sol .case .result { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); font-weight: 800; color: var(--navy); }

  /* process */
  .alg-sol .process { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: s; }
  .alg-sol .process::before { content: ""; position: absolute; top: 22px; left: 8%; right: 8%; height: 2px; background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 14px); }
  .alg-sol .stage { position: relative; counter-increment: s; }
  .alg-sol .stage::before {
    content: counter(s); display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 16px; border-radius: 50%;
    background: var(--white); border: 2px solid var(--blue); color: var(--blue-d); font-weight: 800; position: relative;
  }
  .alg-sol .stage h3 { font-size: 18px; font-weight: 800; }
  .alg-sol .stage p { margin-top: 6px; color: var(--muted); font-size: 15px; }
  @media (max-width: 820px) {
    .alg-sol .process { grid-template-columns: 1fr; gap: 0; }
    .alg-sol .process::before { top: 0; bottom: 0; left: 22px; right: auto; width: 2px; height: auto; background: repeating-linear-gradient(180deg, var(--line) 0 8px, transparent 8px 14px); }
    .alg-sol .stage { display: grid; grid-template-columns: 46px 1fr; column-gap: 18px; padding-bottom: 24px; }
    .alg-sol .stage::before { grid-row: span 2; margin: 0; }
  }

  /* CTA + footer note */
  .alg-sol .cta { padding: clamp(56px, 8vw, 96px) 0 clamp(40px, 6vw, 64px); }
  .alg-sol .cta-box {
    position: relative; overflow: hidden; text-align: center; padding: clamp(36px, 6vw, 64px) 20px; border-radius: 28px;
    background: var(--navy); color: #c9d6e6;
  }
  .alg-sol .cta-box::after { content: ""; position: absolute; width: 420px; height: 420px; right: -140px; top: -200px; border-radius: 50%; background: radial-gradient(circle, rgb(59 125 221 / .45), transparent 70%); }
  .alg-sol .cta-box > * { position: relative; z-index: 1; }
  .alg-sol .cta-box h2 { color: var(--white); font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; }
  .alg-sol .cta-box p { margin: 12px auto 26px; max-width: 54ch; }
  .alg-sol .cta-box .btn { background: var(--white); color: var(--navy); }
  .alg-sol .aside-note { padding-bottom: clamp(48px, 7vw, 80px); text-align: center; color: var(--muted); font-size: 15px; }
  .alg-sol .aside-note a { color: var(--blue-d); font-weight: 700; }

  @media (prefers-reduced-motion: no-preference) {
    .alg-sol .alg-sol-reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.8,.2,1); }
    .alg-sol .alg-sol-reveal.in { opacity: 1; transform: none; }
  }
  @media (prefers-reduced-motion: reduce) {
    .alg-sol *, .alg-sol *::before { transition: none !important; animation: none !important; }
  }
