/* AMTS — Afdal Madeena Technical Services LLC
   Kaynaan Digital. Brand colours sampled from the client logo. */

/* ── Fonts ────────────────────────────────────────────
   Self-hosted so no third-party origin sits on the critical path.
   Only the weights the page actually uses: Barlow 400, Condensed 500/600/700.
   The *Fallback faces below are Arial re-metricked to Barlow's proportions
   (measured, not guessed) so the swap costs zero layout shift. */
@font-face {
  font-family: 'Barlow';
  src: url('/assets/fonts/barlow-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Barlow Condensed';
  src: url('/assets/fonts/barlow-condensed-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Barlow Condensed';
  src: url('/assets/fonts/barlow-condensed-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Barlow Condensed';
  src: url('/assets/fonts/barlow-condensed-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Barlow Fallback';
  src: local('Arial'), local('Helvetica'), local('Liberation Sans');
  font-weight: 400;
  size-adjust: 96.49%;
  ascent-override: 103.63%;
  descent-override: 20.73%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Barlow Condensed Fallback';
  src: local('Arial'), local('Helvetica'), local('Liberation Sans');
  font-weight: 500;
  size-adjust: 77.56%;
  ascent-override: 128.93%;
  descent-override: 25.79%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Barlow Condensed Fallback';
  src: local('Arial'), local('Helvetica'), local('Liberation Sans');
  font-weight: 600;
  size-adjust: 79.07%;
  ascent-override: 126.47%;
  descent-override: 25.29%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Barlow Condensed Fallback';
  src: local('Arial'), local('Helvetica'), local('Liberation Sans');
  font-weight: 700;
  size-adjust: 80.97%;
  ascent-override: 123.51%;
  descent-override: 24.7%;
  line-gap-override: 0%;
}

:root {
  --brand-900: #16321c;
  --brand-800: #234a25;
  --brand-700: #3e6e2c;
  --brand-600: #5b913a;
  --brand-500: #7ba736;
  --brand-100: #e4eeda;
  --brand-50: #f3f7ee;
  --accent: #d3ac4c;

  --btn: #4e7c31; /* white on this = 4.94:1 (AA) */
  --btn-hover: #3b6626; /* white on this = 6.68:1 */

  --ink: #131a15;
  --body: #4e5a52;
  --line: #dce3d8;
  --line-dk: rgba(228, 238, 218, 0.16);
  --paper: #ffffff;
  --concrete: #f5f7f2;

  --radius: 3px;
  --shadow-sm: 0 1px 2px rgba(19, 26, 21, 0.06);
  --shadow-md: 0 4px 16px rgba(19, 26, 21, 0.09);
  --shadow-lg: 0 14px 40px rgba(19, 26, 21, 0.16);

  --wrap: 1180px;
  --pad: 20px;
  --rhythm: 66px;

  --display:
    'Barlow Condensed', 'Barlow Condensed Fallback', system-ui, sans-serif;
  --text: 'Barlow', 'Barlow Fallback', system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-block-start: 76px;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
/* <picture> is only a source-picker — let the <img> stay the real layout child
   so every existing .brand/.hero-shot/.shots/.drawer-head img rule still applies. */
picture {
  display: contents;
}
a {
  color: var(--brand-700);
}

h1,
h2,
h3 {
  font-family: var(--display);
  color: var(--ink);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: 0.002em;
  margin: 0;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.1rem, 6.2vw, 3.9rem);
}
h2 {
  font-size: clamp(1.65rem, 4vw, 2.6rem);
}
h3 {
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  font-weight: 600;
}

p {
  margin: 0;
}
:focus-visible {
  outline: 3px solid var(--brand-600);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.skip {
  position: absolute;
  inset-inline-start: -9999px;
  inset-block-start: 0;
  z-index: 300;
  background: var(--brand-900);
  color: #fff;
  padding: 12px 16px;
  text-decoration: none;
}
.skip:focus {
  inset-inline-start: 8px;
  inset-block-start: 8px;
}

/* ── Header ───────────────────────────────────────── */
.head {
  position: sticky;
  inset-block-start: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-block-end: 1px solid var(--line);
  transition: box-shadow 0.25s ease;
}
.head.stuck {
  box-shadow: var(--shadow-md);
}
.head-in {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  margin-inline-end: auto;
}
.brand img {
  width: auto;
  height: 36px;
}
.nav {
  display: none;
  gap: 24px;
}
@media (min-width: 1000px) {
  .nav {
    display: flex;
  }
}
.nav a {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--ink);
  text-decoration: none;
  padding-block: 6px;
  border-block-end: 2px solid transparent;
}
.nav a:hover,
.nav a.on {
  border-block-end-color: var(--brand-600);
  color: var(--brand-700);
}

/* The bottom bar already carries WhatsApp on small phones — drop the header
   copy there so the logo and the burger both get room. */
.head .head-cta {
  display: none;
}
@media (min-width: 560px) {
  .head .head-cta {
    display: inline-flex;
  }
}

/* ── Burger ───────────────────────────────────────── */
.burger {
  position: relative;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--ink);
}
.burger:hover {
  border-color: var(--brand-600);
}
@media (min-width: 1000px) {
  .burger {
    display: none;
  }
}
.burger i {
  position: absolute;
  inset-inline-start: 12px;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition:
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.18s ease,
    top 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
.burger i:nth-child(1) {
  top: 15px;
}
.burger i:nth-child(2) {
  top: 21px;
}
.burger i:nth-child(3) {
  top: 27px;
}
.burger[aria-expanded='true'] i:nth-child(1) {
  top: 21px;
  transform: rotate(45deg);
}
.burger[aria-expanded='true'] i:nth-child(2) {
  opacity: 0;
  transform: scaleX(0.2);
}
.burger[aria-expanded='true'] i:nth-child(3) {
  top: 21px;
  transform: rotate(-45deg);
}

/* ── Drawer ───────────────────────────────────────── */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 130;
  background: rgba(11, 26, 15, 0.6);
  opacity: 0;
  transition: opacity 0.32s ease;
}
.scrim.show {
  opacity: 1;
}

.drawer {
  position: fixed;
  inset-block: 0;
  inset-inline-end: 0;
  z-index: 140;
  width: min(340px, 86vw);
  display: flex;
  flex-direction: column;
  background: var(--brand-900);
  color: #c9d6c3;
  border-inline-start: 1px solid rgba(232, 239, 228, 0.16);
  transform: translateX(101%);
  visibility: hidden;
  /* visibility flips instantly on open (so the close button is focusable straight away)
     and is held back until the slide-out finishes on close. */
  transition:
    transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0.38s;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-block-end: env(safe-area-inset-bottom);
}
.drawer:dir(rtl) {
  transform: translateX(-101%);
}
.drawer.open {
  transform: none;
  visibility: visible;
  transition:
    transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s;
}
@media (min-width: 1000px) {
  .drawer,
  .scrim {
    display: none;
  }
}

.drawer-head {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--paper);
  border-block-end: 1px solid var(--line);
  padding: 12px 16px;
  min-height: 64px;
}
.drawer-head img {
  width: auto;
  height: 34px;
  margin-inline-end: auto;
}
.drawer-close {
  flex: none;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  cursor: pointer;
}
.drawer-close:hover {
  border-color: var(--brand-600);
  color: var(--brand-700);
}
.drawer-close svg {
  width: 100%;
  height: 100%;
  display: block;
}

.dnav {
  display: grid;
  counter-reset: dn;
  padding-inline: 16px;
}
.dnav a {
  counter-increment: dn;
  display: grid;
  grid-template-columns: 2.2rem 1fr;
  align-items: baseline;
  gap: 10px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.24rem;
  color: #fff;
  text-decoration: none;
  padding-block: 16px;
  border-block-end: 1px solid var(--line-dk);
}
.dnav a::before {
  content: counter(dn, decimal-leading-zero);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--accent);
}
.dnav a:hover,
.dnav a.on {
  color: var(--brand-500);
}
.dnav a.on::before {
  color: var(--brand-500);
}

.drawer-foot {
  margin-block-start: auto;
  display: grid;
  gap: 10px;
  padding: 24px 16px 28px;
}
.drawer-foot .btn {
  width: 100%;
}
.drawer-line {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.02rem;
  color: #c6d5c0;
  text-decoration: none;
  word-break: break-word;
}
.drawer-line:hover {
  color: #fff;
  text-decoration: underline;
}
.drawer-note {
  font-size: 0.86rem;
  color: #8da087;
  margin-block-start: 4px;
}

body.locked {
  overflow: hidden;
}

/* ── Buttons ──────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.06rem;
  letter-spacing: 0.01em;
  background: var(--btn);
  color: #fff;
  text-decoration: none;
  padding: 13px 26px;
  border-radius: var(--radius);
  border: 2px solid var(--btn);
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
  min-height: 48px;
}
.btn:hover {
  background: var(--btn-hover);
  border-color: var(--btn-hover);
}
.btn:active {
  transform: translateY(1px);
}
.btn-sm {
  padding: 9px 18px;
  font-size: 0.98rem;
  min-height: 40px;
}
.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.42);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
}

/* ── Hero ─────────────────────────────────────────── */
.hero {
  background: var(--brand-900);
  color: #e8efe4;
  position: relative;
  overflow: hidden;
  padding-block: calc(var(--rhythm) - 8px) var(--rhythm);
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(91, 145, 58, 0.22), transparent 55%),
    repeating-linear-gradient(
      90deg,
      rgba(232, 239, 228, 0.05) 0 1px,
      transparent 1px 88px
    );
}
.hero-in {
  position: relative;
  display: grid;
  gap: 36px;
}
@media (min-width: 1000px) {
  .hero-in {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 56px;
    align-items: center;
  }
}
.hero h1 {
  color: #fff;
  margin-block-end: 16px;
}
.kicker {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-block-end: 12px;
}
.kicker-dark {
  color: var(--brand-700);
}
.lede {
  font-size: clamp(1.02rem, 1.5vw, 1.15rem);
  color: #c9d6c3;
  max-width: 56ch;
}

.pills {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 0;
  padding: 0;
}
.pills li {
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.98rem;
  border: 1px solid rgba(232, 239, 228, 0.3);
  color: #dce7d6;
  padding: 5px 13px;
  border-radius: var(--radius);
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-block-start: 28px;
}
.hero-for {
  margin-block-start: 24px;
  padding-block-start: 16px;
  border-block-start: 1px solid rgba(232, 239, 228, 0.18);
  font-size: 0.94rem;
  color: #a9baa3;
  max-width: 52ch;
}

.hero-shot {
  margin: 0;
  position: relative;
}
.hero-shot img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  object-position: center 35%;
  border-radius: var(--radius);
  border: 1px solid rgba(232, 239, 228, 0.2);
}
.hero-shot figcaption {
  margin-block-start: 10px;
  font-size: 0.86rem;
  color: #a9baa3;
}

/* ── Bands ────────────────────────────────────────── */
.band {
  padding-block: var(--rhythm);
}
.band-alt {
  background: var(--concrete);
}
.band-dark {
  background: var(--brand-900);
  color: #c9d6c3;
}
.band-dark h2,
.band-dark h3 {
  color: #fff;
}
@media (min-width: 1000px) {
  :root {
    --rhythm: 88px;
  }
}

.band h2 {
  margin-block-end: 14px;
}
.intro {
  max-width: 62ch;
  font-size: 1.03rem;
}
.band-dark .intro {
  color: #b6c6af;
}

/* ── Services spec rows ───────────────────────────── */
.spec {
  margin-block-start: 36px;
  border-block-start: 1px solid var(--line);
}
.spec-row {
  display: grid;
  gap: 6px;
  padding-block: 22px;
  border-block-end: 1px solid var(--line);
  position: relative;
}
@media (min-width: 768px) {
  .spec-row {
    grid-template-columns: minmax(0, 15rem) 1fr;
    gap: 32px;
    align-items: baseline;
  }
}
.spec-row::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  inset-block-end: -1px;
  height: 2px;
  background: var(--brand-600);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.spec-row:hover::after {
  transform: scaleX(1);
}
.spec-row p {
  max-width: 62ch;
}

/* ── Site work shots ──────────────────────────────── */
.shots {
  margin-block-start: 32px;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 768px) {
  .shots {
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
  }
}
.shots figure {
  margin: 0;
}
.shots img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  object-position: center 35%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.note {
  margin-block-start: 22px;
  padding-inline-start: 16px;
  border-inline-start: 3px solid var(--brand-600);
  font-size: 0.98rem;
  max-width: 62ch;
}

/* ── Project register ─────────────────────────────── */
.register {
  list-style: none;
  counter-reset: reg;
  margin: 32px 0 0;
  padding: 0;
  border-block-start: 1px solid var(--line-dk);
}
@media (min-width: 768px) {
  .register {
    columns: 2;
    column-gap: 48px;
    border-block-start: none;
  }
}
.register li {
  counter-increment: reg;
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  gap: 2px 8px;
  padding-block: 12px;
  border-block-end: 1px solid var(--line-dk);
  break-inside: avoid;
}
.register li::before {
  content: counter(reg, decimal-leading-zero);
  grid-row: span 2;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.94rem;
  color: var(--accent);
  padding-block-start: 3px;
}
.register span {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.14rem;
  color: #fff;
  line-height: 1.2;
}
.register em {
  font-style: normal;
  font-size: 0.9rem;
  color: #9fb199;
}
.footnote {
  margin-block-start: 20px;
  font-size: 0.84rem;
  color: #8da087;
}

/* ── Process steps ────────────────────────────────── */
.steps {
  list-style: none;
  counter-reset: st;
  margin: 36px 0 0;
  padding: 0;
  display: grid;
  gap: 0;
  border-block-start: 1px solid var(--line);
}
@media (min-width: 768px) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 48px;
  }
}
.steps li {
  counter-increment: st;
  position: relative;
  padding: 22px 0 22px 56px;
  border-block-end: 1px solid var(--line);
}
.steps li::before {
  content: counter(st, decimal-leading-zero);
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: 24px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--brand-600);
  line-height: 1;
}
.steps h3 {
  margin-block-end: 4px;
}
.steps p {
  font-size: 0.98rem;
}

/* ── Partnership ──────────────────────────────────── */
.partner {
  display: grid;
  gap: 36px;
}
@media (min-width: 1000px) {
  .partner {
    grid-template-columns: 0.95fr 1.05fr;
    gap: 56px;
    align-items: start;
  }
}
.stages {
  margin: 0;
  display: grid;
  gap: 0;
  border-block-start: 1px solid var(--line);
}
.stages > div {
  display: grid;
  grid-template-columns: minmax(0, 7.5rem) 1fr;
  gap: 16px;
  padding-block: 18px;
  border-block-end: 1px solid var(--line);
}
.stages dt {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--ink);
}
.stages dd {
  margin: 0;
  font-size: 0.98rem;
}

/* ── Contact cards ────────────────────────────────── */
.cards {
  margin-block-start: 32px;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1000px) {
  .cards {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
}
.card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 22px;
  text-decoration: none;
  background: rgba(232, 239, 228, 0.055);
  border: 1px solid var(--line-dk);
  border-radius: var(--radius);
  transition:
    background 0.22s ease,
    border-color 0.22s ease,
    transform 0.22s ease;
}
a.card:hover {
  background: rgba(232, 239, 228, 0.1);
  border-color: var(--brand-500);
  transform: translateY(-2px);
}
.card-k {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  color: var(--accent);
}
.card-v {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.18rem;
  color: #fff;
  word-break: break-word;
}
.card-n {
  font-size: 0.86rem;
  color: #9fb199;
}
.card-static {
  cursor: default;
}

/* ── Footer ───────────────────────────────────────── */
.foot {
  background: #0e1f12;
  color: #9fb199;
  padding-block: 44px 0;
  font-size: 0.94rem;
  padding-bottom: calc(64px + env(safe-area-inset-bottom));
}
.foot-in {
  display: grid;
  gap: 20px;
  padding-block-end: 28px;
}
@media (min-width: 768px) {
  .foot-in {
    grid-template-columns: 1fr auto;
    gap: 48px;
  }
}
.foot-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.24rem;
  color: #fff;
}
.foot-line {
  margin-block-start: 6px;
  font-size: 0.9rem;
}
.foot-meta {
  display: grid;
  gap: 4px;
}
.foot a {
  color: #c6d5c0;
  text-decoration: none;
}
.foot a:hover {
  color: #fff;
  text-decoration: underline;
}
.foot-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  border-block-start: 1px solid rgba(232, 239, 228, 0.12);
  padding-block: 16px;
  font-size: 0.84rem;
}

/* ── Sticky mobile bar ────────────────────────────── */
.bar {
  position: fixed;
  inset-inline: 0;
  inset-block-end: 0;
  z-index: 120;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-block-start: 1px solid rgba(0, 0, 0, 0.12);
  padding-block-end: env(safe-area-inset-bottom);
}
.bar a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  text-decoration: none;
  color: #fff;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.1rem;
}
.bar a:first-child {
  background: var(--btn);
}
.bar a:last-child {
  background: var(--brand-900);
}
@media (min-width: 1000px) {
  .bar {
    display: none;
  }
  body {
    padding-block-end: 0;
  }
  .foot {
    padding-bottom: 0;
  }
}

/* ── Reveal ───────────────────────────────────────── */
.rise {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.6s ease,
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.rise.in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .rise {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .spec-row::after {
    transition: none;
  }
  .drawer,
  .scrim,
  .burger i {
    transition: none;
  }
}
