/* YTECH IT Solutions: shared custom styles (Tailwind utilities are loaded from the CDN).
   Used by index.html and services/it-support.html. */

html { scroll-padding-top: 5rem; scroll-behavior: auto; }
[tabindex="-1"]:focus { outline: none; }
body { font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
:focus-visible { outline: 3px solid #60A5FA; outline-offset: 3px; border-radius: 6px; }

/* ---------- Brand logo (official white version, used directly on dark backgrounds) ---------- */
.logo-img { display: block; height: 2.375rem; aspect-ratio: 900 / 241; background: url("ytech-logo-white.png") left center / contain no-repeat; transition: opacity .2s; }
a:hover > .logo-img { opacity: .9; }
/* Optical alignment: nudge the header and drawer logo down 2px (size and header height unchanged) */
#site-header .logo-img, #drawer .logo-img { transform: translateY(2px); }
@media (min-width: 640px) { .logo-img { height: 2.625rem; } }
@media (min-width: 1024px) { .logo-img { height: 2.875rem; } }

/* ---------- Hero: one orchestrated entrance + network diagram ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
.hero-in { opacity: 0; animation: rise .7s cubic-bezier(.2, .7, .2, 1) forwards; }
.hero-in.d1 { animation-delay: .05s; }
.hero-in.d2 { animation-delay: .18s; }
.hero-in.d3 { animation-delay: .3s; }
.hero-in.d4 { animation-delay: .42s; }

@keyframes flow { to { stroke-dashoffset: -24; } }
.link-flow { stroke-dasharray: 4 8; animation: flow 1.6s linear infinite; }
@keyframes pulse-ring { 0% { r: 10; opacity: .55; } 100% { r: 26; opacity: 0; } }
.pulse { animation: pulse-ring 2.6s ease-out infinite; }
.pulse.p2 { animation-delay: .9s; }
.pulse.p3 { animation-delay: 1.7s; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.blink { animation: blink 2.2s ease-in-out infinite; }
.blink.b2 { animation-delay: .7s; }
.blink.b3 { animation-delay: 1.4s; }

.grid-bg {
  background-image:
    linear-gradient(rgba(148, 163, 184, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .07) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse at 65% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse at 65% 40%, #000 20%, transparent 75%);
}

/* ---------- Header navigation ---------- */
.nav-link { position: relative; }
.nav-link::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: #2563EB; opacity: 0; transform: scaleX(.6); transform-origin: left; transition: opacity .25s ease, transform .25s ease; }
.nav-link:not(.active):hover::after { opacity: .45; transform: scaleX(1); }
.nav-link.active { color: #fff; }
/* One indicator slides between items (positioned by assets/site.js) */
.nav-links { position: relative; }
.nav-indicator { position: absolute; left: 0; top: 0; width: 1px; height: 2px; border-radius: 2px; background: #2563EB; pointer-events: none; opacity: 0; transform-origin: 0 0; transform: translate(var(--x, 0px), var(--y, 0px)) scaleX(var(--w, 0)); transition: transform .38s cubic-bezier(.2, .7, .2, 1), opacity .2s ease; }
.nav-indicator.is-on { opacity: 1; }
.nav-indicator.no-anim { transition: none; }

/* Solutions dropdown */
.has-menu { position: relative; }
.has-menu .chev { display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 6px; color: #94A3B8; background: none; border: 0; cursor: pointer; transition: color .2s; }
.has-menu .chev:hover, .has-menu.open .chev { color: #fff; }
.has-menu .chev i { font-size: 10px; transition: transform .2s; }
.has-menu.open .chev i { transform: rotate(180deg); }
.menu { position: absolute; top: calc(100% + 18px); left: -1.25rem; width: 25rem; padding: .5rem; border-radius: 1rem; background: #0b1d36; border: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 24px 48px rgba(0, 0, 0, .45); opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s, transform .18s, visibility 0s linear .18s; }
.menu::before { content: ""; position: absolute; left: 0; right: 0; top: -20px; height: 20px; }
.has-menu.open .menu { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.menu-item { display: flex; gap: .9rem; align-items: flex-start; padding: .7rem; border-radius: .75rem; color: #F8FAFC; transition: background-color .2s; }
.menu-item:hover, .menu-item:focus-visible { background: rgba(255, 255, 255, .06); }
.menu-item .mi-ic { flex: none; display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: .75rem; background: #12318C; color: #fff; font-size: .95rem; transition: background-color .2s; }
.menu-item:hover .mi-ic, .menu-item:focus-visible .mi-ic { background: #2563EB; }
.menu-item strong { display: block; font-size: .95rem; font-weight: 700; line-height: 1.3; }
.menu-item small { display: block; margin-top: .15rem; font-size: .8rem; font-weight: 400; line-height: 1.4; color: #94A3B8; }
.menu-item[aria-current="page"] strong { color: #93B4F5; }

/* Mobile drawer */
#drawer { transition: transform .35s cubic-bezier(.2, .7, .2, 1), visibility .35s; }
#drawer.closed { transform: translateX(100%); visibility: hidden; }
#scrim { transition: opacity .3s ease, visibility .3s; }
#scrim.closed { opacity: 0; visibility: hidden; }

/* ---------- Content panels ---------- */
.media-panel { position: relative; overflow: hidden; border-radius: 1rem; background: linear-gradient(160deg, #0d2140, #071426 70%); border: 1px solid rgba(148, 163, 184, .18); box-shadow: 0 30px 60px -30px rgba(7, 20, 38, .6); padding: clamp(1rem, 3vw, 2rem); }
.panel { font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: .85rem; line-height: 1.75; color: #C7D3E6; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.panel pre { margin: 0; font: inherit; white-space: pre; }
.panel .bar { display: flex; gap: .4rem; margin-bottom: 1rem; }
.panel .bar i { width: 10px; height: 10px; border-radius: 50%; background: #243553; }
.panel-note { margin-top: 1rem; font-size: .8rem; color: #7F90A8; }
.t-k { color: #7FB0FF; } .t-s { color: #A7E3B8; } .t-c { color: #6F7F96; } .t-f { color: #F0C987; }


/* ---------- Hidden elements stay hidden even when a utility class sets display ---------- */
[hidden] { display: none !important; }

/* ---------- Client logo wall (muted until hovered) ---------- */
.client-logo { display: flex; align-items: center; justify-content: center; height: 4rem; }
.client-logo img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; filter: grayscale(1); opacity: .6; transition: filter .25s ease, opacity .25s ease; }
.client-logo:hover img, .client-logo:focus-within img { filter: none; opacity: 1; }
.client-logo-inline { height: 2.5rem; justify-content: flex-start; }
.client-logo-inline img { filter: none; opacity: 1; }

/* ---------- Project filters ---------- */
.filter-btn[aria-pressed="true"] { background: #12318C; color: #fff; border-color: #12318C; }

/* ---------- Scroll reveal (hidden state exists only when JavaScript confirms support; see assets/site.js) ---------- */
.js-motion .reveal { transition: opacity .65s cubic-bezier(.2, .7, .2, 1) var(--rd, 0ms), transform .65s cubic-bezier(.2, .7, .2, 1) var(--rd, 0ms); }
.js-motion .reveal:not(.is-in) { opacity: 0; transform: translateY(22px); }

/* ---------- Solutions overview: micro-interactions ---------- */
.ov-cell { display: block; background: #fff; padding: 1.75rem; transition: background-color .3s ease; }
.ov-cell:focus-visible { outline-offset: -3px; }
.ov-top { display: flex; align-items: center; justify-content: space-between; }
.ov-num { font-size: 1.875rem; line-height: 2.25rem; font-weight: 800; color: #2563EB; transition: transform .3s cubic-bezier(.2, .7, .2, 1), color .3s ease; }
.ov-arrow { width: 20px; height: 20px; color: #94A3B8; transition: transform .3s cubic-bezier(.2, .7, .2, 1), color .3s ease; }
.ov-title { display: block; margin-top: 1rem; font-size: 1.125rem; line-height: 1.75rem; font-weight: 700; color: #0F172A; transition: color .3s ease; }
.ov-desc { display: block; margin-top: .25rem; font-size: .875rem; line-height: 1.25rem; color: #475569; transition: color .3s ease; }
.ov-cell:hover, .ov-cell:focus-visible { background: #12318C; }
.ov-cell:hover .ov-num, .ov-cell:focus-visible .ov-num { transform: translateY(-3px); color: #BFDBFE; }
.ov-cell:hover .ov-arrow, .ov-cell:focus-visible .ov-arrow { transform: translateX(4px); color: #fff; }
.ov-cell:hover .ov-title, .ov-cell:focus-visible .ov-title { color: #fff; }
.ov-cell:hover .ov-desc, .ov-cell:focus-visible .ov-desc { color: #DBEAFE; }

/* ---------- Why YTECH rows ---------- */
.reason { transition: background-color .25s ease; }
.reason-n { transition: background-color .25s ease; }
.reason:hover { background: #F8FAFC; }
.reason:hover .reason-n { background: #2563EB; }

/* ---------- From Infrastructure to Innovation (timeline) ---------- */
.tl-line { position: absolute; left: 10%; right: 10%; top: 19px; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.tl-fill { position: absolute; inset: 0; background: #2563EB; transform-origin: left center; transform: scaleX(var(--p, 0)); transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.tl-tab { background: none; border: 0; cursor: pointer; color: inherit; }
.tl-dot { position: relative; z-index: 1; display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 9999px; border: 2px solid rgba(255, 255, 255, .2); background: #071426; color: #94A3B8; font-weight: 700; font-size: .875rem; transition: background-color .3s, border-color .3s, color .3s, box-shadow .3s; }
.tl-name { color: #94A3B8; transition: color .3s; }
.tl-tab:hover .tl-dot { border-color: #2563EB; }
.tl-tab.is-done .tl-dot { background: #12318C; border-color: #2563EB; color: #fff; }
.tl-tab.is-done .tl-name { color: #C7D6F5; }
.tl-tab[aria-selected="true"] .tl-dot { background: #2563EB; border-color: #2563EB; color: #fff; box-shadow: 0 0 0 6px rgba(37, 99, 235, .2); }
.tl-tab[aria-selected="true"] .tl-name { color: #fff; }
@media (min-width: 640px) { .tl-line { top: 23px; } .tl-dot { width: 3rem; height: 3rem; font-size: 1rem; } }
@media (min-width: 1024px) { .tl-line { top: 27px; } .tl-dot { width: 3.5rem; height: 3.5rem; font-size: 1.125rem; } }

/* Without JavaScript every stage is shown as a list. With JavaScript the panels stack in one cell (no height jump) and cross-fade. */
.tl-panels { display: grid; gap: 1rem; }
.tl.is-js .tl-panels { gap: 0; }
.tl.is-js .tl-panel { grid-area: 1 / 1; opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .16s ease, transform .16s ease, visibility 0s linear .16s; }
.tl.is-js .tl-panel.is-leaving { transform: translateY(-8px); }
.tl.is-js .tl-panel.is-active { opacity: 1; visibility: visible; transform: none; transition: opacity .24s cubic-bezier(.2, .7, .2, 1) .14s, transform .24s cubic-bezier(.2, .7, .2, 1) .14s, visibility 0s; }

/* ---------- Project cards: filter fade ---------- */
.pcard { transition: opacity .22s ease, transform .22s ease, box-shadow .3s ease; }
.pcard.is-fading { opacity: 0; transform: scale(.98); }

/* ---------- Floating WhatsApp button ---------- */
.wa-float { position: fixed; right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); z-index: 40; display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 9999px; background: #12318C; color: #fff; font-size: 1.4rem; border: 1px solid rgba(255, 255, 255, .18); box-shadow: 0 10px 24px rgba(7, 20, 38, .35); transition: opacity .25s ease, transform .25s ease, background-color .2s ease, visibility 0s linear 0s; }
.wa-float:hover { background: #2563EB; }
.wa-float.is-hidden { opacity: 0; transform: translateY(8px); visibility: hidden; pointer-events: none; transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s; }

@media (max-width: 639px) { .wa-float { width: 2.75rem; height: 2.75rem; font-size: 1.25rem; right: .875rem; } }

@media print { .js-motion .reveal:not(.is-in) { opacity: 1 !important; transform: none !important; } .wa-float { display: none; } }

/* ---------- Contact information cards: glow in the colour of their icon on hover ---------- */
.ci-card { --ci: #60A5FA; --ci-rgb: 96, 165, 250; position: relative; display: flex; align-items: center; gap: 1rem; padding: .9rem 1rem; border-radius: .9rem; border: 1px solid rgba(255, 255, 255, .08); background: rgba(255, 255, 255, .03); color: inherit; transition: background-color .25s ease, border-color .25s ease, box-shadow .25s ease, transform .25s ease; }
.ci-sky { --ci: #60A5FA; --ci-rgb: 96, 165, 250; }
.ci-blue { --ci: #3B82F6; --ci-rgb: 59, 130, 246; }
.ci-green { --ci: #22C55E; --ci-rgb: 34, 197, 94; }
.ci-cyan { --ci: #22D3EE; --ci-rgb: 34, 211, 238; }
.ci-indigo { --ci: #818CF8; --ci-rgb: 129, 140, 248; }
.ci-ic { flex: none; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: .7rem; font-size: 1.05rem; color: var(--ci); background: rgba(var(--ci-rgb), .16); transition: background-color .25s ease, color .25s ease, box-shadow .25s ease; }
.ci-body { min-width: 0; display: block; }
.ci-label { display: block; font-size: .8125rem; line-height: 1.25rem; color: #94A3B8; transition: color .25s ease; }
.ci-value { display: block; font-weight: 600; line-height: 1.4; color: #F8FAFC; transition: color .25s ease; }
.ci-card:hover, a.ci-card:focus-visible { transform: translateY(-1px); border-color: rgba(var(--ci-rgb), .55); background: linear-gradient(135deg, rgba(var(--ci-rgb), .26), rgba(var(--ci-rgb), .08)); box-shadow: 0 0 0 1px rgba(var(--ci-rgb), .22), 0 12px 30px -10px rgba(var(--ci-rgb), .55); }
.ci-card:hover .ci-ic, a.ci-card:focus-visible .ci-ic { color: #fff; background: var(--ci); box-shadow: 0 6px 16px -4px rgba(var(--ci-rgb), .7); }
.ci-card:hover .ci-label, a.ci-card:focus-visible .ci-label { color: rgb(var(--ci-rgb)); }
a.ci-card:focus-visible { outline-offset: 2px; }

/* ---------- Glass social buttons ---------- */
.glass-btn { --gb: 255, 255, 255; position: relative; isolation: isolate; overflow: hidden; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: .85rem; color: #E2E8F0; font-size: 1.05rem; background: rgba(255, 255, 255, .07); border: 0; outline: none; -webkit-backdrop-filter: blur(10px) saturate(1.5); backdrop-filter: blur(10px) saturate(1.5); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 -1px 0 rgba(255, 255, 255, .04), 0 6px 16px -6px rgba(0, 0, 0, .55); transition: transform .25s ease, background-color .25s ease, box-shadow .25s ease, color .25s ease; }
.glass-btn::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: linear-gradient(160deg, rgba(255, 255, 255, .22) 0%, rgba(255, 255, 255, .04) 42%, rgba(255, 255, 255, 0) 70%); transition: opacity .25s ease; }
.glass-btn::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; opacity: 0; transition: opacity .25s ease; }
.gb-facebook { --gb: 24, 119, 242; }
.gb-instagram { --gb: 221, 42, 123; }
.gb-whatsapp { --gb: 37, 211, 102; }
.gb-facebook::after { background: linear-gradient(145deg, rgba(24, 119, 242, .95), rgba(18, 49, 140, .85)); }
.gb-instagram::after { background: linear-gradient(145deg, rgba(129, 52, 175, .92), rgba(221, 42, 123, .9) 55%, rgba(245, 133, 41, .9)); }
.gb-whatsapp::after { background: linear-gradient(145deg, rgba(37, 211, 102, .95), rgba(18, 140, 126, .9)); }
.glass-btn:hover, .glass-btn:focus-visible { transform: translateY(-2px); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 12px 24px -8px rgba(var(--gb), .6); }
.glass-btn:focus, .glass-btn:focus-visible { outline: none; }
.glass-btn:hover::after, .glass-btn:focus-visible::after { opacity: 1; }
.glass-btn i { transition: transform .25s ease; }
.glass-btn:hover i, .glass-btn:focus-visible i { transform: translateY(-1px) scale(1.06); }

/* ---------- Contact form ---------- */
.field { width: 100%; background: #fff; border: 1px solid #CBD5E1; border-radius: .6rem; padding: .75rem .9rem; color: #0F172A; font-size: .95rem; transition: border-color .2s, box-shadow .2s; }
.field:focus { outline: none; border-color: #2563EB; box-shadow: 0 0 0 4px rgba(37, 99, 235, .15); }
.field.invalid { border-color: #DC2626; box-shadow: 0 0 0 4px rgba(220, 38, 38, .1); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero-in { opacity: 1; }
}
