/* Reliance IT Solutions design system.
   Square geometry throughout; the camera viewfinder bracket is the recurring motif. */
:root {
    --ink: #131b4d;
    --brand: #293681;
    --signal: #4274d9;
    --alert: #d92d20;
    --mist: #f2f4f9;
    --line: #d9deea;
    --text: #2b3350;
    --muted: #5a6480;
    --ease: cubic-bezier(.2, .7, .2, 1);
    --hero-ms: 8000ms;
}

*, *::before, *::after { border-radius: 0 !important; }
[x-cloak] { display: none !important; }

html { scroll-behavior: smooth; }
body { font-family: 'Barlow', system-ui, sans-serif; color: var(--text); font-size: 17px; line-height: 1.6; background: #fff; }
h1, h2, h3, h4, .display { font-family: 'Barlow Semi Condensed', 'Barlow', sans-serif; color: inherit; font-weight: 700; line-height: 1.08; letter-spacing: -.005em; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }

.wrap { max-width: 80rem; margin-inline: auto; padding-inline: 1rem; }
@media (min-width: 640px) { .wrap { padding-inline: 1.5rem; } }
@media (min-width: 1024px) { .wrap { padding-inline: 2rem; } }

.section { padding-block: 5rem; }
@media (min-width: 1024px) { .section { padding-block: 7rem; } }
.section-title { font-size: clamp(2rem, 4vw, 3rem); color: var(--ink); max-width: 22ch; }
.section-lead { color: var(--muted); max-width: 60ch; margin-top: 1rem; font-size: 1.125rem; }

/* Scroll progress + header */
.scroll-progress { position: fixed; inset: 0 0 auto 0; height: 3px; background: var(--alert); transform: scaleX(0); transform-origin: left; z-index: 70; }
.site-header { position: sticky; top: 0; z-index: 60; background: #fff; border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s; }
.site-header .bar { height: 5rem; transition: height .3s var(--ease); }
.site-header.is-stuck { border-color: var(--line); box-shadow: 0 8px 24px -18px rgba(19, 27, 77, .5); }
.site-header.is-stuck .bar { height: 4rem; }
.brand-mark { display: block; }
.brand-mark img { display: block; height: 46px; width: auto; transition: height .3s var(--ease); }
.site-header.is-stuck .brand-mark img { height: 38px; }
.nav-link { position: relative; padding-block: .35rem; font-weight: 500; color: var(--ink); }
.nav-link::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--alert); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.nav-link:hover::after, .nav-link:focus-visible::after { transform: scaleX(1); }

/* Buttons */
.btn { position: relative; display: inline-flex; align-items: center; gap: .6rem; padding: .85rem 1.6rem; font-weight: 600; overflow: hidden; isolation: isolate; border: 1px solid transparent; transition: color .3s var(--ease), border-color .3s; }
.btn::before { content: ''; position: absolute; inset: 0; z-index: -1; transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.btn:hover::before, .btn:focus-visible::before { transform: scaleX(1); }
.btn i { transition: transform .3s var(--ease); }
.btn:hover i { transform: translateX(4px); }
.btn-primary { background: var(--alert); color: #fff; }
.btn-primary::before { background: var(--ink); }
.btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn-ghost::before { background: #fff; }
.btn-ghost:hover, .btn-ghost:focus-visible { color: var(--ink); border-color: #fff; }
.btn-light { background: #fff; color: var(--ink); }
.btn-light::before { background: var(--alert); }
.btn-light:hover, .btn-light:focus-visible { color: #fff; }

.text-link { color: var(--brand); font-weight: 600; background: linear-gradient(var(--alert), var(--alert)) left bottom / 0 2px no-repeat; padding-bottom: 2px; transition: background-size .3s var(--ease); }
.text-link:hover, a:hover > .text-link, a:focus-visible > .text-link { background-size: 100% 2px; }

/* Viewfinder brackets: the hover state for anything clickable in a grid */
.frame { position: relative; display: block; background: #fff; border: 1px solid var(--line); transition: border-color .3s, transform .35s var(--ease); }
.frame::before {
    content: ''; position: absolute; inset: -6px; pointer-events: none; opacity: 0; transform: scale(1.03); z-index: 2;
    transition: opacity .25s, transform .35s var(--ease);
    --c: var(--alert);
    background:
        linear-gradient(var(--c), var(--c)) left top / 20px 2px,
        linear-gradient(var(--c), var(--c)) left top / 2px 20px,
        linear-gradient(var(--c), var(--c)) right top / 20px 2px,
        linear-gradient(var(--c), var(--c)) right top / 2px 20px,
        linear-gradient(var(--c), var(--c)) left bottom / 20px 2px,
        linear-gradient(var(--c), var(--c)) left bottom / 2px 20px,
        linear-gradient(var(--c), var(--c)) right bottom / 20px 2px,
        linear-gradient(var(--c), var(--c)) right bottom / 2px 20px;
    background-repeat: no-repeat;
}
a.frame:hover, a.frame:focus-visible { border-color: transparent; }
a.frame:hover::before, a.frame:focus-visible::before { opacity: 1; transform: scale(1); }
.frame .scene { transition: transform .6s var(--ease); }
.frame .thumb { overflow: hidden; display: block; }
a.frame:hover .scene { transform: scale(1.04); }
.frame-tag { color: var(--signal); font-weight: 600; font-size: .9rem; }

.scene { display: block; width: 100%; height: auto; }

/* Hero carousel */
.hero { position: relative; background: var(--ink); color: #fff; overflow: hidden; }
.hero::before, .page-hero::before {
    content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
    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: 56px 56px;
}
.hero-stage { display: grid; position: relative; }
.hero-slide { grid-area: 1 / 1; visibility: hidden; opacity: 0; transition: opacity .6s, visibility .6s; }
.hero-slide.is-active { visibility: visible; opacity: 1; }
.hero-grid { display: grid; gap: 3rem; align-items: center; padding-block: 4rem 3rem; }
@media (min-width: 1024px) { .hero-grid { grid-template-columns: 1fr 1.1fr; padding-block: 5.5rem 4.5rem; } }
.hero-title { font-size: clamp(2.6rem, 6vw, 4.5rem); max-width: 14ch; }
.hero-text { color: #c9d2ee; font-size: 1.2rem; max-width: 46ch; margin-block: 1.5rem 2rem; }
.hero-art { position: relative; border: 1px solid rgba(255, 255, 255, .18); }
.hero-slide.is-active .rise { animation: rise .8s var(--ease) both; animation-delay: calc(var(--i, 0) * 110ms + 120ms); }
.hero-slide.is-active .hero-art { animation: wipe 1s var(--ease) both .15s; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }

.hero-nav { position: relative; border-top: 1px solid rgba(255, 255, 255, .16); }
.hero-nav-inner { display: flex; align-items: stretch; }
.hero-tabs { display: grid; grid-template-columns: repeat(3, 1fr); flex: 1; }
.hero-tab { position: relative; padding: 1.1rem .75rem 1.1rem 0; text-align: left; font-weight: 600; color: #aab5dc; transition: color .3s; }
.hero-tab:hover, .hero-tab.is-active { color: #fff; }
.hero-tab .fill { position: absolute; left: 0; right: 1rem; top: -1px; height: 2px; background: var(--alert); transform: scaleX(0); transform-origin: left; }
.hero-tab.is-active .fill { animation: fill var(--hero-ms) linear forwards; }
.hero.is-paused .hero-tab.is-active .fill { animation-play-state: paused; }
@keyframes fill { to { transform: scaleX(1); } }
.hero-arrow { width: 3.25rem; color: #fff; border-left: 1px solid rgba(255, 255, 255, .16); transition: background .25s; }
.hero-arrow:hover { background: var(--alert); }

/* Industry ticker */
.ticker { overflow: hidden; border-bottom: 1px solid var(--line); background: #fff; }
.ticker-track { display: flex; width: max-content; animation: ticker 48s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track span { padding: 1.1rem 2.25rem; font-family: 'Barlow Semi Condensed', sans-serif; font-weight: 600; font-size: 1.15rem; color: var(--brand); white-space: nowrap; border-right: 1px solid var(--line); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* Service rows */
.svc-row { display: grid; gap: 1.5rem; padding-block: 2.25rem; border-top: 1px solid var(--line); position: relative; }
.svc-row:last-child { border-bottom: 1px solid var(--line); }
.svc-row::before { content: ''; position: absolute; left: 0; top: -1px; height: 2px; width: 100%; background: var(--alert); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); }
.svc-row:hover::before { transform: scaleX(1); }
@media (min-width: 900px) { .svc-row { grid-template-columns: 4rem 1.1fr 1.2fr auto; align-items: start; } }
.svc-icon { font-size: 1.75rem; color: var(--signal); transition: transform .35s var(--ease); }
.svc-row:hover .svc-icon { transform: translateY(-3px); }

/* Reasons grid */
.cells { display: grid; gap: 1px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .16); }
@media (min-width: 768px) { .cells { grid-template-columns: repeat(2, 1fr); } }
.cell { background: var(--brand); padding: 2.25rem; transition: background .3s; }
.cell:hover { background: #2f3e93; }

/* Numbered process with a line that draws on reveal */
.steps { position: relative; display: grid; gap: 2rem; counter-reset: step; }
@media (min-width: 900px) {
    .steps { grid-template-columns: repeat(4, 1fr); }
    .steps::before { content: ''; position: absolute; left: 0; right: 0; top: 1.25rem; height: 2px; background: var(--signal); transform: scaleX(0); transform-origin: left; transition: transform 1.4s var(--ease) .2s; }
    .steps.is-in::before { transform: scaleX(1); }
}
.step { position: relative; }
.step-num { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; background: var(--ink); color: #fff; font-family: 'Barlow Semi Condensed', sans-serif; font-weight: 700; font-size: 1.15rem; margin-bottom: 1.25rem; }

/* Scroll-snap rail carousel */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: 86%; gap: 1.5rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px; margin: -8px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
@media (min-width: 700px) { .rail { grid-auto-columns: calc((100% - 1.5rem) / 2); } }
@media (min-width: 1100px) { .rail { grid-auto-columns: calc((100% - 3rem) / 3); } }
.rail-btn { width: 3rem; height: 3rem; border: 1px solid var(--line); color: var(--ink); transition: background .25s, color .25s, opacity .25s; }
.rail-btn:hover:not(:disabled) { background: var(--ink); color: #fff; }
.rail-btn:disabled { opacity: .35; cursor: default; }

/* Inner page banner */
.page-hero { position: relative; overflow: hidden; background: var(--ink); color: #fff; padding-block: 4.5rem; }
.page-hero::after { content: ''; position: absolute; left: 0; right: 0; height: 120px; top: -120px; pointer-events: none; background: linear-gradient(transparent, rgba(66, 116, 217, .22)); border-bottom: 1px solid rgba(66, 116, 217, .6); animation: scan 7s linear infinite; }
@keyframes scan { to { top: 100%; } }
.page-hero .inner { position: relative; z-index: 1; }
.page-hero h1 { font-size: clamp(2.5rem, 5vw, 4rem); max-width: 20ch; animation: rise .8s var(--ease) both; }
.page-hero p { color: #c9d2ee; font-size: 1.2rem; max-width: 56ch; margin-top: 1rem; animation: rise .8s var(--ease) both .12s; }
.crumbs { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .95rem; color: #aab5dc; margin-bottom: 1rem; }
.crumbs a:hover { color: #fff; }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:first-child { border-top: 1px solid var(--line); }
.faq-q { width: 100%; display: flex; justify-content: space-between; gap: 1.5rem; text-align: left; padding-block: 1.25rem; font-weight: 600; color: var(--ink); font-size: 1.1rem; }
.faq-q i { color: var(--signal); margin-top: .3rem; transition: transform .3s var(--ease); }

/* Forms */
.field { width: 100%; border: 1px solid var(--line); padding: .75rem 1rem; background: #fff; transition: border-color .2s, box-shadow .2s; }
.field:focus { outline: none; border-color: var(--signal); box-shadow: 0 0 0 3px rgba(66, 116, 217, .2); }

/* Scroll reveal: only hidden once JS has confirmed it can show it again */
.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .js [data-reveal] { opacity: 1; transform: none; }
    .steps::before { transform: scaleX(1); }
}
