/* ==========================================================================
   AI ETHICS — an independent student publication
   Editorial grid, Archivo + JetBrains Mono, single accent.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
  /* Ink & paper */
  --paper: #F6F4F1;
  --ink: #111110;
  --ink-soft: #2A2823;
  --ink-body: #4A473F;
  --mute: #8C867D;
  --rule: #DCD7D0;
  --dark: #131211;
  --ac: #F04A16;

  /* Placeholder plate (editorial art not yet dropped in) */
  --tone-a: #E7E3DC;
  --tone-b: #EFEBE5;

  /* Type */
  --sans: 'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  /* Kept to exactly two families: the Google Fonts latin subset of JetBrains Mono
     has no U+2192/U+2197, so the arrow glyphs come from the next entry — adding
     further fallbacks here changes their width and shape. */
  --mono: 'JetBrains Mono', ui-monospace;

  /* Rhythm */
  --gutter: clamp(18px, 3vw, 44px);
  --section-gap: clamp(46px, 7vw, 110px);

  /* Motion */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-line: cubic-bezier(.16, .84, .28, 1);
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */

html {
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
  /* Hide the scrollbar chrome without disabling the scroll itself — the page
     still scrolls by wheel, drag, touch, keyboard and anchor link. */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar { width: 0; height: 0; display: none; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
}

* { box-sizing: border-box; }

a {
  color: var(--ink);
  text-decoration: none;
}

a:hover { color: var(--ac); }

::selection {
  background: var(--ac);
  color: var(--paper);
}

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

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

.accent { color: var(--ac); }
.muted { color: var(--mute); }

.shell {
  max-width: 1680px;
  margin: 0 auto;
  overflow-x: hidden;
}

/* Shared monospace stamp used across rails, credits and datelines. */
.dateline,
.issue-badge,
.plate__caption,
.band__rail,
.cover__credit,
.cover__kicker,
.cover__meta,
.section-head__eyebrow,
.section-head__note,
.card__rail,
.card__stamp,
.card__credit,
.brief__rail,
.brief__stamp,
.index__num,
.index__count,
.about__eyebrow,
.fact__label,
.ticker__track,
.colophon__imprint,
.colophon__label,
.colophon__base {
  font-family: var(--mono);
  font-weight: 500;
}

/* …set uppercase everywhere the stamp carries words. The issue badge and the
   index numerals are excluded: their content is already caps or numeric. */
.dateline,
.plate__caption,
.band__rail,
.cover__credit,
.cover__kicker,
.cover__meta,
.section-head__eyebrow,
.section-head__note,
.card__rail,
.card__stamp,
.card__credit,
.brief__rail,
.brief__stamp,
.index__count,
.about__eyebrow,
.fact__label,
.ticker__track,
.colophon__imprint,
.colophon__label,
.colophon__base {
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   3. Motion — entrance keyframes and ambient loops
   -------------------------------------------------------------------------- */

@keyframes scan {
  0%   { transform: translateY(-8%); }
  100% { transform: translateY(760%); }
}

@keyframes nodepulse {
  0%, 100% { opacity: .25; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.6); }
}

@keyframes marchx {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes revRule {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

@keyframes revLine {
  from { transform: translateY(105%); }
  to   { transform: translateY(0); }
}

@keyframes revUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

@keyframes revClip {
  from { clip-path: inset(0 0 100% 0); }
  to   { clip-path: inset(0 0 0% 0); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* --------------------------------------------------------------------------
   4. Interaction primitives — arrows, hover fills, image zoom
   -------------------------------------------------------------------------- */

.arrow {
  display: inline-block;
  transition: transform .35s var(--ease);
}

.arrow--accent { color: var(--ac); }

a:hover .arrow--right,
a:focus-visible .arrow--right { transform: translateX(10px); }

a:hover .arrow--diag,
a:focus-visible .arrow--diag { transform: translate(4px, -4px); }

/* Rows that flood with the accent on hover. */
.fill-row {
  transition: background .3s ease, color .3s ease;
}

.fill-row:hover,
.fill-row:focus-visible {
  background: var(--ac);
  color: var(--paper);
}

/* Placeholder image plates that push in slightly on hover. */
.zoom {
  position: relative;
  overflow: hidden;
}

.zoom__fill {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(135deg, var(--tone-a) 0 9px, var(--tone-b) 9px 18px);
  transition: transform .9s var(--ease);
}

.zoom:hover .zoom__fill { transform: scale(1.05); }

/* Underlined uppercase call to action. */
.rule-link {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 7px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   5. Masthead
   -------------------------------------------------------------------------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 244, 241, .94);
  backdrop-filter: saturate(1.2);
  border-bottom: 1px solid var(--rule);
}

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 var(--gutter);
  height: clamp(58px, 5vw, 72px);
}

.wordmark {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.wordmark__name {
  font-weight: 800;
  font-size: clamp(15px, 1.3vw, 18px);
  letter-spacing: -.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.wordmark__dot {
  width: 6px;
  height: 6px;
  background: var(--ac);
  display: block;
  transform: translateY(-4px);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.4vw, 38px);
}

.nav__link {
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.issue-badge {
  font-size: 10px;
  line-height: 1;
  letter-spacing: .14em;
  color: var(--ac);
  border: 1px solid var(--ac);
  padding: 7px 9px 6px;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   6. Dateline strip
   -------------------------------------------------------------------------- */

.dateline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  justify-content: space-between;
  padding: 9px var(--gutter);
  border-bottom: 1px solid var(--rule);
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: .14em;
  color: var(--mute);
}

/* --------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */

.hero {
  padding: clamp(38px, 6vw, 84px) var(--gutter) 0;
}

.hero__grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: clamp(28px, 4vw, 56px);
}

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

.hero__rule {
  height: 1px;
  background: var(--ink);
  margin-bottom: clamp(16px, 2vw, 26px);
  transform-origin: left;
  animation: revRule 1.1s var(--ease) both;
}

.hero__title {
  margin: 0;
  font-weight: 800;
  font-size: clamp(52px, 11.4vw, 178px);
  line-height: .83;
  letter-spacing: -.045em;
  text-transform: uppercase;
}

.mask {
  display: block;
  overflow: hidden;
}

.mask__line {
  display: block;
  animation: revLine .95s var(--ease-line) both;
}

.mask__line--2 { animation-delay: .09s; }
.mask__line--3 { animation-delay: .18s; }

.hero__foot {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(20px, 3vw, 48px);
  align-items: flex-end;
  margin-top: clamp(22px, 3vw, 40px);
  padding-bottom: clamp(28px, 4vw, 52px);
}

.hero__dek {
  animation: revUp .8s var(--ease) .3s both;
  flex: 1 1 320px;
  margin: 0;
  max-width: 44ch;
  font-size: clamp(15px, 1.25vw, 19px);
  line-height: 1.45;
  font-weight: 500;
  text-wrap: pretty;
  color: var(--ink-soft);
}

.hero__cta {
  animation: revUp .8s var(--ease) .4s both;
  flex: 0 0 auto;
  padding-bottom: 8px;
  white-space: nowrap;
}

.hero__cta .arrow { font-size: 15px; }

/* Hero plate — the "decision surface" figure */

.plate {
  animation: revClip 1.1s var(--ease) .2s both;
  flex: 0 1 400px;
  min-width: 280px;
  align-self: stretch;
  position: relative;
  margin: 0;
  background: var(--dark);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  max-height: 640px;
}

.plate__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(246, 244, 241, .09) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(246, 244, 241, .09) 1px, transparent 1px);
  background-size: 12.5% 10%;
}

.plate__scan {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 10%;
  background: linear-gradient(to bottom, rgba(240, 74, 22, 0), rgba(240, 74, 22, .5));
  animation: scan 7s linear infinite;
}

.plate__node {
  position: absolute;
  width: 7px;
  height: 7px;
  background: var(--ac);
  animation: nodepulse 3.2s ease-in-out infinite;
}

.plate__node--a { left: 25%;   top: 30%; }
.plate__node--b { left: 62.5%; top: 50%; animation-delay: .9s; }
.plate__node--c { left: 37.5%; top: 70%; background: var(--paper); animation-delay: 1.8s; }

.plate__edge {
  position: absolute;
  height: 1px;
  transform-origin: left;
}

.plate__edge--a {
  left: 25%;
  top: 30%;
  width: 37.5%;
  background: rgba(246, 244, 241, .35);
  transform: rotate(28deg) scaleX(1.3);
}

.plate__edge--b {
  left: 37.5%;
  top: 70%;
  width: 25%;
  background: rgba(240, 74, 22, .6);
  transform: rotate(-38deg) scaleX(1.35);
}

.plate__frame {
  position: absolute;
  left: 12.5%;
  top: 12%;
  width: 25%;
  height: 20%;
  border: 1px solid rgba(246, 244, 241, .2);
}

.plate__block {
  position: absolute;
  right: 12.5%;
  bottom: 20%;
  width: 25%;
  height: 20%;
  background: rgba(240, 74, 22, .14);
}

.plate__caption {
  position: absolute;
  left: 16px;
  bottom: 14px;
  right: 16px;
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  line-height: 1;
  letter-spacing: .16em;
  color: rgba(246, 244, 241, .6);
}

/* --------------------------------------------------------------------------
   8. Section scaffolding
   -------------------------------------------------------------------------- */

.band {
  margin-top: var(--section-gap);
  border-top: 1px solid var(--ink);
}

.band__rail {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 12px var(--gutter);
  border-bottom: 1px solid var(--rule);
  font-size: 10px;
  line-height: 1;
  letter-spacing: .16em;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  padding: clamp(18px, 2.4vw, 32px) var(--gutter);
  border-bottom: 1px solid var(--rule);
}

.section-head--bare { border-bottom: 0; }

.section-head__title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 18px;
}

.section-head__eyebrow {
  font-size: 10px;
  line-height: 1;
  letter-spacing: .16em;
}

.section-head__h {
  margin: 0;
  font-weight: 800;
  font-size: clamp(26px, 3.2vw, 46px);
  line-height: 1;
  letter-spacing: -.035em;
  text-transform: uppercase;
}

.section-head__note {
  font-size: 10px;
  line-height: 1.6;
  letter-spacing: .14em;
  color: var(--mute);
}

/* --------------------------------------------------------------------------
   9. Cover story
   -------------------------------------------------------------------------- */

.cover {
  display: flex;
  flex-wrap: wrap;
}

.cover__media {
  flex: 1 1 480px;
  min-width: 280px;
  min-height: clamp(300px, 42vw, 560px);
  border-right: 1px solid var(--rule);
}

.cover__credit {
  position: absolute;
  left: 16px;
  bottom: 14px;
  font-size: 10px;
  line-height: 1;
  letter-spacing: .16em;
  color: var(--mute);
}

.cover__kicker {
  position: absolute;
  left: 0;
  top: 0;
  background: var(--ac);
  color: var(--paper);
  font-size: 10px;
  line-height: 1;
  letter-spacing: .16em;
  padding: 9px 12px 8px;
}

.cover__body {
  flex: 1 1 380px;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  padding: clamp(24px, 3vw, 44px);
}

.cover__headline-link { display: block; }

.cover__headline {
  margin: 0;
  font-weight: 800;
  font-size: clamp(30px, 4.2vw, 66px);
  line-height: .94;
  letter-spacing: -.035em;
  text-transform: uppercase;
  text-wrap: balance;
}

.cover__standfirst {
  margin: clamp(16px, 2vw, 26px) 0 0;
  max-width: 48ch;
  font-size: clamp(14px, 1.1vw, 17px);
  line-height: 1.55;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.cover__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--rule);
  padding-top: 14px;
  font-size: 10px;
  line-height: 1;
  letter-spacing: .14em;
  color: var(--mute);
}

.cover__read {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  letter-spacing: .14em;
}

/* --------------------------------------------------------------------------
   10. The reading room
   -------------------------------------------------------------------------- */

.grid {
  display: flex;
  flex-wrap: wrap;
}

.card__rail {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  line-height: 1;
  letter-spacing: .14em;
  color: var(--mute);
}

.card__h { letter-spacing: -.03em; }

.card__p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-body);
  max-width: 40ch;
}

.card__stamp {
  font-size: 10px;
  line-height: 1;
  letter-spacing: .14em;
  color: var(--mute);
}

/* Lead card, left column */

.card--lead {
  flex: 1 1 300px;
  min-width: 280px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: clamp(20px, 2.4vw, 32px);
}

.card--lead .card__rail { margin-bottom: 18px; }

.card__h--lead {
  margin: 0 0 14px;
  font-weight: 700;
  font-size: clamp(22px, 2.1vw, 31px);
  line-height: 1.02;
}

.card__p--lead {
  margin: 0 0 20px;
  max-width: 42ch;
  text-wrap: pretty;
}

.card__media { aspect-ratio: 16 / 10; }

.card__credit {
  position: absolute;
  left: 12px;
  bottom: 10px;
  font-size: 9px;
  line-height: 1;
  letter-spacing: .16em;
  color: var(--mute);
}

.card--lead .card__stamp { margin-top: 14px; }

/* Middle column pair */

.grid__stack {
  flex: 1 1 300px;
  min-width: 280px;
  display: flex;
  flex-direction: column;
}

.card--stack {
  flex: 1;
  border-bottom: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  padding: clamp(20px, 2.4vw, 32px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: space-between;
}

.card__h--stack {
  margin: 0;
  font-weight: 700;
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1.05;
  letter-spacing: -.025em;
}

/* Accent card */

.card--accent {
  background: var(--ac);
  color: var(--paper);
}

.card--accent .card__rail { color: rgba(246, 244, 241, .8); }
.card--accent .card__p { color: rgba(246, 244, 241, .9); }
.card--accent a { color: inherit; }
.card--accent a:hover { color: inherit; }

.card__h--accent {
  margin: 0;
  font-weight: 800;
  font-size: clamp(22px, 2.1vw, 30px);
  line-height: 1;
  letter-spacing: -.03em;
  text-transform: uppercase;
}

.card__rail--foot {
  align-items: center;
  font-size: 10px;
}

.card__rail--foot .arrow { font-size: 14px; }

.card--accent:hover .arrow--right { transform: translateX(10px); }

/* Right column of briefs */

.grid__list {
  flex: 1 1 260px;
  min-width: 260px;
  display: flex;
  flex-direction: column;
}

.brief {
  border-bottom: 1px solid var(--rule);
  padding: clamp(16px, 2vw, 24px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  justify-content: center;
}

.brief__rail {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  line-height: 1;
  letter-spacing: .14em;
  color: inherit;
  opacity: .6;
}

.brief__h {
  margin: 0;
  font-weight: 700;
  font-size: clamp(17px, 1.4vw, 21px);
  line-height: 1.1;
  letter-spacing: -.02em;
  color: inherit;
}

.brief__stamp {
  font-size: 10px;
  line-height: 1;
  letter-spacing: .14em;
  opacity: .6;
}

.grid__foot {
  padding: clamp(18px, 2.4vw, 30px) var(--gutter);
  display: flex;
  justify-content: flex-end;
  border-bottom: 1px solid var(--rule);
}

/* --------------------------------------------------------------------------
   11. Topic index
   -------------------------------------------------------------------------- */

.index__row {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 44px);
  padding: clamp(16px, 2.2vw, 30px) var(--gutter);
  border-top: 1px solid var(--rule);
}

.index__row--last { border-bottom: 1px solid var(--rule); }

.index__num {
  font-size: 11px;
  line-height: 1;
  letter-spacing: .14em;
  width: 34px;
  flex: 0 0 auto;
  opacity: .6;
}

.index__name {
  flex: 1;
  font-weight: 800;
  font-size: clamp(24px, 4.4vw, 60px);
  line-height: 1;
  letter-spacing: -.04em;
  text-transform: uppercase;
}

.index__count {
  flex: 0 0 auto;
  font-size: 10px;
  line-height: 1;
  letter-spacing: .14em;
  opacity: .6;
  white-space: nowrap;
}

.index__arrow {
  flex: 0 0 auto;
  font-size: clamp(16px, 1.6vw, 22px);
}

/* --------------------------------------------------------------------------
   12. About
   -------------------------------------------------------------------------- */

.about {
  display: flex;
  flex-wrap: wrap;
}

.about__body {
  flex: 1 1 340px;
  min-width: 280px;
  padding: clamp(24px, 3vw, 44px);
  border-right: 1px solid var(--rule);
}

.about__eyebrow {
  font-size: 10px;
  line-height: 1;
  letter-spacing: .16em;
  margin-bottom: clamp(20px, 2.4vw, 32px);
}

.about__statement {
  margin: 0;
  font-weight: 600;
  font-size: clamp(20px, 2.4vw, 34px);
  line-height: 1.16;
  letter-spacing: -.03em;
  max-width: 32ch;
  text-wrap: pretty;
}

.about__note {
  margin: clamp(18px, 2vw, 28px) 0 0;
  max-width: 52ch;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-body);
  text-wrap: pretty;
}

.about__cta {
  display: inline-flex;
  margin-top: clamp(22px, 2.6vw, 34px);
}

.about__facts {
  flex: 0 1 320px;
  min-width: 250px;
  display: flex;
  flex-direction: column;
}

.fact {
  flex: 1;
  padding: clamp(18px, 2vw, 26px);
  border-bottom: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fact__label {
  font-size: 10px;
  line-height: 1;
  letter-spacing: .14em;
  color: var(--mute);
}

.fact__value {
  font-weight: 800;
  font-size: clamp(28px, 3vw, 44px);
  letter-spacing: -.03em;
}

.fact__value--sm {
  font-size: clamp(22px, 2.2vw, 32px);
  line-height: 1.05;
}

/* --------------------------------------------------------------------------
   13. Ticker
   -------------------------------------------------------------------------- */

.ticker {
  overflow: hidden;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: var(--ac);
  color: var(--paper);
  padding: 11px 0;
}

.ticker__track {
  display: flex;
  width: max-content;
  font-size: 11px;
  line-height: 1;
  letter-spacing: .2em;
  animation: marchx 34s linear infinite;
}

.ticker__track > span { padding-right: 40px; }

/* --------------------------------------------------------------------------
   14. Colophon
   -------------------------------------------------------------------------- */

.colophon {
  background: var(--dark);
  color: var(--paper);
  padding: clamp(30px, 4vw, 60px) var(--gutter) clamp(20px, 2.4vw, 30px);
}

.colophon__top {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(24px, 4vw, 64px);
  justify-content: space-between;
}

.colophon__brand { flex: 1 1 320px; }

.colophon__logo {
  font-weight: 800;
  font-size: clamp(34px, 6vw, 88px);
  line-height: .9;
  letter-spacing: -.04em;
  text-transform: uppercase;
}

.colophon__imprint {
  margin-top: 14px;
  font-size: 10px;
  line-height: 1.7;
  letter-spacing: .14em;
  color: rgba(246, 244, 241, .55);
}

.colophon__cols {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(24px, 4vw, 60px);
}

.colophon__col {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.colophon__label {
  font-size: 10px;
  line-height: 1;
  letter-spacing: .14em;
  color: rgba(246, 244, 241, .45);
  margin-bottom: 4px;
}

.colophon__col a {
  color: var(--paper);
  font-weight: 600;
  font-size: 14px;
}

.colophon__col a.accent { color: var(--ac); }
.colophon__col a:hover { color: var(--ac); }

.colophon__base {
  margin-top: clamp(26px, 3vw, 48px);
  padding-top: 14px;
  border-top: 1px solid rgba(246, 244, 241, .16);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
  font-size: 10px;
  line-height: 1;
  letter-spacing: .14em;
  color: rgba(246, 244, 241, .5);
}
