/* AlZamil Robotics — cinematic site */

:root {
  --ink: #141413;
  --cream: #faf9f5;
  --accent: #6a9bcc;
  --blue: #6a9bcc;
  --green: #788c5d;
  --muted: #6b6a64;
  --border: #e8e6dc;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: 'Lora', Georgia, serif;
  overflow-x: clip;
}
::selection { background: var(--accent); color: var(--cream); }
h1, h2, h3 { font-family: 'Poppins', sans-serif; margin: 0; }
.accent { color: var(--accent); }
.container { max-width: 1500px; margin: 0 auto; }

/* grain */
.grain {
  position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

/* ===== hero ===== */
.hero { position: relative; min-height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
.hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0;
  animation: heroVideoIn 1.8s var(--ease) both;
}
.hero-scrim {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(to right, rgba(20,20,19,0.82) 0%, rgba(20,20,19,0.55) 55%, rgba(20,20,19,0.3) 100%),
    linear-gradient(to top, rgba(20,20,19,0.9) 0%, rgba(20,20,19,0.2) 40%, rgba(20,20,19,0.55) 100%);
}
.hero-ghost {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -54%);
  font-family: 'Poppins', sans-serif; font-size: clamp(200px, 34vw, 520px); font-weight: 700;
  color: transparent; -webkit-text-stroke: 1px rgba(250,249,245,0.07);
  letter-spacing: -0.04em; white-space: nowrap; pointer-events: none; user-select: none; z-index: 1;
  animation: heroFade 2.4s var(--ease) both;
}

.masthead {
  position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between;
  padding: 32px 56px; animation: heroFade 1.2s 0.2s var(--ease) both;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { height: 34px; width: auto; display: block; }
.brand-name { font-family: 'Poppins', sans-serif; font-size: 16px; font-weight: 600; letter-spacing: 0.02em; }
.brand-arabic { font-size: 13px; color: rgba(250,249,245,0.45); }
.nav { display: flex; gap: 36px; font-family: 'Poppins', sans-serif; font-size: 12.5px; letter-spacing: 0.06em; }
.nav a { color: rgba(250,249,245,0.55); text-decoration: none; transition: color 150ms var(--ease); }
.nav a:hover { color: var(--cream); }
.nav .nav-cta { color: var(--cream); border-bottom: 1px solid var(--accent); padding-bottom: 3px; }

.hero-copy {
  position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; justify-content: center;
  padding: 0 56px 80px; max-width: 1500px;
}
.hero-eyebrow {
  margin: 0 0 28px; font-family: 'Poppins', sans-serif; font-size: 12.5px; letter-spacing: 0.22em;
  color: var(--accent); animation: heroRise 1s 0.35s var(--ease) both;
}
.hero-title {
  font-weight: 600; font-size: clamp(56px, 8.5vw, 132px); line-height: 0.98; letter-spacing: -0.03em;
  text-wrap: balance; animation: heroRise 1.1s 0.5s var(--ease) both;
}
.hero-title em { font-family: 'Lora', serif; font-weight: 500; font-style: italic; color: var(--accent); letter-spacing: -0.015em; }
.hero-row {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 64px; margin-top: 56px;
  animation: heroRise 1.1s 0.75s var(--ease) both;
}
.hero-sub { margin: 0; font-size: 19px; line-height: 1.7; color: rgba(250,249,245,0.65); max-width: 520px; }
.hero-badge { position: relative; width: 88px; height: 88px; flex-shrink: 0; }
.badge-ring { position: absolute; inset: 0; animation: slowSpin 24s linear infinite; }
.hero-badge span {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: 'Poppins', sans-serif; font-size: 10.5px; letter-spacing: 0.18em; color: rgba(250,249,245,0.6);
}

.scroll-cue {
  position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding-bottom: 36px; animation: heroFade 1s 1.4s both;
}
.scroll-cue span { font-family: 'Poppins', sans-serif; font-size: 10px; letter-spacing: 0.3em; color: rgba(250,249,245,0.4); }
.scroll-line { width: 1px; height: 44px; background: linear-gradient(to bottom, var(--accent), transparent); animation: scrollPulse 2.2s ease-in-out infinite; }

/* marquee */
.marquee { border-top: 1px solid rgba(250,249,245,0.12); border-bottom: 1px solid rgba(250,249,245,0.12); overflow: hidden; padding: 18px 0; }
.marquee-track { display: flex; width: max-content; animation: marqueeLoop 36s linear infinite; }
.marquee-group { display: flex; gap: 56px; padding-right: 56px; font-family: 'Poppins', sans-serif; font-size: 13px; letter-spacing: 0.16em; color: rgba(250,249,245,0.4); white-space: nowrap; }

/* ===== solutions ===== */
.solutions { background: var(--cream); color: var(--ink); padding: 140px 56px 120px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 48px; margin-bottom: 96px; }
.section-head h2 { font-size: clamp(40px, 4.5vw, 64px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.05; max-width: 14ch; }
.section-head p { margin: 0; font-size: 16px; line-height: 1.7; color: var(--muted); max-width: 360px; }
.solution-list { border-bottom: 1px solid var(--border); }
.solution {
  display: grid; grid-template-columns: 110px 1fr auto; align-items: baseline; gap: 48px;
  padding: 44px 0; border-top: 1px solid var(--border); text-decoration: none; color: var(--ink);
  transition: padding-left 300ms var(--ease);
}
.solution:hover { padding-left: 24px; }
.solution-num { font-family: 'Poppins', sans-serif; font-size: 15px; letter-spacing: 0.08em; }
.solution h3 { font-size: clamp(26px, 2.6vw, 38px); font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
.solution p { margin: 12px 0 0; font-size: 16px; line-height: 1.65; color: var(--muted); max-width: 58ch; }
.solution-tag { font-family: 'Poppins', sans-serif; font-size: 12px; letter-spacing: 0.14em; color: #b0aea5; white-space: nowrap; }

/* ===== film ===== */
.film { background: var(--ink); color: var(--cream); padding: 140px 56px; }
.film-head { display: grid; grid-template-columns: 1fr 420px; gap: 80px; align-items: end; margin-bottom: 64px; }
.film-head h2 { font-size: clamp(40px, 5vw, 72px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.02; }
.film-head em { font-family: 'Lora', serif; font-style: italic; font-weight: 500; color: var(--accent); }
.film-head p { margin: 0 0 8px; font-size: 16.5px; line-height: 1.7; color: rgba(250,249,245,0.6); }
.film-frame { position: relative; border-radius: 12px; overflow: hidden; box-shadow: 0 40px 120px rgba(0,0,0,0.5); }
.film-frame video { display: block; width: 100%; height: auto; background: #0c0c0b; cursor: pointer; }
.film-overlay { position: absolute; inset: 0; cursor: pointer; }
.film-overlay.hidden { display: none; }
.play-btn {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 92px; height: 92px; border-radius: 999px; border: 1px solid rgba(250,249,245,0.35);
  display: grid; place-items: center; background: rgba(20,20,19,0.5); backdrop-filter: blur(6px);
  cursor: pointer; transition: transform 300ms var(--ease), border-color 300ms;
}
.play-btn:hover { transform: translate(-50%, -50%) scale(1.08); border-color: var(--accent); }
.play-tri { width: 0; height: 0; border-left: 20px solid var(--accent); border-top: 12px solid transparent; border-bottom: 12px solid transparent; margin-left: 5px; }
.film-caption { position: absolute; bottom: 20px; font-family: 'Poppins', sans-serif; font-size: 11px; letter-spacing: 0.2em; color: rgba(250,249,245,0.7); text-shadow: 0 1px 8px rgba(0,0,0,0.6); }
.film-caption.left { left: 24px; }
.film-caption.right { right: 24px; }
.spec-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 56px;
  background: rgba(250,249,245,0.12); border: 1px solid rgba(250,249,245,0.12); border-radius: 8px; overflow: hidden;
}
.spec { background: var(--ink); padding: 28px 32px; }
.spec-value { margin: 0; font-family: 'Poppins', sans-serif; font-size: clamp(28px, 2.6vw, 40px); font-weight: 600; letter-spacing: -0.02em; }
.spec-value span { font-size: 0.45em; font-weight: 400; color: var(--accent); margin-left: 6px; }
.spec-label { margin: 8px 0 0; font-size: 14px; color: rgba(250,249,245,0.5); }

/* ===== process ===== */
.process { background: var(--cream); color: var(--ink); padding: 140px 56px; }
.process-grid { display: grid; grid-template-columns: 380px 1fr; gap: 96px; align-items: start; }
.process-intro { position: sticky; top: 64px; }
.eyebrow { margin: 0 0 20px; font-family: 'Poppins', sans-serif; font-size: 12.5px; letter-spacing: 0.22em; color: var(--green); }
.accent-eyebrow { color: var(--accent); }
.process-intro h2 { font-size: clamp(36px, 3.8vw, 56px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.05; }
.process-intro em { font-family: 'Lora', serif; font-style: italic; font-weight: 500; }
.process-sub { margin: 28px 0 0; font-size: 16px; line-height: 1.7; color: var(--muted); }
.step-list { border-bottom: 1px solid var(--border); }
.step { cursor: pointer; border-top: 1px solid var(--border); padding: 36px 0; }
.step-head { display: grid; grid-template-columns: 96px 1fr auto; align-items: baseline; gap: 32px; }
.step-num { font-family: 'Poppins', sans-serif; font-size: clamp(32px, 3vw, 48px); font-weight: 600; letter-spacing: -0.02em; color: #c9c5b8; transition: color 300ms; }
.step h3 { font-size: 24px; font-weight: 500; letter-spacing: -0.01em; color: var(--muted); transition: color 300ms; }
.step-chev { font-family: 'Poppins', sans-serif; font-size: 18px; color: #b0aea5; transition: transform 300ms var(--ease); display: inline-block; }
.step-body { max-height: 0; overflow: hidden; transition: max-height 500ms var(--ease); }
.step-body p { margin: 20px 0 0 128px; font-size: 16.5px; line-height: 1.75; color: #57554e; max-width: 56ch; }
.step-duration { font-family: 'Poppins', sans-serif !important; font-size: 12px !important; letter-spacing: 0.14em; color: var(--accent) !important; margin: 14px 0 8px 128px !important; }
.step.active .step-num { color: var(--accent); }
.step.active h3 { color: var(--ink); }
.step.active .step-chev { transform: rotate(180deg); color: var(--accent); }
.step.active .step-body { max-height: 300px; }

/* ===== about ===== */
.about { background: var(--cream); color: var(--ink); padding: 0 56px 140px; }
.about-card {
  position: relative; overflow: hidden; background: #1e2a3a; color: var(--cream);
  border-radius: 16px; padding: clamp(56px, 7vw, 112px);
}
.about-ghost {
  position: absolute; top: -40px; right: -20px; font-family: 'Poppins', sans-serif;
  font-size: clamp(160px, 22vw, 340px); font-weight: 700; color: rgba(250,249,245,0.05);
  letter-spacing: -0.05em; pointer-events: none; user-select: none;
}
.about-card h2 { font-size: clamp(36px, 4.2vw, 64px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.05; max-width: 18ch; position: relative; }
.about-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; margin-top: 56px; position: relative; }
.about-cols p { margin: 0; font-size: 17px; line-height: 1.8; color: rgba(250,249,245,0.75); }
.about-facts { display: flex; gap: 48px; margin-top: 64px; padding-top: 40px; border-top: 1px solid rgba(250,249,245,0.15); position: relative; flex-wrap: wrap; }
.fact-label { margin: 0; font-family: 'Poppins', sans-serif; font-size: 13px; letter-spacing: 0.12em; color: rgba(250,249,245,0.45); }
.about-facts p:last-child { margin: 6px 0 0; font-size: 16px; }

/* ===== contact ===== */
.contact { background: var(--ink); color: var(--cream); padding: 160px 56px 64px; position: relative; overflow: hidden; }
.contact-topline { position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(to right, transparent, var(--accent), transparent); }
.contact-cta {
  display: block; font-family: 'Poppins', sans-serif; font-size: clamp(44px, 7vw, 110px); font-weight: 600;
  letter-spacing: -0.03em; line-height: 1; color: var(--cream); text-decoration: none; transition: color 300ms;
}
.contact-cta:hover { color: var(--accent); }
.contact-cta em { font-family: 'Lora', serif; font-style: italic; font-weight: 500; }
.contact-meta { margin: 40px 0 0; font-size: 17px; color: rgba(250,249,245,0.55); }
.footer {
  display: flex; align-items: baseline; justify-content: space-between; gap: 32px; flex-wrap: wrap;
  margin-top: 120px; padding-top: 32px; border-top: 1px solid rgba(250,249,245,0.12);
  font-family: 'Poppins', sans-serif; font-size: 12.5px; color: rgba(250,249,245,0.4);
}
.footer-links { display: flex; gap: 28px; }
.footer a { color: inherit; text-decoration: none; transition: color 150ms; }
.footer a:hover { color: var(--cream); }

/* reveal on scroll */
.reveal.reveal-init { opacity: 0; transform: translateY(40px); }
.reveal.reveal-in { opacity: 1; transform: translateY(0); transition: opacity 900ms var(--ease), transform 900ms var(--ease); }

/* keyframes */
@keyframes heroRise { from { opacity: 0; transform: translateY(48px); } to { opacity: 1; transform: translateY(0); } }
@keyframes heroFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes heroVideoIn { from { opacity: 0; transform: scale(1.05); } to { opacity: 1; transform: scale(1); } }
@keyframes scrollPulse { 0%, 100% { transform: translateY(0); opacity: 0.9; } 50% { transform: translateY(10px); opacity: 0.3; } }
@keyframes marqueeLoop { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes slowSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* responsive */
@media (max-width: 900px) {
  .masthead { padding: 20px 24px; }
  .nav { display: none; }
  .hero-copy { padding: 0 24px 60px; }
  .hero-row { flex-direction: column; align-items: flex-start; gap: 32px; }
  .solutions, .film, .process, .contact { padding-left: 24px; padding-right: 24px; }
  .about { padding-left: 24px; padding-right: 24px; }
  .section-head, .film-head, .process-grid, .about-cols { grid-template-columns: 1fr; display: block; }
  .section-head p, .film-head p { margin-top: 20px; }
  .process-intro { position: static; margin-bottom: 48px; }
  .solution { grid-template-columns: 56px 1fr; }
  .solution-tag { display: none; }
  .spec-grid { grid-template-columns: 1fr; }
  .step-body p, .step-duration { margin-left: 0 !important; }
}
