/* LinguaTrade — site styles
 * Editorial dark mode, serif/sans pairing, asymmetric signal grid.
 * One file, no preprocessor, custom properties drive theme.
 */

:root {
  --bg: oklch(0.18 0.008 60);
  --bg-deep: oklch(0.14 0.008 60);
  --fg: oklch(0.92 0.012 80);
  --fg-dim: oklch(0.72 0.012 80);
  --fg-quiet: oklch(0.55 0.010 80);
  --rule: oklch(0.32 0.008 60);
  --serif: "Cormorant Garamond", "EB Garamond", Garamond, serif;
  --sans: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

/* ---------- Masthead ---------- */
.masthead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 28px 56px 0;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-quiet);
  gap: 24px;
  flex-wrap: wrap;
}
.masthead .issue {
  font-style: italic;
  text-transform: none;
  letter-spacing: 0.04em;
  font-family: var(--serif);
  font-size: 14px;
  color: var(--fg-dim);
}
.masthead .brand {
  font-family: var(--serif);
  font-style: italic;
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 15px;
  color: var(--fg-dim);
}

/* Archive selector — only visible if more than one entry exists */
.archive {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 10.5px;
  letter-spacing: 0.18em;
}
.archive label { color: var(--fg-quiet); }
.archive select {
  background: transparent;
  color: var(--fg-dim);
  border: 1px solid var(--rule);
  padding: 4px 8px;
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
}
.archive select:focus { outline: 1px solid var(--fg-dim); outline-offset: 2px; }

/* ---------- Hero ---------- */
.hero {
  margin-top: 40px;
  width: 100%;
  height: 88vh;
  min-height: 640px;
  overflow: hidden;
  position: relative;
  background: var(--bg-deep);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero img {
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 18%;
  pointer-events: none;
  z-index: 1;
}
.hero::before {
  left: 0;
  background: linear-gradient(to right, var(--bg-deep) 0%, oklch(0.14 0.008 60 / 0) 100%);
}
.hero::after {
  right: 0;
  background: linear-gradient(to left, var(--bg-deep) 0%, oklch(0.14 0.008 60 / 0) 100%);
}

/* ---------- Page container ---------- */
.page {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 56px;
}

/* ---------- Title block ---------- */
.title-block {
  padding: 120px 0 96px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 80px;
  row-gap: 28px;
  align-items: start;
}
.eyebrow {
  grid-column: 1 / -1;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-quiet);
  margin-bottom: 8px;
}
.title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(56px, 8vw, 132px);
  line-height: 0.96;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--fg);
  text-wrap: balance;
}
.title em { font-style: italic; font-weight: 300; }
.definition {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(20px, 1.7vw, 26px);
  line-height: 1.5;
  color: var(--fg-dim);
  max-width: 52ch;
  align-self: end;
  margin: 0;
  text-wrap: pretty;
}
.definition .lede::first-letter { font-style: italic; }

/* ---------- Section divider ---------- */
.section-mark {
  display: flex;
  align-items: baseline;
  gap: 24px;
  margin: 0 0 56px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-quiet);
}
.section-mark .num {
  font-family: var(--serif);
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
  font-size: 18px;
  color: var(--fg-dim);
}
.section-mark .rule { flex: 1; height: 1px; background: var(--rule); }

/* ---------- Signal grid ---------- */
.signal { padding: 48px 0 120px; }
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 32px;
  row-gap: 88px;
}
.plate { display: flex; flex-direction: column; gap: 18px; }
.plate.a { grid-column: 1 / span 7; }
.plate.b { grid-column: 9 / span 4; margin-top: 80px; }
.plate.c { grid-column: 2 / span 4; }
.plate.d { grid-column: 7 / span 6; margin-top: -40px; }

.frame {
  position: relative;
  width: 100%;
  background: var(--bg-deep);
  overflow: hidden;
}
.frame.tall    { aspect-ratio: 4 / 5; }
.frame.square  { aspect-ratio: 1 / 1; }
.frame.wide    { aspect-ratio: 3 / 2; }
.frame.portrait{ aspect-ratio: 3 / 4; }

.frame .photo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 700ms cubic-bezier(.2,.7,.2,1), filter 500ms ease;
}

/* hover-reveal overlay */
.reveal {
  position: absolute;
  inset: 0;
  padding: 32px 32px 28px;
  display: flex;
  align-items: flex-end;
  background:
    linear-gradient(to top, oklch(0.10 0.008 60 / 0.92) 0%, oklch(0.10 0.008 60 / 0.78) 45%, oklch(0.10 0.008 60 / 0) 100%);
  opacity: 0;
  transition: opacity 380ms ease;
  pointer-events: none;
}
.reveal-inner {
  transform: translateY(14px);
  transition: transform 520ms cubic-bezier(.2,.7,.2,1);
  max-width: 46ch;
}
.reveal .rule-tiny {
  width: 28px;
  height: 1px;
  background: oklch(0.78 0.012 80 / 0.6);
  margin-bottom: 14px;
}
.reveal .body {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(14px, 1.05vw, 17px);
  line-height: 1.5;
  color: oklch(0.94 0.010 80);
  margin: 0;
  text-wrap: pretty;
}
.reveal .body strong {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: oklch(0.78 0.012 80);
  display: block;
  margin-bottom: 10px;
}
.frame:hover .reveal,
.frame:focus-within .reveal { opacity: 1; }
.frame:hover .reveal-inner,
.frame:focus-within .reveal-inner { transform: translateY(0); }
.frame:hover .photo,
.frame:focus-within .photo {
  transform: scale(1.02);
  filter: brightness(0.85);
}
.frame:hover .num-mark,
.frame:focus-within .num-mark { color: oklch(0.88 0.010 80 / 0.9); }
@media (hover: none) {
  .reveal {
    opacity: 1;
    background: linear-gradient(to top, oklch(0.10 0.008 60 / 0.85) 0%, oklch(0.10 0.008 60 / 0) 60%);
  }
  .reveal-inner { transform: none; }
}

.frame .num-mark {
  position: absolute;
  top: 14px;
  right: 16px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: oklch(0.70 0.010 80 / 0.6);
}

.caption .name {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 19px;
  color: var(--fg);
  margin: 0;
  line-height: 1.2;
}
.caption .meta {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-quiet);
  margin-top: 6px;
}
.caption .credit {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 11px;
  line-height: 1.4;
  color: oklch(0.50 0.010 80);
  margin-top: 10px;
  letter-spacing: 0.01em;
}

/* ---------- Refuses / Tension ---------- */
.coda {
  padding: 80px 0 64px;
  display: grid;
  grid-template-columns: 200px 1fr;
  column-gap: 64px;
  align-items: start;
}
.coda + .coda { padding-top: 48px; }

.coda .label {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--fg-quiet);
  padding-top: 8px;
}
.coda.refuses .body {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.55;
  color: var(--fg-dim);
  max-width: 60ch;
  margin: 0;
  text-wrap: pretty;
}
.coda.tension .body {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(22px, 2.0vw, 30px);
  line-height: 1.4;
  color: var(--fg);
  max-width: 50ch;
  margin: 0;
  text-wrap: pretty;
  letter-spacing: -0.005em;
}
.coda.tension { border-top: 1px solid var(--rule); padding-top: 80px; }
.coda.refuses { border-top: 1px solid var(--rule); padding-top: 80px; }

/* ---------- Colophon ---------- */
.colophon {
  margin-top: 140px;
  padding: 28px 0 48px;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: baseline;
  column-gap: 32px;
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-quiet);
}
.colophon em {
  font-family: var(--serif);
  font-style: italic;
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 13px;
  color: var(--fg-dim);
}
.colophon .center { text-align: center; }
.colophon .right  { text-align: right; }
.colophon .rights {
  grid-column: 1 / -1;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 12px;
  line-height: 1.5;
  text-transform: none;
  letter-spacing: 0.01em;
  color: oklch(0.50 0.010 80);
  text-align: center;
  text-wrap: pretty;
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .masthead { padding: 20px 24px 0; gap: 12px; }
  .page { padding-left: 24px; padding-right: 24px; }
  .title-block { grid-template-columns: 1fr; padding: 64px 0 48px; }
  .definition { align-self: start; }
  .plate.a, .plate.b, .plate.c, .plate.d {
    grid-column: 1 / -1;
    margin-top: 0;
  }
  .grid { row-gap: 56px; }
  .coda { grid-template-columns: 1fr; row-gap: 16px; padding: 56px 0 40px; }
  .coda.refuses, .coda.tension { padding-top: 56px; }
  .colophon { grid-template-columns: 1fr; row-gap: 8px; }
  .colophon .center, .colophon .right { text-align: left; }
  .hero { height: 54vh; min-height: 360px; }
}
