/* ============================================================
   Adam Chew — Photographer & Videographer · Penang
   Cinematic dark portfolio. No build step. No JS deps.
   ============================================================ */

:root {
  --bg: #0a0a0a;
  --surface: #141414;
  --surface-2: #1c1c1c;
  --line: #262626;
  --text: #f5f5f5;
  --muted: #9a9a9a;
  --accent: #c9a96e;
  --accent-2: #e6c896;

  --serif: "Playfair Display", "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --maxw: 1280px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section-y: clamp(4rem, 10vw, 8rem);

  --ease: cubic-bezier(.2,.7,.2,1);
}

*,*::before,*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,*::before,*::after { animation-duration:.001ms!important; transition-duration:.001ms!important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

h1,h2,h3,h4 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -.01em;
  line-height: 1.1;
  margin: 0 0 .5em;
}

p { margin: 0 0 1em; }

.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .72rem;
  color: var(--accent);
  margin: 0 0 1.25rem;
}

/* ─────────────────────────  NAV  ───────────────────────── */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 80;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem var(--gutter);
  background: linear-gradient(to bottom, rgba(0,0,0,.55), rgba(0,0,0,0));
  backdrop-filter: blur(0px);
  transition: background .35s var(--ease), backdrop-filter .35s var(--ease), padding .35s var(--ease);
}
.nav.is-scrolled {
  background: rgba(10,10,10,.85);
  backdrop-filter: blur(14px);
  padding: .65rem var(--gutter);
  border-bottom: 1px solid var(--line);
}

.nav__brand { display: flex; flex-direction: column; line-height: 1; }
.nav__brand-name {
  font-family: var(--serif);
  font-size: 1.15rem;
  letter-spacing: .04em;
}
.nav__brand-tag {
  font-size: .65rem;
  letter-spacing: .25em;
  color: var(--accent);
  text-transform: uppercase;
  margin-top: .35rem;
}

.nav__links {
  display: flex; gap: 2.25rem; align-items: center;
  font-size: .88rem; letter-spacing: .04em;
}
.nav__links a { position: relative; color: var(--muted); transition: color .25s var(--ease); }
.nav__links a:hover { color: var(--text); }
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px;
  height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
.nav__links a:hover::after { transform: scaleX(1); }

.nav__cta {
  border: 1px solid var(--line);
  padding: .55rem 1rem;
  border-radius: 999px;
  color: var(--text)!important;
}
.nav__cta:hover { background: var(--accent); color: #111!important; border-color: var(--accent); }
.nav__cta::after { display: none; }

.nav__toggle {
  display: none;
  background: transparent; border: 0; cursor: pointer; padding: .5rem;
  width: 44px; height: 44px;
}
.nav__toggle span {
  display: block; height: 1px; width: 22px; background: var(--text);
  margin: 5px auto; transition: transform .35s var(--ease), opacity .35s var(--ease);
}
.nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
.nav.is-open .nav__toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 768px) {
  .nav__toggle { display: block; }
  .nav__links {
    /* Pinned to viewport (avoid backdrop-filter containing-block trap on .nav). */
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh; height: 100dvh;
    padding: 6rem var(--gutter) var(--gutter);
    background: rgba(10,10,10,.97); backdrop-filter: blur(18px);
    flex-direction: column; gap: 1.5rem; align-items: flex-start;
    font-size: 1.4rem; font-family: var(--serif);
    transform: translateY(-100%); transition: transform .45s var(--ease);
  }
  .nav.is-open .nav__links { transform: translateY(0); }
  .nav__cta { padding: .8rem 1.25rem; font-size: 1rem; }
}

/* ─────────────────────────  BUTTONS  ───────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .95rem 1.6rem;
  font-family: var(--sans); font-weight: 500; letter-spacing: .03em;
  font-size: .92rem;
  border: 1px solid transparent; border-radius: 2px;
  cursor: pointer;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.btn--primary { background: var(--accent); color: #111; }
.btn--primary:hover { background: var(--accent-2); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ─────────────────────────  HERO  ───────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center;
  padding: 0 var(--gutter);
  overflow: hidden;
}

.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__video {
  position: absolute; top: 50%; left: 50%;
  width: max(177.78vh, 100vw);
  height: max(56.25vw, 100vh);
  transform: translate(-50%, -50%);
  border: 0; pointer-events: none;
  filter: brightness(.55) saturate(.85);
}
.hero__veil {
  position: absolute; inset: 0;
  background:
    radial-gradient(80% 60% at 30% 30%, rgba(0,0,0,.0) 0%, rgba(0,0,0,.55) 60%, rgba(10,10,10,.95) 100%),
    linear-gradient(180deg, rgba(10,10,10,.4), rgba(10,10,10,.85));
}
.hero__grain {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .35 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: .35; mix-blend-mode: overlay; pointer-events: none;
}

.hero__content {
  position: relative; z-index: 2;
  max-width: 920px;
  padding-block: 8rem 6rem;
}
.hero__title {
  font-size: clamp(2.6rem, 7vw, 6rem);
  letter-spacing: -.02em;
  margin-bottom: 1.25rem;
}
.hero__title em {
  font-style: italic; color: var(--accent);
}
.hero__lede {
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  color: var(--muted);
  max-width: 56ch;
  margin-bottom: 2.25rem;
}
.hero__cta { display: flex; gap: .75rem; flex-wrap: wrap; }

.hero__scroll {
  position: absolute; left: 50%; bottom: 2rem; transform: translateX(-50%);
  z-index: 2; width: 22px; height: 38px;
  border: 1px solid var(--muted); border-radius: 999px;
  display: grid; place-items: center;
  opacity: .7; transition: opacity .25s var(--ease);
}
.hero__scroll:hover { opacity: 1; }
.hero__scroll span {
  width: 2px; height: 8px; background: var(--text); border-radius: 2px;
  animation: scrollPulse 1.6s var(--ease) infinite;
}
@keyframes scrollPulse { 0%{transform:translateY(-6px);opacity:0;} 50%{opacity:1;} 100%{transform:translateY(6px);opacity:0;} }

/* ─────────────────────────  SECTION COMMON  ───────────────────────── */
section { padding: var(--section-y) var(--gutter); max-width: var(--maxw); margin-inline: auto; }

.section__head { max-width: 64ch; margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.section__head h2 {
  font-size: clamp(2rem, 4.4vw, 3.4rem);
}
.section__lede { color: var(--muted); font-size: 1.05rem; max-width: 52ch; }

/* Reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-in { opacity: 1; transform: translateY(0); }

/* ─────────────────────────  ABOUT  ───────────────────────── */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.about__portrait {
  margin: 0; position: relative;
}
.about__portrait img {
  width: 100%; aspect-ratio: 4/5; object-fit: cover;
  /* Soft vignette so the photo's black background blends into the page bg
     instead of showing a hard rectangle. */
  -webkit-mask-image: radial-gradient(ellipse 80% 90% at 50% 45%, #000 55%, rgba(0,0,0,.6) 80%, transparent 100%);
          mask-image: radial-gradient(ellipse 80% 90% at 50% 45%, #000 55%, rgba(0,0,0,.6) 80%, transparent 100%);
}
.about__portrait figcaption {
  position: absolute; left: 0; bottom: -2rem;
  font-size: .72rem; letter-spacing: .25em; text-transform: uppercase; color: var(--muted);
}
.about__copy h2 { font-size: clamp(2rem, 3.8vw, 3rem); }

.stats {
  list-style: none; padding: 0; margin: 2.5rem 0 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
}
.stats li { display: flex; flex-direction: column; align-items: flex-start; }
.stats__num {
  font-family: var(--serif); font-size: clamp(2rem, 3.4vw, 2.8rem);
  color: var(--text); line-height: 1; font-weight: 500;
}
.stats__plus, .stats__suffix {
  display: inline-block; color: var(--accent);
  font-family: var(--serif); font-size: 1.1rem; vertical-align: top;
  margin-top: -.25rem; margin-left: 2px;
}
.stats__suffix { font-size: 1rem; }
.stats__label { color: var(--muted); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; margin-top: .35rem; }

@media (max-width: 800px) {
  .about__grid { grid-template-columns: 1fr; }
  .about__portrait { max-width: 380px; }
}

/* ─────────────────────────  SERVICES  ───────────────────────── */
.lane {
  display: flex; align-items: center; gap: 1rem;
  margin: 2.5rem 0 1.25rem;
}
.lane:first-of-type { margin-top: 0; }
.lane__label {
  margin: 0;
  font-size: .72rem; letter-spacing: .25em; text-transform: uppercase;
  color: var(--text);
  display: flex; align-items: center; gap: .9rem; flex-wrap: wrap;
}
.lane__by {
  color: var(--muted);
  letter-spacing: .15em;
  text-transform: none;
  font-size: .82rem;
  font-style: italic;
  font-family: var(--serif);
}
.lane::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}
.lane--alt .lane__label { color: var(--accent); }

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
@media (max-width: 900px) {
  .services__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .services__grid { grid-template-columns: 1fr; }
}
.card {
  background: var(--bg);
  padding: clamp(1.5rem, 3vw, 2.4rem);
  transition: background .4s var(--ease);
}
.card:hover { background: var(--surface); }
.card__icon {
  width: 44px; height: 44px;
  color: var(--accent);
  margin-bottom: 1.5rem;
}
.card__icon svg { width: 100%; height: 100%; }
.card h3 { font-size: 1.45rem; }
.card p { color: var(--muted); font-size: .94rem; }
.card__list { list-style: none; padding: 0; margin: 1.25rem 0 0; }
.card__list li {
  font-size: .82rem; letter-spacing: .04em; color: var(--muted);
  padding: .6rem 0; border-top: 1px solid var(--line);
  position: relative; padding-left: 1.25rem;
}
.card__list li::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 6px; height: 1px; background: var(--accent);
}

/* ─────────────────────────  WORK / GRID  ───────────────────────── */
.filters {
  display: flex; flex-wrap: wrap; gap: .5rem;
  margin-bottom: 2rem;
}
.filter {
  background: transparent; color: var(--muted);
  border: 1px solid var(--line);
  padding: .55rem 1.1rem; border-radius: 999px;
  font-size: .82rem; letter-spacing: .04em;
  cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.filter:hover { color: var(--text); border-color: var(--text); }
.filter.is-active { background: var(--accent); color: #111; border-color: var(--accent); }

.grid {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 14px;
  grid-template-columns: repeat(12, 1fr);
}
.tile {
  position: relative; overflow: hidden;
  cursor: pointer;
  background: var(--surface);
  aspect-ratio: 16/10;
  grid-column: span 4;
  transition: opacity .4s var(--ease), transform .5s var(--ease);
}
.tile:nth-child(7n+1) { grid-column: span 6; aspect-ratio: 16/9; }
.tile:nth-child(7n+4) { grid-column: span 6; aspect-ratio: 16/9; }

.tile img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(.5) brightness(.75);
  transition: filter .55s var(--ease), transform .8s var(--ease);
}
.tile:hover img { filter: grayscale(0) brightness(.9); transform: scale(1.04); }

.tile__meta {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1.1rem 1.25rem;
  background: linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,0));
  display: flex; flex-direction: column; gap: .35rem;
}
.tile__cat {
  display: inline-block;
  font-size: .68rem; letter-spacing: .25em; text-transform: uppercase;
  color: var(--accent);
}
.tile__meta h4 {
  font-size: 1.1rem; margin: 0;
  font-family: var(--serif);
}

.tile::after {
  content: "▶"; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%) scale(.8);
  width: 56px; height: 56px; display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.5); border-radius: 50%;
  color: #fff; font-size: 1rem; padding-left: 4px;
  opacity: 0; transition: opacity .3s var(--ease), transform .4s var(--ease);
  pointer-events: none;
  background: rgba(0,0,0,.3); backdrop-filter: blur(4px);
}
.tile:hover::after { opacity: 1; transform: translate(-50%,-50%) scale(1); }

.tile.is-hidden { display: none; }

.tile__badge {
  position: absolute; top: .9rem; right: .9rem;
  padding: .35rem .65rem;
  font-size: .62rem; letter-spacing: .22em; text-transform: uppercase;
  color: #111;
  background: var(--accent);
  border-radius: 2px;
  z-index: 2;
}
.tile--social img { filter: grayscale(0.1) brightness(.85); }

@media (max-width: 1024px) {
  .tile, .tile:nth-child(7n+1), .tile:nth-child(7n+4) { grid-column: span 6; aspect-ratio: 16/10; }
}
@media (max-width: 600px) {
  .tile, .tile:nth-child(7n+1), .tile:nth-child(7n+4) { grid-column: span 12; aspect-ratio: 16/10; }
}

.work__more { text-align: center; margin-top: 3rem; }

/* ─────────────────────────  SHOWREEL  ───────────────────────── */
.showreel__grid {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.reel { margin: 0; }
.reel__embed {
  position: relative; aspect-ratio: 16/9;
  background: var(--surface); overflow: hidden;
}
.reel__embed iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.reel figcaption {
  margin-top: .9rem;
  display: flex; flex-direction: column; gap: .15rem;
}
.reel figcaption strong { font-family: var(--serif); font-weight: 500; font-size: 1.05rem; }
.reel figcaption span { color: var(--muted); font-size: .82rem; letter-spacing: .04em; }

/* ─────────────────────────  TESTIMONIALS  ───────────────────────── */
.voices { text-align: center; }
.voices__track {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  gap: 0;
}
.voices__track::-webkit-scrollbar { display: none; }

.voice {
  scroll-snap-align: center;
  padding: clamp(1.5rem, 4vw, 3rem);
  display: flex; flex-direction: column; justify-content: center;
  gap: 1.5rem; min-height: 220px;
}
.voice p {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.25rem, 2.6vw, 1.9rem);
  line-height: 1.4; max-width: 56ch; margin: 0 auto;
  color: var(--text);
}
.voice footer { color: var(--muted); font-size: .9rem; letter-spacing: .04em; }
.voice footer span { color: var(--accent); }

.voices__dots {
  display: flex; justify-content: center; gap: .5rem;
  margin-top: 1.5rem;
}
.voices__dots button {
  width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%;
  background: var(--line); cursor: pointer;
  transition: background .25s var(--ease), width .25s var(--ease);
}
.voices__dots button.is-active { background: var(--accent); width: 22px; border-radius: 4px; }

/* ─────────────────────────  CONTACT  ───────────────────────── */
.contact__grid {
  display: grid; grid-template-columns: 1.4fr 1fr;
  gap: clamp(2rem, 6vw, 4rem); align-items: start;
}
@media (max-width: 800px) { .contact__grid { grid-template-columns: 1fr; } }

.contact__form { display: grid; gap: 1.1rem; }
.contact__form label { display: flex; flex-direction: column; gap: .4rem; }
.contact__form span {
  font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
}
.contact__form input,
.contact__form select,
.contact__form textarea {
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line);
  padding: .9rem 1rem;
  font-family: inherit; font-size: 1rem;
  border-radius: 2px;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.contact__form input:focus,
.contact__form select:focus,
.contact__form textarea:focus { border-color: var(--accent); background: var(--surface-2); }
.contact__form textarea { resize: vertical; min-height: 120px; }
.contact__form .btn { justify-self: start; }

.contact__direct { padding: 2rem; background: var(--surface); border: 1px solid var(--line); }
.contact__direct h3 { font-size: 1.25rem; margin-bottom: 1.5rem; }
.contact__list { list-style: none; padding: 0; margin: 0 0 2rem; display: grid; gap: 1.1rem; }
.contact__list li { display: flex; flex-direction: column; gap: .2rem; }
.contact__label {
  font-size: .68rem; letter-spacing: .25em; text-transform: uppercase; color: var(--muted);
}
.contact__list a:hover { color: var(--accent); }

.socials { display: flex; gap: .75rem; }
.socials a {
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border: 1px solid var(--line); border-radius: 50%;
  color: var(--muted);
  transition: color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.socials a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.socials svg { width: 18px; height: 18px; }

/* ─────────────────────────  FOOTER  ───────────────────────── */
.foot {
  border-top: 1px solid var(--line);
  padding: 2rem var(--gutter);
}
.foot__row {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  font-size: .82rem; color: var(--muted); letter-spacing: .04em;
  flex-wrap: wrap;
}
.foot__top:hover { color: var(--accent); }
.foot__row a { color: var(--text); border-bottom: 1px dotted var(--line); }
.foot__row a:hover { color: var(--accent); border-color: var(--accent); }

/* ─────────────────────────  LIGHTBOX  ───────────────────────── */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.92);
  display: grid; place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
  animation: fadeIn .25s var(--ease);
}
.lightbox[hidden] { display: none; }
.lightbox__frame {
  width: min(1100px, 92vw);
  aspect-ratio: 16/9;
  position: relative; background: #000;
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
.lightbox__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lightbox__close {
  position: absolute; top: 1rem; right: 1rem;
  background: transparent; border: 1px solid rgba(255,255,255,.4);
  color: #fff; width: 44px; height: 44px; border-radius: 50%;
  font-size: 1.5rem; line-height: 1; cursor: pointer;
  transition: background .25s var(--ease), border-color .25s var(--ease);
}
.lightbox__close:hover { background: var(--accent); color: #111; border-color: var(--accent); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
