@import url('/fonts.css');

/* ─────────────────────────────────────────────────────────────────────────
   Design tokens — Körfez premium: charcoal ground, gold accent, serif voice.
   ───────────────────────────────────────────────────────────────────────── */
:root {
  --bg: #12100e;
  --surface: #1a1714;
  --surface-2: #241e17;
  --border: #2a2521;
  --border-soft: #221d19;

  --gold: #c9a227;
  --gold-dim: #8f7420;
  --gold-wash: rgba(201, 162, 39, 0.12);

  --text: #ede7dd;
  --text-dim: #c3bbae;
  --muted: #9a9187;
  --live: #c0442e;
  --up: #6ba368;
  --down: #c0442e;

  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --max: 1180px;
  --gap: 1.5rem;
  --radius: 3px;

  --step--1: clamp(0.78rem, 0.76rem + 0.1vw, 0.84rem);
  --step-0: clamp(0.95rem, 0.92rem + 0.15vw, 1.02rem);
  --step-1: clamp(1.1rem, 1.04rem + 0.3vw, 1.28rem);
  --step-2: clamp(1.35rem, 1.22rem + 0.65vw, 1.75rem);
  --step-3: clamp(1.7rem, 1.44rem + 1.3vw, 2.6rem);
  --step-4: clamp(2.1rem, 1.6rem + 2.4vw, 3.6rem);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.6;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

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

.shell {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 1.15rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 100;
  background: var(--gold);
  color: var(--bg);
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.masthead {
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
}

.masthead__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.15rem 0.9rem;
}

.wordmark {
  font-family: var(--serif);
  font-weight: 700;
  font-size: var(--step-2);
  letter-spacing: 0.16em;
  color: var(--text);
  text-transform: uppercase;
  line-height: 1;
}

.wordmark span {
  color: var(--gold);
}

.masthead__date {
  font-size: var(--step--1);
  color: var(--muted);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.3rem 0.55rem;
  background: var(--bg);
}

.search-form input {
  background: transparent;
  border: 0;
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--step--1);
  width: 8.5rem;
  padding: 0.15rem 0;
}

.search-form input::placeholder {
  color: var(--muted);
}

.search-form button {
  background: transparent;
  border: 0;
  color: var(--gold);
  cursor: pointer;
  font-size: var(--step-0);
  line-height: 1;
  padding: 0;
}

/* ── Navigation ─────────────────────────────────────────────────────────── */
.nav {
  border-top: 1px solid var(--border-soft);
  overflow-x: auto;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav ul {
  display: flex;
  gap: 1.55rem;
  list-style: none;
  margin: 0;
  padding: 0.7rem 0;
  white-space: nowrap;
}

.nav a {
  font-size: var(--step--1);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 500;
  padding-block: 0.2rem;
  border-bottom: 2px solid transparent;
}

.nav a:hover,
.nav a[aria-current='page'] {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* ── Layout primitives ──────────────────────────────────────────────────── */
main {
  padding-block: 2rem 3rem;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-block: 2.6rem 1.2rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--border);
}

.section-head h2 {
  font-family: var(--serif);
  font-size: var(--step-1);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0;
}

.section-head a {
  font-size: var(--step--1);
  color: var(--gold);
  letter-spacing: 0.06em;
}

.kicker {
  font-size: var(--step--1);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}

.meta {
  font-size: var(--step--1);
  color: var(--muted);
  letter-spacing: 0.03em;
}

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1fr;
  padding-block: 0.5rem 1rem;
}

@media (min-width: 62rem) {
  .hero {
    grid-template-columns: minmax(0, 2.05fr) minmax(0, 1fr);
    gap: 2.4rem;
  }
}

.lead__figure {
  position: relative;
  margin: 0 0 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.lead__figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.credit {
  font-size: 0.72rem;
  color: var(--muted);
  padding: 0.4rem 0.6rem;
  letter-spacing: 0.02em;
}

.lead__title {
  font-family: var(--serif);
  font-size: var(--step-4);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0.55rem 0 0.7rem;
  text-wrap: balance;
}

.lead__dek {
  font-size: var(--step-1);
  color: var(--text-dim);
  line-height: 1.5;
  margin: 0 0 0.8rem;
  max-width: 46ch;
}

/* ── Rail ───────────────────────────────────────────────────────────────── */
.rail {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.rail__block {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.05rem 1.15rem 1.15rem;
}

.rail__title {
  font-family: var(--serif);
  font-size: var(--step--1);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.85rem;
  font-weight: 600;
}

.rail__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.rail__list li {
  border-top: 1px solid var(--border-soft);
  padding-block: 0.7rem;
}

.rail__list li:first-child {
  border-top: 0;
  padding-top: 0;
}

.rail__list a {
  display: block;
  font-size: var(--step-0);
  line-height: 1.35;
  font-weight: 500;
}

.rail__list .meta {
  display: block;
  margin-top: 0.25rem;
}

.ranked {
  counter-reset: rank;
}

.ranked li {
  display: grid;
  grid-template-columns: 1.6rem 1fr;
  gap: 0.65rem;
  align-items: start;
}

.ranked li::before {
  counter-increment: rank;
  content: counter(rank);
  font-family: var(--serif);
  font-size: var(--step-1);
  color: var(--gold-dim);
  line-height: 1.1;
  font-weight: 700;
}

/* ── Market rail ────────────────────────────────────────────────────────── */
.market {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.market__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.market__label {
  color: var(--text-dim);
  font-size: var(--step--1);
}

.market__value {
  font-family: var(--serif);
  font-weight: 600;
  font-size: var(--step-0);
}

.market__value[data-dir='up'] {
  color: var(--up);
}

.market__value[data-dir='down'] {
  color: var(--down);
}

.market__note {
  margin: 0.7rem 0 0;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.45;
}

/* ── Card grid ──────────────────────────────────────────────────────────── */
.grid {
  display: grid;
  gap: 1.6rem var(--gap);
  grid-template-columns: 1fr;
}

@media (min-width: 34rem) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 62rem) {
  .grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.card__figure {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.card__figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: opacity 0.2s ease;
}

.card:hover .card__figure img {
  opacity: 0.85;
}

.card__title {
  font-family: var(--serif);
  font-size: var(--step-1);
  font-weight: 600;
  line-height: 1.22;
  margin: 0;
  text-wrap: balance;
}

.card__dek {
  color: var(--muted);
  font-size: var(--step--1);
  line-height: 1.5;
  margin: 0;
}

.card__foot {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  flex-wrap: wrap;
}

/* ── Article ────────────────────────────────────────────────────────────── */
.article {
  display: grid;
  gap: 2.4rem;
  grid-template-columns: 1fr;
}

@media (min-width: 62rem) {
  .article {
    grid-template-columns: minmax(0, 2.05fr) minmax(0, 1fr);
  }
}

.article__head {
  margin-bottom: 1.4rem;
}

.article__title {
  font-family: var(--serif);
  font-size: var(--step-4);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0.5rem 0 0.75rem;
  text-wrap: balance;
}

.article__dek {
  font-size: var(--step-1);
  color: var(--text-dim);
  line-height: 1.5;
  margin: 0 0 1.1rem;
  max-width: 54ch;
}

.byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.85rem;
  padding-block: 0.85rem;
  border-block: 1px solid var(--border);
  font-size: var(--step--1);
  color: var(--muted);
}

.byline strong {
  color: var(--text-dim);
  font-weight: 600;
}

.prose {
  font-size: var(--step-0);
  line-height: 1.78;
  max-width: 68ch;
}

.prose p {
  margin: 0 0 1.25rem;
}

.prose p:first-of-type {
  font-size: var(--step-1);
  line-height: 1.62;
  color: var(--text);
}

.prose strong {
  color: #fff;
  font-weight: 600;
}

.sources {
  margin-top: 2.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.1rem 1.2rem;
}

.sources h2 {
  font-family: var(--serif);
  font-size: var(--step--1);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.7rem;
}

.sources ul {
  margin: 0;
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.sources li {
  font-size: var(--step--1);
  color: var(--text-dim);
  line-height: 1.45;
}

.sources a {
  color: var(--text-dim);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--gold-dim);
}

.disclosure {
  margin-top: 1.4rem;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.55;
  border-left: 2px solid var(--gold-dim);
  padding-left: 0.9rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.8rem;
  padding: 0;
  list-style: none;
}

.tags a {
  display: inline-block;
  font-size: var(--step--1);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.25rem 0.8rem;
  color: var(--text-dim);
  background: var(--surface);
}

.tags a:hover {
  border-color: var(--gold-dim);
  color: var(--gold);
}

/* ── Static pages & utility ─────────────────────────────────────────────── */
.page {
  max-width: 68ch;
}

.page h1 {
  font-family: var(--serif);
  font-size: var(--step-3);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 1rem;
}

.page h2 {
  font-family: var(--serif);
  font-size: var(--step-1);
  font-weight: 600;
  margin: 2rem 0 0.7rem;
}

.page p,
.page li {
  color: var(--text-dim);
  line-height: 1.75;
}

.empty {
  padding: 3rem 0;
  color: var(--muted);
  text-align: center;
}

.pagination {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
  margin-top: 3rem;
}

.pagination a,
.pagination span {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 1.1rem;
  font-size: var(--step--1);
  color: var(--text-dim);
}

.pagination a:hover {
  border-color: var(--gold-dim);
  color: var(--gold);
}

.pagination span {
  opacity: 0.45;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding-block: 2.4rem 3rem;
  margin-top: 3rem;
}

.footer__grid {
  display: grid;
  gap: 1.8rem;
  grid-template-columns: 1fr;
}

@media (min-width: 48rem) {
  .footer__grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.footer h3 {
  font-size: var(--step--1);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.8rem;
  font-weight: 600;
}

.footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.footer a,
.footer p {
  font-size: var(--step--1);
  color: var(--muted);
  line-height: 1.6;
}

.footer__legal {
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border-soft);
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.6;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
