/* Sadeeq portfolio. One stylesheet for all pages. Mobile first. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("assets/fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 500 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("assets/fonts/figtree.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --green: #14532D;        /* headings, buttons, the numbers */
  --green-mid: #2E7D5B;    /* links, hover */
  --green-soft: #A8CFBB;   /* thin lines and tags */
  --green-wash: #F3F8F5;   /* image backdrops, hover fills (soft green at low strength) */
  --ink: #1F2A24;          /* text */
  --muted: #7A8A80;        /* large captions and quiet labels */
  --muted-text: #68776E;   /* small captions: same hue, darkened to pass 4.5:1 on white */
  --bg: #FFFFFF;

  --radius: 14px;
  --radius-sm: 10px;
  --max: 1100px;
  --gutter: 16px;
  --nav-h: 60px;

  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-body: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

@media (min-width: 768px) {
  :root { --gutter: 32px; --nav-h: 68px; }
}

/* Reset, kept small */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); }
body { margin: 0; }
h1, h2, h3, h4, p, figure, ol, ul, dl, dd, blockquote { margin: 0; }
ol, ul { padding: 0; list-style: none; }
img, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;  /* 17px */
  line-height: 1.6;
  font-feature-settings: "ss01" 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--green-soft); color: var(--green); }

:focus-visible {
  outline: 2px solid var(--green-mid);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute; left: 12px; top: -100px; z-index: 100;
  background: var(--green); color: #fff; padding: 10px 14px; border-radius: var(--radius-sm);
  text-decoration: none; font-weight: 600;
}
.skip:focus { top: 12px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Layout */
.wrap { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(56px, 9vw, 120px); }
.section + .section { border-top: 1px solid var(--green-soft); }
.section--tight { padding-block: clamp(40px, 6vw, 72px); }

/* Type */
h1, h2, h3, .display {
  font-family: var(--font-display);
  color: var(--green);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.08;
  text-wrap: balance;
}
h1 { font-size: clamp(2.375rem, 8.4vw, 4.75rem); letter-spacing: -0.035em; line-height: 1.02; }
h2 { font-size: clamp(1.75rem, 5.2vw, 2.75rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); letter-spacing: -0.015em; }
p { text-wrap: pretty; }

.eyebrow {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--green);
  letter-spacing: 0.01em;
  margin-bottom: 18px;
}
.lead {
  font-size: clamp(1.1875rem, 2.4vw, 1.375rem);
  line-height: 1.5;
  max-width: 38ch;
  margin-top: 20px;
}
.caption {
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--muted-text);
}
.label {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-text);
}

/* Links */
a { color: var(--green-mid); text-decoration: underline; text-decoration-color: var(--green-soft); text-decoration-thickness: 1px; text-underline-offset: 0.22em; transition: color .15s ease, text-decoration-color .15s ease; }
a:hover { color: var(--green); text-decoration-color: currentColor; text-decoration-thickness: 2px; }

.go {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; text-decoration: none; color: var(--green-mid);
  padding-block: 10px; /* taller tap target */
}
.go::after {
  content: "\2192"; /* right arrow */
  transition: transform .2s var(--ease);
}
.go:hover { color: var(--green); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.3em; }
.go:hover::after { transform: translateX(4px); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 22px;
  border-radius: var(--radius);
  font-family: var(--font-body); font-weight: 600; font-size: 1rem; line-height: 1.2;
  text-decoration: none; white-space: nowrap;
  border: 1.5px solid var(--green);
  background: var(--green); color: #fff;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.btn:hover { background: var(--green-mid); border-color: var(--green-mid); color: #fff; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn--ghost { background: transparent; color: var(--green); }
.btn--ghost:hover { background: var(--green-wash); color: var(--green); border-color: var(--green); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: saturate(1.6) blur(12px);
  backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.nav.is-scrolled { border-bottom-color: var(--green-soft); }
.nav__inner { display: flex; align-items: center; gap: 12px; height: var(--nav-h); }
.nav__name {
  font-family: var(--font-display); font-weight: 700; font-size: 1.0625rem; letter-spacing: -0.02em;
  color: var(--green); text-decoration: none; margin-right: auto; white-space: nowrap;
  padding-block: 10px;
}
.nav__name:hover { color: var(--green); text-decoration: none; }
.nav__links { display: flex; align-items: center; gap: 14px; }
.nav__links a {
  font-size: 0.875rem; font-weight: 500; color: var(--ink); text-decoration: none; white-space: nowrap;
  padding-block: 12px;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1.5px; background-repeat: no-repeat; background-position: 0 calc(100% - 9px);
  transition: color .15s ease, background-size .2s var(--ease);
}
.nav__links a:hover { color: var(--green-mid); background-size: 100% 1.5px; }
.nav__links a[aria-current="page"] { color: var(--green); font-weight: 600; background-size: 100% 1.5px; }
.nav__cta { min-height: 38px; padding: 8px 14px; font-size: 0.875rem; border-radius: var(--radius-sm); margin-left: 2px; }

@media (max-width: 374px) {
  .nav__inner { gap: 8px; }
  .nav__links { gap: 10px; }
  .nav__links a, .nav__cta { font-size: 0.8125rem; }
  .nav__cta { padding: 7px 10px; }
  .nav__name { font-size: 1rem; }
}
@media (min-width: 768px) {
  .nav__name { font-size: 1.1875rem; }
  .nav__links { gap: 28px; margin-right: 12px; }
  .nav__links a { font-size: 0.9375rem; }
  .nav__cta { font-size: 0.9375rem; padding: 9px 18px; }
}

/* Hero */
.hero { padding-block: clamp(56px, 12vw, 136px) clamp(48px, 8vw, 96px); }
.hero h1 { max-width: 16ch; }
.hero .btn-row { margin-top: 32px; }

/* Numbers: the visual feature of the site */
.num {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--green);
  letter-spacing: -0.045em;
  line-height: 0.95;
  font-variant-numeric: proportional-nums lining-nums;
  white-space: nowrap;
}
.num__pre { font-size: 0.4em; letter-spacing: -0.01em; font-weight: 600; margin-right: 0.18em; vertical-align: 0.12em; }

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px 20px;
}
.stat { border-top: 1px solid var(--green-soft); padding-top: 18px; contain: layout style; }
.stat .num { font-size: clamp(2.625rem, 11vw, 5.25rem); }
.stat__label { margin-top: 12px; font-size: 0.9375rem; line-height: 1.4; color: var(--ink); max-width: 22ch; }
@media (min-width: 720px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 56px 32px; }
  .stats--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stats--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat__label { font-size: 1rem; }
}
.stats--4 .num { font-size: clamp(2.625rem, 9vw, 4.5rem); }

/* Media frames */
.frame {
  display: block;
  border: 1px solid var(--green-soft);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--green-wash);
}
.frame img { width: 100%; }
figure > figcaption { margin-top: 12px; }

/* Skill blocks (home) */
.skills { display: grid; gap: 0; }
.skill { display: grid; gap: 28px; padding-block: clamp(48px, 8vw, 96px); }
.skill + .skill { border-top: 1px solid var(--green-soft); }
.skill:first-child { padding-top: 0; }
.skill:last-child { padding-bottom: 0; }
.skill__text p { margin-top: 14px; max-width: 42ch; }
.skill__link { margin-top: -14px; }
.skill__media--video { width: min(100%, 280px); }
@media (min-width: 860px) {
  .skill {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    grid-template-areas: ". media" "text media" "link media" ". media";
    grid-template-rows: 1fr auto auto 1fr;
    column-gap: 64px; row-gap: 0;
    align-items: start;
  }
  .skill__text { grid-area: text; }
  .skill__link { grid-area: link; margin-top: 10px; }
  .skill__media { grid-area: media; align-self: center; }
  .skill__media--video { justify-self: center; width: 300px; }
}

/* Video */
.vid {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--green-wash);
  border: 1px solid var(--green-soft);
}
.vid video { width: 100%; height: 100%; object-fit: cover; }
.vid__btn {
  position: absolute; inset: 0;
  display: none; align-items: flex-end; justify-content: flex-start;
  padding: 10px;
  background: transparent; border: 0; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.js .vid__btn { display: flex; }
.vid__btn:focus-visible { outline-offset: -4px; border-radius: var(--radius); }
.vid__pill {
  display: inline-block;
  font-size: 0.75rem; font-weight: 600; line-height: 1;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(20, 83, 45, .82);
  color: #fff;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: background-color .15s ease;
}
.vid__pill { white-space: nowrap; }
.vid__btn:hover .vid__pill { background: var(--green); }
.vid__btn[aria-pressed="true"] .vid__pill { background: #fff; color: var(--green); }

/* Videos fade in once they come near the viewport (only when JS runs and motion is allowed) */
@media (prefers-reduced-motion: no-preference) {
  .js .vid { opacity: 0; transform: translateY(10px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
  .js .vid.is-in { opacity: 1; transform: none; }
}

/* Timeline */
.timeline { margin-top: clamp(28px, 4vw, 44px); border-top: 1px solid var(--green-soft); }
.timeline li { display: grid; gap: 6px; padding-block: 26px; border-bottom: 1px solid var(--green-soft); }
.timeline li:last-child { border-bottom: 0; padding-bottom: 0; }
.timeline__when { font-size: 0.9375rem; color: var(--muted-text); font-variant-numeric: tabular-nums; }
.timeline__role { font-family: var(--font-display); font-size: 1.3125rem; font-weight: 700; color: var(--green); letter-spacing: -0.015em; line-height: 1.2; }
.timeline__org { font-weight: 600; }
.timeline__org span { font-weight: 400; color: var(--muted-text); }
.timeline__what { margin-top: 4px; max-width: 60ch; }
@media (min-width: 760px) {
  .timeline li { grid-template-columns: 220px minmax(0, 1fr); column-gap: 40px; }
  .timeline__when { padding-top: 4px; grid-row: span 3; }
}

/* Contact */
.contact__card {
  border: 1px solid var(--green-soft);
  border-radius: var(--radius);
  padding: clamp(28px, 6vw, 64px);
}
.contact__card h2 { font-size: clamp(2rem, 6.4vw, 3.5rem); max-width: 14ch; letter-spacing: -0.03em; }
.contact__sub { margin-top: 16px; max-width: 46ch; font-size: 1.125rem; }
.contact__plain { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 6px 24px; }
.contact__plain a { font-size: 0.9375rem; }

/* Footer */
.footer { border-top: 1px solid var(--green-soft); padding-block: 28px 40px; }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.footer p, .footer a { font-size: 0.875rem; color: var(--muted-text); }
.footer nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.footer nav a { text-decoration: none; padding-block: 4px; }
.footer nav a:hover { color: var(--green); text-decoration: underline; }

/* Page header (inner pages) */
.page-head { padding-block: clamp(48px, 10vw, 112px) clamp(32px, 6vw, 64px); }
.page-head h1 { max-width: 18ch; font-size: clamp(2.25rem, 7.4vw, 4.25rem); }
.page-head .lead { max-width: 46ch; }

/* Media buying hero */
.page-head--mb { padding-bottom: clamp(20px, 4vw, 40px); }
.page-head--mb h1 { font-size: clamp(1.625rem, 4.6vw, 2.625rem); max-width: 24ch; letter-spacing: -0.025em; }
.mb-hero { display: grid; gap: 28px; padding-bottom: clamp(48px, 8vw, 96px); }
.mb-hero__num { font-size: clamp(5.5rem, 30vw, 13rem); }
.mb-hero__unit { font-family: var(--font-display); font-weight: 700; color: var(--green); font-size: clamp(1.5rem, 5vw, 2.25rem); letter-spacing: -0.025em; line-height: 1.1; margin-top: 10px; }
.mb-hero__sub { margin-top: 14px; max-width: 36ch; }
@media (min-width: 900px) {
  .mb-hero { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: center; }
  .mb-hero__num { font-size: clamp(6rem, 12.4vw, 10.5rem); }
}

/* Receipts */
.receipts { display: grid; gap: 20px; margin-top: clamp(28px, 4vw, 44px); }
@media (min-width: 760px) { .receipts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; } }
.receipt {
  display: flex; flex-direction: column;
  border: 1px solid var(--green-soft); border-radius: var(--radius); overflow: hidden;
  background: #fff;
  transition: border-color .2s ease;
}
.receipt:hover { border-color: var(--green-mid); }
.receipt__img {
  display: block; position: relative;
  background: var(--green-wash);
  overflow: hidden;
  cursor: zoom-in;
}
/* contain, not cover: a receipt never hides its own number.
   One column on phones: natural height. Two columns: a shared ratio so captions line up. */
.receipt__img img { width: 100%; height: auto; padding: 10px; transition: transform .5s var(--ease); }
@media (min-width: 760px) {
  .receipt__img { aspect-ratio: 16 / 10; }
  .receipt__img img { height: 100%; object-fit: scale-down; padding: 18px; } /* never enlarge a small crop past its real size */
}
.receipt:hover .receipt__img img { transform: scale(1.015); }
.receipt__img:focus-visible { outline-offset: -3px; border-radius: var(--radius) var(--radius) 0 0; }
.receipt figcaption { margin: 0; padding: 16px 18px 18px; border-top: 1px solid var(--green-soft); color: var(--ink); font-size: 1rem; line-height: 1.45; }
.receipt figcaption strong { font-family: var(--font-display); color: var(--green); font-weight: 700; letter-spacing: -0.01em; }
.receipts__sub { margin-top: clamp(40px, 6vw, 64px); }
.receipts__note { margin-top: 20px; max-width: 60ch; }
.intro { margin-top: 12px; max-width: 54ch; }

/* Steps */
.steps { display: grid; gap: 28px; margin-top: clamp(28px, 4vw, 44px); counter-reset: step; }
.step { border-top: 1px solid var(--green-soft); padding-top: 20px; }
.step__n { font-family: var(--font-display); color: var(--green); font-weight: 700; font-size: 2.75rem; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.step h3 { margin-top: 14px; }
.step p { margin-top: 10px; max-width: 34ch; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; } }

/* One-line callouts */
.callout { font-family: var(--font-display); font-weight: 600; color: var(--green); font-size: clamp(1.375rem, 3.8vw, 2rem); letter-spacing: -0.02em; line-height: 1.25; max-width: 30ch; }
.callout a { white-space: nowrap; }
.callouts { display: grid; }
.callouts > * { padding-block: clamp(28px, 4vw, 40px); }
.callouts > * + * { border-top: 1px solid var(--green-soft); }
.callouts > *:first-child { padding-top: 0; }
.callouts > *:last-child { padding-bottom: 0; }

/* AI ads grid */
.ads-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; margin-top: 8px; }
.ads-grid figcaption { margin-top: 12px; font-size: 0.9375rem; line-height: 1.35; color: var(--ink); font-weight: 500; }
@media (min-width: 900px) { .ads-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; } }
.grid-note { margin-bottom: 20px; }

/* Tags */
.tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.tag {
  display: inline-block; padding: 8px 14px;
  border: 1px solid var(--green-soft); border-radius: 999px;
  font-size: 0.9375rem; font-weight: 500; color: var(--green); line-height: 1.2;
}

/* Builds */
.case { display: grid; gap: 32px; padding-block: clamp(56px, 9vw, 112px); }
.case + .case { border-top: 1px solid var(--green-soft); }
.case:first-child { padding-top: 0; }
.case:last-child { padding-bottom: 0; }
.case h2 { font-size: clamp(2.25rem, 7vw, 3.5rem); letter-spacing: -0.035em; }
.case__what { margin-top: 12px; font-size: clamp(1.1875rem, 2.4vw, 1.375rem); line-height: 1.45; max-width: 34ch; }
.case__block { margin-top: 28px; }
.case__block h3 { font-family: var(--font-body); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-text); }
.case__block p { margin-top: 8px; max-width: 46ch; }
.case .stats { margin-top: 16px; }
.case__block .stats + p { margin-top: 20px; }
.case .stat .num { font-size: clamp(3rem, 12vw, 4.5rem); }
.case .btn-row { margin-top: 32px; }
@media (min-width: 900px) {
  .case {
    grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
    grid-template-areas: "head media" "body media";
    grid-template-rows: auto 1fr;
    column-gap: 64px; row-gap: 0;
    align-items: start;
  }
  .case__head { grid-area: head; }
  .case__body { grid-area: body; }
  .case__media { grid-area: media; position: sticky; top: calc(var(--nav-h) + 32px); }
}
.phones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: start; }
.phones img { width: 100%; }
.phones-frame { padding: clamp(16px, 4vw, 32px) clamp(10px, 3vw, 24px); background: #fff; }

/* Lightbox */
.lightbox {
  border: 0; padding: 0; margin: auto;
  max-width: min(1600px, calc(100vw - 24px)); max-height: calc(100dvh - 24px);
  background: transparent; overflow: visible;
}
.lightbox::backdrop { background: rgba(31, 42, 36, .86); }
.lightbox img {
  max-width: min(1600px, calc(100vw - 24px)); max-height: calc(100dvh - 88px);
  width: auto; height: auto;
  border-radius: var(--radius-sm); background: #fff;
}
.lightbox__bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 12px; }
.lightbox__cap { color: #fff; font-size: 0.9375rem; line-height: 1.4; }
.lightbox__close {
  flex: none; min-height: 40px; padding: 8px 16px;
  border-radius: var(--radius-sm); border: 1px solid rgba(255, 255, 255, .5);
  background: transparent; color: #fff; font-weight: 600; cursor: pointer;
}
.lightbox__close:hover { background: rgba(255, 255, 255, .12); }
body:has(.lightbox[open]) { overflow: hidden; }

/* 404 */
.notfound { min-height: 60vh; display: grid; align-content: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
.section--flush-top { padding-top: 0; }
.section--ruled { border-top: 1px solid var(--green-soft); }

/* UGC Beast: homepage in a simple browser frame, with one of its ads resting on the corner */
.ugc-media { display: grid; }
.ugc-media > * { grid-area: 1 / 1; }
.browser {
  width: 86%; align-self: start; justify-self: start;
  border: 1px solid var(--green-soft); border-radius: var(--radius);
  overflow: hidden; background: #fff;
}
.browser__bar {
  display: flex; align-items: center; gap: 12px;
  height: 30px; padding: 0 12px;
  background: var(--green-wash); border-bottom: 1px solid var(--green-soft);
}
.browser__dots { display: flex; gap: 5px; flex: none; }
.browser__dots i { display: block; width: 8px; height: 8px; border-radius: 50%; background: var(--green-soft); }
.browser__url {
  flex: 1; max-width: 220px; margin-right: auto;
  height: 18px; border-radius: 999px; background: #fff; border: 1px solid var(--green-soft);
  font-size: 0.6875rem; line-height: 16px; text-align: center; color: var(--muted-text);
  overflow: hidden; white-space: nowrap;
}
.browser__shot { display: block; }
.browser__shot img { width: 100%; }
.ugc-media__ad {
  width: 34%; justify-self: end; align-self: end;
  margin-top: 30%;
  padding: 5px; background: #fff; border-radius: calc(var(--radius) + 5px);
}
.ugc-media__ad .vid__btn { padding: 6px; }
.ugc-media__ad .vid__pill { font-size: 0.6875rem; padding: 6px 8px; }
