/*
 * Portfolio page + new Home / About sections. Uses the site's theme tokens,
 * so it follows dark and light mode. Kept separate from style.css.
 */

/* ---------- shared feature cards ---------- */
.ws-feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.ws-feature {
  position: relative; padding: 28px 26px; border-radius: var(--radius-lg);
  background: var(--bg-card); border: 1px solid var(--border-mid);
  transition: transform var(--trans), border-color var(--trans), box-shadow var(--trans);
}
.ws-feature:hover { transform: translateY(-4px); border-color: var(--border-glow); box-shadow: var(--shadow-glow); }
.ws-feature > i {
  display: inline-grid; place-items: center; width: 50px; height: 50px; border-radius: 14px; margin-bottom: 18px;
  background: var(--glow-soft); color: var(--primary); font-size: 1.35rem;
}
.ws-feature h3 { font-size: 1.08rem; margin: 0 0 8px; }
.ws-feature p { margin: 0; color: var(--text-muted); font-size: .93rem; line-height: 1.65; }

/* ---------- home: how we work ---------- */
.ws-steps-section { background: var(--bg-2); }
.ws-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; counter-reset: none; position: relative; }
.ws-steps::before {
  content: ''; position: absolute; top: 44px; left: 12%; right: 12%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--border-glow), var(--border-glow), transparent);
}
.ws-step {
  position: relative; text-align: center; padding: 26px 22px 24px; border-radius: var(--radius-lg);
  background: var(--bg-card); border: 1px solid var(--border-mid);
}
.ws-step > i {
  position: relative; z-index: 1; display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%;
  background: var(--grad-brand); color: #fff; font-size: 1.5rem; box-shadow: 0 10px 30px var(--glow); margin-bottom: 16px;
}
.ws-step-num { position: absolute; top: 14px; right: 18px; font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; color: var(--watermark-strong); -webkit-text-stroke: 1px var(--border-mid); }
.ws-step h3 { font-size: 1.05rem; margin: 0 0 8px; }
.ws-step p { margin: 0; color: var(--text-muted); font-size: .9rem; line-height: 1.6; }

/* ---------- home: industries ---------- */
.ws-industries { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.ws-industry {
  display: flex; gap: 14px; align-items: flex-start; padding: 20px 18px; border-radius: var(--radius);
  background: var(--surface-tint-soft); border: 1px solid var(--border-mid); transition: border-color var(--trans), background var(--trans);
}
.ws-industry:hover { border-color: var(--border-glow); background: var(--surface-tint); }
.ws-industry > i { flex-shrink: 0; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--glow-soft); color: var(--primary); font-size: 1.2rem; }
.ws-industry h3 { font-size: .95rem; margin: 2px 0 4px; line-height: 1.35; }
.ws-industry p { margin: 0; font-size: .84rem; color: var(--text-muted); line-height: 1.5; }

/* ---------- home: client logo strip ---------- */
.ws-logo-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 34px; }
.ws-logo-strip span { display: grid; place-items: center; width: 118px; height: 64px; padding: 10px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--border-mid); }
.ws-logo-strip img { max-width: 100%; max-height: 100%; object-fit: contain; filter: grayscale(.2); transition: filter var(--trans); }
.ws-logo-strip span:hover img { filter: none; }

/* ---------- portfolio cards (portfolio page + home preview) ---------- */
.pf-numbers { padding: 0 0 10px; }
.pf-numbers-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; overflow: hidden;
  border-radius: var(--radius-lg); border: 1px solid var(--border-mid); background: var(--border-mid);
}
.pf-numbers-grid > div { background: var(--bg-card); padding: 24px 18px; text-align: center; }
.pf-numbers-grid strong { display: block; font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.2rem); background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pf-numbers-grid span { color: var(--text-muted); font-size: .88rem; }

.pf-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: -24px 0 36px; }
.pf-filter {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; cursor: pointer;
  background: var(--surface-tint-soft); border: 1px solid var(--border-mid); color: var(--text); font-weight: 700; font-size: .86rem;
  transition: all var(--trans);
}
.pf-filter span { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--surface-tint); font-size: .72rem; }
.pf-filter:hover { border-color: var(--border-glow); }
.pf-filter.is-active { background: var(--grad-brand); border-color: transparent; color: #fff; box-shadow: 0 6px 22px var(--glow); }
.pf-filter.is-active span { background: rgba(255, 255, 255, .25); }

.pf-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.pf-card {
  display: flex; flex-direction: column; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--bg-card); border: 1px solid var(--border-mid);
  transition: transform var(--trans), border-color var(--trans), box-shadow var(--trans);
}
.pf-card[hidden] { display: none; }
.pf-card:hover { transform: translateY(-6px); border-color: var(--border-glow); box-shadow: var(--shadow-glow), var(--shadow-sm); }
.pf-frame { padding: 12px 12px 0; }
.pf-frame-bar {
  display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-radius: 12px 12px 0 0;
  background: var(--surface-tint); border: 1px solid var(--border-mid); border-bottom: 0;
}
.pf-frame-bar i { width: 9px; height: 9px; border-radius: 50%; background: #FF5F57; }
.pf-frame-bar i:nth-child(2) { background: #FEBC2E; }
.pf-frame-bar i:nth-child(3) { background: #28C840; }
.pf-frame-bar span { margin-left: 8px; font-size: .72rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-shot { position: relative; aspect-ratio: 16 / 11; overflow: hidden; border: 1px solid var(--border-mid); border-top: 0; background: var(--bg-highlight); }
.pf-shot img { display: block; width: 100%; height: auto; min-height: 100%; object-fit: cover; object-position: top; transition: transform 3.5s ease; }
.pf-card:hover .pf-shot img { transform: translateY(calc(-100% + 220px)); }
.pf-shot-empty { display: grid; place-items: center; width: 100%; height: 100%; background: #fff; }
.pf-shot-empty img { max-width: 60%; max-height: 60%; object-fit: contain; min-height: 0; }
.pf-card:hover .pf-shot-empty img { transform: none; }
.pf-meta { display: flex; align-items: center; gap: 12px; padding: 16px 18px 18px; }
.pf-logo { flex-shrink: 0; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: #fff; border: 1px solid var(--border-mid); padding: 5px; }
.pf-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pf-meta-text { min-width: 0; flex: 1; }
.pf-meta h3 { font-size: 1rem; margin: 0 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-tag { display: inline-block; font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--glow-soft); color: var(--primary-light); }
[data-theme="light"] .pf-tag { color: var(--primary-dark); }
.pf-visit {
  flex-shrink: 0; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border-mid); color: var(--text); font-size: 1rem; transition: all var(--trans);
}
.pf-visit:hover, .pf-card:hover .pf-visit { background: var(--grad-brand); border-color: transparent; color: #fff; }
.pf-card.is-compact .pf-shot { aspect-ratio: 16 / 10; }

/* logo wall */
.pf-logos-section { background: var(--bg-2); }
.pf-logo-wall { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.pf-logo-tile {
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 12px 14px; border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--border-mid); text-decoration: none; transition: all var(--trans);
}
.pf-logo-tile img { width: 100%; height: 62px; object-fit: contain; background: #fff; border-radius: 10px; padding: 8px; }
.pf-logo-tile span { font-size: .8rem; font-weight: 700; color: var(--text-muted); text-align: center; line-height: 1.3; }
.pf-logo-tile:hover { border-color: var(--border-glow); transform: translateY(-3px); }
.pf-logo-tile:hover span { color: var(--text); }

/* ---------- about: what we do ---------- */
.ws-service-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; max-width: 980px; margin: 0 auto; }
.ws-service-item {
  display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--border-mid); color: var(--text); text-decoration: none; transition: all var(--trans);
}
.ws-service-item > i:first-child { flex-shrink: 0; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--glow-soft); color: var(--primary); font-size: 1.25rem; }
.ws-service-text { flex: 1; min-width: 0; }
.ws-service-text strong { display: block; font-family: var(--font-display); font-size: .98rem; color: var(--white); }
.ws-service-text small { color: var(--text-muted); font-size: .8rem; }
.ws-service-go { color: var(--text-muted); transition: transform var(--trans), color var(--trans); }
.ws-service-item:hover { border-color: var(--border-glow); transform: translateX(4px); color: var(--text); }
.ws-service-item:hover .ws-service-go { color: var(--primary); transform: translateX(4px); }

/* ---------- about: commitments ---------- */
.ws-commit-section { background: var(--bg-2); }

/* ---------- about: visit us ---------- */
.ws-visit {
  display: grid; grid-template-columns: 1fr 1.1fr; gap: 0; overflow: hidden; border-radius: var(--radius-xl);
  background: var(--bg-card); border: 1px solid var(--border-mid);
}
.ws-visit-copy { padding: 44px 42px; }
.ws-visit-copy h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 12px 0 14px; }
.ws-visit-copy > p { color: var(--text-muted); }
.ws-visit-list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.ws-visit-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--text); font-size: .95rem; }
.ws-visit-list i { flex-shrink: 0; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--glow-soft); color: var(--primary); }
.ws-visit-list span { padding-top: 6px; }
.ws-visit-list a { color: var(--text); }
.ws-visit-list a:hover { color: var(--primary); }
.ws-visit-map { min-height: 380px; }
.ws-visit-map iframe { display: block; width: 100%; height: 100%; min-height: 380px; border: 0; }

/* ---------- responsive ---------- */
@media (max-width: 1199px) {
  .pf-logo-wall { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ws-industries { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 991px) {
  .ws-feature-grid, .pf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ws-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ws-steps::before { display: none; }
  .ws-visit { grid-template-columns: 1fr; }
  .ws-visit-copy { padding: 34px 28px; }
  .ws-visit-map, .ws-visit-map iframe { min-height: 300px; }
}
@media (max-width: 767px) {
  .pf-numbers-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pf-logo-wall { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ws-service-list { grid-template-columns: 1fr; }
  .pf-filters { margin-top: -30px; }
}
@media (max-width: 575px) {
  .ws-feature-grid, .pf-grid, .ws-steps, .ws-industries { grid-template-columns: 1fr; }
  .pf-logo-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ws-logo-strip span { width: 96px; height: 54px; }
  .ws-visit-copy { padding: 28px 20px; }
  .pf-filters { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; margin-left: -4px; margin-right: -4px; padding: 0 4px 6px; }
  .pf-filter { flex-shrink: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .pf-shot img { transition: none; }
  .pf-card:hover .pf-shot img { transform: none; }
}

/* logos: fixed box, scale inside it (the site's global img rule keeps natural height otherwise) */
.ws-logo-strip span { overflow: hidden; }
.ws-logo-strip img,
.pf-logo img,
.pf-shot-empty img {
  display: block; width: 100%; height: 100%; max-width: none; max-height: none;
  object-fit: contain; object-position: center;
}
.pf-logo { overflow: hidden; }
.pf-shot-empty { padding: 18% 20%; }
.pf-logo-tile img { display: block; max-width: 100%; }

/* ================= AI SOLUTIONS ================= */
.ai-section { position: relative; overflow: hidden; background: var(--bg-2); }
.ai-section::before {
  content: ''; position: absolute; inset: -20% -10% auto auto; width: 640px; height: 640px; pointer-events: none;
  background: radial-gradient(circle, rgba(240, 90, 36, .12), transparent 65%);
}
.ai-section .container { position: relative; z-index: 1; }
.ai-intro { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; margin-bottom: 48px; }
.ai-intro-copy h2 { font-size: clamp(1.9rem, 3.5vw, 2.8rem); margin: 14px 0 14px; }
.ai-intro-copy > p { color: var(--text-muted); font-size: 1.02rem; }
.ai-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.ai-jump a {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px; font-size: .8rem; font-weight: 700;
  color: var(--text); background: var(--surface-tint-soft); border: 1px solid var(--border-mid); text-decoration: none; transition: all var(--trans);
}
.ai-jump a i { color: var(--primary-light); }
.ai-jump a:hover { border-color: var(--border-glow); color: var(--text); background: var(--glow-soft); }

.ai-chat-demo {
  border-radius: 24px; overflow: hidden; background: var(--bg-card); border: 1px solid var(--border-mid);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35), 0 0 0 1px var(--glow-soft);
}
.ai-chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: var(--grad-brand); color: #fff; }
.ai-chat-head strong { display: block; font-size: .92rem; color: #fff; }
.ai-chat-head small { font-size: .74rem; opacity: .9; display: inline-flex; align-items: center; gap: 6px; }
.ai-chat-head small i { width: 7px; height: 7px; border-radius: 50%; background: #4ADE80; display: inline-block; }
.ai-chat-avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .2); font-size: 1.2rem; }
.ai-chat-body { display: flex; flex-direction: column; gap: 10px; padding: 18px; min-height: 280px; }
.ai-msg { max-width: 84%; padding: 10px 14px; border-radius: 16px; font-size: .86rem; line-height: 1.5; }
.ai-msg.user { align-self: flex-end; background: var(--grad-brand); color: #fff; border-bottom-right-radius: 4px; }
.ai-msg.bot { align-self: flex-start; background: var(--surface-tint); color: var(--text); border: 1px solid var(--border-mid); border-bottom-left-radius: 4px; }
.ai-typing { align-self: flex-start; display: inline-flex; gap: 4px; padding: 10px 14px; border-radius: 16px; background: var(--surface-tint); }
.ai-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--primary-light); animation: ai-dot 1.2s infinite ease-in-out; }
.ai-typing i:nth-child(2) { animation-delay: .15s; } .ai-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes ai-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.ai-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.ai-card {
  display: flex; flex-direction: column; padding: 26px 26px 22px; border-radius: var(--radius-lg); scroll-margin-top: 140px;
  background: var(--bg-card); border: 1px solid var(--border-mid); transition: transform var(--trans), border-color var(--trans), box-shadow var(--trans);
}
.ai-card:hover { transform: translateY(-4px); border-color: var(--border-glow); box-shadow: 0 18px 44px rgba(240, 90, 36, .16); }
.ai-card-head { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.ai-card-icon { flex-shrink: 0; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: var(--grad-brand); color: #fff; font-size: 1.45rem; box-shadow: 0 10px 26px rgba(240, 90, 36, .32); }
.ai-card-eyebrow { display: block; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--primary-light); margin-bottom: 3px; }
[data-theme="light"] .ai-card-eyebrow, [data-theme="light"] .ai-jump a i { color: var(--primary); }
.ai-card h3 { font-size: 1.12rem; margin: 0; line-height: 1.3; }
.ai-card > p { color: var(--text-muted); font-size: .92rem; line-height: 1.65; margin-bottom: 14px; }
.ai-card-list { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 7px; }
.ai-card-list li { display: flex; gap: 9px; font-size: .88rem; color: var(--text); line-height: 1.45; }
.ai-card-list i { color: var(--primary); margin-top: 2px; }

.ai-card-uses { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.ai-card-uses span { font-size: .74rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--glow-soft); color: var(--text); border: 1px solid var(--border-glow); }
.ai-card-foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 16px; border-top: 1px solid var(--border-mid); }
.ai-card-price { width: 100%; font-size: .86rem; color: var(--text-muted); }
.ai-card-price strong { color: var(--text); font-size: 1.05rem; }
.ai-card-plans { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.ai-plan-chip { border: 1px solid var(--border-mid); background: var(--surface-tint-soft); color: var(--text); font-size: .76rem; font-weight: 700; padding: 6px 11px; border-radius: 999px; cursor: pointer; transition: all var(--trans); }
.ai-plan-chip:hover { border-color: var(--border-glow); background: var(--glow-soft); }
.ai-card-foot .btn { padding: 9px 16px; font-size: .84rem; }

/* home: AI teaser */
.ai-home { position: relative; overflow: hidden; }
.ai-home::before { content: ''; position: absolute; left: 50%; top: 0; width: 900px; height: 500px; transform: translateX(-50%); pointer-events: none; background: radial-gradient(ellipse, rgba(240, 90, 36, .10), transparent 65%); }
.ai-home .container { position: relative; z-index: 1; }
.ai-home-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.ai-home-tile {
  display: flex; flex-direction: column; gap: 10px; padding: 22px 20px; border-radius: var(--radius-lg); text-decoration: none;
  background: var(--bg-card); border: 1px solid var(--border-mid); color: var(--text); transition: all var(--trans);
}
.ai-home-tile > i { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--grad-brand); color: #fff; font-size: 1.2rem; }
.ai-home-tile strong { font-family: var(--font-display); font-size: .98rem; color: var(--white); line-height: 1.35; }
.ai-home-tile span { font-size: .84rem; color: var(--text-muted); line-height: 1.5; }
.ai-home-tile:hover { transform: translateY(-4px); border-color: var(--border-glow); color: var(--text); }

@media (max-width: 1199px) { .ai-home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 991px) {
  .ai-intro { grid-template-columns: 1fr; gap: 30px; }
  .ai-grid { grid-template-columns: 1fr; }
}
@media (max-width: 575px) {
  .ai-home-grid { grid-template-columns: 1fr; }
  .ai-card { padding: 22px 18px 18px; }
  .ai-card-foot .btn { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .ai-typing i { animation: none; } }
/* explicit logo sizes (percent heights don't resolve inside these tiles) */
.ws-logo-strip span { display: flex; align-items: center; justify-content: center; }
.ws-logo-strip img { width: 100%; height: 44px; }
.pf-logo { display: flex; align-items: center; justify-content: center; }
.pf-logo img { width: 100%; height: 34px; }
.pf-shot-empty { position: relative; padding: 0; }
.pf-shot-empty img { position: absolute; top: 18%; left: 20%; width: 60%; height: 64%; }
@media (max-width: 575px) { .ws-logo-strip img { height: 36px; } }
