/* ═════════════════════════════════════════
   HOME: Services (dark), Selected Work (light), CTA (dark)
   ═════════════════════════════════════════ */

/* ───── shared ───── */
.section {
  position: relative;
  padding: clamp(88px, 12vw, 160px) var(--pad);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.section-head {
  max-width: 900px;
  margin-bottom: clamp(48px, 6vw, 88px);
}
.section-title {
  margin-top: 18px;
  font-family: var(--font-display);
  font-weight: var(--title-weight);
  letter-spacing: var(--title-tracking);
  line-height: 1.02;
  font-size: clamp(30px, 4.6vw, 64px);
}
.section-lede {
  margin-top: 22px;
  max-width: 56ch;
  color: var(--muted);
  font-size: clamp(16px, 1.3vw, 18px);
}

/* reveal on scroll (home.js inaongeza .is-in) */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.9s var(--ease),
    transform 0.9s var(--ease);
  transition-delay: var(--d, 0s);
}
.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 3px;
  border-bottom: 1px solid currentColor;
  font-weight: 500;
  transition: gap 0.4s var(--ease);
}
.link-arrow:hover {
  gap: 14px;
}

/* ═════════ SERVICES (dark technical) ═════════ */
.services {
  background: var(--bg);
  padding-bottom: calc(clamp(88px, 12vw, 160px) + 32px);
}
.services::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(
    rgba(242, 239, 233, 0.09) 1px,
    transparent 1px
  );
  background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent,
    #000 22%,
    #000 78%,
    transparent
  );
  mask-image: linear-gradient(
    to bottom,
    transparent,
    #000 22%,
    #000 78%,
    transparent
  );
}
.services > * {
  position: relative;
}

.service-list {
  border-bottom: 1px solid var(--line);
}
.service {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px 24px;
  padding: 36px 0;
  align-items: start;
}
.service-line {
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: var(--line);
  transform-origin: left;
  transition: transform 1.4s var(--ease);
}
.js .service-line {
  transform: scaleX(0);
}
.js .service.is-in .service-line {
  transform: scaleX(1);
}

.service-num {
  grid-column: 1/-1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.service-tag {
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--accent);
  color: var(--bg);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.service h3 {
  font-size: clamp(22px, 2.6vw, 34px);
  font-weight: 500;
  letter-spacing: -0.02em;
  transition:
    transform 0.5s var(--ease),
    color 0.3s;
}
.service p {
  margin-top: 8px;
  max-width: 52ch;
  color: var(--muted);
}
.service-arrow {
  font-size: 26px;
  transition:
    transform 0.5s var(--ease),
    color 0.3s;
}

@media (min-width: 860px) {
  .service {
    grid-template-columns: 270px 1fr auto;
    align-items: center;
  }
  .service-num {
    grid-column: auto;
  }
}
.service:hover h3,
.service:focus-visible h3 {
  transform: translateX(12px);
  color: var(--accent);
}
.service:hover .service-arrow,
.service:focus-visible .service-arrow {
  transform: translateX(8px);
  color: var(--accent);
}

/* ═════════ SELECTED WORK (light editorial) ═════════ */
.work {
  --ink: #0b0b0c;
  --ink-muted: #5e5a54;
  --ink-line: rgba(11, 11, 12, 0.14);
  position: relative;
  z-index: 2;
  margin-top: -32px;
  border-radius: 32px 32px 0 0;
  background: #f2efe9;
  color: var(--ink);
  padding-bottom: calc(clamp(88px, 12vw, 160px) + 32px);
}
.work .eyebrow,
.work .section-lede {
  color: var(--ink-muted);
}

.project {
  display: grid;
  gap: 32px;
  align-items: center;
  padding: clamp(36px, 5vw, 64px) 0;
  border-top: 1px solid var(--ink-line);
}
.project:last-of-type {
  border-bottom: 1px solid var(--ink-line);
}
@media (min-width: 900px) {
  .project {
    grid-template-columns: 1.2fr 0.8fr;
    gap: 64px;
  }
  .project--flip .project__visual {
    order: 2;
  }
}

.project__body {
  min-width: 0;
}
.project__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.project__num {
  color: var(--ink);
}
.project__status {
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--ink);
  color: #f2efe9;
}
.project__title {
  margin-top: 18px;
  font-family: var(--font-display);
  font-weight: var(--title-weight);
  letter-spacing: var(--title-tracking);
  line-height: 1.02;
  font-size: clamp(30px, 3.6vw, 52px);
}
.project__desc {
  margin-top: 18px;
  max-width: 46ch;
  color: var(--ink-muted);
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}
.tags li {
  padding: 6px 12px;
  border: 1px solid var(--ink-line);
  border-radius: 99px;
  font-size: 12px;
}
.project__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: 32px;
}
.work-more {
  margin-top: 48px;
}

/* visual container (container queries zinaipa kila visual mpangilio wake) */
.project__visual {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-radius: 22px;
  container-type: inline-size;
}

/* ───── PrimeHomes: chat + lead card ───── */
.pv {
  background: #0b0b0c;
  color: var(--fg);
  padding: clamp(16px, 3cqw, 28px);
}
.pv__grid {
  display: grid;
  gap: 16px;
  align-content: start;
}
@container (min-width:560px) {
  .pv__grid {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: start;
  }
}

.chat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.chat__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
}
.chat__avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
}
.msg {
  max-width: 84%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.4;
  transition:
    opacity 0.5s var(--ease),
    transform 0.6s var(--ease);
}
.msg--user {
  align-self: flex-end;
  background: var(--accent);
  color: var(--bg);
  border-bottom-right-radius: 4px;
}
.msg--bot {
  align-self: flex-start;
  background: rgba(242, 239, 233, 0.08);
  border-bottom-left-radius: 4px;
}
.js .msg {
  opacity: 0;
  transform: translateY(10px);
}
.js .msg.is-on {
  opacity: 1;
  transform: none;
}

.lead {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(242, 239, 233, 0.04);
}
.lead__title {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.lead dl {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.lead__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
  font-size: 12.5px;
  transition:
    opacity 0.5s var(--ease),
    transform 0.6s var(--ease);
}
.lead__row dt {
  color: var(--muted);
}
.lead__row dd {
  text-align: right;
}
.lead__handoff {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--bg);
  font-size: 12.5px;
  font-weight: 500;
  transition:
    opacity 0.5s var(--ease),
    transform 0.6s var(--ease);
}
.js .lead__row,
.js .lead__handoff {
  opacity: 0;
  transform: translateX(10px);
}
.js .lead__row.is-on,
.js .lead__handoff.is-on {
  opacity: 1;
  transform: none;
}

.pv__note {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ───── FMA: website inayosogea ───── */
.fv {
  background: #e3dfd5;
  padding: clamp(16px, 4cqw, 36px);
}
.browser {
  overflow: hidden;
  border-radius: 12px;
  background: #fbfaf7;
  box-shadow: 0 20px 50px rgba(11, 11, 12, 0.18);
}
.browser__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  background: #efebe2;
  border-bottom: 1px solid rgba(11, 11, 12, 0.08);
}
.browser__bar i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(11, 11, 12, 0.2);
}
.browser__url {
  margin-left: 10px;
  padding: 3px 12px;
  border-radius: 99px;
  background: #fbfaf7;
  font-family: var(--font-mono);
  font-size: 10px;
  color: #5e5a54;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.browser__view {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
}

.page {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  height: 210%;
  padding: 16px;
  animation: scroll-page 16s ease-in-out infinite;
}
@keyframes scroll-page {
  0%,
  14% {
    transform: translateY(0);
  }
  46%,
  58% {
    transform: translateY(-52%);
  }
  90%,
  100% {
    transform: translateY(0);
  }
}
.page__nav {
  display: flex;
  align-items: center;
  gap: 10px;
}
.page__nav b {
  width: 42px;
  height: 10px;
  border-radius: 3px;
  background: #0b0b0c;
}
.page__nav span {
  width: 26px;
  height: 6px;
  border-radius: 3px;
  background: #dad5ca;
}
.page__nav span:nth-of-type(1) {
  margin-left: auto;
}
.page__hero {
  display: grid;
  gap: 8px;
}
.page__hero .l {
  height: 12px;
  border-radius: 4px;
  background: #0b0b0c;
}
.page__hero .l:nth-child(2) {
  width: 72%;
}
.page__hero .s {
  width: 60%;
  height: 6px;
  border-radius: 3px;
  background: #dad5ca;
}
.pbtn {
  width: 84px;
  height: 22px;
  border-radius: 99px;
  background: #0b0b0c;
}
.page__cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.page__cards i {
  height: 64px;
  border-radius: 8px;
  background: #efebe2;
  border: 1px solid rgba(11, 11, 12, 0.06);
}
.page__band {
  height: 70px;
  border-radius: 12px;
  background: var(--accent);
}
.page__form {
  display: grid;
  gap: 8px;
  max-width: 60%;
}
.page__form div {
  height: 16px;
  border-radius: 5px;
  background: #efebe2;
}

/* ═════════ CTA YA MWISHO (dark) ═════════ */
.cta-section {
  position: relative;
  z-index: 3;
  overflow: hidden;
  margin-top: -32px;
  border-radius: 32px 32px 0 0;
  background: var(--bg);
  padding: clamp(96px, 14vw, 200px) var(--pad);
}
.cta-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    40% 50% at 85% 100%,
    color-mix(in srgb, var(--accent) 14%, transparent),
    transparent 70%
  );
}
.cta-section > * {
  position: relative;
}
.cta-title {
  max-width: 16ch;
  margin-top: 20px;
  font-family: var(--font-display);
  font-weight: var(--title-weight);
  letter-spacing: var(--title-tracking);
  line-height: 0.98;
  font-size: clamp(40px, 8.4vw, 128px);
}
.cta-arrow {
  display: inline-block;
  color: var(--accent);
  transition: transform 0.6s var(--ease);
}
.cta-title:hover .cta-arrow {
  transform: translate(8px, -8px) rotate(8deg);
}
.cta-section .section-lede {
  margin-top: 28px;
}
.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 44px;
}
