/* PakAdv. One stylesheet for all four pages.
   Visual idea: a transit map. Straight rules are lines, round shapes are stops and actions.
   Green = payments, marigold = advertising. Marigold never carries text on white. */

:root {
  --green: #01411C;    /* Pakistan flag green: text, payments line, dark bands */
  --marigold: #F5B700; /* advertising line, primary actions */
  --mist: #EDF3EC;
  --paper: #fff;
  --muted: #4B6253;
  --rule: #C5D3C8;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 1.0625rem/1.6 Archivo, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--green);
  background: var(--paper);
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: .08em; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 {
  margin: 0 0 .6em;
  font-weight: 800;
  font-stretch: 125%;
  line-height: 1.05;
  letter-spacing: -.015em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.2rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.2rem; font-stretch: 112%; line-height: 1.25; letter-spacing: 0; }
p, ul, ol, dl { margin: 0 0 1em; }
p { max-width: 64ch; }

.skip { position: absolute; left: -999rem; }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; padding: .5rem 1rem; background: var(--paper); }

.wrap { max-width: 76rem; margin-inline: auto; padding-inline: var(--gutter); }

/* Header */
.top-in {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .5rem 1rem; padding-block: 1rem;
}
.brand {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: 1.3rem; font-weight: 800; font-stretch: 125%; letter-spacing: -.01em;
  text-decoration: none;
}
.top nav { display: flex; gap: clamp(.8rem, 3vw, 2rem); }
.top nav a {
  padding-block: .35rem; border-bottom: 3px solid transparent;
  font-weight: 600; text-decoration: none;
}
.top nav a:hover { border-color: var(--rule); }
.top nav a[aria-current] { border-color: var(--green); }

/* Bands */
.band { padding-block: clamp(3rem, 8vw, 6rem); }
.mist { background: var(--mist); }
.gold { background: var(--marigold); }
.dark { background: var(--green); color: #fff; }
.dark :focus-visible { outline-color: var(--marigold); }

/* Hero */
.hero { padding-block: clamp(2.5rem, 7vw, 5rem) clamp(3rem, 8vw, 6rem); overflow: clip; }
.hero h1 { max-width: 16ch; }
.hero.inner h1 { max-width: 24ch; font-size: clamp(2rem, 4.6vw, 3.5rem); }
.lede { max-width: 54ch; font-size: clamp(1.1rem, 1.7vw, 1.3rem); line-height: 1.5; }

.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.btn {
  display: inline-block; padding: .8em 1.5em;
  border: 2px solid var(--green); border-radius: 99px;
  font-weight: 700; line-height: 1.2; text-decoration: none;
}
.btn.primary { background: var(--marigold); }
.btn:hover { background: var(--green); color: #fff; }
.dark .btn { border-color: #fff; }
.dark .btn.primary { border-color: var(--marigold); color: var(--green); }
.dark .btn:hover { border-color: #fff; background: #fff; color: var(--green); }

.tag {
  display: inline-block; padding: .15em .7em;
  border: 1.5px solid var(--green); border-radius: 99px; background: var(--marigold);
  font-size: .78rem; font-weight: 700; line-height: 1.4; white-space: nowrap;
}

/* Route map: two lines leaving one hub. Vertical on small screens, horizontal on wide ones. */
.routes {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem;
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
}
.hub {
  grid-column: 1 / -1; max-width: none; margin: 0; padding: .7rem 1.1rem;
  border-radius: .8rem; background: var(--green); color: #fff;
  font-size: .9rem; line-height: 1.3;
}
.hub strong { display: block; font-size: 1.15rem; font-weight: 800; font-stretch: 125%; }
.route {
  position: relative; padding: 1.25rem 0 0 2.1rem;
  animation: wipe-down 1.1s .2s cubic-bezier(.3, .7, .2, 1) both;
}
.route::before {
  content: ""; position: absolute; left: .4rem; top: 0; bottom: -100vh; width: 8px;
  background: var(--green);
}
.route.ads::before { background: var(--marigold); outline: 1.5px solid var(--green); }
.route-name { margin-bottom: 1rem; font-weight: 800; font-stretch: 112%; }
.route ol { margin: 0; padding: 0; list-style: none; }
.route li { position: relative; padding-bottom: 1.1rem; font-weight: 600; line-height: 1.3; }
.route li::before {
  content: ""; position: absolute; left: calc(-1.7rem - 5px); top: .05em;
  width: 18px; height: 18px; border: 4px solid var(--green); border-radius: 50%;
  background: #fff;
}
.route li.here::before { background: var(--marigold); }
.route a { text-decoration: none; }
.route a:hover { text-decoration: underline; }

@media (min-width: 64rem) {
  .routes { grid-template-columns: auto 1fr; gap: 0; }
  .hub {
    grid-column: 1; grid-row: 1 / 3;
    display: flex; flex-direction: column; justify-content: center;
    padding: 1rem 1.5rem;
  }
  .route { padding: 2.3rem 0 1.5rem; animation-name: wipe-right; }
  .route::before { left: 0; top: 2.3rem; bottom: auto; width: 100vw; height: 8px; }
  .route-name { position: absolute; top: .3rem; left: 2rem; margin: 0; font-size: .95rem; }
  .route ol { display: grid; grid-template-columns: repeat(7, 1fr); padding-left: 2rem; }
  .route.ads li { grid-column: span 2; }
  .route.ads li:last-child { grid-column: 7; } /* lines up with the payments stop of the same name */
  .route li { padding: 1.5rem .75rem 0 0; font-size: .92rem; }
  .route li::before { left: 0; top: -5px; }
  .route .tag { display: table; margin-top: .3rem; }
}

@keyframes wipe-down { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 -100vh 0); } }
@keyframes wipe-right { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 -100vw 0 0); } }
@media (prefers-reduced-motion: reduce) { .route { animation: none; } }

/* Two-up blocks, each headed by its line */
.duo { display: grid; gap: 2.5rem clamp(2rem, 5vw, 4rem); margin-top: 2.5rem; }
@media (min-width: 48rem) { .duo { grid-template-columns: 1fr 1fr; } }
.line-top::before {
  content: ""; display: block; height: 8px; margin-bottom: 1.4rem; background: var(--green);
}
.line-top.ads::before { background: var(--marigold); outline: 1.5px solid var(--green); }
.dark .line-top::before { background: #fff; }
.dark .line-top.ads::before { background: var(--marigold); outline: 0; }

/* Heading on the left, content on the right */
.split { display: grid; gap: 1.5rem clamp(2rem, 6vw, 5rem); }
@media (min-width: 54rem) { .split { grid-template-columns: 5fr 7fr; } }

/* Short term + description sets */
.quad {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0 2rem;
  margin: 2.5rem 0 0;
}
.quad div { padding: 1rem 0 1.5rem; border-top: 1.5px solid var(--green); }
.quad dt { font-weight: 800; font-stretch: 112%; }
.quad dd { margin: .25rem 0 0; color: var(--muted); }
.quad.contact dd { color: inherit; font-size: 1.15rem; font-weight: 600; overflow-wrap: anywhere; }

.rows { margin: 0; }
.rows div { display: grid; gap: .25rem 2rem; padding: 1.1rem 0; border-top: 1.5px solid var(--rule); }
.rows div:first-child { border-top-color: var(--green); }
@media (min-width: 36rem) { .rows div { grid-template-columns: 14rem 1fr; } }
.rows dt { font-weight: 700; }
.rows dd { margin: 0; color: var(--muted); }

/* Careers */
.roles { margin: 2.5rem 0 0; padding: 0; list-style: none; border-top: 1.5px solid var(--green); }
.roles li {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .3rem 1.5rem; padding: 1rem 0; border-bottom: 1.5px solid var(--rule); font-weight: 600;
}
.roles .closed { color: var(--muted); font-weight: 400; }

.pills { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; list-style: none; }
.pills li {
  padding: .3em .9em; border: 1.5px solid var(--green); border-radius: 99px;
  font-size: .92rem; font-weight: 600;
}
.cols { display: grid; gap: 2.5rem clamp(2rem, 5vw, 4rem); margin-top: 3rem; }
@media (min-width: 48rem) { .cols { grid-template-columns: 1fr 1fr; } }
.cols h3 { padding-top: 1rem; border-top: 1.5px solid var(--green); }
.cols ul { padding-left: 1.1em; }
.cols .pills { padding-left: 0; }
.cols li { margin-bottom: .4em; }

.income { padding: 1.5rem; background: var(--mist); }
.income h3 { padding-top: 0; border-top: 0; }
.income dl { margin: 0 0 1rem; }
.income dl div {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: .2rem 1rem; padding: .8rem 0; border-top: 1.5px solid var(--rule);
}
.income dd {
  margin: 0; font-size: 1.3rem; font-weight: 800; font-stretch: 112%;
  font-variant-numeric: tabular-nums;
}
.income small { font-size: .85rem; font-weight: 400; font-stretch: 100%; white-space: nowrap; }
.income p { margin: 0; font-size: .95rem; }

/* Footer */
.foot { padding-block: 3rem 1.5rem; border-top: 1.5px solid var(--green); font-size: .95rem; }
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 2rem; }
.foot .brand { margin-bottom: .9rem; }
.foot h2 { margin-bottom: .75rem; font-size: 1rem; font-stretch: 112%; letter-spacing: 0; }
.foot ul { margin: 0 0 .6rem; padding: 0; list-style: none; }
.foot li { margin-bottom: .4rem; }
.foot p { max-width: 38ch; }
.legal { margin-top: 2.5rem; color: var(--muted); font-size: .85rem; }
