/* Metrofile Saudi Arabia - public website */
:root {
  --pink: #e8175d; --pink-dark: #c30f4d; --navy: #1c2635; --navy-2: #26344a; --ink: #1f2937; --muted: #5b6474;
  --line: #e5e8ee; --bg-alt: #f5f7fa; --radius: 14px; --shadow: 0 10px 30px rgba(16, 24, 40, .08);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
html[lang="ar"] { --font: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: #fff; line-height: 1.65; font-size: 16px; }
img, video { max-width: 100%; display: block; }
a { color: var(--pink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; color: var(--navy); }
h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); letter-spacing: -.01em; }
h3 { font-size: 1.1rem; }
html[lang="ar"] h1, html[lang="ar"] h2 { letter-spacing: 0; }
p { margin: 0 0 1em; }
.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }
.narrow { max-width: 760px; }
.center { text-align: center; }
.skip { position: absolute; inset-inline-start: -999px; top: 8px; background: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { inset-inline-start: 8px; }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }

/* Icons & buttons */
.ic { width: 22px; height: 22px; flex: none; }
.ic-sm { width: 18px; height: 18px; }
html[dir="rtl"] .flip { transform: scaleX(-1); }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: .98rem; border: 2px solid transparent; cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .15s; font-family: inherit; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--pink); color: #fff; }
.btn-primary:hover { background: var(--pink-dark); }
.btn-ghost { border-color: rgba(255,255,255,.7); color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--navy); }
.btn-ghost-dark { border-color: var(--line); color: var(--navy); }
.btn-ghost-dark:hover { border-color: var(--pink); color: var(--pink); }
.btn-light { background: #fff; color: var(--pink); }
.btn-login { background: var(--navy); color: #fff !important; padding: 9px 16px; font-size: .9rem; }
.btn-login:hover { background: var(--navy-2); }
.btn-login .ic { width: 18px; height: 18px; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 20px; }
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-decoration: none !important; }
.brand img { height: 36px; width: auto; }
.brand-tag { font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: #6b7384; white-space: nowrap; font-family: "Inter", system-ui, sans-serif; font-weight: 500; padding-left: 2px; }
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav > a:not(.btn) { color: var(--ink); font-weight: 500; padding: 8px 12px; border-radius: 8px; font-size: .95rem; }
.main-nav > a:not(.btn):hover { background: var(--bg-alt); text-decoration: none; }
.main-nav > a[aria-current="page"] { color: var(--pink); }
.main-nav .lang { font-weight: 600; border: 1px solid var(--line); margin-inline: 6px; }
.nav-overlay { display: none; }
.menu-btn { display: none; width: 44px; height: 44px; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 0; flex-direction: column; justify-content: center; align-items: center; gap: 5px; cursor: pointer; }
.menu-btn span { width: 20px; height: 2px; background: var(--navy); border-radius: 2px; transition: transform .2s, opacity .2s; }
body.nav-open .menu-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .menu-btn span:nth-child(2) { opacity: 0; }
body.nav-open .menu-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero */
.hero { position: relative; color: #fff; background: center/cover no-repeat var(--navy); isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgba(20,28,42,.94) 0%, rgba(20,28,42,.78) 45%, rgba(20,28,42,.3) 100%); }
html[dir="rtl"] .hero::before { background: linear-gradient(260deg, rgba(20,28,42,.94) 0%, rgba(20,28,42,.78) 45%, rgba(20,28,42,.3) 100%); }
.hero-inner { padding: clamp(80px, 12vw, 150px) 0 clamp(90px, 12vw, 160px); max-width: 700px; margin-inline-start: max(20px, calc((100% - 1180px) / 2)); margin-inline-end: auto; width: auto; }
.hero h1 { color: #fff; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 700; color: #ff7aa6; margin-bottom: 14px; display: inline-flex; align-items: center; gap: 8px; }
html[lang="ar"] .eyebrow { letter-spacing: 0; text-transform: none; font-size: .95rem; }
.eyebrow.dark { color: var(--pink); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: #d7dde7; max-width: 580px; }
.lead-dark { font-size: 1.15rem; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Stats */
.stats-band { background: var(--navy); color: #fff; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 28px 16px; text-align: center; border-inline-start: 1px solid rgba(255,255,255,.1); }
.stat:first-child { border-inline-start: 0; }
.stat strong { display: block; font-size: clamp(1.6rem, 3vw, 2.3rem); color: #fff; line-height: 1.1; }
.stat span { color: #aeb8c8; font-size: .9rem; }

/* Sections */
.section { padding: clamp(56px, 8vw, 100px) 0; }
.section.tight { padding-top: 30px; }
.section.alt { background: var(--bg-alt); }
.sec-head { text-align: center; max-width: 680px; margin: 0 auto 44px; }
.sec-head p { color: var(--muted); font-size: 1.08rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.svc { display: flex; flex-direction: column; overflow: hidden; color: inherit; transition: transform .2s, box-shadow .2s; }
.svc:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(16,24,40,.14); text-decoration: none; }
.svc-img { height: 180px; background: center/cover no-repeat #ddd; }
.svc-body { padding: 22px 24px 26px; position: relative; flex: 1; display: flex; flex-direction: column; }
.ic-badge { position: absolute; top: -26px; inset-inline-start: 22px; width: 52px; height: 52px; padding: 13px; border-radius: 14px; background: var(--pink); color: #fff; box-shadow: 0 8px 18px rgba(232,23,93,.35); }
.svc-body h3 { margin-top: 18px; }
.svc-body p { color: var(--muted); flex: 1; }
.more { display: inline-flex; align-items: center; gap: 6px; color: var(--pink); font-weight: 600; font-size: .95rem; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 64px); align-items: center; }
.split-media img, .rounded, .promo { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
.promo { aspect-ratio: 16/9; object-fit: cover; background: #000; }
.why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 18px; }
.why .ic { width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: #fde7ef; color: var(--pink); margin-bottom: 10px; }
.why h3 { margin-bottom: 4px; }
.why p { color: var(--muted); font-size: .95rem; margin: 0; }

/* Logos */
.logo-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.logo-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.logo { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; height: 110px; display: flex; align-items: center; justify-content: center; padding: 14px; }
.logo img { max-height: 76px; width: auto; max-width: 100%; object-fit: contain; transition: transform .2s; }
.logo:hover img { transform: scale(1.05); }

/* CTA band */
.cta-band { background: linear-gradient(120deg, var(--pink) 0%, #b80d48 100%); color: #fff; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 48px 0; }
.cta-band h2 { color: #fff; margin-bottom: 6px; }
.cta-band p { margin: 0; color: #ffe1ec; }

/* Inner pages */
.page-hero { position: relative; isolation: isolate; color: #fff; background: center/cover no-repeat var(--navy); padding: clamp(64px, 9vw, 110px) 0 clamp(56px, 8vw, 90px); }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(20,28,42,.82) 0%, rgba(20,28,42,.55) 60%, rgba(20,28,42,.35) 100%); }
.page-hero h1 { color: #fff; margin-bottom: 10px; }
.page-hero p { color: #d7dde7; font-size: 1.15rem; max-width: 640px; margin: 0; }
.timeline { position: relative; padding-inline-start: 30px; border-inline-start: 2px solid #f6c3d4; }
.tl-item { position: relative; padding-bottom: 26px; }
.tl-item::before { content: ""; position: absolute; inset-inline-start: -39px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 5px #fde7ef; }
.tl-year { font-weight: 800; color: var(--pink); font-size: 1.1rem; }
.tl-item p { color: var(--muted); }
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.gallery img { border-radius: 12px; aspect-ratio: 1; object-fit: cover; width: 100%; }

.jump { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: -26px; position: relative; z-index: 2; }
.jump a { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 999px; padding: 10px 16px; color: var(--navy); font-weight: 600; font-size: .9rem; }
.jump a:hover { color: var(--pink); border-color: var(--pink); text-decoration: none; }
.svc-detail { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(28px, 5vw, 60px); align-items: center; padding: 50px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 90px; }
.svc-detail:last-child { border-bottom: 0; }
.svc-detail.rev .svc-detail-media { order: 2; }
.svc-detail-media img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.svc-detail p { color: var(--muted); }
.points { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 12px; }
.points li { display: flex; gap: 10px; align-items: flex-start; }
.points .ic { color: #fff; background: var(--pink); border-radius: 50%; padding: 3px; margin-top: 3px; }
.points strong { color: var(--navy); }
.points div { color: var(--muted); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 28px; align-items: start; }
.contact-card { padding: 30px; }
.foot-contact { display: flex; gap: 12px; align-items: flex-start; }
.foot-contact .ic { color: var(--pink); margin-top: 2px; }
.form { padding: 30px; display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; color: var(--navy); }
.form input, .form select, .form textarea { font: inherit; font-size: 16px; font-weight: 400; padding: 12px 14px; border: 1px solid #d3d8e0; border-radius: 10px; background: #fff; color: var(--ink); width: 100%; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--pink); box-shadow: 0 0 0 4px rgba(232,23,93,.12); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form .btn { justify-self: start; }
.hp { position: absolute; inset-inline-start: -9999px; }
.form-msg { padding: 12px 14px; border-radius: 10px; font-weight: 500; }
.form-msg.ok { background: #e6f7ed; color: #146c40; }
.form-msg.err { background: #fdecee; color: #a61b2b; }

/* Footer */
.site-footer { background: var(--navy); color: #aeb8c8; padding-top: 60px; font-size: .95rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1.2fr 1fr 1.2fr; gap: 36px; padding-bottom: 40px; }
.foot-logo { height: 40px; width: auto; margin-bottom: 16px; }
.site-footer h3 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { color: #d7dde7; }
.site-footer a:hover { color: #fff; }
.foot-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 20px 0 28px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .85rem; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } .btn, .svc { transition: none; } }
.no-js .reveal { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 1020px) {
  /* the blur effect would trap the fixed menu inside the 72px header, so phones get a solid header */
  .site-header { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .menu-btn { display: inline-flex; }
  .main-nav { position: fixed; top: 0; bottom: 0; inset-inline-end: 0; inset-inline-start: auto; width: min(320px, 86vw); height: 100vh; height: 100dvh; z-index: 60; background: #fff; box-shadow: -12px 0 40px rgba(16,24,40,.25); flex-direction: column; align-items: stretch; padding: 84px 20px 24px; gap: 4px; transform: translateX(105%); transition: transform .28s ease; overflow-y: auto; visibility: hidden; }
  body.nav-open .main-nav { visibility: visible; }
  .nav-overlay { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(16,24,40,.5); opacity: 0; pointer-events: none; transition: opacity .25s ease; }
  body.nav-open .nav-overlay { opacity: 1; pointer-events: auto; }
  .menu-btn { position: relative; z-index: 70; }
  html[dir="rtl"] .main-nav { transform: translateX(-105%); box-shadow: 12px 0 40px rgba(16,24,40,.25); }
  body.nav-open .main-nav { transform: none; }
  body.nav-open { overflow: hidden; }
  .main-nav > a:not(.btn) { padding: 14px 12px; font-size: 1.05rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .main-nav .lang { margin: 10px 0 0; border-radius: 10px; text-align: center; }
  .main-nav .btn-login { justify-content: center; margin-top: 10px; padding: 14px; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .logo-strip { grid-template-columns: repeat(4, 1fr); }
  .logo-grid { grid-template-columns: repeat(4, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-inline-start: 0; }
  .stat { border-top: 1px solid rgba(255,255,255,.1); }
  .grid-3, .split, .svc-detail, .contact-grid, .row2, .why-grid { grid-template-columns: 1fr; }
  .svc-detail.rev .svc-detail-media { order: 0; }
  .logo-strip, .logo-grid { grid-template-columns: repeat(3, 1fr); }
  .logo { height: 84px; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
  .foot-grid { grid-template-columns: 1fr; gap: 26px; }
  .hero-inner { margin-inline: 20px; }
  .jump { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; margin-top: 16px; padding-bottom: 6px; }
  .jump a { white-space: nowrap; }
}

.contact-card h2 { font-size: 1.35rem; }

/* Hero slideshow */
.hero-slides { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.hero-slides .slide { position: absolute; inset: 0; background: center/cover no-repeat; opacity: 0; transform: scale(1.06); transition: opacity 1.2s ease, transform 7s ease; }
.hero-slides .slide.active { opacity: 1; transform: scale(1); }
.hero-dots { position: absolute; bottom: 22px; inset-inline-start: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 1; }
html[dir="rtl"] .hero-dots { transform: translateX(50%); }
.hero-dots span { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.45); transition: width .3s, background .3s; }
.hero-dots span.on { width: 24px; border-radius: 4px; background: var(--pink); }
@media (prefers-reduced-motion: reduce) { .hero-slides .slide { transition: opacity .3s; transform: none; } }
.svc-detail-media img[src$="scanner.jpg"], .svc-img[style*="scanner.jpg"] { background-color: #fff; object-fit: contain; background-size: contain; }

@media (max-width: 420px) { .brand img { height: 30px; } .brand-tag { font-size: 7.5px; letter-spacing: .12em; } }
