:root {
  --bg: #F6F6F3;
  --ink: #121212;
  --muted: #6B6B6B;
  --line: #D9D9D4;
  --purple: #7C4DEA;
  --purple-dark: #5A30C8;
  --lime: #C6F000;
  --night: #130A1E;
  --radius: 14px;
  --display: "Geist", "Helvetica Neue", Arial, sans-serif;
  --body: "Inter", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
ul { list-style: none; }

.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .wrap { padding: 0 32px; } }

.label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.label--spaced { margin-top: 24px; }
.label--light { color: rgba(255,255,255,.55); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 22px;
  border-radius: 999px;
  font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  text-decoration: none;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn:focus-visible, .filter:focus-visible, a:focus-visible {
  outline: 2px solid var(--purple); outline-offset: 3px;
}
.btn--pill { border: 1.5px solid var(--ink); }
.btn--pill:hover { background: var(--ink); color: var(--bg); }
.btn--lime { background: var(--lime); color: var(--ink); text-transform: none; letter-spacing: 0; font-size: 15px; }
.btn--lime:hover { transform: translateY(-2px); }
.btn--ghost { border: 1.5px solid rgba(255,255,255,.35); color: #fff; text-transform: none; letter-spacing: 0; font-size: 15px; }
.btn--ghost:hover { border-color: #fff; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(246,246,243,.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.nav__inner { display: flex; align-items: center; gap: 24px; height: 72px; }
.nav__logo {
  font-family: var(--display); font-weight: 600;
  font-size: 15px; letter-spacing: .02em; text-transform: uppercase; text-decoration: none;
  margin-right: auto;
}
.nav__links { display: none; gap: 32px; }
.nav__links a {
  font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  text-decoration: none; color: var(--ink);
}
.nav__links a:hover { color: var(--purple); }
@media (min-width: 768px) { .nav__links { display: flex; } }
.nav .btn--pill { min-height: 40px; padding: 0 18px; font-size: 11px; }

/* Hero */
.hero { padding-top: 32px; padding-bottom: 8px; }
@media (min-width: 768px) { .hero { padding-top: 40px; padding-bottom: 8px; } }
.status {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 500;
  padding: 6px 14px 6px 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  margin-bottom: 20px;
}
.status__dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--lime); box-shadow: 0 0 0 3px rgba(198,240,0,.3);
}
.hero__title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(36px, 5.4vw, 76px);
  line-height: 1.05;
  letter-spacing: normal;
  max-width: 17ch;
}
.hero__meta {
  display: grid; gap: 20px;
  margin-top: 28px; padding: 20px 0 32px;
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
}
.hero__meta p { max-width: 56ch; color: #3A3A3A; font-size: 17px; }
.hero__meta p a { color: var(--purple); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.link-arrow {
  font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  text-decoration: none; align-self: end;
}
.link-arrow:hover { color: var(--purple); }
@media (min-width: 900px) {
  .hero__meta { grid-template-columns: 1fr auto; gap: 48px; }
}

/* Upwork proof */
.hero__intro { display: grid; gap: 16px; align-content: start; }
.proof {
  display: inline-flex; align-items: center; gap: 10px; justify-self: start;
  font-size: 14px; color: #3A3A3A; text-decoration: none;
  padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line);
  transition: border-color .2s;
}
.proof:hover { border-color: var(--ink); }
.proof strong { color: var(--ink); }
.proof__star { color: #F5A400; font-size: 15px; }

/* Clients */
.clients { display: grid; gap: 10px; align-content: start; }
.clients__list { display: flex; flex-wrap: wrap; gap: 6px 22px; max-width: 420px; }
.clients__list li {
  font-family: var(--display); font-weight: 600;
  font-size: 16px; color: #8A8A85;
}
#work { padding-top: 40px; }
#work .section__head { margin-bottom: 24px; }
.clients__list { display: flex; flex-wrap: wrap; gap: 12px 36px; }
.clients__list li {
  font-family: var(--display); font-weight: 600;
  font-size: 18px; color: #8A8A85;
}

/* Sections */
.section { padding-top: 96px; }
.section__head {
  display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between;
  gap: 20px; margin-bottom: 40px;
}
.section__title {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(28px, 3.6vw, 44px); line-height: 1.1; letter-spacing: normal;
}

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter {
  font: 600 12px/1 var(--body); letter-spacing: .06em; text-transform: uppercase;
  min-height: 36px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--ink); cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.filter:hover { border-color: var(--ink); }
.filter.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* Grid */
.grid { display: grid; gap: 48px 24px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(3, 1fr); } }

.card { cursor: default; }
.card__link { display: block; color: inherit; text-decoration: none; cursor: pointer; }
.card__arrow { display: inline-block; margin-left: 4px; color: var(--purple); transition: transform .2s; }
.card__link:hover .card__arrow { transform: translateX(4px); }
.card__link:hover .card__name { color: var(--purple-dark); }
.card.is-hidden { display: none; }
.thumb {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, var(--a, var(--purple)), var(--b, var(--night)));
}
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card:hover .thumb img { transform: scale(1.03); }
.thumb__ph {
  width: 100%; height: 100%;
  display: flex; align-items: flex-end; padding: 20px;
  font-family: var(--display); font-weight: 600;
  font-size: clamp(26px, 3vw, 36px); line-height: 1;
  color: rgba(255,255,255,.92);
  transition: transform .6s ease;
}
.card:hover .thumb__ph { transform: scale(1.03); }

.card__info { margin-top: 4px; }
.card__info > div {
  display: grid; grid-template-columns: 76px 1fr; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.card__info dt {
  font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); padding-top: 3px;
}
.card__info dd { font-size: 14px; }
.card__name { font-family: var(--display); font-weight: 600; font-size: 17px !important; line-height: 1.3; }
.tag {
  display: inline-block; vertical-align: 2px; margin-left: 6px;
  font-family: var(--body); font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  padding: 3px 7px; border-radius: 999px;
  background: #ECE6FC; color: var(--purple-dark);
}

/* Services */
.services { border-top: 1px solid var(--ink); }
.service {
  display: grid; gap: 8px 32px;
  grid-template-columns: 40px 1fr;
  padding: 28px 0; border-bottom: 1px solid var(--line);
}
.service__num { font-size: 13px; font-weight: 600; color: var(--purple); padding-top: 6px; }
.service h3 { font-family: var(--display); font-weight: 600; font-size: 24px; line-height: 1.2; }
.service p, .service__cta { grid-column: 2; }
.service p { color: #4A4A4A; max-width: 52ch; }
.service__cta {
  font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  text-decoration: none; color: var(--purple-dark);
}
.service__cta:hover { text-decoration: underline; }
@media (min-width: 900px) {
  .service { grid-template-columns: 60px 1.1fr 1.4fr auto; align-items: baseline; }
  .service p, .service__cta { grid-column: auto; }
}

/* Testimonials */
.quotes { display: grid; gap: 16px; }
@media (min-width: 900px) { .quotes { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.quote {
  display: flex; flex-direction: column; justify-content: space-between; gap: 28px;
  padding: 28px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
}
.quote blockquote { font-size: 17px; line-height: 1.55; color: #2A2A2A; }
.quote figcaption { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); line-height: 1.4; }
.quote figcaption strong { color: var(--ink); font-weight: 600; }
.quote__avatar {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--purple); color: var(--lime);
  font-family: var(--display); font-weight: 600;
}

.quote__stars { color: #F5A400; letter-spacing: 2px; font-size: 14px; margin-bottom: -12px; }
.quotes__more { display: inline-block; margin-top: 24px; color: var(--purple-dark); }

/* About */
.about { display: grid; gap: 40px; }
@media (min-width: 900px) { .about { grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; } }
.about__photo {
  aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(160deg, var(--purple), var(--night));
  max-width: 280px;
}
@media (min-width: 900px) { .about__photo { max-width: 460px; } }
.about__photo img { width: 100%; height: 100%; object-fit: cover; }
.thumb__ph--photo { align-items: center; justify-content: center; font-size: 22px; color: rgba(255,255,255,.5); }
.about__lead { margin-top: 20px; font-size: 19px; line-height: 1.5; color: #2E2E2E; max-width: 54ch; }
.about__cols { display: grid; gap: 32px; margin-top: 40px; }
@media (min-width: 640px) { .about__cols { grid-template-columns: 1fr 1fr; } }
.facts { margin-top: 10px; }
.about__text { margin-top: 14px; color: #4A4A4A; max-width: 54ch; }
.about__text a { color: var(--purple); text-underline-offset: 3px; }
.facts li {
  display: flex; flex-direction: column; gap: 2px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.facts li span:first-child { font-size: 13px; color: var(--muted); }
.facts li span:last-child { font-weight: 600; }
.tools { margin-top: 10px; font-weight: 500; }

/* Contact */
.contact {
  margin-top: 120px;
  background: var(--night);
  color: #fff;
  padding: 96px 0;
  position: relative; overflow: hidden;
}
.contact::before {
  content: ""; position: absolute; right: -10%; top: -40%;
  width: 60vw; height: 60vw; max-width: 720px; max-height: 720px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,77,234,.55), transparent 65%);
  pointer-events: none;
}
.contact .wrap { position: relative; }
.contact__title {
  margin-top: 16px;
  font-family: var(--display); font-weight: 600;
  font-size: clamp(32px, 5vw, 64px); line-height: 1.08; letter-spacing: normal;
  max-width: 20ch;
}
.contact__sub { margin-top: 18px; font-size: 18px; color: rgba(255,255,255,.7); max-width: 64ch; }
.contact__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.contact__note { display: flex; align-items: center; gap: 10px; margin-top: 20px; font-size: 14px; color: rgba(255,255,255,.65); }

/* Footer */
.footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding-top: 28px; padding-bottom: 28px;
  font-size: 13px; color: var(--muted);
}
.footer a { text-decoration: none; }
.footer a:hover { color: var(--ink); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .thumb img, .thumb__ph, .btn { transition: none; }
}

/* Mobile: keep the first project peeking above the fold */
@media (max-width: 639px) {
  .hero__meta p { font-size: 15px; }
  .clients__list { gap: 4px 16px; }
  .clients__list li { font-size: 14px; }
  #work { padding-top: 28px; }
  #work .section__head { gap: 14px; margin-bottom: 20px; }
}

/* ===== Case study pages ===== */
.page-case { background: #fff; }
.page-case .nav { background: rgba(255,255,255,.85); }

.case-head { padding-top: 40px; padding-bottom: 40px; }
.case-back { display: inline-block; margin-bottom: 32px; color: var(--muted); }
.case-title {
  margin-top: 10px;
  font-family: var(--display); font-weight: 600;
  font-size: clamp(48px, 8vw, 112px); line-height: 1; letter-spacing: normal;
}
.case-sub { margin-top: 16px; font-size: clamp(18px, 2vw, 24px); color: #3A3A3A; }
.case-meta {
  display: grid; gap: 0 32px; margin-top: 36px;
  border-top: 1px solid var(--ink);
}
.case-meta > div {
  display: grid; grid-template-columns: 76px 1fr; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.case-meta dt { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.case-meta dd { font-size: 15px; }
@media (min-width: 900px) {
  .case-meta { grid-template-columns: 1fr 2fr 1fr; }
  .case-meta > div { grid-template-columns: 1fr; gap: 6px; }
}

.case-media { margin-top: 24px; }
.case-media img { width: 100%; height: auto; border-radius: 20px; }

.case-ticker { margin-top: 24px; background: #0B0410; }
.case-ticker video { display: block; width: 100%; height: auto; max-height: 70vh; object-fit: cover; }

.case-story {
  display: grid; gap: 28px;
  padding-top: 88px; padding-bottom: 88px;
}
@media (min-width: 900px) { .case-story { grid-template-columns: 5fr 7fr; gap: 64px; } }
.case-story__lead h2 {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(26px, 3vw, 38px); line-height: 1.15; letter-spacing: normal;
}
.case-story__body > p { font-size: 18px; line-height: 1.6; color: #333; max-width: 60ch; }
.case-story__body > p + p { margin-top: 16px; }
.case-story__tagline { font-weight: 600; color: var(--ink) !important; }
.case-story__cols { display: grid; gap: 28px; margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
@media (min-width: 640px) { .case-story__cols { grid-template-columns: 1fr 1fr; } }
.case-story__cols p:not(.label) { margin-top: 8px; color: #333; }

.case-band { background: #C0B8CA; }
.case-band img { width: 100%; max-width: 1600px; height: auto; margin: 0 auto; }

.case-grid { display: grid; gap: 16px; margin-top: 24px; }
.case-grid__col { display: flex; flex-direction: column; gap: 16px; }
.case-grid img { display: block; width: 100%; height: auto; border-radius: 20px; object-fit: cover; }
@media (min-width: 768px) {
  .case-grid { grid-template-columns: 1074fr 746fr; gap: 20px; align-items: stretch; }
  .case-grid__col { gap: 20px; }
  /* last tile in each column stretches so both columns end on the same line */
  .case-grid__col img:last-child { flex: 1 1 auto; min-height: 0; }
}

.case-next { margin-top: 96px; }
.case-next__link {
  display: flex; flex-direction: column; gap: 8px;
  padding: 32px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.case-next__title {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(28px, 4vw, 52px); line-height: 1.1; letter-spacing: normal;
  transition: color .2s;
}
.case-next__link:hover .case-next__title { color: var(--purple); }
.page-case .contact { margin-top: 96px; }
