/* ===== FAYN Solutions — design tokens ===== */
:root {
  --bg: #f4f3f1;
  --bg-white: #ffffff;
  --ink: #111114;
  --ink-soft: #555558;
  --ink-mute: #8a8a8e;
  --line: #e4e2de;
  --dark: #0e0e12;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --maxw: 1280px;
  --pad: 48px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg-white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }

.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-style: italic;
  color: var(--ink);
  margin: 0 0 22px;
}
.eyebrow.strong { font-style: normal; font-weight: 800; letter-spacing: 0.08em; }
.eyebrow.italic { font-style: italic; }

/* ===== Header ===== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding: 22px 0;
  transition: background-color 0.4s ease, padding 0.4s ease, box-shadow 0.4s ease;
}
.site-header.scrolled {
  background: rgba(12, 12, 16, 0.82);
  backdrop-filter: saturate(140%) blur(12px);
  padding: 14px 0;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; }
.brand-logo { height: 30px; width: auto; }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a, .nav-more {
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: var(--sans);
  opacity: 0.92;
  transition: opacity 0.2s ease;
}
.nav a:hover, .nav-more:hover { opacity: 1; }
.btn-pill {
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  padding: 9px 20px !important;
  font-size: 12px !important;
  letter-spacing: 0.08em;
  font-weight: 600;
  transition: background-color 0.25s ease, color 0.25s ease;
}
.btn-pill:hover { background: #fff; color: var(--ink); }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: url("assets/frames/f001.jpg") center center / cover no-repeat;
  will-change: transform;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  /* Stronger scrim so the headline stays legible over real (bright) footage. */
  background:
    radial-gradient(60% 55% at 50% 50%, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 75%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.4) 45%, rgba(0, 0, 0, 0.62) 100%);
}
.hero-content { position: relative; z-index: 2; padding: 0 24px; color: #fff; }

/* Two hero stages: A while the intro video plays, B after it ends. */
.hero-stage {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 100%;
  max-width: 820px;
  padding: 0 24px;
  color: #fff;
  transform: translate(-50%, calc(-50% + 22px));
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.hero-stage.is-on {
  opacity: 1;
  transform: translate(-50%, -50%);
  pointer-events: auto;
}
.hero-cta {
  display: inline-block;
  margin-top: 28px;
  padding: 13px 28px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  transition: background-color 0.25s ease, color 0.25s ease;
}
.hero-cta:hover { background: #fff; color: var(--ink); }

/* ----- Hero story carousel ----- */
.hero-slides { position: absolute; inset: 0; }
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  background-size: cover;
  background-position: center;
  pointer-events: none;
}
.hero-slide.is-active { opacity: 1; pointer-events: auto; }
.hero-slide .hero-stage { transition: opacity 0.7s ease 0.15s, transform 0.8s cubic-bezier(0.22,1,0.36,1) 0.15s; }
.hero-slide.is-active .hero-stage { opacity: 1; transform: translate(-50%, -50%); pointer-events: auto; }
.hero-cta { pointer-events: auto; cursor: pointer; }
.hero-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 34px;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}
.hero-bars { display: flex; gap: 8px; }
.hero-bar {
  position: relative;
  width: 54px;
  height: 3px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.35);
  overflow: hidden;
  cursor: pointer;
}
.hero-bar .fill {
  position: absolute;
  inset: 0;
  width: 0%;
  background: #fff;
}
.hero-pause {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  color: #111;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.hero-eyebrow {
  font-size: 14px;
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0.22em;
  margin: 0 0 22px;
}
.hero-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 4vw, 52px);
  line-height: 1.18;
  letter-spacing: 0.01em;
  max-width: 760px;
  margin: 0 auto;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.35);
}
.hero-cue {
  position: absolute;
  bottom: 38px;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.9);
}
.cue-dashes {
  position: absolute;
  left: var(--pad);
  width: 90px;
  height: 1px;
  background:
    repeating-linear-gradient(90deg, #fff 0 16px, transparent 16px 26px);
  opacity: 0.85;
}
.cue-chevron { font-size: 30px; line-height: 1; animation: bob 2s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(7px); } }

/* ===== Section base ===== */
.section { padding: 96px 0; background: var(--bg-white); }

/* ===== Trending ===== */
.trending-title {
  font-weight: 400;
  font-size: clamp(20px, 2.4vw, 30px);
  line-height: 1.35;
  margin: 0 0 44px;
  color: var(--ink);
  max-width: 720px;
}
.trend-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.trend-card {
  margin: 0;
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 1.4 / 1;
  background: #eee;
}
.trend-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.trend-card:hover img { transform: scale(1.06); }

/* ===== Category bar ===== */
.category-bar { background: var(--bg-white); padding-bottom: 8px; }
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.cat {
  height: 58px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  position: relative;
  overflow: hidden;
}
.cat span {
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  position: relative;
  z-index: 2;
}
.cat-1 { background: linear-gradient(110deg, #1f2c4d 0%, #28415f 55%, #2f5a63 100%); }
.cat-2 { background: linear-gradient(110deg, #3a2350 0%, #5a2f63 55%, #2f5560 100%); }
.cat-3 { background: linear-gradient(110deg, #1f4a45 0%, #2f6a5a 55%, #2c5a6f 100%); }
.cat-4 { background: linear-gradient(110deg, #20305f 0%, #2f3f7a 55%, #46357a 100%); }

/* ===== What We Do ===== */
.what-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 24px;
  margin-top: 28px;
}
.svc {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  min-height: 230px;
  display: block;
}
.svc-big { grid-row: span 2; }
.svc img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}
.svc::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,0.62) 100%);
}
.svc:hover img { transform: scale(1.07); }
.svc-label {
  position: absolute;
  left: 22px;
  bottom: 20px;
  z-index: 2;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  max-width: 80%;
  line-height: 1.25;
}

/* ===== Vision ===== */
.vision { border-top: 1px solid var(--line); }
.vision-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: start;
}
.vision-head {
  font-weight: 700;
  font-size: clamp(26px, 3.2vw, 40px);
  line-height: 1.18;
  margin: 0;
  letter-spacing: -0.01em;
}
.vision-body {
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.7;
  margin: 6px 0 0;
}

/* ===== Selected Works ===== */
.works-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; margin-top: 26px; }
.work-img { border-radius: 4px; overflow: hidden; aspect-ratio: 3 / 2; margin-bottom: 20px; background: #eee; }
.work-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.work:hover .work-img img { transform: scale(1.05); }
.work h3 { font-size: 18px; font-weight: 700; margin: 0 0 10px; letter-spacing: -0.01em; }
.work p { color: var(--ink-mute); font-size: 14px; line-height: 1.6; margin: 0; }

/* ===== Who We Are ===== */
.who { background: #fff; }
.who-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 56px;
  align-items: start;
}
.who-head {
  font-weight: 700;
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
}
.who-right { position: relative; padding-top: 6px; }
.who-arrow {
  position: absolute;
  top: -6px;
  right: 0;
  font-size: 34px;
  line-height: 1;
  color: var(--ink);
  transition: transform 0.3s ease;
}
.who-arrow:hover { transform: translate(4px, -4px); }
.who-body { font-size: 19px; line-height: 1.6; color: var(--ink); margin: 0; max-width: 460px; }

/* ===== Footer ===== */
.footer { background: #000; color: #fff; padding: 90px 0 36px; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.footer-logo { height: 30px; margin-bottom: 18px; }
.footer-brand p { color: rgba(255, 255, 255, 0.6); font-size: 14px; line-height: 1.6; max-width: 280px; margin: 0; }
.footer-col h4 { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.5); margin: 0 0 16px; font-weight: 600; }
.footer-col a { display: block; color: rgba(255, 255, 255, 0.85); font-size: 14px; margin-bottom: 12px; transition: color 0.2s ease; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 26px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 13px;
}

/* ===== Scroll-reveal (CSS-driven, JS only toggles .in) =====
   Elements only hide once the page is marked .anim-ready by JS, so if the
   script ever fails to load the content stays fully visible. */
.anim-ready [data-anim="up"],
.anim-ready [data-anim="stagger"] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-anim].in { opacity: 1 !important; transform: none !important; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  :root { --pad: 32px; }
  .what-grid { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .svc-big { grid-row: span 1; grid-column: span 2; min-height: 280px; }
  .vision-grid, .who-grid { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 720px) {
  :root { --pad: 20px; }
  .section { padding: 64px 0; }
  .nav { gap: 16px; }
  .nav a, .nav-more { display: none; }
  .btn-pill { display: inline-block; }
  .trend-grid { grid-template-columns: 1fr 1fr; }
  .cat-grid { grid-template-columns: 1fr 1fr; }
  .what-grid { grid-template-columns: 1fr; }
  .svc-big { grid-column: span 1; }
  .works-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 8px; }
  .cue-dashes { display: none; }
}

/* ===== Mobile nav (hamburger) ===== */
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  z-index: 70;
}
@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .nav {
    position: fixed;
    inset: 0;
    z-index: 60;
    background: rgba(10, 12, 20, 0.97);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 26px;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .nav.open { transform: none; }
  .nav a { display: block; font-size: 22px; opacity: 1; }
  .btn-pill { display: inline-block; font-size: 14px !important; padding: 12px 26px !important; }
  body.nav-open { overflow: hidden; }
}

/* ========================================================================
   ANIMATION ENHANCEMENTS
   ======================================================================== */

/* Card hover: zoom + lift + shadow */
.trend-card {
  transition: box-shadow 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0);
}
.trend-card:hover { transform: translateY(-6px); box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12); }
.trend-card:hover img { transform: scale(1.09); }

.work {
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0);
}
.work:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14); }
.work:hover .work-img img { transform: scale(1.08); }

.svc img { transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
.svc:hover img { transform: scale(1.1); }
.svc-label { transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1); }
.svc:hover .svc-label { transform: translateY(-8px); }
.svc::after { transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1); }
.svc:hover::after { opacity: 0.85; }

/* Hero: Ken Burns zoom on active slide background */
.hero-slide.is-active .hero-bg { animation: kenBurns 7000ms linear forwards; }
@keyframes kenBurns {
  0% { transform: scale(1) translateZ(0); }
  100% { transform: scale(1.08) translateZ(0); }
}

/* Hero: per-slide eyebrow + title entrance */
.hero-eyebrow {
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.1s,
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.1s;
}
.hero-slide.is-active .hero-eyebrow { opacity: 1; transform: translateY(0); }
.hero-title {
  opacity: 0; transform: translateY(12px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.2s,
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.2s;
}
.hero-slide.is-active .hero-title { opacity: 1; transform: translateY(0); }

/* Nav: animated underline + pill/CTA scale */
.nav a { position: relative; }
.nav a::after {
  content: ""; position: absolute; bottom: -2px; left: 0;
  width: 0; height: 1px; background: rgba(255, 255, 255, 0.8);
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav a:hover::after { width: 100%; }
.btn-pill {
  transition: background-color 0.25s ease, color 0.25s ease,
    transform 0.25s ease, border-color 0.25s ease;
}
.btn-pill:hover { transform: scale(1.06); border-color: rgba(255, 255, 255, 1); }
.hero-cta {
  transition: background-color 0.25s ease, color 0.25s ease,
    transform 0.25s ease, box-shadow 0.25s ease;
}
.hero-cta:hover { transform: scale(1.08); box-shadow: 0 12px 32px rgba(255, 255, 255, 0.15); }

/* Reveals: refined easing + directional variants */
.anim-ready [data-anim="up"],
.anim-ready [data-anim="stagger"] {
  transition: opacity 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.anim-ready [data-anim="from-left"] { opacity: 0; transform: translateX(-26px);
  transition: opacity 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.anim-ready [data-anim="from-right"] { opacity: 0; transform: translateX(26px);
  transition: opacity 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94); }

/* Hero progress-bar glow + pause feedback */
.hero-bar .fill { box-shadow: 0 0 8px rgba(255, 255, 255, 0.4), inset 0 0 4px rgba(255, 255, 255, 0.3); }
.hero-bar:hover { background: rgba(255, 255, 255, 0.5); }
.hero-pause { transition: background-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease; }
.hero-pause:hover { background: #f0f0f0; box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2); transform: scale(1.05); }
.hero-pause:active { transform: scale(0.98); }

/* Header logo shrink on scroll */
.brand-logo { transition: height 0.4s ease, opacity 0.4s ease; }
.site-header.scrolled .brand-logo { height: 24px; opacity: 0.9; }

/* Reduced-motion: keep everything visible, drop movement */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .anim-ready [data-anim] { transform: none !important; transition: opacity 0.15s linear !important; }
  [data-anim].in { opacity: 1 !important; transform: none !important; }
  .hero-slide.is-active .hero-bg { animation: none; }
  .hero-eyebrow, .hero-title { transition: none; opacity: 1; transform: none; }
  .trend-card:hover, .work:hover, .trend-card:hover img, .work:hover .work-img img,
  .svc:hover img, .svc:hover .svc-label,
  .btn-pill:hover, .hero-cta:hover, .hero-pause:hover, .hero-pause:active { transform: none; }
  #scroll-progress { display: none; }
}
