/* Alec Wild Studio
   Palette from a London street-name plate: enamel white, black lettering, postcode red. */
:root {
  --paper: #F6F6F2;
  --ink: #000;
  --soft: #56564F;
  --hair: #CFCFC7;
  --wash: #EAEAE3;
  --red: #D6252B;
  --red-ink: #B81C22; /* red for small text on paper: 5.6:1 */

  --display: "Anybody", "Arial Narrow", system-ui, sans-serif;
  --text: "Source Serif 4", Georgia, serif;

  /* perfect fourth on 18px */
  --s-0: 1.125rem;
  --s-1: 1.5rem;
  --s-2: 2rem;
  --s-3: 2.666rem;
  --s-4: 3.553rem;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1440px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--s-0)/1.6 var(--text);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 700; line-height: 1.05; }
p { margin: 0; }

:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip {
  position: absolute; left: var(--gutter); top: -100px; z-index: 10;
  background: var(--ink); color: var(--paper); padding: .6rem 1rem;
  font-family: var(--display); font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- header ---------- */
.top {
  max-width: var(--max); margin: 0 auto;
  padding: 20px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  font-family: var(--display); font-size: 1rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; font-weight: 650; font-stretch: 112%; letter-spacing: .005em;
}
.mark { width: 34px; height: auto; color: var(--red); flex: none; }
.top nav { display: flex; gap: clamp(14px, 2.4vw, 32px); }
.top nav a { text-decoration: none; font-weight: 500; padding: 6px 0; background: linear-gradient(var(--ink), var(--ink)) 0 100% / 0 2px no-repeat; transition: background-size .25s ease; }
.top nav a:hover { background-size: 100% 2px; }

/* ---------- masthead ---------- */
.masthead { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.name {
  font-family: var(--display);
  font-weight: 850;
  font-stretch: 150%;
  font-size: 15.6vw; /* replaced by site.js, which fits the name to the column */
  line-height: .8;
  letter-spacing: -.02em;
  margin: clamp(12px, 3vw, 40px) 0 0;
  padding-bottom: .06em;
  white-space: nowrap;
}
@media (min-width: 1440px) { .name { font-size: 220px; } }
.name-line { display: inline-block; }
.js .name { visibility: hidden; }
.js .name.is-set { visibility: visible; }

.intro {
  border-top: 6px solid var(--ink);
  margin-top: clamp(14px, 2vw, 24px);
  padding: clamp(24px, 3vw, 40px) 0 clamp(56px, 8vw, 112px);
  display: grid; gap: 28px 48px;
  grid-template-columns: minmax(0, 7fr) minmax(0, 6fr);
}
.statement {
  font-family: var(--display); font-weight: 650; font-stretch: 100%;
  font-size: var(--s-3); line-height: 1.08; letter-spacing: -.01em;
  max-width: 15em;
}
.intro-body { max-width: 34em; display: grid; gap: 28px; align-content: start; padding-top: .4em; }
.intro-body p { font-size: 1.1875rem; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px;
  font-family: var(--display); font-size: 1rem; font-weight: 650; font-stretch: 105%;
  text-decoration: none; color: var(--paper); background: var(--ink);
  border: 2px solid var(--ink);
  transition: background-color .2s ease, color .2s ease;
}
.button:hover { background: var(--red); border-color: var(--red); }
.button-quiet { background: transparent; color: var(--ink); }
.button-quiet:hover { color: var(--paper); }

/* ---------- concepts ---------- */
.concepts { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); position: relative; }
.section-head {
  display: grid; gap: 16px 48px; align-items: end;
  grid-template-columns: minmax(0, 7fr) minmax(0, 6fr);
  padding-bottom: 20px;
}
.section-head h2, .process h2, .contact h2 { font-size: var(--s-4); font-weight: 750; font-stretch: 120%; letter-spacing: -.015em; }
.honest { color: var(--soft); font-size: 1rem; max-width: 34em; }

.rows { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.rows li { border-bottom: 1px solid var(--ink); }
.row {
  display: grid; align-items: baseline;
  grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 3fr) auto;
  gap: 8px 32px;
  padding: 26px 0 24px;
  text-decoration: none;
}
.row-thumb { display: none; }
.row-name {
  font-family: var(--display); font-weight: 700; font-stretch: 112%;
  font-size: var(--s-2); line-height: 1.05; letter-spacing: -.01em;
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), color .2s ease;
}
.row-trade, .row-place { color: var(--soft); }
.row-go {
  font-family: var(--display); font-weight: 600; font-size: .9375rem;
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px;
}
.row:hover .row-name, .row:focus-visible .row-name { transform: translateX(18px); color: var(--red); }
.row:hover .row-go, .row:focus-visible .row-go { color: var(--red-ink); }
.row:focus-visible { outline-offset: -3px; }

/* floating preview, pointer and keyboard */
.preview {
  position: fixed; left: 0; top: 0; z-index: 5; pointer-events: none;
  width: min(30vw, 440px);
  opacity: 0; transform: translate3d(-9999px, 0, 0);
  transition: opacity .2s ease;
}
.preview img { width: 100%; border: 2px solid var(--ink); background: var(--wash); box-shadow: 10px 10px 0 var(--red); }
.preview.is-on { opacity: 1; }
@media (hover: none), (max-width: 899px) { .preview { display: none; } }

/* ---------- each concept ---------- */
.closer { max-width: var(--max); margin: 0 auto; padding: clamp(64px, 9vw, 128px) var(--gutter) 0; display: grid; gap: clamp(72px, 10vw, 144px); }
.study {
  display: grid; gap: 32px 56px; align-items: center;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  scroll-margin-top: 24px;
}
.study h3 { font-size: var(--s-3); font-weight: 750; font-stretch: 115%; letter-spacing: -.015em; margin-bottom: 14px; }
.study-text { display: grid; gap: 16px; align-content: start; max-width: 30em; }
.study-for { font-style: italic; color: var(--soft); }
.study-links { display: flex; flex-wrap: wrap; gap: 10px 24px; padding-top: 6px; font-family: var(--display); font-weight: 600; font-size: 1rem; }
.study-links a { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.study-links a:hover { color: var(--red-ink); }
.study-links .official { font-weight: 500; text-decoration-thickness: 1px; color: var(--soft); }

.study-shots { margin: 0; position: relative; padding: 0 9% 9% 0; }
.shot-desktop { width: 100%; border: 2px solid var(--ink); }
.shot-phone {
  position: absolute; right: 0; bottom: 0; width: 24%;
  border: 2px solid var(--ink); border-radius: 18px;
  box-shadow: 10px 10px 0 var(--red);
}

/* ---------- process ---------- */
.process { max-width: var(--max); margin: 0 auto; padding: clamp(96px, 12vw, 176px) var(--gutter) 0; }
.process h2 { padding-bottom: 20px; border-bottom: 2px solid var(--ink); }
.steps {
  list-style: none; margin: 0; padding: 0; counter-reset: step;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
}
.steps li { counter-increment: step; padding: 24px 28px 8px 0; display: grid; gap: 12px; align-content: start; }
.steps li + li { padding-left: 28px; border-left: 1px solid var(--hair); }
.steps li::before {
  content: counter(step);
  font-family: var(--display); font-weight: 800; font-stretch: 150%;
  font-size: var(--s-4); line-height: 1; color: var(--red);
}
.steps h3 { font-size: 1.375rem; font-weight: 700; font-stretch: 105%; line-height: 1.15; }
.steps p { color: var(--soft); font-size: 1.0625rem; }

/* ---------- about ---------- */
.about { max-width: var(--max); margin: 0 auto; padding: clamp(8px, 2vw, 24px) var(--gutter) 0; }
.route {
  display: grid; grid-template-columns: auto minmax(40px, 1fr) auto; align-items: center; gap: clamp(12px, 2vw, 28px);
  font-family: var(--display); font-weight: 800; font-stretch: 140%;
  font-size: clamp(1.5rem, 5.4vw, 4.75rem); line-height: 1; letter-spacing: -.02em;
}
.route-wave { width: 100%; height: .5em; overflow: visible; }
.route-wave polyline { fill: none; stroke: var(--red); stroke-width: 5; vector-effect: non-scaling-stroke; stroke-linejoin: miter; }
.about-body {
  margin-top: clamp(28px, 4vw, 48px); margin-left: auto;
  max-width: 36em; display: grid; gap: 20px; font-size: 1.1875rem;
}

/* ---------- contact ---------- */
.contact {
  max-width: var(--max); margin: clamp(96px, 12vw, 176px) auto 0;
  padding: clamp(40px, 5vw, 64px) var(--gutter) 0;
  border-top: 6px solid var(--ink);
  display: grid; gap: 16px;
}
.contact p { color: var(--soft); }
.contact-mail {
  font-family: var(--display); font-weight: 750; font-stretch: 110%;
  font-size: clamp(1.25rem, 5.2vw, 4.5rem); line-height: 1.1; letter-spacing: -.015em;
  text-decoration: underline; text-decoration-thickness: .06em; text-underline-offset: .12em;
  overflow-wrap: anywhere; margin-top: 8px;
}
.contact-mail:hover { color: var(--red); }

/* ---------- footer ---------- */
.foot {
  max-width: var(--max); margin: clamp(96px, 12vw, 160px) auto 0;
  padding: 24px var(--gutter) 40px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px;
  border-top: 1px solid var(--ink);
  color: var(--soft); font-size: .9375rem;
}
.foot-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-family: var(--display); font-weight: 650; font-stretch: 112%; }
.foot-brand .mark { width: 26px; }

/* ---------- smaller screens ---------- */
@media (max-width: 1099px) {
  .row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
  .row-name { grid-column: 1 / -1; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps li:nth-child(3) { padding-left: 0; border-left: 0; }
  .steps li:nth-child(n+3) { border-top: 1px solid var(--hair); margin-top: 16px; }
}
@media (max-width: 899px) {
  .intro, .section-head { grid-template-columns: minmax(0, 1fr); }
  .study { grid-template-columns: minmax(0, 1fr); }
  .study-shots { order: -1; }
  .row {
    grid-template-columns: 76px minmax(0, 1fr);
    grid-template-rows: auto auto auto auto;
    gap: 2px 18px; padding: 18px 0;
    align-items: start;
  }
  .row-thumb {
    display: block; grid-row: 1 / span 4; width: 76px; aspect-ratio: 76 / 110;
    object-fit: cover; object-position: top; border: 1.5px solid var(--ink); border-radius: 8px;
  }
  .row-name { grid-column: 2; font-size: var(--s-1); margin-bottom: 6px; }
  .row-trade, .row-place { grid-column: 2; font-size: 1rem; line-height: 1.4; }
  .row-go { grid-column: 2; margin-top: 8px; }
  .row:hover .row-name, .row:focus-visible .row-name { transform: none; }
}
@media (max-width: 640px) {
  :root { --s-3: 2rem; --s-4: 2.5rem; }
  .top { padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; row-gap: 6px; }
  .top nav { width: 100%; gap: 28px; padding-left: 44px; }
  .brand { font-size: 1.0625rem; }
  .name { line-height: .9; }
  .name-line { display: block; }
  .intro-body p { font-size: 1.125rem; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .steps li, .steps li + li { padding: 22px 0 6px; border-left: 0; }
  .steps li + li { border-top: 1px solid var(--hair); margin-top: 12px; }
  .about-body { font-size: 1.125rem; }
  .route { grid-template-columns: minmax(0, 1fr); gap: 10px; font-size: 2.75rem; }
  .route-wave { height: 22px; }
  .route span:last-of-type { text-align: right; }
  .shot-phone { border-radius: 10px; box-shadow: 6px 6px 0 var(--red); }
}
@media (prefers-reduced-motion: reduce) {
  .row-name, .top nav a, .button, .preview { transition: none; }
}
