/* Plug NW — editorial homepage */

:root {
  --ink: #0b0b0a;
  --ink-2: #141412;
  --paper: #f2ede3;
  --muted: #8f8a80;
  --line: rgba(242, 237, 227, 0.14);
  --accent: #c9b99a;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --max: 1440px;
  --sans: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

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

h1, h2, h3, p, ul, ol, figure {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  padding: 0.6rem 1rem;
  background: var(--paper);
  color: var(--ink);
  z-index: 100;
}

.skip-link:focus {
  top: 1rem;
}

/* ---------- Shared ---------- */

.eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(3rem, 8vw, 6rem);
}

.section-title {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

section {
  padding: clamp(6rem, 14vw, 11rem) var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem var(--gutter);
  mix-blend-mode: difference;
}

.wordmark,
.site-header nav a {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-decoration: none;
  text-transform: uppercase;
}

.site-header ul {
  display: flex;
  gap: clamp(1rem, 3vw, 2.5rem);
}

.site-header nav a {
  font-weight: 500;
  opacity: 0.75;
  transition: opacity 0.2s;
}

.site-header nav a:hover {
  opacity: 1;
}

/* ---------- Hero ---------- */

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: 6rem;
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
}

.hero__eyebrow {
  margin-bottom: auto;
  padding-top: clamp(2rem, 10vh, 6rem);
}

.hero__title {
  font-size: clamp(5rem, min(29vw, 34svh), 26rem);
  font-weight: 800;
  line-height: 0.8;
  letter-spacing: -0.065em;
  margin-left: -0.05em;
}

.hero__line {
  display: block;
  animation: rise 1.2s var(--ease) both;
}

.hero__line + .hero__line {
  animation-delay: 0.12s;
}

.hero__foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  margin-top: clamp(2rem, 5vw, 3.5rem);
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  animation: fade 1.4s 0.5s var(--ease) both;
}

.hero__tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.25rem, 2.6vw, 2rem);
  line-height: 1.2;
  max-width: 22ch;
}

.scroll-cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
}

.scroll-cue__label {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.scroll-cue__line {
  position: relative;
  width: 1px;
  height: 3.5rem;
  background: var(--line);
  overflow: hidden;
}

.scroll-cue__line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--paper);
  transform: translateY(-100%);
  animation: drip 2.4s var(--ease) infinite;
}

/* ---------- Stories ---------- */

.story-list {
  display: grid;
  gap: clamp(5rem, 12vw, 10rem);
}

.story article {
  display: grid;
  gap: 1.25rem;
}

.story__media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--ink-2);
  overflow: hidden;
}

.story__media img,
.story__media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Placeholder: letterboxed frame with corner marks, intentional not empty */
.story__media.is-placeholder {
  background:
    radial-gradient(120% 90% at 50% 40%, #1c1b18 0%, var(--ink-2) 70%);
  box-shadow: inset 0 0 0 1px var(--line);
}

.story__media.is-placeholder::before,
.story__media.is-placeholder::after {
  content: "";
  position: absolute;
  width: 1.5rem;
  height: 1.5rem;
  border: 1px solid rgba(242, 237, 227, 0.35);
}

.story__media.is-placeholder::before {
  top: 1rem;
  left: 1rem;
  border-right: 0;
  border-bottom: 0;
}

.story__media.is-placeholder::after {
  right: 1rem;
  bottom: 1rem;
  border-left: 0;
  border-top: 0;
}

.story__slot {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.story__meta {
  display: flex;
  align-items: baseline;
  gap: clamp(1rem, 3vw, 2.5rem);
}

.story__index {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.story__title {
  font-size: clamp(2.25rem, 6.5vw, 6rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.045em;
}

/* Editorial rhythm on wide screens: alternate frame widths and alignment */
@media (min-width: 900px) {
  .story article {
    grid-template-columns: repeat(12, 1fr);
    column-gap: 1.5rem;
    row-gap: 1.75rem;
  }

  .story__media,
  .story__meta {
    grid-column: 1 / span 10;
  }

  .story:nth-child(even) .story__media,
  .story:nth-child(even) .story__meta {
    grid-column: 3 / span 10;
  }

  .story:nth-child(1) .story__media,
  .story:nth-child(1) .story__meta {
    grid-column: 1 / -1;
  }

  .story:nth-child(3) .story__media {
    grid-column: 2 / span 8;
  }

  .story:nth-child(3) .story__meta {
    grid-column: 2 / span 10;
  }
}

/* ---------- About ---------- */

.about {
  display: grid;
  gap: 2rem;
}

.about__statement {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 5.2vw, 4.75rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 20ch;
}

.about__statement em {
  color: var(--accent);
}

@media (min-width: 900px) {
  .about {
    grid-template-columns: 2fr 10fr;
    gap: 1.5rem;
  }

  .about .eyebrow {
    padding-top: 1.1rem;
  }
}

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

.work__list li {
  font-size: clamp(2.5rem, 9vw, 8.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  padding: 0.12em 0 0.14em;
  border-bottom: 1px solid var(--line);
}

.cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem 2rem;
  margin-top: clamp(4rem, 10vw, 8rem);
}

.cta__line {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.6rem, 4vw, 3.25rem);
  line-height: 1.1;
}

.cta__contact {
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

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

.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(4rem, 10vw, 8rem) var(--gutter) 2rem;
  border-top: 1px solid var(--line);
}

.site-footer__mark {
  font-size: clamp(4rem, 21vw, 19rem);
  font-weight: 800;
  line-height: 0.8;
  letter-spacing: -0.065em;
  margin-left: -0.05em;
}

.site-footer__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
}

.socials li,
.site-footer__note {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.site-footer__note {
  color: var(--muted);
}

/* ---------- Motion ---------- */

.reveal {
  opacity: 1;
}

.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(0.15em); }
  to   { opacity: 1; transform: none; }
}

@keyframes fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes drip {
  0%   { transform: translateY(-100%); }
  60%  { transform: translateY(100%); }
  100% { transform: translateY(100%); }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Small screens ---------- */

@media (max-width: 560px) {
  .site-header nav li:nth-child(3) {
    display: none;
  }

  .hero__foot {
    align-items: flex-start;
  }

  .scroll-cue__line {
    height: 2.5rem;
  }
}

.nowrap {
  white-space: nowrap;
}
