/* ============================================================
   BIGBROSOFT — typography-led editorial dark
   Palette (locked):
     --base   #0A0A10  near-black, cool     (page background)
     --ink    #EDECF5  off-white            (primary text)
     --accent #8B8DFF  electric periwinkle  (the ONE accent)
   Secondary text = alpha tints of --ink only.
   Type: IBM Plex Mono 500 as oversized display, 400 for body;
   Silkscreen reserved for micro-labels.
   Motion: 2 effects total — hero fade-up, status-dot pulse.
   ============================================================ */

@font-face {
  font-family: "Silkscreen";
  src: url("fonts/silkscreen-400.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Silkscreen";
  src: url("fonts/silkscreen-700.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibm-plex-mono-400.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibm-plex-mono-500.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: dark;

  /* -- palette ------------------------------------------------ */
  --base: #0A0A10;
  --ink: #EDECF5;
  --accent: #8B8DFF;

  /* -- derived tints ------------------------------------------ */
  --ink-soft: rgba(237, 236, 245, .84);   /* body copy            */
  --ink-dim: rgba(237, 236, 245, .70);    /* metadata, footer     */
  --hairline: rgba(237, 236, 245, .12);   /* 1px section rules    */
  --star: rgba(237, 236, 245, .04);       /* whisper texture      */

  /* -- type --------------------------------------------------- */
  --font-pixel: "Silkscreen", ui-monospace, monospace;
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  /* -- rhythm ------------------------------------------------- */
  --measure: 34rem;
  --header-h: 4.25rem;

  font-family: var(--font-mono);
  background: var(--base);
  color: var(--ink);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--base);
}

body {
  min-width: 20rem;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: transparent;
  font-size: 1rem;
  line-height: 1.75;
}

/* Whisper texture — star dots at threshold of perception */
body::after {
  position: fixed;
  z-index: -1;
  inset: 0;
  content: "";
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 21% 17%, var(--star), transparent 100%),
    radial-gradient(1px 1px at 67% 33%, var(--star), transparent 100%),
    radial-gradient(1.5px 1.5px at 85% 11%, var(--star), transparent 100%),
    radial-gradient(1px 1px at 9% 59%, var(--star), transparent 100%),
    radial-gradient(1px 1px at 44% 77%, var(--star), transparent 100%),
    radial-gradient(1.5px 1.5px at 91% 67%, var(--star), transparent 100%),
    radial-gradient(1px 1px at 57% 9%, var(--star), transparent 100%);
  background-size: 54rem 40rem;
}

::selection {
  background: var(--accent);
  color: var(--base);
}

/* ---------------------------------------------------- a11y -- */

.skip-link {
  position: fixed;
  z-index: 10;
  top: .7rem;
  left: .7rem;
  padding: .65rem .8rem;
  transform: translateY(-180%);
  background: var(--ink);
  color: var(--base);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

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

/* ------------------------------------------------- layout --- */

.site-header,
.site-footer,
.hero,
.chapter {
  width: min(100% - 3rem, 68rem);
  margin: 0 auto;
}

/* ------------------------------------------------- header --- */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--header-h);
  border-bottom: 1px solid var(--hairline);
}

.wordmark {
  color: var(--ink);
  font-family: var(--font-pixel);
  font-size: .85rem;
  letter-spacing: .1em;
  text-decoration: none;
}
.wordmark span { color: var(--accent); }

.build-number {
  margin: 0;
  color: var(--ink-dim);
  font-family: var(--font-pixel);
  font-size: .72rem;
  letter-spacing: .16em;
}

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

.hero {
  display: grid;
  align-content: center;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  padding: clamp(4rem, 9vh, 7rem) 0;
  animation: rise .9s cubic-bezier(.2, .7, .2, 1) both;
}

h1, h2, h3, p { margin-top: 0; }
h1, h2 { text-wrap: balance; }

h1 {
  margin-bottom: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: clamp(3rem, 8.4vw, 6.1rem);
  font-weight: 500;
  letter-spacing: -.02em;
  line-height: 1.05;
  text-transform: uppercase;
}
h1 span { color: var(--accent); }

.lede {
  max-width: var(--measure);
  margin-bottom: clamp(2.4rem, 5vw, 3.6rem);
  color: var(--ink-soft);
  font-size: clamp(1.06rem, 1.5vw, 1.2rem);
  line-height: 1.8;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem 2.4rem;
  align-items: baseline;
}

.hero-tagline,
.status,
.section-label,
.work-index,
.footer-tag {
  font-family: var(--font-pixel);
  letter-spacing: .08em;
}

.hero-tagline {
  margin: 0;
  color: var(--accent);
  font-size: .85rem;
  line-height: 1.5;
}

.status {
  display: inline-flex;
  gap: .6rem;
  align-items: center;
  margin: 0;
  color: var(--ink-dim);
  font-size: .72rem;
  line-height: 1.5;
}
.status-light {
  width: .45rem;
  height: .45rem;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 3.2s ease-in-out infinite;
}

/* ----------------------------------------------- chapters --- */

.chapter {
  padding: clamp(5rem, 12vh, 9rem) 0;
  border-top: 1px solid var(--hairline);
}

.section-label {
  margin: 0 0 clamp(2.2rem, 5vw, 3.5rem);
  color: var(--accent);
  font-size: .72rem;
}

h2 {
  max-width: 22ch;
  margin-bottom: clamp(1.4rem, 3vw, 2.2rem);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: clamp(1.9rem, 4.6vw, 3.4rem);
  font-weight: 500;
  letter-spacing: -.01em;
  line-height: 1.15;
  text-transform: uppercase;
}

.chapter-body {
  max-width: var(--measure);
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 1.06rem;
  line-height: 1.8;
}

/* ---------------------------------------------- work list --- */

.work-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.work-list li {
  display: grid;
  grid-template-columns: 4rem minmax(11rem, 16rem) minmax(0, var(--measure));
  gap: 1rem 2rem;
  align-items: baseline;
  padding: 1.9rem 0;
  border-top: 1px solid var(--hairline);
}
.work-list li:first-child { border-top: 0; }

.work-index {
  color: var(--ink-dim);
  font-size: .72rem;
}

.work-list h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: .06em;
  line-height: 1.4;
  text-transform: uppercase;
}

.work-list p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.06rem;
  line-height: 1.75;
}

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

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .6rem 2rem;
  padding: 2rem 0 2.6rem;
  border-top: 1px solid var(--hairline);
}
.site-footer p { margin: 0; }

.footer-tag {
  color: var(--ink-dim);
  font-size: .72rem;
  line-height: 1.6;
}

.footer-contact {
  font-size: .85rem;
  line-height: 1.6;
}
.footer-contact a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--hairline);
  transition: color .2s ease, border-color .2s ease;
}
.footer-contact a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.footer-legal {
  color: var(--ink-dim);
  font-size: .85rem;
  letter-spacing: .02em;
  line-height: 1.6;
}

/* ----------------------------------------------- motion ----- */

@keyframes rise {
  from { opacity: 0; transform: translateY(1.2rem); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

/* -------------------------------------------- responsive ---- */

@media (max-width: 52rem) {
  .work-list li {
    grid-template-columns: 3rem minmax(0, 1fr);
  }
  .work-list p {
    grid-column: 2;
  }
}

@media (max-width: 38rem) {
  .site-header,
  .site-footer,
  .hero,
  .chapter { width: min(100% - 2rem, 68rem); }

  .hero { padding: 3.2rem 0; }
  h1 { font-size: clamp(2.35rem, 11.5vw, 3rem); }
  h2 { font-size: clamp(1.6rem, 7.4vw, 2rem); }

  .work-list li {
    grid-template-columns: 1fr;
    gap: .5rem;
    padding: 1.6rem 0;
  }
  .work-list p { grid-column: 1; }

  .site-footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
