/* ═══════════════════════════════════════════════════════════
   Alpha Development SIA
   Baltic cool paper · pine-teal accent · grotesk + serif body
   Three moves only: hero, work, contact.
   ═══════════════════════════════════════════════════════════ */

:root {
  --paper:  #F4F5F2;
  --card:   #FFFFFF;
  --ink:    #14181A;
  --slate:  #5D686B;
  --rule:   #DCDFD9;
  --accent: #2F5D57;
  --sand:   #E8E3D7;

  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --body:    "Source Serif 4", Georgia, "Times New Roman", serif;
  --mono:    "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap: 1140px;
  --gut: clamp(1.25rem, 5vw, 4rem);
  --pad: clamp(5rem, 12vw, 10rem);
}

*, *::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-family: var(--body);
  font-size: clamp(1.0625rem, 0.45vw + 0.95rem, 1.1875rem);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { font-family: var(--display); font-weight: 600; margin: 0; }
p { margin: 0; }
img { max-width: 100%; display: block; }

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

.skip {
  position: absolute; left: -9999px;
  background: var(--ink); color: var(--paper);
  padding: .75rem 1rem; z-index: 99; font-family: var(--mono); font-size: .8rem;
}
.skip:focus { left: 1rem; top: 1rem; }

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

/* ── shared bits ───────────────────────────────────────── */

.eyebrow {
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.link {
  font-family: var(--mono);
  font-size: .84rem;
  letter-spacing: .01em;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: .2rem;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  transition: color .18s ease, border-color .18s ease;
}
.link:hover { color: var(--accent); border-color: var(--accent); }
.link__arrow { transition: transform .18s ease; }
.link:hover .link__arrow { transform: translateX(3px); }

/* ── nav ───────────────────────────────────────────────── */

.nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; min-height: 68px;
}

.mark {
  display: inline-flex; align-items: center; gap: .6rem;
  text-decoration: none; color: var(--ink);
  font-family: var(--display);
  font-weight: 600; font-size: .95rem; letter-spacing: -.01em;
}
.mark__glyph { width: 18px; height: 16px; color: var(--accent); flex: none; }
.mark__suffix { color: var(--slate); font-weight: 400; }

.nav__links { display: flex; align-items: center; gap: 1.75rem; }
.nav__links a {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .04em;
  color: var(--slate); text-decoration: none;
  transition: color .18s ease;
}
.nav__links a:hover { color: var(--ink); }
.nav__cta {
  color: var(--paper) !important;
  background: var(--ink);
  padding: .5rem .9rem; border-radius: 2px;
  transition: background .18s ease;
}
.nav__cta:hover { background: var(--accent); }

@media (max-width: 640px) {
  .mark__suffix { display: none; }
  .nav__links { gap: 1rem; }
}

/* At 320 the wordmark, the link and the button stop fitting on one row. */
@media (max-width: 400px) {
  .nav__inner { gap: .75rem; min-height: 60px; }
  .mark { font-size: .85rem; gap: .45rem; }
  .mark__glyph { width: 16px; height: 14px; }
  .nav__links { gap: .85rem; }
  .nav__links a { font-size: .72rem; }
  .nav__cta { padding: .45rem .7rem; }
}

/* ── hero ──────────────────────────────────────────────── */

.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: min(90svh, 900px);
  padding-block: clamp(4.5rem, 10vw, 8rem);
}
.hero__inner { position: relative; z-index: 1; width: 100%; }

/* Loose lattice behind the type, densest to the right and falling off in
   every direction so it never boxes the page. */
.hero__grid {
  position: absolute;
  inset: 0;
  color: var(--accent);
  opacity: .13;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(90% 110% at 88% 45%, #000 0%, transparent 68%);
  mask-image: radial-gradient(90% 110% at 88% 45%, #000 0%, transparent 68%);
}
.hero__grid svg { display: block; width: 100%; height: 100%; }

/* ── stepped forms ─────────────────────────────────────── */

/* One hue, six depths. Each layer mixes further toward the section's own
   background, so the stack reads as recession rather than as six colours.
   --bg is set per section, which is the only thing that differs between
   the hero's paper and the contact block's sand. */
.st { fill: color-mix(in srgb, var(--accent) var(--w), var(--bg)); }
.st--1 { --w: 14%; }
.st--2 { --w: 26%; }
.st--3 { --w: 40%; }
.st--4 { --w: 55%; }
.st--5 { --w: 72%; }
.st--6 { --w: 90%; }

/* Sits beside the type, aligned to the container edge like everything else. */
.hero__art {
  --bg: var(--paper);
  position: absolute;
  top: 50%;
  right: max(2vw, calc((100vw - var(--wrap)) / 2));
  translate: 0 -50%;
  width: min(34vw, 400px, 58svh);
  pointer-events: none;
}
.hero__art svg { display: block; width: 100%; height: auto; }

@media (max-width: 980px) {
  .hero { min-height: 0; }
  .hero__art { display: none; }
}

.hero__title {
  font-size: clamp(2.75rem, 6.4vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: -.037em;
  font-weight: 700;
  font-variation-settings: "opsz" 96;
  max-width: 20ch;
}
/* the manual break only holds where both halves fit on one line */
@media (max-width: 560px) { .hero__title br { display: none; } }
.hero__title em {
  font-style: normal;
  color: var(--accent);
}

.hero__deck {
  margin-top: 2.1rem;
  max-width: 44ch;
  text-wrap: pretty;
  font-size: clamp(1.2rem, 1vw + 1rem, 1.55rem);
  line-height: 1.52;
  color: var(--slate);
}

.hero__more {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin-top: 2.75rem;
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  padding-bottom: .35rem;
  transition: border-color .18s ease;
}
.hero__more:hover { border-color: var(--accent); }
.hero__more .link__arrow { transition: transform .18s ease; }
.hero__more:hover .link__arrow { transform: translateY(2px); }

/* ── section frame ─────────────────────────────────────── */

.section { padding-block: var(--pad); border-top: 1px solid var(--rule); }

/* ── work ──────────────────────────────────────────────── */

/* Two projects, two columns — the whole portfolio at a glance. */
.projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(3rem, 6vw, 5.5rem);
  row-gap: clamp(3.5rem, 8vw, 5rem);
  align-items: start;
}

.workgroup__label {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: clamp(1.75rem, 3vw, 2.5rem);
}
.workgroup__label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.proj {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
/* Fallback alignment: at minimum the closing link sits on a common baseline. */
.proj > .link { margin-top: auto; }

/* Preferred: every row — label, shot, title, tagline, copy, chips, link —
   shares a track across both columns, so the two cards line up exactly. */
@supports (grid-template-rows: subgrid) {
  .projects { grid-template-rows: repeat(7, auto); }
  .proj {
    display: grid;
    grid-row: span 7;
    grid-template-rows: subgrid;
    row-gap: 0;
    justify-items: start;
  }
  .proj > .link { margin-top: 0; }
}

/* The screenshot is decorative (the real link is below), so it is
   aria-hidden and skipped by tab order — the styling keeps it quiet. */
.proj__shotlink {
  display: block;
  width: 100%;
  margin-bottom: 1.75rem;
  border-radius: 4px;
}
.proj__shot {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
  border: 1px solid var(--rule);
  border-radius: 4px;
  transition: border-color .18s ease;
}
.proj__shotlink:hover .proj__shot { border-color: color-mix(in srgb, var(--accent) 45%, var(--rule)); }

.proj__title {
  font-size: clamp(1.7rem, 2vw + 1rem, 2.4rem);
  letter-spacing: -.03em;
  line-height: 1.05;
  font-weight: 700;
}
.proj__line {
  font-family: var(--display);
  font-size: clamp(1.05rem, .8vw + .85rem, 1.2rem);
  font-weight: 400;
  color: var(--accent);
  margin-top: .6rem;
  letter-spacing: -.01em;
}
.proj__text { margin-top: 1.4rem; max-width: 52ch; color: var(--slate); }

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 1.6rem 0 1.9rem; padding: 0; }
.chips li {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .02em;
  color: var(--slate);
  background: var(--card);
  border: 1px solid var(--rule);
  padding: .3rem .6rem; border-radius: 2px;
}

@media (max-width: 860px) {
  .projects { grid-template-columns: 1fr; gap: clamp(3.5rem, 8vw, 5rem); }
}

/* ── contact ───────────────────────────────────────────── */

.section--contact { background: var(--sand); }

.contact__title {
  font-size: clamp(1.9rem, 3.4vw + 1rem, 3.1rem);
  letter-spacing: -.032em; line-height: 1.06; font-weight: 700;
  max-width: 18ch;
}
.contact__text {
  margin-top: 1.25rem;
  max-width: 38ch;
  color: #55605C;
  text-wrap: pretty;
}

/* Copy on the left, the steps holding the right half of the band. */
.contact__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .78fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
}

.contact__plate {
  --bg: var(--sand);
  justify-self: end;
  width: min(100%, 440px);
}
.contact__plate svg { display: block; width: 100%; height: auto; }

/* Both stepped marks drop at the same width as the hero's, so the page never
   sits in a state where one section has a graphic and the other does not. */
@media (max-width: 980px) {
  .contact__top { display: block; }
  .contact__plate { display: none; }
}

/* The address is the whole call to action, so it gets the type weight
   rather than a button sitting next to a list of things already in the footer. */
.mailband {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding-block: clamp(1.5rem, 3vw, 2.25rem);
  border-top: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  text-decoration: none;
  color: var(--ink);
}
.mailband__label {
  font-family: var(--mono);
  font-size: .7rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent);
}
.mailband__addr {
  font-family: var(--display);
  font-size: clamp(1.35rem, 4.2vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1.05;
  overflow-wrap: anywhere;
  transition: color .18s ease;
}
.mailband__arrow {
  font-size: clamp(1.5rem, 2.5vw, 2.25rem);
  color: var(--accent);
  transition: transform .22s cubic-bezier(.16,.84,.44,1);
}
.mailband:hover .mailband__addr { color: var(--accent); }
.mailband:hover .mailband__arrow { transform: translateX(8px); }

@media (max-width: 700px) {
  .mailband {
    grid-template-columns: 1fr auto;
    row-gap: .75rem;
  }
  .mailband__label { grid-column: 1 / -1; }
}

/* ── footer ────────────────────────────────────────────── */

.foot { border-top: 1px solid var(--rule); padding-block: 2.5rem; }
.foot__inner {
  display: flex; flex-wrap: wrap; gap: .5rem 2rem;
  align-items: baseline; justify-content: center; text-align: center;
  font-family: var(--mono); font-size: .74rem; color: var(--slate);
}
.foot__name { color: var(--ink); }

/* Stacked footers need hierarchy, not four equal lines in a row. */
@media (max-width: 720px) {
  .foot { padding-block: 2.25rem 2.5rem; }
  .foot__inner {
    display: grid;
    justify-items: center;
    gap: .4rem;
    font-size: .72rem;
    line-height: 1.5;
  }
  .foot__name {
    font-size: .8rem;
    letter-spacing: .02em;
    margin-bottom: .35rem;
  }
  /* stretch, or centring shrinks the rule to the width of "© 2026" */
  .foot__year {
    justify-self: stretch;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--rule);
  }
}
