/* ==========================================================================
   Farooq Khalid, portfolio styles
   ========================================================================== */

:root {
  --bg: #1A1A1A;
  --surface: #111111;
  --surface-2: #222222;
  --line: #2A2A2A;
  --line-strong: #3D3D3D;
  --text: #FFFFFF;
  --text-2: #AAAAAA;
  --text-3: #999999;
  --accent: #FFBD38;
  --on-accent: #1A1A1A;
  --accent-text: var(--accent);
  --ink: #1A1A1A;
  --grid-line: rgba(255,255,255,.035);
  --badge-bg: rgba(255,255,255,.04);
  --pre-glow: #222222;
  --chip-bg: #FFFFFF;
  --chip-fg: #1A1A1A;
  --header-bg: rgba(26,26,26,.82);

  --font-sans: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 20px;
  --pill: 999px;

  --container: 1200px;
  --gutter: 24px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* Reset ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.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;
}
.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 10;
  padding: 10px 16px; border-radius: var(--pill);
  background: var(--accent); color: var(--on-accent); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 16px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Layout ----------------------------------------------------------------- */
.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { display: flex; flex-direction: column; gap: 40px; padding-block: 88px; }
.section--tight-top { padding-top: 40px; }
.section__head { display: flex; flex-direction: column; gap: 12px; max-width: 720px; }
.section__head--row { max-width: none; flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.section__head--row > div:first-child { display: flex; flex-direction: column; gap: 12px; }
.section__title { font-size: 44px; line-height: 1.1; letter-spacing: -0.03em; font-weight: 600; }
.section__title--sm { font-size: 40px; }
.grid { display: grid; gap: 16px; }
.grid--services { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.grid--steps { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 32px; }
.center { display: flex; justify-content: center; }
.muted { color: var(--text-2); font-size: 16px; }

/* Type helpers ----------------------------------------------------------- */
.eyebrow {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--accent-text);
}
.eyebrow--muted { color: var(--text-3); font-size: 12px; }
.eyebrow--status { display: flex; align-items: center; gap: 10px; color: var(--text-3); letter-spacing: 0.04em; }
.dot { width: 8px; height: 8px; border-radius: var(--pill); background: var(--accent); flex: none; }
.dot--sm { width: 7px; height: 7px; }
.tag {
  font-family: var(--font-mono); font-size: 12px; color: var(--text-3);
  border: 1px solid var(--line-strong); border-radius: var(--pill); padding: 3px 10px; white-space: nowrap;
}
.text-link { color: var(--text-2); transition: color .2s ease; }
.text-link:hover { color: var(--accent-text); }

/* Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--pill); border: 1px solid transparent;
  font-size: 15px; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer;
  background: transparent;
  transition: transform .2s var(--ease), box-shadow .2s ease, border-color .2s ease, color .2s ease, background-color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { box-shadow: 0 8px 22px rgba(255, 189, 56, .3); }
.btn--ghost { border-color: var(--line-strong); color: var(--text); font-weight: 500; }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent-text); }
.btn--sm { padding: 9px 18px; font-size: 14px; }
.btn--block { width: 100%; height: 46px; }
.btn--icon { width: 48px; height: 48px; padding: 0; }
.btn--icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Cards ------------------------------------------------------------------ */
.card-surface, .card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.card { transition: transform .25s var(--ease), border-color .25s ease; }
.card:hover { transform: translateY(-4px); border-color: var(--accent); }

/* Header ----------------------------------------------------------------- */
.site-header { border-bottom: 1px solid var(--line); }
.nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-block: 20px; }
.nav__logo img { height: 52px; width: auto; }
.nav__links { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; font-size: 15px; }
.nav__link { color: var(--text-2); text-decoration: none; transition: color .2s ease; }
.nav__link:hover { color: var(--text); }

/* Hero ------------------------------------------------------------------- */
.hero {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  gap: 64px; align-items: center; padding-block: 96px 80px;
}
.hero__copy { display: flex; flex-direction: column; gap: 28px; }
.hero__title { font-size: clamp(40px, 6vw, 64px); line-height: 1.04; letter-spacing: -0.035em; font-weight: 600; }
.hero__lead { font-size: 19px; color: var(--text-2); max-width: 540px; }

.workflow { border-radius: var(--radius-lg); padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.workflow__head { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-size: 12px; color: var(--text-3); }
.workflow__status { display: flex; align-items: center; gap: 8px; }
.workflow__steps { display: flex; flex-direction: column; gap: 14px; }
.workflow__step {
  position: relative; display: flex; gap: 14px; align-items: center;
  padding: 14px 16px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.workflow__step + .workflow__step::before {
  content: ""; position: absolute; left: 32px; top: -15px; width: 1px; height: 14px; background: var(--line-strong);
}
.workflow__step strong { display: block; font-weight: 500; font-size: 15px; }
.workflow__step small { display: block; font-size: 13px; color: var(--text-3); }
.workflow__step--ai { border-color: var(--accent); }
.step-num { font-family: var(--font-mono); font-size: 12px; color: var(--bg); background: var(--text); border-radius: 6px; padding: 3px 8px; }
.workflow__step--ai .step-num { background: var(--accent); }
.workflow__note { font-size: 13px; color: var(--text-3); border-top: 1px solid var(--line); padding-top: 14px; }

/* Stats ------------------------------------------------------------------ */
.stats { border-block: 1px solid var(--line); }
.stats__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; padding-block: 36px; }
.stat { display: flex; flex-direction: column-reverse; gap: 4px; }
.stat__value { font-size: 44px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.2; }
.stat__label { color: var(--text-3); font-size: 15px; }

/* Clients ---------------------------------------------------------------- */
.clients { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 40px; padding-block: 40px; }
.clients__list { display: flex; flex-wrap: wrap; gap: 16px 40px; font-size: 20px; font-weight: 600; color: var(--text-2); }

/* Services --------------------------------------------------------------- */
.service { padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.service__title { font-size: 21px; font-weight: 600; }
.icon { width: 28px; height: 28px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* Tabs ------------------------------------------------------------------- */
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: var(--pill); background: var(--surface); border: 1px solid var(--line); }
.tab { padding: 10px 22px; font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text); }
.tab[aria-selected="true"] { background: var(--accent); color: var(--on-accent); }

/* Projects --------------------------------------------------------------- */
.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 20px; }
.projects:not(.is-expanded) .is-extra { display: none; }
.project__link { display: flex; flex-direction: column; gap: 16px; height: 100%; padding: 14px 14px 22px; text-decoration: none; }
.project__media { position: relative; aspect-ratio: 16 / 10; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); }
.project__media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.project__backdrop { object-fit: cover; filter: blur(28px) saturate(1.1); transform: scale(1.25); opacity: .9; }
.project__img { object-fit: contain; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .35)); }
.project__body { display: flex; flex-direction: column; gap: 6px; padding-inline: 8px; }
.project__title-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.project__title { font-size: 20px; font-weight: 600; }
.project__desc { font-size: 15px; color: var(--text-3); }

/* Process ---------------------------------------------------------------- */
.process { background: var(--surface); border-block: 1px solid var(--line); }
.step { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line-strong); padding-top: 20px; }
.step__num { font-family: var(--font-mono); font-size: 13px; color: var(--accent-text); }
.step__title { font-size: 20px; font-weight: 600; }

/* About ------------------------------------------------------------------ */
.about { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 64px; }
.about__intro { display: flex; flex-direction: column; gap: 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 8px; }
.chip { font-size: 14px; padding: 8px 14px; border-radius: var(--pill); border: 1px solid var(--line-strong); }
.timeline__item { display: grid; grid-template-columns: 130px 1fr; gap: 20px; padding-block: 22px; border-bottom: 1px solid var(--line); }
.timeline__when { font-family: var(--font-mono); font-size: 13px; color: var(--text-3); padding-top: 3px; }
.timeline__item strong { display: block; font-size: 18px; font-weight: 600; }
.timeline__item small { display: block; font-size: 15px; color: var(--text-3); }

/* Testimonials slider ---------------------------------------------------- */
.testimonials { --per-view: 3; --gap: 16px; }
.testimonials__viewport { overflow: hidden; margin: -6px; padding: 6px; }
.testimonials__track { display: flex; gap: var(--gap); transition: transform .5s var(--ease); }
.testimonial {
  flex: 0 0 calc((100% - (var(--per-view) - 1) * var(--gap)) / var(--per-view));
  padding: 28px; display: flex; flex-direction: column; gap: 24px; justify-content: space-between;
}
.testimonial__quote { font-size: 18px; line-height: 1.5; }
.testimonial__author { display: flex; align-items: center; gap: 12px; }
.avatar { width: 40px; height: 40px; flex: none; border-radius: var(--pill); background: var(--line); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; }
.testimonial__meta { display: flex; flex-direction: column; }
.testimonial__name { font-weight: 600; font-size: 15px; }
.testimonial__role { font-size: 14px; color: var(--text-3); }
.sample-badge {
  align-self: flex-start; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--on-accent); background: var(--text-2); border-radius: var(--pill); padding: 3px 10px;
}
.slider-controls { display: flex; gap: 10px; }
.dots { display: flex; justify-content: center; gap: 8px; }
.dots button {
  width: 8px; height: 8px; padding: 0; border: 0; border-radius: var(--pill); cursor: pointer;
  background: var(--line-strong); transition: width .3s ease, background-color .3s ease;
}
.dots button[aria-current="true"] { width: 28px; background: var(--accent); }

/* Contact ---------------------------------------------------------------- */
.contact { border-top: 1px solid var(--line); }
.contact__inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 64px; padding-block: 96px; }
.contact__copy { display: flex; flex-direction: column; gap: 24px; }
.contact__title { font-size: clamp(36px, 5vw, 52px); line-height: 1.05; letter-spacing: -0.035em; font-weight: 600; }
.contact__lead { font-size: 18px; }
.form { border-radius: var(--radius-lg); padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--text-2); }
.field input, .field textarea {
  border-radius: 10px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--text);
  padding: 0 14px; font-size: 16px; transition: border-color .2s ease;
}
.field input { height: 48px; }
.field textarea { padding-block: 12px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--accent); outline: none; }

/* Thank-you page --------------------------------------------------------- */
.thanks { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 20px; max-width: 760px; }
.thanks .nav__logo { margin-bottom: 24px; }

/* Footer ----------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding-block: 28px; font-size: 14px; color: var(--text-3); }
.socials { display: flex; flex-wrap: wrap; gap: 10px; }
.social {
  width: 44px; height: 44px; border-radius: var(--pill); border: 1px solid var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text); text-decoration: none;
  transition: transform .2s var(--ease), border-color .2s ease, color .2s ease;
}
.social:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--accent-text); }
.social svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.social svg .fill { fill: currentColor; }
.social__text { font-weight: 700; font-size: 14px; letter-spacing: -0.02em; line-height: 1; }
.social__text--lg { font-size: 17px; }

/* Responsive ------------------------------------------------------------- */
@media (max-width: 960px) {
  .testimonials { --per-view: 2; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .section { padding-block: 64px; }
  .section__title { font-size: 34px; }
  .hero { padding-block: 56px 48px; gap: 40px; }
  .nav__links { gap: 18px; }
  .testimonials { --per-view: 1; }
  .timeline__item { grid-template-columns: 1fr; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .btn:hover, .card:hover { transform: none; }
}

/* Timeline detail line */
.timeline__detail { display: block; padding-top: 4px; font-size: 15px; color: var(--text-2); }

/* Button icon */
.btn__icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Mobile hamburger menu */
.menu-btn {
  display: none; width: 44px; height: 44px; padding: 0; align-items: center; justify-content: center;
  border-radius: var(--pill); border: 1px solid var(--line-strong); background: transparent; color: var(--text); cursor: pointer;
}
.menu-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.menu-btn__close { display: none; }
.menu-btn[aria-expanded="true"] .menu-btn__open { display: none; }
.menu-btn[aria-expanded="true"] .menu-btn__close { display: block; }
@media (max-width: 760px) {
  .menu-btn { display: inline-flex; }
  .nav__links { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 4px; padding: 12px 0 4px; border-top: 1px solid var(--line); }
  .nav__links.is-open { display: flex; }
  .nav__links .nav__link { font-size: 18px; padding: 12px 4px; }
  .nav__links .btn { margin-top: 8px; }
}

/* AI speed messaging */
.stat__value--accent { color: var(--accent-text); }
.section__lead { color: var(--text-2); font-size: 18px; }

/* ==========================================================================
   Design updates from the canvas (October 21, 2026)
   ========================================================================== */
:root { --yellow: #FFD60A; }

/* Nav: yellow glow on hover */
.nav__link { position: relative; padding: 6px 4px; transition: color .2s ease, transform .2s ease, text-shadow .2s ease; }
.nav__link:hover { color: var(--yellow); transform: translateY(-2px); text-shadow: 0 0 12px rgba(255, 214, 10, .45); }
.nav__link:active { color: var(--text); transform: translateY(0); }
.nav__links .btn--primary:hover { transform: translateY(-2px) scale(1.05); box-shadow: 0 8px 24px rgba(255, 214, 10, .35); }

/* Clients: pill chips in a horizontal scroll row */
.clients { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.clients .eyebrow { flex-shrink: 0; white-space: nowrap; scroll-snap-align: start; }
.clients__list { flex-wrap: nowrap; gap: 16px; }
.clients__list li {
  flex-shrink: 0; white-space: nowrap; scroll-snap-align: start;
  padding: 8px 20px; border: 1px solid var(--line-strong); border-radius: var(--pill);
}

/* Contact: yellow card */
.contact { background: var(--bg); padding: 48px var(--gutter); }
.contact__inner {
  max-width: var(--container); margin-inline: auto; padding: 72px 48px;
  background: var(--yellow); border-radius: 32px;
}
.contact__copy { text-align: center; align-items: center; align-self: center; }
.contact__title { color: var(--ink); }
.contact .contact__lead { color: var(--line-strong); }
.contact__actions { justify-content: center; }
.btn--dark { background: var(--ink); color: var(--yellow); }
.btn--dark:hover { box-shadow: 0 8px 22px rgba(0, 0, 0, .25); }
.btn--outline-dark { border-color: var(--ink); color: var(--ink); font-weight: 500; }
.btn--outline-dark:hover { background: var(--ink); color: var(--yellow); }
.btn--yellow { background: var(--yellow); color: var(--ink); }
.btn--yellow:hover { box-shadow: 0 8px 22px rgba(255, 214, 10, .3); }
.btn__icon { flex-shrink: 0; }
.field__label { display: flex; align-items: center; gap: 8px; }
.field__icon { width: 18px; height: 18px; fill: none; stroke: var(--yellow); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.btn .btn__icon { stroke-width: 2; }

@media (max-width: 640px) {
  .contact { padding: 32px var(--gutter); }
  .contact__inner { padding: 40px 20px; border-radius: 24px; gap: 40px; }
}

/* Clients: auto-scrolling marquee */
.clients { overflow: visible; scroll-snap-type: none; gap: 24px; }
.marquee {
  flex: 1; min-width: 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track { display: flex; width: max-content; animation: marquee 30s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee .clients__list { flex-shrink: 0; padding-right: 16px; }
.marquee .clients__list li { scroll-snap-align: none; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }
@media (max-width: 640px) {
  .clients { flex-direction: column; align-items: flex-start; gap: 12px; }
  .marquee { width: 100%; }
}

/* Stats: keep labels on one line and numbers aligned */
.stats__grid { align-items: end; }
.stat__label { white-space: nowrap; }
@media (max-width: 480px) { .stat__label { white-space: normal; } }

/* Upwork proof line under testimonials heading */
.upwork-proof { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; color: var(--text-2); font-size: 15px; text-decoration: none; transition: color .2s ease; }
.upwork-proof strong { color: var(--accent-text); font-weight: 600; }
.upwork-proof__link { text-decoration: underline; }
.upwork-proof:hover { color: var(--accent-text); }

/* Recognition card */
.award { display: flex; gap: 16px; align-items: flex-start; padding: 20px 22px; border-radius: 16px; }
.award__icon { width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; background: rgba(255, 189, 56, .12); color: var(--accent-text); display: flex; align-items: center; justify-content: center; }
.award__icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.award__body { display: flex; flex-direction: column; gap: 4px; }
.award__body .eyebrow { font-size: 12px; }
.award__title { font-size: 18px; font-weight: 600; }
.award__meta { font-size: 15px; color: var(--text-2); }

/* ==========================================================================
   Preloader: logo reveal while the page loads
   ========================================================================== */
.preloader {
  position: fixed; inset: 0; z-index: 100; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 50%, var(--pre-glow) 0%, var(--bg) 60%);
  transition: opacity .6s var(--ease), visibility .6s, clip-path .8s var(--ease);
  clip-path: inset(0 0 0 0);
}
.preloader__inner { position: relative; display: flex; flex-direction: column; align-items: center; gap: 28px; }
.preloader__ring {
  position: absolute; top: 50%; left: 50%; width: min(460px, 94vw); height: min(460px, 94vw); max-width: none;
  transform: translate(-50%, -50%) rotate(-90deg);
  fill: none; stroke: var(--accent); stroke-width: 1; stroke-linecap: round; opacity: .6;
  stroke-dasharray: 340; stroke-dashoffset: 340;
  animation: pre-ring 1.6s var(--ease) forwards, pre-spin 6s linear infinite;
}
.preloader__logo {
  position: relative; height: 72px; width: auto;
  opacity: 0; filter: blur(12px); transform: translateY(14px) scale(.92);
  animation: pre-logo .9s var(--ease) .15s forwards;
}
.preloader__bar { position: relative; width: 160px; height: 2px; border-radius: 2px; background: var(--line); overflow: hidden; }
.preloader__bar span {
  position: absolute; inset: 0; background: var(--accent); transform-origin: left;
  transform: scaleX(0); animation: pre-bar 1.4s var(--ease) .3s forwards;
  box-shadow: 0 0 12px rgba(255, 189, 56, .6);
}
.preloader.is-done { opacity: 0; visibility: hidden; clip-path: inset(0 0 100% 0); }
body.is-loading { overflow: hidden; }

@keyframes pre-logo { to { opacity: 1; filter: blur(0); transform: none; } }
@keyframes pre-ring { to { stroke-dashoffset: 0; } }
@keyframes pre-spin { to { transform: translate(-50%, -50%) rotate(270deg); } }
@keyframes pre-bar  { to { transform: scaleX(1); } }

/* Page content rises in after the preloader */
.site-header, main { transition: opacity .7s var(--ease) .1s, transform .7s var(--ease) .1s; }
body.is-loading .site-header, body.is-loading main { opacity: 0; transform: translateY(16px); }

@media (prefers-reduced-motion: reduce) {
  .preloader { display: none; }
  body.is-loading { overflow: auto; }
  body.is-loading .site-header, body.is-loading main { opacity: 1; transform: none; }
}

/* ==========================================================================
   Motion: scroll reveals, hero words, live workflow, card spotlight
   ========================================================================== */

/* Scroll reveal (classes added by JS, so content is visible without JS) */
.js-motion .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.js-motion .reveal.is-in { opacity: 1; transform: none; }

/* Hero headline: words rise in one by one */
.hero__title .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.hero__title .w > span { display: inline-block; transform: translateY(105%); transition: transform .9s var(--ease); transition-delay: var(--d, 0s); }
.hero__title.is-in .w > span { transform: none; }

/* Status dots pulse */
.dot { position: relative; }
.dot::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; background: inherit;
  animation: ping 2s cubic-bezier(0, 0, .2, 1) infinite;
}
@keyframes ping { 75%, 100% { transform: scale(2.6); opacity: 0; } }

/* Workflow card: steps light up in sequence, data flows down the connectors */
.workflow__step { transition: border-color .4s ease, box-shadow .4s ease, transform .4s var(--ease); }
.workflow__step .step-num { transition: background-color .4s ease; }
.workflow__step.is-active { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(255,189,56,.25), 0 10px 30px rgba(255,189,56,.12); transform: translateX(4px); }
.workflow__step.is-active .step-num { background: var(--accent); }
.workflow__step--ai { border-color: var(--line); }
.workflow__step--ai .step-num { background: var(--text); }
.workflow__step--ai.is-active .step-num, .workflow__step--ai.is-active { border-color: var(--accent); }
.workflow__step--ai.is-active .step-num { background: var(--accent); }
.workflow__step + .workflow__step::before { background: linear-gradient(var(--line-strong), var(--line-strong)); overflow: hidden; }
.workflow__step.is-active::before { background: linear-gradient(180deg, transparent, var(--accent)); animation: flow .6s ease; }
@keyframes flow { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }

/* Cards: soft amber spotlight follows the cursor */
.card { position: relative; isolation: isolate; }
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 189, 56, .10), transparent 60%);
  opacity: 0; transition: opacity .3s ease;
}
.card:hover::after { opacity: 1; }

/* Service icons float on hover */
.service .icon { transition: transform .4s var(--ease); }
.service:hover .icon { transform: translateY(-4px) rotate(-6deg) scale(1.08); }

/* Primary buttons: light sweep on hover */
.btn--primary, .btn--dark, .btn--yellow { position: relative; overflow: hidden; }
.btn--primary::before, .btn--dark::before, .btn--yellow::before {
  content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent);
  transform: skewX(-20deg); transition: left .6s var(--ease); pointer-events: none;
}
.btn--primary:hover::before, .btn--dark:hover::before, .btn--yellow:hover::before { left: 120%; }

/* Process steps: number underline grows on reveal */
.step { position: relative; }
.js-motion .step::before {
  content: ""; position: absolute; top: -1px; left: 0; height: 1px; width: 100%; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform 1s var(--ease) calc(var(--d, 0s) + .2s);
}
.js-motion .step.is-in::before { transform: scaleX(1); }

/* Project thumbnails zoom gently on hover */
.project__img { transition: transform .6s var(--ease); }
.project__link:hover .project__img { transform: scale(1.04); }

@media (prefers-reduced-motion: reduce) {
  .js-motion .reveal { opacity: 1; transform: none; transition: none; }
  .hero__title .w > span { transform: none; transition: none; }
  .dot::after { animation: none; }
  .js-motion .step::before { transform: scaleX(1); transition: none; }
}

/* Preloader welcome message */
.preloader__msg { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 0; text-align: center; }
.preloader__greet {
  font-size: 22px; font-weight: 600; letter-spacing: -0.01em; color: var(--text);
  opacity: 0; transform: translateY(10px); animation: pre-msg .7s var(--ease) .7s forwards;
}
.preloader__sub {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-text);
  opacity: 0; transform: translateY(10px); animation: pre-msg .7s var(--ease) 1s forwards;
}
@keyframes pre-msg { to { opacity: 1; transform: none; } }

/* ==========================================================================
   Hero: glow, grid, orbit, floating status chips
   ========================================================================== */
.hero-wrap { position: relative; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.hero__glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .35; }
.hero__glow--1 { width: 560px; height: 560px; right: -80px; top: -60px; background: radial-gradient(circle, rgba(255,189,56,.55), transparent 65%); animation: glow-drift 14s ease-in-out infinite alternate; }
.hero__glow--2 { width: 420px; height: 420px; left: 30%; bottom: -220px; background: radial-gradient(circle, rgba(255,189,56,.35), transparent 65%); animation: glow-drift 18s ease-in-out infinite alternate-reverse; }
.hero__grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 10%, transparent 70%); mask-image: radial-gradient(ellipse at 70% 40%, #000 10%, transparent 70%);
}
@keyframes glow-drift { to { transform: translate(-60px, 40px) scale(1.12); } }
.hero { position: relative; z-index: 1; }

.hero__badge { align-self: flex-start; padding: 8px 14px; border-radius: var(--pill); background: var(--badge-bg); border: 1px solid var(--line); }
.hero__accent, .hero__title .w--accent > span {
  background: linear-gradient(90deg, #FFD60A, var(--accent) 45%, #FF9F1C);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__proof { display: flex; flex-wrap: wrap; gap: 10px 24px; font-size: 15px; color: var(--text); }
.hero__proof li { display: flex; align-items: center; gap: 8px; }
.hero__proof svg { width: 18px; height: 18px; fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.btn--arrow .btn__icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--ease); }
.btn--arrow:hover .btn__icon { transform: translateX(4px); }

.hero__visual { position: relative; }
.orbit {
  position: absolute; left: 50%; top: 50%; width: 118%; aspect-ratio: 1; height: auto; max-width: none;
  transform: translate(-50%, -50%); fill: none; stroke: rgba(255,189,56,.35); stroke-width: 1.2; stroke-dasharray: 4 8;
  animation: orbit-spin 24s linear infinite; pointer-events: none;
}
@keyframes orbit-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.orbit .orbit__dot { fill: var(--accent); stroke: none; filter: drop-shadow(0 0 6px rgba(255,189,56,.9)); }
.hero__visual .workflow { position: relative; z-index: 1; box-shadow: 0 30px 80px rgba(0,0,0,.45); }

.chip-float {
  position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px; border-radius: var(--pill); background: var(--chip-bg); color: var(--chip-fg);
  font-size: 15px; font-weight: 600; white-space: nowrap; box-shadow: 0 12px 30px rgba(0,0,0,.35);
  animation: chip-bob 5s ease-in-out infinite;
}
.chip-float .dot { width: 8px; height: 8px; }
.chip-float--1 { top: 10%; left: -48px; animation-delay: 0s; }
.chip-float--2 { top: 44%; right: -56px; animation-delay: -1.6s; }
.chip-float--3 { bottom: 6%; left: -24px; animation-delay: -3.2s; }
.chip-float.is-pop { animation: chip-pop .6s var(--ease), chip-bob 5s ease-in-out infinite; }
@keyframes chip-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes chip-pop { 0% { transform: scale(.85); box-shadow: 0 0 0 0 rgba(255,189,56,.7); } 60% { transform: scale(1.06); } 100% { transform: scale(1); box-shadow: 0 12px 30px rgba(0,0,0,.35), 0 0 0 10px rgba(255,189,56,0); } }

@media (max-width: 1100px) {
  .chip-float--1 { left: -12px; } .chip-float--2 { right: -12px; } .chip-float--3 { left: 0; }
}
@media (max-width: 640px) {
  .orbit, .orbit__dot { display: none; }
  .chip-float { font-size: 13px; padding: 8px 14px; }
  .chip-float--1 { top: -18px; left: 8px; } .chip-float--2 { top: auto; bottom: 30%; right: -6px; } .chip-float--3 { bottom: -18px; left: 12px; }
  .hero__visual { margin-top: 12px; margin-bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__glow, .orbit, .orbit__dot, .chip-float { animation: none; }
}

/* ==========================================================================
   Contact CTA: gradient card with decorative rings (matches hero motion)
   ========================================================================== */
.contact__inner {
  position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(120deg, #FF9F1C 0%, var(--accent) 45%, #FFD60A 100%);
  background-size: 200% 200%; animation: cta-shift 12s ease-in-out infinite alternate;
  box-shadow: 0 30px 80px rgba(255, 189, 56, .18);
}
@keyframes cta-shift { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
.contact__inner > *:not(.cta-ring) { position: relative; z-index: 1; }
.cta-ring { position: absolute; border-radius: 50%; pointer-events: none; z-index: 0; }
.cta-ring--dashed {
  width: 520px; height: 520px; left: -200px; bottom: -300px;
  border: 2px dashed rgba(26, 26, 26, .28); animation: orbit-spin-plain 50s linear infinite;
}
.cta-ring--solid {
  width: 420px; height: 420px; right: -140px; top: -180px;
  border: 1.5px solid rgba(255, 255, 255, .55); animation: ring-breathe 8s ease-in-out infinite;
}
@keyframes orbit-spin-plain { to { transform: rotate(360deg); } }
@keyframes ring-breathe { 0%, 100% { transform: scale(1); opacity: .8; } 50% { transform: scale(1.06); opacity: 1; } }
.contact__title { font-size: clamp(36px, 5vw, 56px); font-weight: 700; letter-spacing: -0.04em; }
.contact .contact__lead { color: #2A2A2A; }
.btn--dark.btn--arrow .btn__arrow { transition: transform .25s var(--ease); }
.btn--dark.btn--arrow:hover .btn__arrow { transform: translateX(4px); }
.contact .form { box-shadow: 0 24px 60px rgba(0, 0, 0, .25); }
@media (prefers-reduced-motion: reduce) { .contact__inner, .cta-ring { animation: none; } }


/* ==========================================================================
   Light theme (toggle in the header, remembered per visitor)
   ========================================================================== */
:root { color-scheme: dark; }
[data-theme="light"] {
  color-scheme: light;
  --bg: #FAFAF7;
  --surface: #FFFFFF;
  --surface-2: #F1F0EC;
  --line: #E6E4DE;
  --line-strong: #CFCCC4;
  --text: #141414;
  --text-2: #4A4A4A;
  --text-3: #6B6B6B;
  --accent-text: #A35F00;
  --grid-line: rgba(0,0,0,.05);
  --badge-bg: rgba(0,0,0,.03);
  --pre-glow: #FFFFFF;
  --chip-bg: #1A1A1A;
  --chip-fg: #FFFFFF;
  --header-bg: rgba(250,250,247,.85);
}
[data-theme="light"] .nav__link:hover { color: var(--accent-text); text-shadow: none; }
[data-theme="light"] .hero__glow { opacity: .55; }
[data-theme="light"] .hero__accent, [data-theme="light"] .hero__title .w--accent > span { background-image: linear-gradient(90deg, #E08A00, #C46F00 50%, #E65C00); }
[data-theme="light"] .hero__visual .workflow, [data-theme="light"] .card-surface { box-shadow: 0 20px 50px rgba(20,20,20,.08); }
[data-theme="light"] .card:hover { box-shadow: 0 16px 40px rgba(20,20,20,.08); }
[data-theme="light"] .contact .form { background: #1A1A1A; border-color: #2A2A2A; }
[data-theme="light"] .contact .form .field { color: #AAAAAA; }
[data-theme="light"] .contact .form input, [data-theme="light"] .contact .form textarea { background: #222222; border-color: #3D3D3D; color: #FFFFFF; }
[data-theme="light"] .process { background: var(--surface-2); }
[data-theme="light"] .marquee .clients__list li { background: var(--surface); }

/* Logo per theme */
.logo--light { display: none; }
[data-theme="light"] .logo--dark { display: none; }
[data-theme="light"] .logo--light { display: block; }

/* Theme toggle button */
.theme-toggle {
  width: 40px; height: 40px; padding: 0; border-radius: var(--pill); border: 1px solid var(--line-strong);
  background: transparent; color: var(--text); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  transition: border-color .2s ease, color .2s ease, transform .3s var(--ease);
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent-text); transform: rotate(15deg); }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .i-sun { display: none; }
[data-theme="light"] .theme-toggle .i-sun { display: block; }
[data-theme="light"] .theme-toggle .i-moon { display: none; }
.nav__end { display: flex; align-items: center; gap: 10px; }
html.theme-anim, html.theme-anim * { transition: background-color .35s ease, color .35s ease, border-color .35s ease !important; }
/* Header layout with theme toggle: logo | links | toggle (+ menu on mobile) */
.nav__logo { order: 0; }
.nav__links { order: 1; margin-left: auto; }
.nav__end { order: 2; }
@media (max-width: 760px) {
  .nav__end { margin-left: auto; }
  .nav__links { order: 3; margin-left: 0; }
}
.stat__label { font-size: 14px; }

/* CV button: full-width amber, under the tool chips */
.cv-btn { height: auto; padding-block: 12px; gap: 10px; }

/* Workflow card width matches the design */
.hero__visual { max-width: 460px; width: 100%; justify-self: center; }

/* Three project tabs on small screens */
@media (max-width: 560px) {
  .tabs { display: flex; width: 100%; }
  .tab { flex: 1 1 auto; padding: 10px 8px; font-size: 12px; letter-spacing: 0.02em; white-space: nowrap; text-align: center; }
}
