/* =========================================================
   Triasols - Inner pages (about, services, solutions, work,
   blog, careers, contact). Loaded after motion.css
   ========================================================= */

/* ---------- Page hero ---------- */
.page-hero {
  position: relative; overflow: hidden; isolation: isolate; text-align: center;
  padding-top: calc(var(--header-h) + clamp(70px, 10vw, 120px)); padding-bottom: clamp(70px, 9vw, 110px);
  border-bottom: 1px solid var(--border);
}
.page-hero .hero-glow.g1 { width: 520px; height: 520px; top: -260px; inset-inline-start: 50%; translate: 50% 0; }
.page-hero .hero-glow.g2 { width: 360px; height: 360px; bottom: -220px; }
.page-hero .bg-word { bottom: -3vw; font-size: 17vw; }
.page-hero h1 { font-size: clamp(34px, 5.4vw, 66px); font-weight: 800; max-width: 900px; margin: 22px auto 20px; }
.page-hero .lead { color: var(--muted); font-size: clamp(16px, 1.8vw, 19px); max-width: 680px; margin-inline: auto; }
.page-hero .hero-cta { justify-content: center; }
.js body:not(.ready) .page-hero .reveal { opacity: 0 !important; translate: 0 30px !important; }

.breadcrumb { display: flex; justify-content: center; gap: 10px; font-size: 13.5px; color: var(--faint); margin-bottom: 22px; }
.breadcrumb a { color: var(--muted); transition: color .3s; }
.breadcrumb a:hover { color: var(--lavender); }
.breadcrumb [aria-current] { color: var(--lavender); }

.hero-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 34px; }
.hero-pills span { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 14px; color: #ddd6ea; }
.hero-pills .icon { width: 16px; height: 16px; color: var(--accent); }

/* ---------- Generic layout helpers ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 80px); align-items: center; }
.two-col > * { min-width: 0; }
.prose p { color: var(--muted); }
.prose p + p { margin-top: 16px; }
.prose .section-head { margin-bottom: 26px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.grid-3 h3, .grid-4 h3 { font-size: 18px; margin-bottom: 8px; }
.grid-3 p, .grid-4 p { color: var(--muted); font-size: 14.5px; }
.check-list { display: grid; gap: 12px; margin-top: 24px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; }
.check-list .icon { width: 22px; height: 22px; padding: 4px; margin-top: 3px; border-radius: 50%; background: rgba(166, 76, 166, .2); color: var(--lavender); stroke-width: 2.4; }

/* ---------- About: story visual ---------- */
.story-visual { position: relative; aspect-ratio: 1; max-width: 480px; margin-inline: auto; width: 100%; }
.story-visual .ring { position: absolute; inset: 0; border-radius: 50%; border: 1px dashed rgba(201, 176, 220, .2); animation: spin 40s linear infinite; }
.story-visual .ring.r2 { inset: 16%; animation-duration: 28s; animation-direction: reverse; }
.story-visual .ring i { position: absolute; top: -5px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 16px var(--accent); }
.story-core {
  position: absolute; inset: 31%; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 30% 30%, rgba(123, 79, 224, .55), rgba(75, 42, 138, .25) 60%, transparent);
  border: 1px solid rgba(201, 176, 220, .25); box-shadow: 0 0 80px -10px rgba(123, 79, 224, .6);
}
.story-core img { width: 46%; }
.story-tag { position: absolute; padding: 10px 16px; border-radius: 14px; background: rgba(20, 15, 34, .9); border: 1px solid var(--border-strong); font-size: 13.5px; backdrop-filter: blur(10px); animation: bob 6s ease-in-out infinite; white-space: nowrap; }
.story-tag b { color: var(--lavender); font-family: var(--font-en); }
.story-tag.t1 { top: 8%; inset-inline-start: 0; }
.story-tag.t2 { top: 46%; inset-inline-end: -4%; animation-delay: -2s; }
.story-tag.t3 { bottom: 6%; inset-inline-start: 12%; animation-delay: -4s; }

/* Vision / mission / goals */
.vmg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.vmg .card { padding: 34px 30px; }
.vmg .big-num { font-size: 96px; top: 10px; }
.vmg h3 { font-size: 22px; margin-bottom: 12px; }
.vmg p { color: var(--muted); }

/* Team disciplines */
.disciplines { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.discipline { text-align: center; padding: 26px 18px; }
.discipline .icon-box { margin-inline: auto; }
.discipline h3 { font-size: 16px; margin-bottom: 6px; }
.discipline p { font-size: 13.5px; color: var(--muted); }

/* ---------- Services page ---------- */
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.chip {
  padding: 9px 18px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  color: var(--muted); font-size: 14.5px; font-weight: 500; transition: color .3s, background .3s, border-color .3s;
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip.active, .chip[aria-pressed="true"] { color: #fff; background: var(--grad-btn); border-color: transparent; }
.chip small { font-family: var(--font-en); opacity: .7; margin-inline-start: 6px; }

.sticky-chips { position: sticky; top: calc(var(--sticky-top, var(--header-h)) + 12px); z-index: 20; padding: 10px; margin-bottom: 50px; border-radius: 999px; background: rgba(13, 10, 23, .75); backdrop-filter: blur(14px); border: 1px solid var(--border); width: fit-content; margin-inline: auto; transition: top .5s var(--ease); }

.svc-group + .svc-group { margin-top: 90px; }
.svc-group-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.svc-group-head h2 { font-size: clamp(24px, 3vw, 34px); }
.svc-group-head p { color: var(--muted); max-width: 460px; font-size: 15px; }
.svc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.svc { display: flex; flex-direction: column; padding: 32px; }
.svc-top { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.svc-top .icon-box { margin: 0; }
.svc h3 { font-size: 21px; }
.svc > p { color: var(--muted); font-size: 15px; }
.svc ul { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; margin-block: 20px 22px; }
.svc li { display: flex; gap: 8px; align-items: center; font-size: 14px; color: #ddd6ea; }
.svc li .icon { width: 16px; height: 16px; color: var(--accent); stroke-width: 2.4; }
.svc .svc-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.svc .card-link { margin: 0; }
.svc-num { position: absolute; top: 22px; left: 26px; font-family: var(--font-en); font-size: 14px; color: var(--faint); }

/* ---------- Solutions page ---------- */
.sol-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.sol { padding: 32px; }
.sol-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.sol-head .icon-box { margin: 0; }
.sol-head h3 { font-size: 21px; }
.sol-head small { display: block; color: var(--muted); font-size: 13.5px; }
.sol .pain { font-size: 14.5px; color: var(--muted); padding: 14px 16px; border-radius: 12px; background: rgba(255, 255, 255, .025); border: 1px dashed var(--border); margin-bottom: 18px; }
.sol .pain b { color: #f0a6c8; font-weight: 600; }
.sol .tags { margin-top: 18px; }

.odoo { position: relative; border-radius: var(--radius-lg); border: 1px solid var(--border-strong); overflow: hidden; isolation: isolate; padding: clamp(32px, 5vw, 64px); background: linear-gradient(140deg, rgba(91, 52, 176, .35), rgba(7, 6, 11, .85) 55%), var(--bg-2); }
.odoo::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(500px circle at var(--sx, 70%) var(--sy, 30%), rgba(201, 176, 220, .14), transparent 60%); }
.odoo-head { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; margin-bottom: 44px; }
.odoo-head h2 { font-size: clamp(28px, 4vw, 44px); margin-block: 16px; }
.odoo-head p { color: var(--muted); }
.odoo-results { display: grid; gap: 12px; }
.odoo-result { display: flex; align-items: center; gap: 18px; padding: 16px 20px; border-radius: 16px; background: rgba(255, 255, 255, .04); border: 1px solid var(--border); }
.odoo-result b { font-family: var(--font-en); font-size: 34px; font-weight: 700; line-height: 1; direction: ltr; text-align: right; min-width: 92px; color: transparent; -webkit-text-stroke: 1.2px var(--lavender); }
.odoo-result > span { font-size: 14px; color: var(--muted); }
.modules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.module { display: flex; gap: 14px; align-items: flex-start; padding: 20px; }
.module .icon-box { width: 44px; height: 44px; margin: 0; border-radius: 12px; }
.module .icon { width: 20px; height: 20px; }
.module h3 { font-size: 16px; margin-bottom: 4px; }
.module p { font-size: 13.5px; color: var(--muted); }

/* ---------- Work page ---------- */
.work-toolbar { display: flex; flex-direction: column; align-items: center; gap: 18px; margin-bottom: 44px; }
.work-count { font-size: 14px; color: var(--faint); }
.work-count b { color: var(--lavender); font-family: var(--font-en); }
.portfolio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.project { padding: 0; transition: border-color .4s, transform .5s var(--ease), background .4s, opacity .45s var(--ease), scale .45s var(--ease); }
.project.is-hidden, .post.is-hidden { display: none; }
.project.is-leaving { opacity: 0; scale: .94; }
.project.is-entering { animation: projIn .6s var(--ease) both; animation-delay: calc(var(--k, 0) * 45ms); }
@keyframes projIn { from { opacity: 0; scale: .94; translate: 0 20px; } }
.p-thumb {
  position: relative; aspect-ratio: 16 / 11; overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(circle at var(--px, 30%) 20%, var(--c1), transparent 60%), linear-gradient(150deg, var(--c2), #0c0a15 75%);
}
.p-thumb::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 28px 28px; -webkit-mask-image: radial-gradient(circle at 50% 40%, #000, transparent 75%); mask-image: radial-gradient(circle at 50% 40%, #000, transparent 75%); }
.p-thumb .p-name { position: relative; font-family: var(--font-en); font-weight: 700; font-size: clamp(22px, 2.4vw, 30px); letter-spacing: .01em; text-align: center; padding: 0 18px; transition: scale .7s var(--ease), letter-spacing .7s var(--ease); }
.project:hover .p-name { scale: 1.06; letter-spacing: .05em; }
.p-thumb .p-icon { position: absolute; bottom: 14px; inset-inline-start: 14px; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: rgba(0, 0, 0, .35); border: 1px solid rgba(255, 255, 255, .12); backdrop-filter: blur(6px); }
.p-thumb .p-icon .icon { width: 18px; height: 18px; }
.p-thumb .p-view { position: absolute; top: 14px; inset-inline-end: 14px; font-size: 12.5px; padding: 5px 12px; border-radius: 999px; background: rgba(0, 0, 0, .45); border: 1px solid rgba(255, 255, 255, .15); opacity: 0; translate: 0 -6px; transition: opacity .4s, translate .4s var(--ease); }
.project:hover .p-view { opacity: 1; translate: 0 0; }
.p-info { padding: 20px 22px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.p-info h3 { font-size: 17px; font-family: var(--font-en); font-weight: 600; }
.p-info small { display: block; color: var(--muted); font-size: 13px; font-family: var(--font-ar); }
.p-info .icon { width: 18px; height: 18px; color: var(--lavender); transition: translate .4s var(--ease); }
.project:hover .p-info .icon { translate: -4px 0; }
.load-more { display: flex; justify-content: center; margin-top: 48px; }
.load-more[hidden] { display: none; }

/* ---------- Blog page ---------- */
.post.post-featured { display: grid; grid-template-columns: 1.4fr 1fr; padding: 0; margin-bottom: 44px; }
.post-featured .post-cover { aspect-ratio: auto; min-height: 300px; } /* fills the row beside the text */
.post-featured .post-cover.has-img img { object-fit: contain; z-index: 1; }
.post-cover-bg { position: absolute; inset: -30px; background-size: cover; background-position: center; filter: blur(28px) saturate(1.2) brightness(.7); }
.post-featured .post-body p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-badge { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; margin-bottom: 12px; padding: 4px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--lavender); background: rgba(123, 79, 224, .14); border: 1px solid rgba(201, 176, 220, .2); }
.post-badge .icon { width: 14px; height: 14px; }
.post-featured .post-cover .icon { width: 96px; height: 96px; }
.post-featured .post-body { padding: clamp(28px, 4vw, 48px); align-self: center; }
.post-featured h2 { font-size: clamp(24px, 3vw, 34px); margin-block: 14px; }
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.post { padding: 0; display: flex; flex-direction: column; }
.post-cover {
  position: relative; aspect-ratio: 2 / 1; overflow: hidden; display: grid; place-items: center; /* the blog's cover images are about 2:1 */
  background: radial-gradient(circle at 80% 10%, var(--c1), transparent 55%), linear-gradient(160deg, var(--c2), #0c0a15 80%);
}
.post-cover .icon { width: 64px; height: 64px; stroke-width: 1; color: rgba(255, 255, 255, .8); transition: scale .7s var(--ease), rotate .7s var(--ease); }
.post:hover .post-cover .icon { scale: 1.15; rotate: -8deg; }
.post-body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.post-meta { display: flex; gap: 14px; font-size: 13px; color: var(--faint); }
.post-meta span { display: inline-flex; align-items: center; gap: 6px; }
.post-meta .icon { width: 14px; height: 14px; }
.post h3 { font-size: 18px; margin-block: 10px 8px; line-height: 1.55; }
.post p { color: var(--muted); font-size: 14.5px; }
.post .card-link { margin-top: auto; padding-top: 18px; }

.newsletter { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: center; padding: clamp(28px, 4vw, 48px); }
.newsletter h2 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 8px; }
.newsletter p { color: var(--muted); }
.inline-form { display: flex; gap: 10px; padding: 6px; border-radius: 999px; border: 1px solid var(--border-strong); background: rgba(0, 0, 0, .25); }
.inline-form input { flex: 1; min-width: 0; background: none; border: 0; color: var(--text); font: inherit; padding-inline: 18px; outline: 0; }
.form-note { font-size: 13px; color: var(--faint); margin-top: 10px; min-height: 1.5em; }
.form-note.ok { color: #6ee7a8; }

/* ---------- Careers ---------- */
.roles { display: grid; gap: 12px; }
.role { display: flex; align-items: center; gap: 18px; padding: 22px 26px; }
.role .icon-box { margin: 0; width: 46px; height: 46px; border-radius: 12px; }
.role h3 { font-size: 17px; }
.role p { font-size: 14px; color: var(--muted); }
.role .tags { margin-inline-start: auto; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: 24px; align-items: start; }
.contact-grid > * { min-width: 0; }
.form-card { padding: clamp(26px, 4vw, 44px); }
.form-card h2 { font-size: clamp(22px, 2.6vw, 30px); margin-bottom: 6px; }
.form-card > p { color: var(--muted); margin-bottom: 30px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label, .field legend { font-size: 14px; font-weight: 500; color: #ddd6ea; padding: 0; }
.field label i, .field legend i { color: var(--accent); font-style: normal; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 15px; color: var(--text); padding: 13px 16px; border-radius: 12px;
  background: rgba(0, 0, 0, .25); border: 1px solid var(--border-strong); transition: border-color .3s, box-shadow .3s, background .3s;
}
.field textarea { min-height: 140px; resize: vertical; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23c9b0dc' stroke-width='1.6'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 16px center; padding-inline-end: 40px; }
.field select option { background: var(--bg-2); }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--lavender); box-shadow: 0 0 0 4px rgba(166, 76, 166, .18); background: rgba(0, 0, 0, .35); }
.field input[type="tel"], .field input[type="email"] { direction: ltr; text-align: right; }
.field .err { font-size: 12.5px; color: #f39ab8; min-height: 0; display: none; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #e0668f; }
.field.invalid .err { display: block; }
fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }

/* country picker (main.js countryPickers): flag + name, searchable list */
@font-face {
  /* flag emoji for Windows, which has none. Twemoji art CC-BY 4.0 (Twitter), font MIT (TalkJS); see TwemojiCountryFlags-LICENSE.md */
  font-family: 'Twemoji Country Flags';
  src: url('../fonts/TwemojiCountryFlags.woff2') format('woff2');
  unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E0063, U+E0065, U+E0067, U+E006C, U+E006E, U+E0073-E0074, U+E0077, U+E007F;
  font-display: swap;
}
.cpick-native { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.field:has(.cpick) { position: relative; }
.cpick { position: relative; }
.cpick-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 50px; padding: 0 16px; border-radius: 12px; text-align: start;
  font: inherit; font-size: 15px; color: var(--text); background: rgba(0, 0, 0, .25); border: 1px solid var(--border-strong);
  transition: border-color .3s, box-shadow .3s, background .3s; cursor: pointer;
}
.cpick-btn:focus-visible, .cpick.is-open .cpick-btn { outline: 0; border-color: var(--lavender); box-shadow: 0 0 0 4px rgba(166, 76, 166, .18); background: rgba(0, 0, 0, .35); }
.field.invalid .cpick-btn { border-color: #e0668f; }
.cpick-value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cpick-value.is-empty { color: var(--faint); }
.cpick-flag { flex: none; font-family: 'Twemoji Country Flags', 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif; font-size: 22px; line-height: 1; }
.cpick-btn .cpick-flag:empty { display: none; }
.cpick-chev { flex: none; width: 16px; height: 16px; color: var(--lavender); transition: rotate .3s var(--ease); }
.cpick.is-open .cpick-chev { rotate: 180deg; }
.cpick-pop {
  position: absolute; z-index: 30; top: calc(100% + 8px); inset-inline: 0; min-width: 260px; padding: 8px; border-radius: 16px;
  background: #141020; border: 1px solid var(--border-strong); box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .75);
  animation: cpickIn .2s var(--ease) both;
}
.cpick-pop[hidden] { display: none; }
@keyframes cpickIn { from { opacity: 0; translate: 0 -6px; } }
.cpick-search { display: flex; align-items: center; gap: 8px; padding: 0 12px; margin-bottom: 6px; border-radius: 10px; background: rgba(255, 255, 255, .05); border: 1px solid var(--border); color: var(--muted); }
.cpick-search:focus-within { border-color: var(--lavender); }
.cpick-search .icon { flex: none; width: 16px; height: 16px; }
.field .cpick-search input { padding: 11px 0; border: 0; background: none; box-shadow: none; border-radius: 0; font-size: 14.5px; }
.field .cpick-search input:focus { background: none; box-shadow: none; }
.cpick-search input::-webkit-search-cancel-button { filter: invert(1) opacity(.5); }
.cpick-list { list-style: none; margin: 0; padding: 0; max-height: 280px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .2) transparent; }
.cpick-list [role="option"] { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; font-size: 14.5px; cursor: pointer; }
.cpick-list [role="option"].is-active { background: rgba(123, 79, 224, .18); }
.cpick-list [role="option"][aria-selected="true"] { color: var(--lavender); font-weight: 600; }
.cpick-list [role="option"][aria-selected="true"]::after { content: "✓"; margin-inline-start: auto; color: var(--lavender); }
.cpick-group { padding: 10px 10px 4px; font-size: 12px; font-weight: 600; color: var(--faint); }
.cpick-group + [role="option"] { margin-top: 2px; }
.cpick-list [role="option"] + .cpick-group { margin-top: 6px; border-top: 1px solid var(--border); padding-top: 12px; }
.cpick-empty { padding: 18px 10px; text-align: center; font-size: 14px; color: var(--muted); }
@media (max-width: 600px) { .cpick-list { max-height: 45vh; } }
@media (prefers-reduced-motion: reduce) { .cpick-pop { animation: none; } }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills input { position: absolute; opacity: 0; pointer-events: none; }
.pills label { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--border-strong); background: rgba(0, 0, 0, .2); font-size: 14px; cursor: pointer; transition: background .3s, border-color .3s, color .3s; color: var(--muted); }
.pills label:hover { color: var(--text); border-color: var(--lavender); }
.pills input:checked + label { background: var(--grad-btn); border-color: transparent; color: #fff; }
.pills input:focus-visible + label { outline: 2px solid var(--lavender); outline-offset: 3px; }
.form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 28px; }
.form-actions small { color: var(--faint); font-size: 13px; }
.form-success { display: none; text-align: center; padding: 40px 10px; }
.form-success .icon-box { margin: 0 auto 20px; width: 72px; height: 72px; border-radius: 50%; color: #6ee7a8; animation: chipIn .7s var(--ease) both; scale: .6; opacity: 0; }
.form-success .icon { width: 32px; height: 32px; stroke-width: 2.4; }
.form-success h3 { font-size: 24px; margin-bottom: 10px; }
.form-success p { color: var(--muted); max-width: 440px; margin: 0 auto 24px; }
.form-card.sent form { display: none; }
.form-card.sent .form-success { display: block; }

.info-stack { display: grid; gap: 14px; }
.info { display: flex; gap: 16px; align-items: flex-start; padding: 22px; }
.info .icon-box { margin: 0; width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0; }
.info .icon { width: 20px; height: 20px; }
.info h3 { font-size: 15px; color: var(--muted); font-weight: 500; margin-bottom: 4px; }
.info p, .info a { font-size: 16px; font-weight: 600; }
.info a:hover { color: var(--lavender); }
.info small { display: block; color: var(--faint); font-size: 13px; font-weight: 400; margin-top: 2px; }
.info.wa { border-color: rgba(37, 211, 102, .35); background: linear-gradient(150deg, rgba(37, 211, 102, .1), var(--surface) 60%); }
.info.wa .icon-box { background: rgba(37, 211, 102, .15); border-color: rgba(37, 211, 102, .3); color: #4ade80; }

.next-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: ns; }
.next-steps .card { padding-top: 70px; }
.next-steps .card::before { content: none; }
.next-steps .card > b { position: absolute; top: 22px; inset-inline-start: 28px; font-family: var(--font-en); font-size: 15px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--grad-btn); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .two-col, .odoo-head, .post-featured, .newsletter, .contact-grid { grid-template-columns: 1fr; }
  .grid-4, .disciplines { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .vmg, .portfolio, .posts, .modules, .next-steps { grid-template-columns: repeat(2, 1fr); }
  .post.post-featured { grid-template-columns: 1fr; }
  .post-featured .post-cover { aspect-ratio: 2 / 1; min-height: 0; }
  .story-visual { max-width: 380px; }
}
@media (max-width: 720px) {
  .grid-3, .grid-4, .vmg, .svc-grid, .sol-grid, .portfolio, .posts, .modules, .next-steps, .form-grid { grid-template-columns: 1fr; }
  .disciplines { grid-template-columns: 1fr 1fr; }
  .svc ul { grid-template-columns: 1fr; }
  .svc-num { display: none; }
  .svc-group-head { flex-direction: column; align-items: flex-start; }
  .sticky-chips { position: static; border-radius: var(--radius); background: none; border: 0; padding: 0; backdrop-filter: none; }
  .role { flex-wrap: wrap; }
  .role .tags { margin-inline-start: 0; width: 100%; }
  .story-tag { font-size: 12px; }
  .story-tag.t2 { inset-inline-end: 0; }
  .inline-form { flex-direction: column; border-radius: var(--radius); }
  .inline-form input { padding: 12px 14px; }
}

/* ---------- Small shared bits ---------- */
.icon.fill { fill: currentColor; stroke: none; }
.next-steps h3 { font-size: 18px; margin-bottom: 8px; }
.next-steps p { color: var(--muted); font-size: 14.5px; }
.avatar img { width: 24px; height: auto; }

/* ---------- Service detail ---------- */
.svc-hero .bg-word { font-size: 30vw; bottom: -9vw; }
.svc-orb { position: relative; width: 108px; height: 108px; margin: 0 auto 26px; display: grid; place-items: center; }
.svc-orb span {
  width: 76px; height: 76px; border-radius: 24px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(140deg, #7b4fe0, #a64ca6); box-shadow: 0 0 0 8px rgba(166, 76, 166, .12), 0 20px 60px -10px rgba(166, 76, 166, .8);
  animation: bob 6s ease-in-out infinite;
}
.svc-orb .icon { width: 34px; height: 34px; stroke-width: 1.5; }
.svc-orb i { position: absolute; inset: -14px; border-radius: 50%; border: 1px dashed rgba(201, 176, 220, .3); animation: spin 18s linear infinite; }
.svc-orb i::after { content: ""; position: absolute; top: -4px; left: 50%; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: var(--lavender); box-shadow: 0 0 12px var(--accent); }
.svc-orb i.r2 { inset: -34px; animation-duration: 30s; animation-direction: reverse; border-color: rgba(201, 176, 220, .14); }
.svc-orb i.r2::after { background: var(--accent); width: 6px; height: 6px; }
.page-hero .btn .icon.fill { width: 18px; height: 18px; }

.svc-overview { display: grid; grid-template-columns: 1.35fr .65fr; gap: clamp(36px, 5vw, 64px); align-items: start; }
.svc-overview > * { min-width: 0; }
.check-list.deliver { grid-template-columns: 1fr 1fr; gap: 14px 24px; }
.glance-wrap { position: sticky; top: calc(var(--sticky-top, var(--header-h)) + 20px); }
.glance { padding: 30px; background: linear-gradient(160deg, rgba(91, 52, 176, .22), var(--surface) 55%); border-color: rgba(201, 176, 220, .18); }
.glance h3 { font-size: 18px; margin-bottom: 18px; }
.glance dl { margin: 0 0 20px; display: grid; gap: 10px; }
.glance dl div { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding-bottom: 10px; border-bottom: 1px dashed var(--border); }
.glance dt { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.glance dt .icon { width: 18px; height: 18px; color: var(--accent); }
.glance dd { margin: 0; font-weight: 600; font-size: 14.5px; text-align: end; }
.glance-label { display: block; font-size: 13px; color: var(--faint); margin-bottom: 10px; }
.glance-results { display: grid; gap: 10px; margin-top: 20px; }
.glance-results .odoo-result { padding: 12px 14px; }
.glance-results .odoo-result b { font-size: 26px; min-width: 70px; }
.glance .btn-primary { width: 100%; margin-top: 24px; }
.glance-call { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 14px; font-size: 13.5px; color: var(--muted); transition: color .3s; }
.glance-call:hover { color: var(--lavender); }
.glance-call .icon { width: 16px; height: 16px; }

.aud { display: grid; gap: 12px; }
.aud-item {
  display: flex; align-items: center; gap: 18px; padding: 20px 24px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface);
  font-size: 16px; font-weight: 500; transition: border-color .4s, background .4s, translate .5s var(--ease);
}
.aud-item b { font-size: 15px; color: transparent; -webkit-text-stroke: 1px var(--lavender); font-size: 26px; line-height: 1; }
.aud-item:hover { border-color: rgba(166, 76, 166, .5); background: linear-gradient(120deg, rgba(166, 76, 166, .14), var(--surface)); translate: -8px 0; }

.svc-rel h3 { font-size: 18px; }
.svc-rel .card-link { margin-top: 16px; }
.svc-pager { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: stretch; margin-top: 50px; }
.svc-pager .card { padding: 20px 24px; }
.svc-pager .card:last-child { text-align: end; }
.svc-pager small { display: block; color: var(--faint); font-size: 13px; }
.svc-pager b { font-size: 16px; }
.svc-all { width: 64px; display: grid; place-items: center; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--lavender); transition: border-color .3s, background .3s; }
.svc-all:hover { border-color: var(--lavender); background: var(--surface-2); }

@media (max-width: 1080px) {
  .svc-overview { grid-template-columns: 1fr; }
  .glance-wrap { position: static; }
}
@media (max-width: 720px) {
  .check-list.deliver { grid-template-columns: 1fr; }
  .svc-pager { grid-template-columns: 1fr 1fr; }
  .svc-all { display: none; }
  .svc-hero .bg-word { font-size: 48vw; }
}

/* =========================================================
   Project page (template-parts/project.php)
   Sections appear only when the project has their content; nothing is drawn for a missing screenshot.
   ========================================================= */
.cs-hero {
  position: relative; overflow: hidden; isolation: isolate;
  padding-top: calc(var(--header-h) + clamp(40px, 6vw, 80px)); padding-bottom: clamp(40px, 5vw, 64px);
  background: radial-gradient(60% 70% at 85% 0%, rgba(123, 79, 224, .22), transparent 70%), radial-gradient(40% 50% at 0% 100%, rgba(166, 76, 166, .1), transparent 70%);
  border-bottom: 1px solid var(--border);
}
.cs-hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.cs-hero-grid.no-visual { grid-template-columns: minmax(0, 820px); }
.cs-hero .breadcrumb { justify-content: flex-start; margin-bottom: 22px; }
.cs-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
  font-size: 13.5px; font-weight: 600; color: var(--lavender); background: rgba(123, 79, 224, .14); border: 1px solid rgba(201, 176, 220, .22);
  transition: background .3s;
}
.cs-badge:hover { background: rgba(123, 79, 224, .24); }
.cs-badge .icon { width: 16px; height: 16px; }
.cs-hero h1 { font-size: clamp(34px, 5vw, 62px); line-height: 1.2; margin-bottom: 18px; overflow-wrap: anywhere; }
.cs-tagline { display: flex; align-items: flex-start; gap: 8px; margin: -6px 0 14px; font-size: 14.5px; font-weight: 600; line-height: 1.8; color: var(--lavender); max-width: 640px; }
.cs-tagline .icon { flex: none; width: 16px; height: 16px; margin-top: 5px; }
.cs-hero .lead { color: var(--muted); font-size: clamp(16px, 1.6vw, 18.5px); line-height: 1.95; max-width: 640px; }
.cs-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 30px; }
.cs-store { display: inline-flex; align-items: center; gap: 10px; padding: 9px 18px; border-radius: 14px; background: #000; border: 1px solid var(--border-strong); direction: ltr; line-height: 1.2; transition: border-color .3s, translate .3s var(--ease); }
.cs-store:hover { border-color: var(--lavender); translate: 0 -2px; }
.cs-store .icon { width: 22px; height: 22px; fill: currentColor; stroke: none; }
.cs-store small { display: block; font-size: 10px; color: var(--muted); }
.cs-store b { font-size: 15px; }

.cs-meta {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0; margin: clamp(36px, 5vw, 56px) 0 0;
  border: 1px solid var(--border); border-radius: var(--radius); background: rgba(255, 255, 255, .025); overflow: hidden;
}
.cs-meta > div { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 14px; padding: 18px 20px; border-inline-start: 1px solid var(--border); }
.cs-meta > div:first-child { border-inline-start: 0; }
.cs-meta .icon-box { grid-row: span 2; width: 42px; height: 42px; margin: 0; border-radius: 12px; }
.cs-meta .icon-box .icon { width: 19px; height: 19px; }
.cs-meta dt { font-size: 12.5px; color: var(--faint); }
.cs-meta dd { margin: 0; font-weight: 700; font-size: 14.5px; line-height: 1.6; }

/* browser frame (websites) */
.cs-browser { direction: ltr; border-radius: 16px; overflow: hidden; background: #0e0b19; border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(123, 79, 224, .1); }
.cs-bar { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; background: rgba(255, 255, 255, .05); border-bottom: 1px solid rgba(255, 255, 255, .08); }
.cs-bar i { width: 9px; height: 9px; border-radius: 50%; background: #ff5f57; opacity: .8; }
.cs-bar i:nth-child(2) { background: #febc2e; } .cs-bar i:nth-child(3) { background: #28c840; }
.cs-bar span { display: inline-flex; align-items: center; gap: 6px; margin-inline: auto; padding: 3px 16px; border-radius: 99px; background: rgba(0, 0, 0, .35); font-family: var(--font-en); font-size: 12px; color: var(--muted); max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-bar span .icon { width: 12px; height: 12px; color: #28c840; flex: none; }
.cs-screen { position: relative; aspect-ratio: 16 / 10.5; overflow: hidden; container-type: size; background: #fff; }
.cs-screen img { width: 100%; min-height: 100%; object-fit: cover; object-position: top; }
.cs-screen img.mk-page { position: absolute; inset: 0 0 auto; height: auto; }
.cs-screen:hover img.mk-page { animation: pageScroll 14s ease-in-out infinite alternate; }

/* phone frames (apps) */
.cs-phone { flex: none; width: 100%; padding: 9px; border-radius: 38px; background: linear-gradient(160deg, #2e2645, #100c1b); border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7); }
.cs-phone > div { position: relative; aspect-ratio: 9 / 19.5; border-radius: 30px; overflow: hidden; background: #0d0a18; }
.cs-phone > div::before { content: ""; position: absolute; top: 9px; left: 37%; right: 37%; height: 18px; border-radius: 99px; background: #000; z-index: 1; }
.cs-phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.cs-phones-hero { position: relative; display: flex; justify-content: center; align-items: center; min-height: 420px; }
.cs-phones-hero .cs-phone { width: min(44%, 250px); position: relative; z-index: 2; }
.cs-phones-hero .cs-phone.side { width: min(36%, 205px); z-index: 1; opacity: .9; }
.cs-phones-hero .cs-phone.s1 { rotate: -7deg; margin-inline-end: -14%; translate: 0 26px; }
.cs-phones-hero .cs-phone.s2 { rotate: 7deg; margin-inline-start: -14%; translate: 0 26px; }
.cs-visual { position: relative; }
.cs-visual::before { content: ""; position: absolute; inset: 8% 4% -6%; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, rgba(123, 79, 224, .35), transparent); filter: blur(30px); }

/* sections */
.cs-section { padding-block: clamp(64px, 8vw, 110px); }
.cs-section + .cs-section { padding-top: 0; }
.cs-section.alt { padding-block: clamp(64px, 8vw, 110px); background: rgba(255, 255, 255, .018); border-block: 1px solid var(--border); }
.cs-section.alt + .cs-section { padding-top: clamp(64px, 8vw, 110px); }
.cs-section .section-head { margin-bottom: clamp(30px, 4vw, 48px); }

.cs-overview { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.cs-overview.solo { grid-template-columns: minmax(0, 900px); }
.cs-prose { color: var(--muted); font-size: 16.5px; line-height: 2; }
.cs-prose p + p { margin-top: 14px; }
.cs-prose > p:first-child { color: var(--text); font-size: clamp(17px, 1.7vw, 19.5px); font-weight: 500; }
.cs-prose ul, .cs-prose ol { padding-inline-start: 22px; margin-top: 12px; }
.cs-prose li + li { margin-top: 6px; }
.cs-checks { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; list-style: none; padding: 0; }
.cs-checks li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; font-size: 14px; background: var(--surface); border: 1px solid var(--border); }
.cs-checks .icon { width: 15px; height: 15px; color: #4ade80; }
.cs-goal { position: sticky; top: calc(var(--sticky-top, var(--header-h)) + 24px); padding: 28px; background: radial-gradient(120% 80% at 100% 0%, rgba(123, 79, 224, .2), transparent 70%), var(--surface); }
.cs-goal .icon-box { margin-bottom: 18px; }
.cs-goal small { display: block; font-size: 12.5px; font-weight: 600; color: var(--lavender); margin-bottom: 6px; }
.cs-goal h3 { font-size: 20px; line-height: 1.6; margin-bottom: 10px; }
.cs-goal p { color: var(--muted); font-size: 14.5px; line-height: 1.95; }

.cs-cs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.cs-cs .card { padding: clamp(26px, 3vw, 36px); }
.cs-cs .cs-tag { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; margin-bottom: 18px; }
.cs-cs .cs-tag .icon { width: 15px; height: 15px; }
.cs-cs .is-challenge .cs-tag { color: #fca5a5; background: rgba(248, 113, 113, .1); border: 1px solid rgba(248, 113, 113, .22); }
.cs-cs .is-solution .cs-tag { color: #86efac; background: rgba(74, 222, 128, .1); border: 1px solid rgba(74, 222, 128, .22); }
.cs-cs .is-solution { background: radial-gradient(100% 80% at 0% 0%, rgba(123, 79, 224, .16), transparent 70%), var(--surface); }
.cs-cs h3 { font-size: clamp(20px, 2.2vw, 24px); margin-bottom: 12px; }
.cs-cs p { color: var(--muted); font-size: 15.5px; line-height: 2; }

/* inside the app */
.cs-shot { border-radius: 20px; overflow: hidden; border: 1px solid var(--border); background: var(--surface); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .7); }
.cs-shot img { width: 100%; height: auto; display: block; }
.cs-shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 28px; }
.cs-shots:first-child { margin-top: 0; }
.cs-shots .cs-shot:only-child { grid-column: 1 / -1; max-width: 900px; margin-inline: auto; }
.cs-phones { position: relative; }
.cs-phones-track { display: flex; gap: clamp(14px, 2vw, 24px); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 10px 4px 30px; }
.cs-phones-track::-webkit-scrollbar { display: none; }
.cs-phones-track .cs-phone { width: clamp(200px, 22vw, 260px); scroll-snap-align: start; }
.cs-phones-track.is-few { justify-content: center; }
.cs-nav { display: flex; justify-content: center; gap: 10px; margin-top: 6px; }
.cs-nav button { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); transition: background .3s, opacity .3s; }
.cs-nav button:hover { background: var(--surface-2); }
.cs-nav button:disabled { opacity: .35; cursor: default; }
.cs-nav .icon { width: 18px; height: 18px; }
.cs-nav .prev .icon { rotate: 180deg; }

.cs-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; counter-reset: f; }
.cs-feature { padding: 26px; counter-increment: f; }
.cs-feature::after { content: counter(f, decimal-leading-zero); position: absolute; top: 18px; inset-inline-end: 22px; font-family: var(--font-en); font-size: 34px; font-weight: 700; color: rgba(255, 255, 255, .06); }
.cs-feature .icon-box { width: 44px; height: 44px; margin-bottom: 16px; border-radius: 12px; }
.cs-feature .icon-box .icon { width: 19px; height: 19px; }
.cs-feature h3 { font-size: 17px; line-height: 1.6; margin-bottom: 8px; }
.cs-feature p { color: var(--muted); font-size: 14.5px; line-height: 1.9; }
.cs-feature.no-title p { color: var(--text); font-size: 15.5px; }

.cs-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.cs-results.single { grid-template-columns: minmax(0, 900px); justify-content: center; }
.cs-result { display: flex; gap: 16px; align-items: flex-start; padding: 22px 24px; border-inline-start: 3px solid var(--lavender); }
.cs-result .icon-box { flex: none; width: 42px; height: 42px; margin: 0; border-radius: 12px; color: #86efac; background: rgba(74, 222, 128, .1); border-color: rgba(74, 222, 128, .2); }
.cs-result .icon-box .icon { width: 19px; height: 19px; }
.cs-result b { display: block; font-size: 16px; margin-bottom: 4px; }
.cs-result p { color: var(--muted); font-size: 14.5px; line-height: 1.9; }

.cs-journey { max-width: 900px; margin-inline: auto; }
.cs-journey > .cs-prose { margin-bottom: 26px; }
.cs-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; position: relative; }
.cs-steps::before { content: ""; position: absolute; top: 24px; bottom: 24px; inset-inline-start: 23px; width: 2px; background: linear-gradient(var(--primary), transparent); opacity: .5; }
.cs-steps li { position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 18px; align-items: start; }
.cs-steps .n { position: relative; z-index: 1; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-en); font-weight: 700; color: #fff; background: var(--grad-btn); box-shadow: 0 0 0 6px var(--bg); }
.cs-steps .card { padding: 18px 22px; }
.cs-steps h3 { font-size: 16.5px; margin-bottom: 4px; }
.cs-steps p { color: var(--muted); font-size: 14.5px; line-height: 1.9; }
.cs-journey > .cs-prose:last-child { margin: 26px 0 0; }

.cs-related .portfolio { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cs-related-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 30px; }
.cs-related-head .section-head { margin: 0; }

/* the home slider's card: a clean placeholder when a project has no screenshot */
img.mk-page { position: absolute; inset: 0 0 auto; width: 100%; height: auto; }
@keyframes pageScroll { 0%, 8% { translate: 0 0; } 92%, 100% { translate: 0 calc(-100% + 100cqh); } }
.wk-screen.is-empty { display: grid; place-items: center; background: radial-gradient(circle at 70% 0%, color-mix(in srgb, var(--pc) 45%, transparent), transparent 70%), #120e1f; }
.wk-ph { display: grid; justify-items: center; gap: 12px; padding: 18px; text-align: center; }
.wk-ph .icon { width: 44px; height: 44px; padding: 10px; border-radius: 14px; color: #fff; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); }
.wk-ph b { font-size: 17px; color: #fff; }

@media (max-width: 1080px) {
  .cs-hero-grid { grid-template-columns: 1fr; }
  .cs-overview { grid-template-columns: 1fr; }
  .cs-goal { position: static; }
  .cs-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-related .portfolio { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .cs-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-meta > div { border-inline-start: 0; border-top: 1px solid var(--border); padding: 14px; column-gap: 10px; }
  .cs-meta > div:nth-child(-n+2) { border-top: 0; }
  .cs-meta > div:nth-child(even) { border-inline-start: 1px solid var(--border); }
  .cs-meta .icon-box { width: 34px; height: 34px; border-radius: 10px; }
  .cs-cs, .cs-features, .cs-results, .cs-shots, .cs-related .portfolio { grid-template-columns: 1fr; }
  .cs-phones-hero { min-height: 0; }
  .cs-steps li { grid-template-columns: 40px minmax(0, 1fr); gap: 12px; }
  .cs-steps .n { width: 40px; height: 40px; }
  .cs-steps::before { inset-inline-start: 19px; }
  .cs-related-head { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { .cs-screen:hover img.mk-page { animation: none; } }

/* =========================================================
   Article page (article-*.html)
   ========================================================= */
.read-progress { position: fixed; top: 0; inset-inline: 0; height: 3px; z-index: 102; pointer-events: none; }
.read-progress span { display: block; height: 100%; background: var(--grad-btn); transform: scaleX(0); transform-origin: right; box-shadow: 0 0 14px var(--accent); }
.art-hero h1.art-title { font-size: clamp(30px, 4.4vw, 54px); max-width: 920px; line-height: 1.4; }
.art-meta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 22px; margin-top: 26px; font-size: 14px; color: var(--muted); }
.art-meta > span { display: inline-flex; align-items: center; gap: 8px; }
.art-meta .icon { width: 16px; height: 16px; color: var(--accent); }
.art-author-mini .avatar { width: 32px; height: 32px; }
.art-author-mini .avatar img, .art-author .avatar img { width: 60%; }
.art-wrap { padding-top: clamp(50px, 7vw, 80px); }
.art-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(30px, 5vw, 64px); align-items: start; }
.art-body { min-width: 0; max-width: 760px; }
.art-cover { aspect-ratio: 16 / 7; border-radius: var(--radius-lg); display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle at 80% 10%, var(--c1), transparent 55%), linear-gradient(160deg, var(--c2), #0c0a15 80%); border: 1px solid var(--border); margin-bottom: 34px; }
.art-cover .icon { width: 90px; height: 90px; stroke-width: .9; color: rgba(255, 255, 255, .85); animation: bob 7s ease-in-out infinite; }
.art-takeaways { padding: 24px 26px; border-radius: var(--radius); border: 1px solid rgba(166, 76, 166, .35); background: linear-gradient(150deg, rgba(166, 76, 166, .12), var(--surface) 60%); margin-bottom: 40px; }
.art-takeaways b { display: flex; align-items: center; gap: 10px; font-size: 16px; margin-bottom: 12px; }
.art-takeaways b .icon { width: 20px; height: 20px; color: var(--pa, #f5c77e); }
.art-takeaways ul { display: grid; gap: 8px; }
.art-takeaways li { position: relative; padding-inline-start: 22px; color: #ddd6ea; font-size: 15px; }
.art-takeaways li::before { content: ""; position: absolute; inset-inline-start: 2px; top: .75em; width: 8px; height: 8px; border-radius: 50%; background: var(--grad-btn); }

/* reading typography */
.art-content { font-size: 17.5px; line-height: 2; color: #d9d3e6; }
.art-content > * + * { margin-top: 18px; }
.art-content h2 { font-size: clamp(22px, 2.6vw, 28px); color: var(--text); margin-top: 48px; padding-top: 8px; scroll-margin-top: calc(var(--sticky-top, var(--header-h)) + 20px); position: relative; }
.art-content h2::before { content: ""; position: absolute; inset-inline-start: -18px; top: 22px; width: 6px; height: 22px; border-radius: 3px; background: var(--grad-btn); }
.art-content strong { color: var(--text); }
.art-content ul, .art-content ol { display: grid; gap: 10px; padding-inline-start: 0; }
.art-content ul li { position: relative; padding-inline-start: 24px; }
.art-content ul li::before { content: ""; position: absolute; inset-inline-start: 4px; top: .85em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.art-content ol { counter-reset: n; list-style: none; }
.art-content ol li { counter-increment: n; position: relative; padding-inline-start: 42px; }
.art-content ol li::before { content: counter(n); position: absolute; inset-inline-start: 0; top: .3em; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-en); font-size: 13px; font-weight: 600; background: rgba(166, 76, 166, .18); color: var(--lavender); }
.art-content .callout { padding: 18px 22px; border-radius: 14px; border-inline-start: 4px solid var(--accent); background: rgba(123, 79, 224, .1); color: #e8e1f3; }
.art-content .callout b { color: var(--lavender); }

.art-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--border); font-size: 14px; color: var(--faint); }
.art-tags a { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); transition: border-color .3s, color .3s; }
.art-tags a:hover { border-color: var(--lavender); color: var(--text); }
.art-author { display: flex; align-items: center; gap: 18px; margin-top: 28px; padding: 24px; }
.art-author .avatar { width: 56px; height: 56px; flex-shrink: 0; }
.art-author p { color: var(--muted); font-size: 14.5px; margin-top: 4px; }
.art-author .btn { margin-inline-start: auto; flex-shrink: 0; }

/* sidebar */
.art-sticky { position: sticky; top: calc(var(--sticky-top, var(--header-h)) + 20px); transition: top .5s var(--ease); display: grid; gap: 16px; }
.art-side .card { padding: 22px; }
.art-side h3 { font-size: 15px; margin-bottom: 14px; }
.art-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; counter-reset: t; }
.art-toc li { counter-increment: t; }
/* number in its own column on the start side, aligned with the first line; long titles wrap under the text */
.art-toc a {
  display: grid; grid-template-columns: 24px minmax(0, 1fr); column-gap: 8px; align-items: baseline;
  padding: 9px 12px; border-radius: 12px; font-size: 14px; line-height: 1.65; text-align: start; color: var(--muted);
  border-inline-start: 2px solid transparent; transition: color .3s, background .3s, border-color .3s;
}
.art-toc a::before { content: counter(t, decimal-leading-zero); grid-column: 1; grid-row: 1; font-family: var(--font-en); font-size: 11.5px; color: var(--faint); }
.art-toc a:hover { color: var(--text); background: var(--surface-2); }
.art-toc a.on { color: #fff; background: linear-gradient(120deg, rgba(123, 79, 224, .25), rgba(166, 76, 166, .1)); border-inline-start-color: var(--lavender); }
.art-toc a.on::before { color: var(--lavender); }
.art-share > div { display: flex; gap: 8px; }
.art-share a, .art-share button { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--border); background: var(--surface); color: var(--muted); transition: border-color .3s, color .3s, translate .3s var(--ease); cursor: pointer; }
.art-share a:hover, .art-share button:hover { border-color: var(--lavender); color: var(--text); translate: 0 -3px; }
.art-share .icon { width: 18px; height: 18px; }
.art-share b { font-size: 17px; }
.art-copied { display: block; min-height: 1.4em; margin-top: 8px; font-size: 12.5px; color: #6ee7a8; }
.art-cta { position: relative; overflow: hidden; background: linear-gradient(150deg, rgba(91, 52, 176, .3), var(--surface) 70%); }
.art-cta b { display: block; font-size: 16px; margin-bottom: 4px; }
.art-cta p { color: var(--muted); font-size: 14px; margin-bottom: 16px; }

@media (max-width: 1080px) {
  .art-grid { grid-template-columns: 1fr; }
  .art-body { max-width: none; }
  .art-side { order: -1; }
  .art-sticky { position: static; grid-template-columns: 1fr 1fr; }
  .art-toc { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .art-sticky { grid-template-columns: 1fr; }
  .art-cta { display: none; }
  .art-content { font-size: 16.5px; }
  .art-content h2::before { display: none; }
  .art-author { flex-wrap: wrap; }
  .art-author .btn { margin: 0; }
}

/* =========================================================
   404
   ========================================================= */
.nf { min-height: 100svh; display: grid; place-items: center; text-align: center; padding-top: var(--header-h); border-bottom: 0; }
.nf-code { position: relative; font-family: var(--font-en); font-size: clamp(130px, 26vw, 300px); font-weight: 700; line-height: .9; letter-spacing: -.04em; color: transparent; -webkit-text-stroke: 2px rgba(201, 176, 220, .55); }
.nf-code span { display: inline-block; animation: nfFloat 6s ease-in-out infinite; }
.nf-code span:nth-child(2) { color: transparent; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-stroke: 0; animation-delay: -2s; }
.nf-code span:nth-child(3) { animation-delay: -4s; }
@keyframes nfFloat { 50% { translate: 0 -14px; rotate: -3deg; } }
.nf-term { direction: ltr; display: inline-block; margin: 24px auto 0; padding: 12px 20px; border-radius: 12px; background: rgba(0, 0, 0, .35); border: 1px solid var(--border); font-family: Consolas, monospace; font-size: 14px; color: var(--muted); text-align: left; }
.nf-term b { color: #f39ab8; font-weight: 400; }
.nf-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 30px; }

/* =========================================================
   Legal pages
   ========================================================= */
.legal-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(30px, 5vw, 64px); align-items: start; }
.legal-grid .art-toc { position: sticky; top: calc(var(--sticky-top, var(--header-h)) + 20px); }
.legal-note { padding: 14px 18px; border-radius: 12px; border: 1px dashed rgba(245, 199, 126, .4); background: rgba(245, 199, 126, .06); color: #f5d9a8; font-size: 14px; margin-bottom: 30px; }
.legal-updated { color: var(--faint); font-size: 14px; margin-bottom: 26px; }
@media (max-width: 1080px) { .legal-grid { grid-template-columns: 1fr; } .legal-grid .art-toc { position: static; } }

/* RTL fixes */
.glance dd.en { text-align: left; }          /* "end" of an RTL row is the physical left */
.story-tag b { direction: ltr; unicode-bidi: isolate; }
.info p.en, .info a.en { text-align: right; }

/* =========================================================
   Home: work tabs + card slider
   ========================================================= */
.wk { position: relative; --wk-gap: 22px; --wk-n: 4; }
.wk-tabs { justify-content: center; margin-bottom: 30px; }
.wk-track { display: flex; gap: var(--wk-gap); overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; overscroll-behavior-x: contain; padding: 14px 0 30px; outline: 0; }
.wk-track::-webkit-scrollbar { display: none; }
.wk-track.is-drag { scroll-snap-type: none; scroll-behavior: auto; cursor: grabbing; user-select: none; }
.wk-track.is-drag a { pointer-events: none; }

.wk-card { position: relative; flex: 0 0 calc((100% - (var(--wk-n) - 1) * var(--wk-gap)) / var(--wk-n)); scroll-snap-align: start; display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; border: 1px solid var(--border); background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .015)); transition: translate .5s var(--ease), border-color .4s, box-shadow .5s var(--ease); }
.wk-card:hover { translate: 0 -8px; border-color: color-mix(in srgb, var(--pc) 55%, transparent); box-shadow: 0 34px 60px -34px color-mix(in srgb, var(--pc) 75%, transparent); }
.wk-card.is-hidden { display: none; }
.wk-card.is-entering { animation: projIn .6s var(--ease) both; animation-delay: calc(var(--k, 0) * 60ms); }

.wk-media { position: relative; display: block; padding: 18px 18px 0; overflow: hidden; background: radial-gradient(circle at 75% 0%, color-mix(in srgb, var(--pc) 55%, transparent), transparent 65%), linear-gradient(165deg, var(--pc2), #0c0a15 85%); -webkit-user-drag: none; }
.wk-media::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px); background-size: 24px 24px; -webkit-mask-image: linear-gradient(180deg, #000, transparent 70%); mask-image: linear-gradient(180deg, #000, transparent 70%); }
.wk-frame { position: relative; direction: ltr; border-radius: 12px 12px 0 0; overflow: hidden; background: #0e0b19; border: 1px solid rgba(255, 255, 255, .14); border-bottom: 0; box-shadow: 0 -10px 40px -10px color-mix(in srgb, var(--pc) 45%, transparent); transition: translate .6s var(--ease); }
.wk-card:hover .wk-frame { translate: 0 -4px; }
.wk-bar { display: flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; background: rgba(255, 255, 255, .05); border-bottom: 1px solid rgba(255, 255, 255, .07); }
.wk-bar i { width: 7px; height: 7px; border-radius: 50%; background: #ff5f57; opacity: .75; }
.wk-bar i:nth-child(2) { background: #febc2e; } .wk-bar i:nth-child(3) { background: #28c840; }
.wk-bar span { margin-inline: auto; padding: 1px 12px; border-radius: 99px; background: rgba(0, 0, 0, .3); font-family: var(--font-en); font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; max-width: 64%; }
.wk-screen { position: relative; aspect-ratio: 16 / 10.5; overflow: hidden; container-type: size; }
.wk-card:hover .mk-page { animation: pageScroll 9s ease-in-out infinite alternate; }

.wk-body { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 20px; border-top: 1px solid rgba(255, 255, 255, .07); }
.wk-cat { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: color-mix(in srgb, var(--pc) 55%, #fff); }
.wk-cat .icon { width: 14px; height: 14px; }
.wk-body h3 { font-size: 17px; line-height: 1.5; }
.wk-body h3.en { font-family: var(--font-en); font-weight: 600; text-align: right; }
.wk-body p { color: var(--muted); font-size: 13.5px; line-height: 1.8; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wk-btn { margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px; border-radius: 99px; font-size: 14px; border: 1px solid var(--border-strong); transition: background .35s, border-color .35s, gap .35s var(--ease); }
.wk-btn .icon { width: 16px; height: 16px; }
.wk-card:hover .wk-btn, .wk-btn:focus-visible { background: var(--pc); border-color: transparent; gap: 12px; }

.wk-ctrl { display: flex; align-items: center; justify-content: center; gap: 18px; }
.wk-arrow { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--border); background: var(--surface); transition: border-color .3s, background .3s, opacity .3s, scale .3s var(--ease); }
.wk-arrow:hover:not(:disabled) { border-color: var(--lavender); background: var(--surface-2); scale: 1.07; }
.wk-arrow:disabled { opacity: .35; cursor: default; }
.wk-arrow .icon { width: 18px; height: 18px; }
.wk-prev .icon { scale: -1 1; }
.wk-progress { width: min(300px, 46vw); height: 4px; border-radius: 99px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.wk-progress span { display: block; height: 100%; width: 25%; border-radius: 99px; background: var(--grad-btn); transition: margin .25s, width .3s; }

@media (max-width: 1080px) { .wk { --wk-n: 3; } }
@media (max-width: 820px) { .wk { --wk-n: 2; --wk-gap: 16px; } }
@media (max-width: 560px) {
  .wk-tabs { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
  .wk-tabs .chip { flex-shrink: 0; }
  .wk-card { flex-basis: 80%; }
}

/* ---------- Live apps ---------- */
.lapps-search {
  display: flex; align-items: center; gap: 10px; max-width: 420px; margin: 0 auto 36px; padding: 0 18px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  transition: border-color .3s;
}
.lapps-search:focus-within { border-color: var(--border-strong); }
.lapps-search svg { width: 18px; height: 18px; flex: none; }
.lapps-search input { flex: 1; min-width: 0; padding: 13px 0; background: none; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 15px; }
.lapps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.lapp { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 26px 20px 22px; }
.lapp[hidden] { display: none; }
.lapp-icon {
  position: relative; width: 76px; height: 76px; margin-bottom: 16px; border-radius: 20px;
  background: var(--grad-btn); box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
.lapp-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.lapp-icon b { display: grid; place-items: center; height: 100%; font-size: 30px; color: #fff; }
.lapp-dot {
  position: absolute; inset-block-start: -3px; inset-inline-end: -3px; width: 14px; height: 14px; border-radius: 50%;
  background: #22c55e; border: 3px solid var(--bg); box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); animation: lapp-pulse 2.4s infinite;
}
@keyframes lapp-pulse { 70% { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
.lapp h3 { font-size: 17px; margin-bottom: 8px; }
.lapp p {
  font-size: 13.5px; line-height: 1.75; color: var(--muted); margin-bottom: 18px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.lapp-stores { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: auto; }
.lapp-stores a {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 10px; direction: ltr;
  background: #000; border: 1px solid var(--border-strong); font-size: 13px; font-weight: 600; transition: border-color .3s, transform .3s;
}
.lapp-stores a:hover { border-color: var(--lavender); transform: translateY(-2px); }
.lapp-stores svg { width: 16px; height: 16px; fill: currentColor; }
.lapps-empty { text-align: center; color: var(--muted); margin-top: 24px; }
@media (max-width: 600px) {
  .lapps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .lapp { padding: 18px 12px 16px; }
  .lapp-icon { width: 58px; height: 58px; border-radius: 16px; margin-bottom: 12px; }
  .lapp h3 { font-size: 14.5px; }
  .lapp p { font-size: 12.5px; -webkit-line-clamp: 2; margin-bottom: 14px; }
  .lapp-stores { gap: 6px; }
  .lapp-stores a { padding: 7px 9px; font-size: 0; gap: 0; } /* icon-only buttons; the name stays in aria-label */
  .lapp-stores svg { width: 18px; height: 18px; }
}
@media (prefers-reduced-motion: reduce) { .lapp-dot { animation: none; } }

/* a link chip beside the work filters (e.g. to the live apps page) */
.chip-link { display: inline-flex; align-items: center; gap: 8px; }
.chip-link .lapp-dot { position: static; width: 9px; height: 9px; border-width: 0; }
.chip-link svg { width: 14px; height: 14px; }
