/* ---------- 1. DESIGN TOKENS ---------- */
:root {
  /* Colors */
  --bg:            #0A0A0A;
  --bg-elev:       #121212;
  --card:          #161616;
  --card-2:        #1C1C1C;
  --border:        rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  --accent:        #F26B1F;   /* brand orange */
  --accent-2:      #FF8A3D;
  --accent-soft:   rgba(242, 107, 31, 0.12);

  --text:          #FFFFFF;
  --text-muted:    #9A9A9A;
  --text-dim:      #6B6B6B;

  /* Typography */
  --font-head: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;

  /* Spacing scale */
  --sp-1: 0.5rem;
  --sp-2: 1rem;
  --sp-3: 1.5rem;
  --sp-4: 2rem;
  --sp-5: 3rem;
  --sp-6: 4rem;
  --sp-7: 6rem;
  --sp-8: 8rem;

  /* Radii */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;
  --r-pill: 999px;

  /* Layout */
  --container: 1200px;
  --container-wide: 1320px;

  /* Effects */
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --transition: 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- 2. RESET & BASE ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  overflow-x: hidden;       /* guard: no element may push the page sideways */
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Lenis smooth scroll */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* The [hidden] attribute must beat layout displays (grid/flex) set below,
   otherwise JS-toggled tab panels (.split, .step-detail) never hide. */
[hidden] { display: none !important; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }

::selection { background: var(--accent); color: #fff; }

/* Custom scrollbar (WebKit) */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ---------- 3. TYPOGRAPHY ---------- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); font-weight: 500; }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
h4 { font-size: 1.2rem; }

p  { color: var(--text-muted); }

.eyebrow {
  color: var(--accent);
  font-family: var(--font-head);   /* Inter */
  font-weight: 400;
  font-size: 32px;
  letter-spacing: -0.05em;         /* -5% */
  margin-bottom: var(--sp-2);
  display: inline-block;
}
/* Scale the kicker down on small screens, in step with the section titles
   below it. .about-sub is the home About section's kicker — same role. */
@media (max-width: 768px) {
  .eyebrow { font-size: 24px; }
}

.text-accent { color: var(--accent); }
.text-white  { color: var(--text); }
.muted       { color: var(--text-muted); }
.lead        { font-size: 1.1rem; color: var(--text-muted); max-width: 60ch; }

/* ---------- 4. LAYOUT UTILITIES ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--sp-3);
}
.container-wide { max-width: var(--container-wide); }

.section { padding-block: clamp(3.5rem, 8vw, 7rem); }
.section-sm { padding-block: clamp(2.5rem, 5vw, 4rem); }

.section-head { max-width: 720px; margin-bottom: var(--sp-5); }
.section-head.center { margin-inline: auto; text-align: center; }

/* Section titles */
.section-head h2,
#works h2,
.ai-banner h2,
.founder .text-side h2 {
  font-weight: 200;
  font-size: 48px;          /* desktop */
  letter-spacing: -0.05em;  /* -5% */
}
@media (max-width: 768px) {
  .section-head h2,
  #works h2,
  .ai-banner h2,
  .founder .text-side h2 { font-size: 34px; }   /* scale down on smaller screens */
}

.grid { display: grid; gap: var(--sp-3); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }

.center { text-align: center; }
.mt-3 { margin-top: var(--sp-3); }
.mt-4 { margin-top: var(--sp-4); }
.mb-3 { margin-bottom: var(--sp-3); }

/* Placeholder media (until real assets are dropped in) */
.media {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background:
    linear-gradient(135deg, #1e1e1e 0%, #141414 100%);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--text-dim);
  font-family: var(--font-head);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  min-height: 220px;
}
.media[data-ratio="16-9"] { aspect-ratio: 16 / 9; }
.media[data-ratio="4-3"]  { aspect-ratio: 4 / 3; }
.media[data-ratio="1-1"]  { aspect-ratio: 1 / 1; }
.media[data-ratio="3-4"]  { aspect-ratio: 3 / 4; }
.media img { width: 100%; height: 100%; object-fit: cover; }

.work-card .media {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--border);
  cursor: pointer;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* when playing, use flex to center the iframe without aspect ratio cropping */
.work-card.playing .media {
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: none;
}
.work-card .media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.12), rgba(0,0,0,0.55));
  pointer-events: none;
}
.work-card .media.playing::after {
  background: rgba(0,0,0,0.25);
}
.work-card-title {
  position: absolute;
  z-index: 1;
  left: 1.25rem;
  right: 1.25rem;
  color: #fff;
  font-size: 1.1rem;
  text-align: left;
  line-height: 1.2;
  text-shadow: 0 1px 15px rgba(0,0,0,0.45);
}
.work-card .play-btn {
  position: absolute;
  z-index: 1;
  inset: auto 1.25rem 1.25rem auto;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  display: grid;
  place-items: center;
}
.work-card .play-btn:hover {
  background: var(--accent);
}
.work-card .media-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 1;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.45);
  background: rgba(0,0,0,0.55);
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.work-card.playing .media-close {
  display: grid;
}
.work-card-title { display: none; }
.work-card .media iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
  background: #000;
}
.play-center {
  position: absolute;
  z-index: 2;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.12);
  display: grid;
  place-items: center;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  transition: transform 160ms ease, background 160ms ease;
}
.play-center:hover { transform: translate(-50%, -50%) scale(1.06); background: rgba(0,0,0,0.65); }
.play-center svg, .play-center i { width: 28px; height: 28px; color: var(--accent); }


.work-title-small { font-size: 1.25rem; margin: 1rem 0 0 0; }

.grid.grid-2 { gap: 2.5rem; }

.work-card .media { background-position: center center; background-size: cover; border: 1px solid rgba(255,255,255,0.15); }

.portfolio-modal,
.portfolio-modal.active,
.portfolio-modal .modal-content,
.portfolio-modal iframe,
.portfolio-modal .modal-close {
  display: none !important;
}

/* hide the centered play button while the card is playing */
.work-card.playing .play-center { display: none; }

/* make sure the iframe sits above the thumbnail and controls */
.work-card .media iframe { z-index: 3; }

/* ---------- 5. BUTTONS & UI ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  /* tight right padding so the round icon badge hugs the edge */
  padding: 0.4rem 0.45rem 0.4rem 1.5rem;
  border-radius: var(--r-pill);
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 0.95rem;
  transition: transform var(--transition), background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
}

/* Arrow icon rendered as a contrasting circular badge on the right */
.btn svg {
  width: 36px; height: 36px;
  padding: 9px;
  border-radius: 50%;
  flex: none;
  background: #fff;
  color: #0a0a0a;
  transform: rotate(-45deg);     /* arrow points up-right (↗) by default */
  transition: transform 0.4s var(--ease-out), background var(--transition), color var(--transition);
}
.btn:hover svg { transform: rotate(0deg); }   /* straightens to point right (→) on hover */

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary svg { background: #fff; color: var(--accent); }
.btn-primary:hover { background: var(--accent-2); }

.btn-light { background: #fff; color: #0a0a0a; }
.btn-light svg { background: #0a0a0a; color: #fff; }
.btn-light:hover { background: #e9e9e9; }

.btn-ghost { border: 1px solid var(--border-strong); color: #fff; }
.btn-ghost svg { background: #fff; color: #0a0a0a; }
.btn-ghost:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Buttons with no arrow icon keep symmetric padding (e.g. header "Let's Talk") */
.btn:not(:has(svg)):not(:has(i[data-lucide])) { padding: 0.7rem 1.5rem; }

/* Header "Let's Talk": orange by default, white on hover */
.nav-actions .btn-ghost {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.nav-actions .btn-ghost:hover {
  background: #161616;
  border-color: #ffffff14;
  color: #fff;
}
/* Header call button: equal padding, plain solid white phone icon (no badge) */
.nav-actions .btn-call {
  padding: 0.6rem 1.5rem;
  gap: 0.55rem;
}
.nav-actions .btn-call svg {
  width: 18px; height: 18px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  transform: none;
  fill: #fff;
}
.nav-actions .btn-call:hover svg { fill: #fff; }   /* keep icon white on hover */

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.1rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-strong);
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  background: transparent;
}
.chip:hover { border-color: var(--accent); color: #fff; }
.chip.active { background: #fff; color: #0a0a0a; border-color: #fff; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
}
.card:hover { transform: translateY(-6px); border-color: var(--border-strong); }

.icon-badge {
  width: 54px; height: 54px;
  border-radius: var(--r-md);
  display: grid; place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: var(--sp-3);
}
.icon-badge svg { width: 26px; height: 26px; }

/* Divider */
.divider { height: 1px; background: var(--border); border: 0; }

/* ---------- 6. HEADER / NAV ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background var(--transition), backdrop-filter var(--transition), border-color var(--transition);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-head); }
.brand-logo { height: 52px; width: auto; display: block; }

.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a {
  font-size: 0.95rem;
  color: var(--text-muted);
  position: relative;
  transition: color var(--transition);
  padding: 0.25rem 0;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}
.nav-links a:hover,
.nav-links a.active { color: #fff; }
.nav-links a.active::after { width: 100%; }

.nav-actions { display: flex; align-items: center; gap: 1rem; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-strong);
  place-items: center;
}
.nav-toggle svg { width: 22px; height: 22px; }

/* Clickable call button — hidden on desktop, shown on mobile/tablet only */
.nav-call {
  display: none;
  align-items: center;
  gap: 0.5rem;
  height: 44px;
  padding: 0 1rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-strong);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 0.95rem;
  white-space: nowrap;
  transition: all var(--transition);
}
.nav-call svg { width: 20px; height: 20px; fill: var(--accent); flex: none; }
.nav-call:hover { background: var(--accent); border-color: var(--accent); }
.nav-call:hover svg { fill: #fff; }

/* Call link inside the mobile drawer */
.drawer-call {
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.drawer-call svg { width: 18px; height: 18px; }

/* Mobile drawer */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(10, 10, 10, 0.98);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.4rem;
  transform: translateY(-100%);
  transition: transform 0.5s var(--ease-out);
  visibility: hidden;
}
.mobile-drawer.open { transform: translateY(0); visibility: visible; }
.mobile-drawer a { font-family: var(--font-head); font-size: 1.25rem; color: var(--text-muted); }
.mobile-drawer a:hover { color: var(--accent); }
.mobile-drawer .btn { margin-top: 1rem; font-size: 0.9rem; padding: 0.7rem 1.8rem; }
.mobile-drawer .btn-primary { color: #fff; }      /* keep button text white, not muted */
.mobile-drawer .btn-primary:hover { color: #fff; }
.drawer-brand { position: absolute; top: 20px; left: 24px; }
.drawer-brand img { height: 48px; width: auto; display: block; }
.drawer-close {
  position: absolute; top: 24px; right: 24px;
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 1px solid var(--border-strong); border-radius: var(--r-sm);
}

/* ---------- 7. FOOTER ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: var(--sp-6) var(--sp-4);
  background: var(--bg);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--sp-4);
}
.footer-about p { font-size: 0.85rem; line-height: 1.7; margin-top: var(--sp-2); max-width: 34ch; }
.footer-col h5 { font-family: var(--font-head); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); margin-bottom: var(--sp-2); }
.footer-col a, .footer-col p { display: block; font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0.6rem; transition: color var(--transition); }
.footer-col a:hover { color: var(--accent); }
.footer-socials { display: flex; gap: 0.8rem; margin-top: 0.4rem; }
.footer-socials a {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--border-strong);
  display: grid; place-items: center; color: var(--text-muted);
}
.footer-socials a:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.footer-socials svg { width: 18px; height: 18px; }
.footer-bottom { margin-top: var(--sp-5); padding-top: var(--sp-3); border-top: 1px solid var(--border); font-size: 0.82rem; color: var(--text-dim); }

/* ---- Back to top ---- */
.back-to-top {
  position: fixed; right: clamp(1rem, 3vw, 2rem); bottom: clamp(1rem, 3vw, 2rem);
  z-index: 90;
  width: 56px; height: 56px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: #fff;
  border: none; cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(16px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition), background var(--transition);
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--text); color: var(--bg); }
.back-to-top svg { width: 26px; height: 26px; }

.whatsapp-float {
  position: fixed;
  left: clamp(1rem, 3vw, 2rem);
  right: auto;
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 1000;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #25D366;
  color: #fff;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.25);
  transition: transform var(--transition), box-shadow var(--transition);
}
.whatsapp-float:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 36px rgba(0, 0, 0, 0.30);
}
.whatsapp-float svg,
.whatsapp-float i {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #fff;
}

@media (max-width: 768px) {
  .whatsapp-float {
    left: 1rem;
    right: auto;
    bottom: 1rem;
  }
}

/* ---------- 8. ANIMATION HELPERS ---------- */
/* Elements start hidden; GSAP/observer reveals them. JS adds .reveal-ready
   only when scripts run, so no-JS users still see content. */
.js [data-reveal] { opacity: 0; }
.js [data-reveal="up"]    { transform: translateY(40px); }
.js [data-reveal="left"]  { transform: translateX(-40px); }
.js [data-reveal="right"] { transform: translateX(40px); }
.js [data-reveal="scale"] { transform: scale(0.94); }

/* Reduced motion: show everything, no transforms */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------- 9. RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-5) var(--sp-4); }
  .footer-about { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-actions .btn { display: none; }
  .nav-call { display: inline-flex; }
  .nav-toggle { display: grid; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--sp-5); }
  .footer-about { grid-column: auto; }
  .footer-col { min-width: 0; }
  .footer-bottom { text-align: center; }
  .section-head { margin-bottom: var(--sp-4); }
}
