/* Wanbird IT — agency site (self-contained; shares the Wanbird look, not its files)
   Palette comes from the mark (#1DA1F2) and the owner's chosen direction:
   warm off-white, blue mark, clean black type, generous space. */

:root {
  --paper: #F7F5F0;
  --ink: #000;
  --blue: #1DA1F2;       /* the mark's blue: shapes and large type only */
  --blue-deep: #0A6CB0;  /* readable blue for small text on paper */
  --muted: #55534E;
  --line: rgba(0, 0, 0, .16);
  --line-dark: rgba(255, 255, 255, .22);

  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --body: "Onest", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(1.25rem, 4vw, 4rem);
  --lean: 14deg;         /* the slant of the strokes in the mark */
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  background: var(--ink);
  color: var(--paper);
  padding: .5rem .9rem;
  z-index: 10;
}
.skip:focus { top: .75rem; }

/* ---------- Header ---------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -.02em;
  text-decoration: none;
}
.brand img { width: 2rem; height: auto; display: block; }

.top nav {
  display: flex;
  gap: clamp(1rem, 2.5vw, 2.25rem);
  font-size: .975rem;
}
.top nav a {
  text-decoration: none;
  padding: .25rem 0;
  border-bottom: 2px solid transparent;
}
.top nav a:hover { border-bottom-color: var(--blue); }

/* ---------- The blade: one stroke of the mark ---------- */

.blade {
  display: block;
  width: .5em;
  height: .82em;
  border: .045em solid var(--ink);
  border-radius: .06em .06em .26em .26em;
  margin-left: .2em; /* the lean pushes the top edge left; keep it on the margin */
  transform: skewX(var(--lean));
  transform-origin: bottom;
}
.is-open .blade,
.hero-name .blade {
  background: var(--blue);
  border-color: var(--blue);
}

/* ---------- Dark top: header, name, services ---------- */

.dark { background: var(--ink); color: var(--paper); }

.hero { padding: clamp(3rem, 8vw, 7rem) var(--gutter) clamp(2rem, 4vw, 3rem); }

.hero-name {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 2.5rem);
  font-size: clamp(3.2rem, 11vw, 10.5rem);
}
.hero-name h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1em;
  line-height: .95;
  letter-spacing: -.05em;
}

/* The one load moment: the stroke of the mark rises. */
@keyframes rise {
  from { transform: skewX(var(--lean)) scaleY(0); }
  to   { transform: skewX(var(--lean)) scaleY(1); }
}
.hero-name .blade { animation: rise .7s cubic-bezier(.2, .8, .2, 1) both; }

.lede {
  margin-top: clamp(2rem, 4vw, 3.5rem);
  max-width: 34ch;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  line-height: 1.25;
  letter-spacing: -.015em;
}

.services-section { padding: clamp(2rem, 5vw, 4rem) var(--gutter) clamp(4rem, 9vw, 8rem); }

.quiet-heading {
  font-family: var(--body);
  font-weight: 500;
  font-size: 1rem;
  color: var(--blue);
}

.services { margin-top: 1.25rem; }

.service {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) minmax(0, 5fr);
  column-gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
  padding: clamp(1.75rem, 3vw, 2.75rem) 0;
  border-top: 1px solid var(--line-dark);
}
.service:last-child { border-bottom: 1px solid var(--line-dark); }

.service h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1.05;
  letter-spacing: -.035em;
}
.service p { max-width: 38ch; }
.service ul { color: rgba(247, 245, 240, .72); }
.service li + li { margin-top: .3rem; }

/* ---------- Work ---------- */

.work { padding: clamp(4rem, 9vw, 8rem) var(--gutter) 0; }

.work h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.9rem, 4.2vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -.03em;
}

.projects { margin-top: clamp(2rem, 4vw, 3.5rem); }

.project {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(14rem, 34rem);
  align-items: center;
  column-gap: clamp(1rem, 2.4vw, 2.5rem);
  padding: clamp(1.5rem, 3vw, 2.75rem) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: clamp(2.2rem, 4.6vw, 4.4rem); /* sizes the name and its stroke together */
}
.project + .project { border-top: 0; }

/* The stroke takes the project's own colour. */
.project .blade { background: var(--accent); align-self: start; margin-top: .1em; }

.project h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1em;
  line-height: 1;
  letter-spacing: -.045em;
}
.project h3 a { text-decoration: none; }
.project h3 a::after { content: ""; position: absolute; inset: 0; } /* the whole row opens the story */
.project h3 a:focus-visible { outline: none; }
.project:has(a:focus-visible) { outline: 3px solid var(--blue); outline-offset: 3px; }

.project-text p {
  margin-top: 1rem;
  max-width: 44ch;
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--muted);
}
.project-more {
  display: inline-block;
  margin-top: .8rem;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--blue-deep);
  text-decoration: underline;
  text-underline-offset: .22em;
  text-decoration-thickness: 2px;
}
.project:hover .project-more { color: var(--ink); }

/* The picture is cut on the lean of the mark: 15.58% is height × tan(14°), in widths. */
.project-shot {
  aspect-ratio: 1440 / 900;
  overflow: hidden;
  clip-path: polygon(0 0, 84.42% 0, 100% 100%, 15.58% 100%);
}
.project-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform .5s cubic-bezier(.2, .8, .2, 1);
}
.project:hover .project-shot img { transform: scale(1.06); }

/* ---------- Process ---------- */

.process { padding: clamp(4rem, 9vw, 8rem) var(--gutter); }

.process h2,
.contact h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.9rem, 4.2vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -.03em;
}

.process ol {
  margin-top: clamp(2.5rem, 5vw, 4.5rem);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 3rem);
  counter-reset: step;
}
.process li {
  counter-increment: step;
  border-top: 2px solid var(--ink);
  padding-top: 1rem;
}
.process li::before {
  content: counter(step);
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--blue-deep);
}
.process h3 {
  margin: .35rem 0 .6rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.6rem;
  letter-spacing: -.03em;
}
.process p { color: var(--muted); max-width: 30ch; }

/* ---------- Contact ---------- */

.contact {
  padding: clamp(4rem, 9vw, 8rem) var(--gutter);
  background: var(--blue);
  color: var(--ink);
}
.contact h2 { max-width: 16ch; text-wrap: balance; }
.contact p { margin-top: 1.25rem; max-width: 44ch; font-size: 1.15rem; }

.button {
  display: inline-block;
  margin-top: 2.25rem;
  padding: 1rem 1.6rem;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
  border-radius: .2rem .2rem .9rem .9rem; /* the rounded foot of a stroke */
  transition: background-color .15s, color .15s;
}
.button:hover { background: var(--paper); color: var(--ink); }
.contact :focus-visible { outline-color: var(--ink); }

/* ---------- Footer ---------- */

.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem var(--gutter);
  background: var(--blue);
  border-top: 1px solid rgba(0, 0, 0, .25);
  font-size: .95rem;
}
.foot :focus-visible { outline-color: var(--ink); }

/* ---------- Smaller screens ---------- */

@media (max-width: 900px) {
  .project { grid-template-columns: auto minmax(0, 1fr); row-gap: 1.5rem; }
  .project-shot { grid-column: 1 / -1; }
  .service { grid-template-columns: 1fr; row-gap: .9rem; }
  .process ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .top nav a[href="#process"], .top nav a[href="#services"] { display: none; }
  .process ol { grid-template-columns: 1fr; }
  .foot { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .blade { animation: none !important; }
  .button, .project-shot img { transition: none; }
}
