/* HHS Photography Club
   Aesthetic: editorial photography publication.
   Tokens: paper/ink neutrals, one vermilion accent, zero radii, serif display (Newsreader), grotesque body (Archivo), mono meta (IBM Plex Mono). */

:root {
  --paper: #f4f4f2;
  --ink: #171614;
  --muted: #6e6b64;
  --line: #d9d6cf;
  --accent: #b33a26;
  --dark: #141311;
  --dark-line: #2c2a26;
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-body: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", Menlo, monospace;
  --gutter: clamp(20px, 4vw, 48px);
  --max-w: 1240px;
}

* { box-sizing: border-box; margin: 0; }

html { scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
html.lenis { scroll-behavior: auto; }
html.lenis.lenis-stopped { overflow: clip; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; }

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

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper);
  padding: 10px 16px; z-index: 100;
}
.skip-link:focus { left: 0; }
#main { scroll-margin-top: 88px; }

/* ---------- Typography ---------- */

h1, h2, h3 { font-weight: 400; }

.display {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 5.5rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
}

.page-head { padding-top: clamp(96px, 13vw, 150px); }
.page-head h1 { font-family: var(--font-display); font-size: clamp(2.8rem, 6vw, 4.6rem); line-height: 1.05; letter-spacing: -0.01em; }
.hero h1, .page-head h1, .comp-meta h2, .profile-name, .potm-side h3 { text-wrap: balance; }
.page-head .lede { margin-top: 24px; }

.lede {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  color: var(--muted);
  max-width: 52ch;
  line-height: 1.55;
}

.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: clamp(28px, 4vw, 48px);
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  letter-spacing: -0.01em;
}
.section-head .side-link { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; border-bottom: 1px solid var(--ink); padding-bottom: 2px; white-space: nowrap; }
.section-head .side-link:hover { color: var(--accent); border-color: var(--accent); }

.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-open { color: var(--accent); }

/* ---------- Layout ---------- */

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

section { padding: clamp(44px, 6vw, 76px) 0; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 15px 26px;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn:active { transform: translateY(1px); }

.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.btn-paper { border-color: var(--paper); color: var(--paper); }
.btn-paper:hover { background: var(--paper); color: var(--ink); }

.text-link {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 3px;
  white-space: nowrap;
}
.text-link:hover { color: var(--accent); border-color: var(--accent); }

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

/* ---------- Navigation ---------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  transition: background 0.25s ease, border-color 0.25s ease;
  border-bottom: 1px solid transparent;
}
.nav .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: calc(72px + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
}
.wordmark {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
}
.nav-links {
  display: flex; align-items: center; gap: clamp(20px, 3vw, 36px);
  list-style: none; padding: 0;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}
.nav-links a:hover { border-bottom-color: currentColor; }
.nav-links a[aria-current="page"] { color: var(--accent); border-bottom-color: currentColor; }

/* over-hero state (home only) */
.nav-over { background: transparent; }
.nav-over .wordmark, .nav-over .nav-links a { color: #fff; }
.nav-over.scrolled {
  background: var(--paper);
  border-bottom-color: var(--line);
}
.nav-over.scrolled .wordmark, .nav-over.scrolled .nav-links a { color: var(--ink); }

.nav-solid { background: var(--paper); border-bottom-color: var(--line); }

/* mobile menu */
.nav-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  width: 44px; height: 44px;
  position: relative;
}
.nav-toggle span {
  position: absolute; left: 10px; right: 10px; height: 2px; background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-over .nav-toggle { color: #fff; }
.nav-over.scrolled .nav-toggle { color: var(--ink); }
.nav-toggle span:nth-child(1) { top: 16px; }
.nav-toggle span:nth-child(2) { top: 26px; }
body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; inset: 0;
    flex-direction: column; justify-content: center; gap: 8px;
    background: var(--paper);
    transform: translateY(-100%);
    transition: transform 0.28s ease;
  }
  .nav-links a {
    font-family: var(--font-display);
    font-size: 2rem; text-transform: none; letter-spacing: -0.01em;
    color: var(--ink);
    padding: 10px;
  }
  body.nav-open .nav-links { transform: translateY(0); }
  body.nav-open { overflow: hidden; }
  body.nav-open .nav .wordmark { pointer-events: none; }
  body.nav-open .nav-toggle { pointer-events: auto; z-index: 60; position: relative; }
  .nav-links { padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
  .text-link, .side-link { display: inline-block; padding-top: 24px; margin-top: -24px; }
  body.nav-open .nav .wordmark, body.nav-open .nav-toggle { color: var(--ink); }
}
@media (prefers-reduced-motion: reduce) {
  .nav-links, .nav-toggle span { transition: none; }
}

/* ---------- Hero (home) ---------- */

.hero {
  position: relative;
  min-height: 100dvh;
  display: flex; align-items: flex-end;
}
.hero img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.hero-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,10,9,0.72) 0%, rgba(10,10,9,0.25) 34%, rgba(10,10,9,0.12) 60%, rgba(10,10,9,0.05) 100%);
}
.hero-content {
  position: relative;
  width: 100%;
  padding-bottom: max(clamp(36px, 6vw, 72px), calc(env(safe-area-inset-bottom) + 24px));
  color: #fff;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 9vw, 7rem);
  line-height: 1;
  letter-spacing: -0.02em;
  max-width: 14ch;
}
.hero-sub {
  margin-top: 20px;
  max-width: 44ch;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: rgba(255,255,255,0.88);
  line-height: 1.55;
}

/* ---------- Now (home) ---------- */

.now-list { list-style: none; padding: 0; }
.now-row {
  display: grid;
  grid-template-columns: 150px 1fr auto;
  gap: clamp(16px, 3vw, 40px);
  align-items: baseline;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}
.now-row:last-child { border-bottom: 1px solid var(--line); }
.now-when { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.06em; }
.now-when .status-open { display: block; margin-bottom: 6px; }
.now-title { font-size: clamp(1.15rem, 2vw, 1.5rem); font-weight: 500; letter-spacing: -0.01em; }
.now-note { color: var(--muted); font-size: 15px; margin-top: 4px; max-width: 56ch; }
.now-link { justify-self: end; }

@media (max-width: 720px) {
  .now-row { grid-template-columns: 1fr; gap: 8px; }
  .now-link { justify-self: start; margin-top: 6px; }
}

/* ---------- Gallery grid ---------- */

.photo-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(20px, 3vw, 40px) clamp(16px, 2.4vw, 28px);
}
.photo { grid-column: span 4; }
.photo.span-6 { grid-column: span 6; }
.photo.span-12 { grid-column: span 12; }
.photo.span-7 { grid-column: span 7; }
.photo.span-5 { grid-column: span 5; }

.photo-frame { position: relative; overflow: hidden; background: #e7e5e0; }
.photo-frame img {
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  transform: scale(1.001);
  transition: transform 0.6s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.photo:hover .photo-frame img { transform: scale(1.025); }
@media (prefers-reduced-motion: reduce) {
  .photo-frame img { transition: none; }
  .photo:hover .photo-frame img { transform: scale(1.001); }
}

.photo-caption { display: flex; justify-content: space-between; gap: 16px; padding-top: 12px; }
.photo-credit { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--muted); text-transform: uppercase; white-space: nowrap; }

@media (max-width: 820px) {
  .photo, .photo.span-5, .photo.span-6, .photo.span-7 { grid-column: span 12; }
  .photo-grid { gap: 40px 16px; }
}

/* ---------- Photo of the month ---------- */

.potm {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: clamp(24px, 4vw, 64px);
  align-items: end;
}
.potm-side { padding-bottom: 12px; }
.potm-side .mono { color: var(--accent); margin-bottom: 14px; }
.potm-side h3 { font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.15; letter-spacing: -0.01em; }
.potm-side .credit { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; color: var(--muted); text-transform: uppercase; margin-top: 12px; }
.potm-side p { color: var(--muted); margin-top: 16px; font-size: 15px; }
@media (max-width: 820px) {
  .potm { grid-template-columns: 1fr; align-items: start; }
  .potm-side { order: -1; padding-bottom: 0; }
}

/* ---------- Dark band (join) ---------- */

.band-dark { background: var(--dark); color: var(--paper); padding: clamp(36px, 5vw, 56px) 0; }
.band-dark .lede { color: #a3a09a; }
.band-dark .display { color: var(--paper); }
.band-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(24px, 4vw, 64px);
  align-items: end;
}
.band-inner .lede { margin-top: 24px; }
@media (max-width: 720px) {
  .band-inner { grid-template-columns: 1fr; align-items: start; }
}

/* ---------- Split section (join / about) ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.split .photo-frame img { aspect-ratio: 4 / 5; object-fit: cover; }
@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; }
  .split .photo-frame img { aspect-ratio: 4 / 3; }
}

.steps { list-style: none; padding: 0; margin-top: 32px; }
.steps li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.steps .num { font-family: var(--font-mono); font-size: 13px; color: var(--accent); padding-top: 3px; }
.steps h2 { font-size: 17px; font-weight: 600; margin-bottom: 4px; }
.steps p { color: var(--muted); font-size: 15px; }

/* ---------- Competition blocks ---------- */

.comp {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: clamp(28px, 5vw, 72px);
  padding: clamp(36px, 5vw, 64px) 0;
  border-top: 1px solid var(--line);
}
.comp:first-of-type { border-top: none; padding-top: 0; }
.comp-meta .mono { color: var(--muted); display: block; margin-bottom: 10px; }
.comp-meta .mono.status-open { color: var(--accent); }
.comp-meta h2 { font-family: var(--font-display); font-size: clamp(1.9rem, 3.4vw, 2.8rem); line-height: 1.1; letter-spacing: -0.01em; }
.comp-meta .dates { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.04em; margin-top: 16px; color: var(--ink); }
.comp-body p { color: var(--muted); max-width: 56ch; }
.comp-body p + p { margin-top: 14px; }
.comp-facts { list-style: none; padding: 0; margin: 28px 0; max-width: 56ch; }
.comp-facts li {
  display: grid; grid-template-columns: 150px 1fr; gap: 16px;
  padding: 12px 0; border-top: 1px solid var(--line);
  font-size: 15px;
}
.comp-facts .k { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.comp-actions { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.comp-actions .note { font-size: 13px; color: var(--muted); }

.comp-past {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 4vw, 56px);
}
.comp-past .meta { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
@media (max-width: 820px) {
  .comp { grid-template-columns: 1fr; }
  .comp-past { grid-template-columns: 1fr; }
  .comp-facts li { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- Events ---------- */

.event-list { list-style: none; padding: 0; }
.event {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: clamp(16px, 3vw, 40px);
  align-items: baseline;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.event:last-child { border-bottom: 1px solid var(--line); }
.event-date { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }
.event-date .d { display: block; font-size: 26px; letter-spacing: 0.02em; line-height: 1; margin-bottom: 6px; }
.event-title { font-size: clamp(1.1rem, 1.8vw, 1.4rem); font-weight: 500; letter-spacing: -0.01em; }
.event-meta { color: var(--muted); font-size: 14px; margin-top: 5px; }
.event-note { color: var(--muted); font-size: 14px; max-width: 40ch; margin-top: 8px; }
.event-action { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); white-space: nowrap; }
@media (max-width: 720px) {
  .event { grid-template-columns: 1fr; gap: 6px; }
  .event-date .d { display: inline; margin-right: 8px; }
}

/* ---------- Officers ---------- */

.profiles { display: grid; gap: clamp(2rem, 4vw, 3.25rem); }
.profile {
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr;
  gap: clamp(1.5rem, 3.5vw, 2.5rem);
  align-items: start;
}
.profile:nth-child(even) { grid-template-columns: 1fr minmax(240px, 360px); }
.profile:nth-child(even) .profile-media { order: 2; }
.profile-media img { width: 100%; aspect-ratio: 3 / 3.6; object-fit: cover; display: block; }
.profile-role { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.profile-name { font-family: var(--font-display); font-size: clamp(1.8rem, 3.4vw, 2.6rem); letter-spacing: -0.01em; margin-top: 8px; }
.profile-fact { margin-top: 12px; font-size: 15px; line-height: 1.55; color: var(--muted); max-width: 40ch; }
@media (max-width: 760px) {
  .profile, .profile:nth-child(even) { grid-template-columns: 1fr; }
  .profile:nth-child(even) .profile-media { order: 0; }
  .profile-media { max-width: 420px; }
}

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

footer { background: var(--dark); color: #a3a09a; padding: clamp(32px, 4vw, 44px) 0 max(28px, env(safe-area-inset-bottom)); }
.foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: clamp(24px, 4vw, 64px);
  padding-bottom: 28px;
  border-bottom: 1px solid var(--dark-line);
}
.foot-grid h2 {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: #8b8781; margin-bottom: 16px; font-weight: 400;
}
.foot-grid ul { list-style: none; padding: 0; }
.foot-grid li { margin-bottom: 8px; font-size: 15px; }
.foot-grid a { color: #d6d3cd; text-decoration: none; }
.foot-grid a:hover { color: #fff; }
.foot-wordmark { font-family: var(--font-body); font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: #fff; font-size: 14px; }
.foot-note { margin-top: 10px; font-size: 14px; max-width: 34ch; }
.foot-bottom {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-top: 20px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: #8b8781;
}
@media (max-width: 720px) { .foot-grid { grid-template-columns: 1fr; gap: 32px; } .foot-grid li { margin-bottom: 10px; } .foot-grid li a { display: inline-block; padding-top: 12px; margin-top: -12px; } }

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

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.6, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Past competition strips ---------- */

.past-block { margin-top: clamp(40px, 5vw, 64px); }
.past-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.past-head h3 { font-family: var(--font-display); font-size: clamp(1.3rem, 2.2vw, 1.7rem); letter-spacing: -0.01em; }
.past-head .mono { font-size: 11px; }
.past-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.past-strip img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: #e7e5e0; }
.past-note { margin-top: 10px; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
