/* ============ Muhammad Saad Faisal — portfolio ============ */

:root {
  --black: #050505;
  --panel: #0d0d0c;
  --white: #f4f1e8;
  --muted: #9a958a;
  --gold: #e3b823;
  --line: rgba(244, 241, 232, 0.12);
  --sans: "Jost", sans-serif;
  --serif: "Cormorant Garamond", serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--gold); color: var(--black); }

em { font-style: italic; color: var(--gold); }

/* ---------- nav ---------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px clamp(20px, 5vw, 64px);
  background: linear-gradient(to bottom, rgba(5,5,5,0.92), rgba(5,5,5,0));
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--white);
  letter-spacing: 0.28em;
  font-size: 0.82rem;
  font-weight: 500;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-left: clamp(16px, 3vw, 40px);
  transition: color 0.25s;
}

.nav-links a:hover { color: var(--gold); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 120px clamp(20px, 6vw, 80px) 80px;
}

.hero > * { position: relative; z-index: 1; max-width: 1200px; }

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0 !important;
  max-width: none !important;
  overflow: hidden;
}

.hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* dark veil so the headline stays readable over the footage */
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(5, 5, 5, 0.82), rgba(5, 5, 5, 0.45) 60%, rgba(5, 5, 5, 0.3)),
    linear-gradient(to top, rgba(5, 5, 5, 0.9), rgba(5, 5, 5, 0.2) 30%);
}

.eyebrow {
  color: var(--gold);
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.6rem, 7vw, 5.6rem);
  line-height: 1.05;
  max-width: 16ch;
}

.hero-sub {
  margin-top: 32px;
  max-width: 52ch;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
}

.hero-cta {
  margin-top: 48px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  text-decoration: none;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.82rem;
  border: 1px solid var(--line);
  padding: 16px 28px;
  border-radius: 999px;
  transition: border-color 0.3s, color 0.3s;
}

.hero-cta:hover { border-color: var(--gold); color: var(--gold); }

.hero-cta .arrow { color: var(--gold); }

/* ---------- clients marquee ---------- */

.clients {
  padding: clamp(48px, 8vh, 80px) 0 8px;
  overflow: hidden;
}

.clients-label {
  text-align: center;
  color: var(--gold);
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 32px;
  padding: 0 20px;
}

.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: clamp(56px, 8vw, 110px);
  width: max-content;
  padding-right: clamp(56px, 8vw, 110px);
  animation: marquee 28s linear infinite;
}

.marquee:hover .marquee-track { animation-play-state: paused; }

.marquee-track img {
  height: 34px;
  width: auto;
  opacity: 0.85;
  transition: opacity 0.3s;
}

.marquee-track img:hover { opacity: 1; }

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- sections ---------- */

section { scroll-margin-top: 80px; }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 24px;
  padding: clamp(64px, 10vh, 120px) clamp(20px, 6vw, 80px) 40px;
}

.section-head h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 1;
}

.section-head p { color: var(--muted); font-size: 0.9rem; letter-spacing: 0.1em; }

/* ---------- work / reels ---------- */

.reel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2.5vw, 36px);
  padding: 0 clamp(20px, 6vw, 80px) 40px;
}

.reel-frame {
  position: relative;
  aspect-ratio: 9 / 16;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.reel-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.reel.has-video .reel-frame video { display: block; }

.reel-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(227, 184, 35, 0.08), transparent 60%),
    var(--panel);
}

.reel.has-video .reel-placeholder { display: none; }

.ph-num {
  font-family: var(--serif);
  font-size: 3.4rem;
  color: rgba(244, 241, 232, 0.25);
  line-height: 1;
}

.ph-note {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.reel-play {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(5, 5, 5, 0.25);
  border: none;
  cursor: pointer;
  transition: background 0.3s;
}

.reel.has-video .reel-play { display: flex; }

/* no dark overlay or icon while hovering (silent preview) or playing */
.reel:hover .reel-play,
.reel.playing .reel-play { background: transparent; }

.reel-play svg {
  width: 64px;
  height: 64px;
  fill: var(--black);
  background: var(--gold);
  border-radius: 50%;
  padding: 16px;
  transition: transform 0.25s, opacity 0.25s;
}

.reel:hover .reel-play svg,
.reel.playing .reel-play svg { opacity: 0; }

.reel figcaption { padding: 16px 4px 0; }

.reel figcaption h3 {
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.reel figcaption p { color: var(--muted); font-size: 0.85rem; margin-top: 2px; }

/* ---------- about ---------- */

.about { border-top: 1px solid var(--line); margin-top: 60px; }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  padding: 0 clamp(20px, 6vw, 80px) 40px;
}

.about-lead {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 500;
  line-height: 1.25;
}

.about-body p { color: var(--muted); margin-bottom: 18px; max-width: 56ch; }

.about-grid { padding-bottom: 80px; }

/* ---------- contact ---------- */

.contact {
  border-top: 1px solid var(--line);
  padding: clamp(80px, 14vh, 160px) clamp(20px, 6vw, 80px);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 1.1;
  max-width: 18ch;
}

.contact-form {
  margin-top: 56px;
  width: 100%;
  max-width: 640px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-form label span {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--white);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.95rem;
  padding: 14px 16px;
  outline: none;
  transition: border-color 0.25s;
  width: 100%;
}

.contact-form select { appearance: none; cursor: pointer; }

.contact-form select:invalid { color: var(--muted); }

.contact-form select option { background: var(--panel); color: var(--white); }

.contact-form textarea { resize: vertical; min-height: 120px; }

.contact-form input::placeholder,
.contact-form textarea::placeholder { color: rgba(154, 149, 138, 0.6); }

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus { border-color: var(--gold); }

.form-send {
  margin-top: 6px;
  align-self: flex-start;
  background: var(--gold);
  color: var(--black);
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 15px 36px;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
}

.form-send:hover { background: transparent; color: var(--gold); }

.form-status { color: var(--gold); font-size: 0.95rem; }

@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; }
}

.contact-meta {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 32px;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.contact-meta a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: border-color 0.25s;
}

.contact-meta a svg {
  width: 20px;
  height: 20px;
  fill: var(--white);
  transition: fill 0.25s;
}

.contact-meta a:hover { border-color: var(--gold); }

.contact-meta a:hover svg { fill: var(--gold); }

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding: 32px clamp(20px, 6vw, 80px);
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
}

/* ---------- reveal animation ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; gap: 8px; }
}

/* phones: stack the reels */
@media (max-width: 700px) {
  .reel-grid { grid-template-columns: 1fr; max-width: 440px; margin: 0 auto; }
}

/* small phones: tighter nav so nothing wraps or collides */
@media (max-width: 480px) {
  .nav { padding: 16px 20px; }
  .nav-brand { letter-spacing: 0.18em; font-size: 0.76rem; }
  .nav-links a { margin-left: 14px; font-size: 0.76rem; letter-spacing: 0.1em; }
}

@media (max-width: 380px) {
  .nav { padding: 14px 16px; }
  .nav-brand { letter-spacing: 0.12em; font-size: 0.72rem; }
  .nav-links a { margin-left: 11px; font-size: 0.72rem; letter-spacing: 0.06em; }
}
