/* «Custom εφαρμογές» landing (page-custom-efarmoges.php). Rows, FAQ and end card come from systems.css.
   Drawings pause through .sy-anim until on screen; reduced motion / «χωρίς κίνηση» shows the finished state. */

/* ---------- Shared drawing parts ---------- */
.cu-win { background: #fff; border: 1px solid var(--line-strong); box-shadow: 0 24px 48px -28px rgba(10, 37, 64, .35); }
.cu-win__bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: var(--bg-alt); border-bottom: 1px solid var(--line); }
.cu-win__bar i { width: 8px; height: 8px; background: var(--line-strong); }
.cu-win__bar span { margin-left: 8px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cu-dash { display: grid; grid-template-columns: 56px minmax(0, 1fr); min-height: 220px; }
.cu-dash__side { display: grid; align-content: start; gap: 10px; padding: 14px 12px; background: var(--navy); }
.cu-dash__side i { height: 8px; background: rgba(255, 255, 255, .22); }
.cu-dash__side i:first-child { background: #8DB2F2; }
.cu-dash__main { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 14px; padding: 14px; min-width: 0; }
.cu-dash__nums { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cu-dash__nums span { display: grid; gap: 2px; padding: 8px 10px; background: var(--bg-alt); min-width: 0; }
.cu-dash__nums small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cu-dash__nums b { font: 700 20px/1.1 var(--font-h); color: var(--navy); font-variant-numeric: tabular-nums; }
.cu-dash__bars { display: flex; align-items: flex-end; gap: 8px; min-height: 100px; }
.cu-dash__bars i { flex: 1; height: calc(var(--h) * 1%); background: var(--blue); transform-origin: bottom; animation: cu-bar 5s ease-in-out infinite alternate; }
.cu-dash__bars i:nth-child(odd) { background: #8DB2F2; animation-delay: -1.5s; }
@keyframes cu-bar { from { transform: scaleY(.55); } to { transform: scaleY(1); } }

/* The phone is the one rounded thing, as on the project pages. */
.cu-phone { width: 170px; padding: 7px; background: #0A2540; border-radius: 26px !important; box-shadow: 0 24px 48px -20px rgba(10, 37, 64, .5); }
.cu-phone__screen { position: relative; display: grid; grid-template-rows: minmax(0, 1fr) auto; aspect-ratio: 9 / 18; padding: 46px 10px 10px; background: var(--bg-alt); border-radius: 20px !important; overflow: hidden; }
.cu-phone__list { display: grid; align-content: start; gap: 8px; min-height: 0; overflow: hidden; }
.cu-phone__list i { height: 34px; background: #fff; border: 1px solid var(--line); }
.cu-phone__tabs { display: flex; justify-content: space-around; padding-top: 10px; }
.cu-phone__tabs i { width: 18px; height: 6px; background: var(--line-strong); }
.cu-phone__tabs i:first-child { background: var(--blue); }
.cu-push { position: absolute; left: 7px; right: 7px; top: 8px; z-index: 1; display: grid; gap: 1px; padding: 6px 8px; background: var(--navy); color: #fff; border-radius: 8px !important; animation: cu-push 6s var(--ease-out, cubic-bezier(.23, 1, .32, 1)) infinite; }
.cu-push b { font-size: 12px; line-height: 1.25; }
.cu-push small { font-size: 11px; line-height: 1.25; color: #B9C9E4; }
@keyframes cu-push { 0%, 8% { transform: translateY(-130%); } 18%, 82% { transform: none; } 92%, 100% { transform: translateY(-130%); } }

/* ---------- Hero scene ---------- */
.cu-scene { position: relative; margin: 0; padding: 34px 76px 44px 0; min-width: 0; }
.cu-code { position: absolute; left: -14px; bottom: 0; z-index: 2; margin: 0; padding: 12px 14px; max-width: 72%; overflow: hidden; background: var(--navy); color: #DCE6F7; font: 500 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; box-shadow: 0 20px 40px -20px rgba(10, 37, 64, .6); }
.cu-code em { font-style: normal; color: #8DB2F2; }
.cu-code u { text-decoration: none; color: #7FE0AE; }
.cu-scene .cu-phone { position: absolute; right: 0; top: 0; z-index: 3; width: 138px; }
.cu-scene .cu-phone__screen { padding-top: 42px; }

/* ---------- Row drawings ---------- */
.cu-phones { display: flex; justify-content: center; }
.cu-phones .cu-phone { width: min(210px, 64cqw); }
.cu-more { margin-top: 22px; }

.cu-layers { display: grid; }
.cu-layers__row { display: flex; gap: 10px; }
.cu-layers__row span { flex: 1; min-width: 0; padding: 16px 8px; background: #fff; border: 1px solid var(--line-strong); text-align: center; font-weight: 600; font-size: 15px; color: var(--navy); }
.cu-layers__row--dark span { background: var(--navy); border-color: var(--navy); color: #fff; }
.cu-layers__pipe { display: flex; gap: 10px; height: 40px; }
/* Calm, one at a time: a line fills, then the next. Same rhythm as the connections drawing below. */
.cu-layers__pipe i { position: relative; flex: 1; }
.cu-layers__pipe i::before, .cu-layers__pipe i::after { content: ""; position: absolute; top: 0; bottom: 0; left: calc(50% - 1px); width: 2px; background: var(--line-strong); }
.cu-layers__pipe i::after { background: var(--blue); transform-origin: top; transform: scaleY(0); animation: cu-fill-y 7.5s var(--ease-out, ease-out) infinite; animation-delay: calc(var(--n, 0) * 1.5s); }
.cu-layers__pipe i:nth-child(2) { --n: 1; }
.cu-layers__pipe i:nth-child(3) { --n: 2; }
.cu-layers__row--dark + .cu-layers__pipe i:nth-child(1) { --n: 3; }
.cu-layers__row--dark + .cu-layers__pipe i:nth-child(2) { --n: 4; }
@keyframes cu-fill-y { 0% { transform: scaleY(0); opacity: 1; } 6%, 14% { transform: scaleY(1); opacity: 1; } 20%, 100% { transform: scaleY(1); opacity: 0; } }

.cu-api { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); align-items: center; gap: 0; }
.cu-api__core { display: grid; gap: 4px; padding: 18px 14px; background: var(--navy); color: #fff; }
.cu-api__core b { font: 700 18px/1.2 var(--font-h); }
.cu-api__core small { font-size: 13px; color: #B9C9E4; }
.cu-api__ends { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cu-api__ends li { position: relative; display: grid; grid-template-columns: clamp(28px, 12cqw, 64px) minmax(0, 1fr); align-items: center; }
/* The spine that joins every line back to the app box. */
.cu-api__ends li::before { content: ""; position: absolute; left: 0; top: -4px; bottom: -4px; width: 2px; background: var(--line-strong); }
.cu-api__ends li:first-child::before { top: 50%; }
.cu-api__ends li:last-child::before { bottom: 50%; }
.cu-api__ends i { position: relative; height: 2px; background: var(--line-strong); }
.cu-api__ends i::after { content: ""; position: absolute; inset: 0; background: var(--blue); transform-origin: left; transform: scaleX(0); animation: cu-fill-x 7.5s var(--ease-out, ease-out) infinite; animation-delay: calc(var(--i) * 1.5s); }
.cu-api__ends span { padding: 9px 10px; background: #fff; border: 1px solid var(--line-strong); font-weight: 600; font-size: 14px; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: cu-lit 7.5s ease infinite; animation-delay: calc(var(--i) * 1.5s); }
@keyframes cu-fill-x { 0% { transform: scaleX(0); opacity: 1; } 6%, 14% { transform: scaleX(1); opacity: 1; } 20%, 100% { transform: scaleX(1); opacity: 0; } }
@keyframes cu-lit { 0%, 4%, 22%, 100% { border-color: var(--line-strong); color: var(--navy); } 8%, 16% { border-color: var(--blue); color: var(--blue); } }

/* ---------- When it's worth it, what it can be ---------- */
.cu-when__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px); margin-top: clamp(24px, 4vw, 40px); }
.cu-when__grid h3 { margin: 0 0 10px; font: 700 21px/1.25 var(--font-h); color: var(--navy); padding-top: 16px; border-top: 2px solid var(--blue); }
.cu-when__grid p { margin: 0; color: var(--text); font-size: 16px; line-height: 1.65; }
.cu-uses { background: var(--bg-alt); }
.cu-uses__grid { list-style: none; margin: clamp(24px, 4vw, 40px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px clamp(24px, 4vw, 48px); }
.cu-uses__grid li { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 14px; }
.cu-uses__grid .ico { grid-row: span 2; width: 40px; height: 40px; padding: 10px; background: #fff; color: var(--blue); }
.cu-uses__grid b { font: 700 18px/1.3 var(--font-h); color: var(--navy); }
.cu-uses__grid span { margin-top: 4px; color: var(--text); font-size: 15px; line-height: 1.6; }

/* ---------- Languages and tools ---------- */
.cu-stack { background: var(--navy); color: #fff; }
.cu-stack__in { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.cu-stack .section-head { margin: 0; text-align: left; }
.cu-stack .eyebrow, .cu-stack .section-title .hl { color: #8DB2F2; }
.cu-stack .section-title { color: #fff; }
.cu-stack .section-lead { color: #C7D4EA; }
.cu-stack__list { margin: 0; }
.cu-stack__list > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; padding-block: 16px; border-top: 1px solid rgba(255, 255, 255, .16); }
.cu-stack__list > div:last-child { border-bottom: 1px solid rgba(255, 255, 255, .16); }
.cu-stack__list dt { color: #B9C9E4; font-size: 15px; line-height: 1.6; }
.cu-stack__list dd { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0; }
.cu-stack__list dd span { font: 600 17px/1.4 var(--font-h); color: #fff; }

/* ---------- Real projects ---------- */
.cu-work__grid { display: grid; gap: 24px; margin-top: clamp(24px, 4vw, 48px); }
.cu-proof { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cu-proof a { display: grid; align-content: start; gap: 6px; height: 100%; padding: 18px 20px; background: #fff; border: 1px solid var(--line); color: var(--navy); transition: border-color .16s ease, background-color .16s ease; }
.cu-proof a:hover { border-color: var(--blue); background: var(--bg-alt); }
.cu-proof b { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.cu-proof .ico { width: 15px; height: 15px; color: var(--blue); }
.cu-proof span { color: var(--muted); font-size: 15px; line-height: 1.55; }

@media (max-width: 980px) {
	.cu-stack__in, .cu-when__grid, .cu-uses__grid, .cu-proof { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
	.cu-scene { padding: 24px 52px 60px 0; }
	.cu-scene .cu-phone { width: 104px; padding: 5px; border-radius: 20px !important; }
	.cu-scene .cu-phone__screen { padding: 34px 6px 6px; border-radius: 15px !important; }
	.cu-scene .cu-push { left: 4px; right: 4px; padding: 4px 5px; }
	.cu-scene .cu-push b { font-size: 11px; }
	.cu-scene .cu-push small { display: none; }
	.cu-code { left: 0; max-width: 84%; font-size: 11px; }
	.cu-stack__list > div { grid-template-columns: minmax(0, 1fr); gap: 6px; }
	.cu-layers__row span { padding: 13px 4px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
	.cu-dash__bars i, .cu-push, .cu-layers__pipe i::after, .cu-api__ends i::after, .cu-api__ends span { animation: none; }
}
.a11y-nomotion .cu-dash__bars i, .a11y-nomotion .cu-push, .a11y-nomotion .cu-layers__pipe i::after, .a11y-nomotion .cu-api__ends i::after, .a11y-nomotion .cu-api__ends span { animation: none; }
