/* wdpkstudios.com — one stylesheet, no framework. Tokens first. */

@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/unbounded-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/unbounded-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  --bg: #07080f;          /* matches the logo's own background */
  --panel: #0d0e14;
  --panel-border: #22232a;
  --line: #26272d;
  --text: #f3ede4;
  --text-2: #d9d4cb;
  --muted: #a8a49d;
  --faint: #5b5a57;
  --shot-border: #2a2b32;
  --font-display: "Unbounded", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(20px, 5vw, 64px);
  color-scheme: dark;
}

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

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  /* Very fine vertical grain, barely visible; two rhythms so it reads as grain, not pinstripes. */
  background-image:
    repeating-linear-gradient(90deg, rgba(243, 237, 228, 0.009) 0 1px, transparent 1px 9px),
    repeating-linear-gradient(90deg, transparent 0 4px, rgba(243, 237, 228, 0.008) 4px 5px, transparent 5px 23px);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--text);
}

a:hover {
  color: #ffffff;
}

a:focus-visible,
.shots:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 4px;
  border-radius: 6px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.page {
  position: relative;
  z-index: 1;
}

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

/* ---------- header and language switch ---------- */

.site-header {
  display: flex;
  justify-content: flex-end;
  padding-top: 24px;
}

.lang {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.18em;
}

.lang a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  color: var(--muted);
  text-decoration: none;
}

.lang a[aria-current="page"] {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 8px;
  text-decoration-thickness: 1px;
}

.lang span {
  color: var(--faint);
}

/* ---------- hero ---------- */

.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 48px 80px;
  padding-top: 8px;
  padding-bottom: 88px;
}

.hero__mark {
  flex: 0 0 auto;
  width: 260px;
  height: auto;
}

.hero__text {
  flex: 1 1 520px;
  min-width: 0;
}

.wordmark {
  margin: 0;
  line-height: 1;
}

.wordmark img {
  width: min(100%, 640px);
  height: auto;
}

.tagline {
  margin: 44px 0 0;
  font-size: 21px;
  line-height: 1.5;
  color: var(--muted);
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  margin-top: 28px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
}

/* ---------- projects ---------- */

.projects {
  padding-top: 40px;
  padding-bottom: 104px;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 40px;
}

.section-head::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--line);
}

.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
}

.project-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.project {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px 72px;
  padding: clamp(28px, 4vw, 56px);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 28px;
}

.project__text {
  flex: 1 1 360px;
  min-width: 0;
}

.status {
  margin: 0 0 18px;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.project h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(24px, 2.8vw, 38px);
  line-height: 1.18;
}

.desc {
  margin: 22px 0 0;
  max-width: 42ch;
  font-size: 18px;
  line-height: 1.65;
  color: var(--text-2);
}

.small-print {
  margin: 18px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

/* Screenshots: a native scrolling row, no carousel. */
.shots {
  display: flex;
  gap: 20px;
  flex: 0 1 auto;
  max-width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.shots li {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.shots img {
  width: 220px;
  height: auto;
  border: 1px solid var(--shot-border);
  border-radius: 24px;
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid #1d1e24;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px 48px;
  padding-top: 40px;
  padding-bottom: 56px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

/* ---------- grain light (E1): shown only with a fine pointer, see site.js ---------- */

.grain {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 0;
  width: 480px;
  height: 480px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
  background-image:
    repeating-linear-gradient(90deg, rgba(243, 237, 228, 0.1) 0 1px, transparent 1px 9px),
    repeating-linear-gradient(90deg, transparent 0 4px, rgba(243, 237, 228, 0.05) 4px 5px, transparent 5px 23px);
  -webkit-mask-image: radial-gradient(circle, #000 0%, rgba(0, 0, 0, 0.35) 38%, transparent 68%);
  mask-image: radial-gradient(circle, #000 0%, rgba(0, 0, 0, 0.35) 38%, transparent 68%);
  will-change: transform;
}

.grain.is-on {
  opacity: 1;
}

/* ---------- 404 page ---------- */

.chooser {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 56px;
  padding-bottom: 72px;
}

.chooser .hero__mark {
  width: 150px;
}

.chooser__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 40px;
}

.chooser__links a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 28px;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  background: var(--panel);
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.chooser__links a:hover {
  border-color: var(--faint);
}

.chooser__note {
  margin: 32px 0 0;
  color: var(--muted);
}

h1.chooser__note {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 20px;
  line-height: 1.6;
  color: var(--text);
}

/* ---------- phones ---------- */

@media (max-width: 760px) {
  .site-header {
    padding-top: 8px;
    padding-inline: 12px;
  }

  .lang {
    font-size: 12px;
  }

  .hero {
    flex-direction: column;
    text-align: center;
    gap: 36px;
    padding-bottom: 64px;
  }

  .hero__mark {
    width: 165px;
  }

  .hero__text {
    flex: none;
    width: 100%;
  }

  .wordmark img {
    width: min(100%, 250px);
    margin-inline: auto;
  }

  .tagline {
    margin-top: 28px;
    font-size: 17px;
  }

  .cta {
    margin-top: 16px;
    font-size: 12px;
  }

  .projects {
    padding-top: 8px;
    padding-bottom: 72px;
    padding-inline: 16px;
  }

  .section-head {
    gap: 16px;
    margin: 0 4px 24px;
  }

  .section-head h2 {
    font-size: 12px;
  }

  .project-list {
    gap: 20px;
  }

  .project {
    gap: 24px;
    padding: 28px 24px;
    border-radius: 22px;
  }

  .project__text {
    flex: none;
    width: 100%;
  }

  .status {
    margin-bottom: 14px;
    font-size: 11px;
    letter-spacing: 0.2em;
  }

  .project h3 {
    font-size: 23px;
  }

  .desc {
    margin-top: 16px;
    font-size: 16px;
    line-height: 1.6;
  }

  .small-print {
    margin-top: 12px;
  }

  /* Let the row run to the card's edge so the next screenshot peeks in. */
  .shots {
    gap: 12px;
    margin-right: -24px;
    padding-right: 24px;
  }

  .shots img {
    width: 200px;
    border-radius: 20px;
  }

  .site-footer .wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-top: 32px;
    padding-bottom: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .grain {
    display: none;
  }
}
