/* ==========================================================
   Elvira Hellenpárt — Portfolio
   Editorial / magazine system
   ========================================================== */

:root {
  /* Palette — near-white (#FBFBFB trial) */
  --paper: #FBFBFB;
  --paper-2: #F1F1EF;
  --paper-3: #E7E7E4;
  --ink: #1A1814;
  --ink-2: #3A352D;
  --ink-mute: #6E665A;
  --rule: #DEDDD8;
  --accent: oklch(55% 0.10 45);   /* terracotta */
  --accent-soft: oklch(80% 0.05 50);

  /* Type */
  --serif: "Newsreader", "Source Serif Pro", Georgia, serif;
  --sans:  "Instrument Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, Menlo, monospace;

  /* Rhythm */
  --gutter: clamp(20px, 3vw, 40px);
  --col: 1320px;

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

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

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

/* ---------- Layout primitives ---------- */
.wrap {
  max-width: var(--col);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 0;
}

/* ---------- Top navigation ---------- */
.nav {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 28px var(--gutter) 22px;
  max-width: var(--col);
  margin: 0 auto;
  gap: 24px;
}
.nav-mark {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.01em;
  font-style: italic;
}
.nav-mark sup {
  font-family: var(--mono);
  font-style: normal;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.06em;
  margin-left: 6px;
  color: var(--ink-mute);
  vertical-align: super;
}
.nav-links {
  display: flex;
  gap: 28px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.nav-links a {
  position: relative;
  padding-bottom: 3px;
  color: var(--ink-mute);
  transition: color .25s var(--ease);
}
.nav-links a:hover { color: var(--accent); }
.nav-links a.active {
  color: var(--ink);
  font-weight: 500;
}
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--accent);
}
.nav-meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: oklch(65% 0.13 145);
  display: inline-block;
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ---------- Masthead — magazine top bar ---------- */
.masthead {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 10px 0;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.masthead .row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

/* ---------- Headlines ---------- */
.kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 18px;
}
.display {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(54px, 9vw, 148px);
  line-height: 0.92;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}
.display em {
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
}
.h2 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(34px, 4.5vw, 64px);
  line-height: 1.0;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
.h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
}
.lead {
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1.45;
  color: var(--ink-2);
  text-wrap: pretty;
}
.body {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink-2);
  text-wrap: pretty;
}
.body p { margin: 0 0 1em; }
.dropcap::first-letter {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 5.6em;
  float: left;
  line-height: 0.85;
  padding: 6px 10px 0 0;
  color: var(--ink);
}
.meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* ---------- Buttons / links ---------- */
.link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  padding-bottom: 4px;
  border-bottom: 1px solid var(--ink);
  transition: gap .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.link:hover {
  gap: 16px;
  color: var(--accent);
  border-color: var(--accent);
}
.link svg { width: 12px; height: 12px; }

/* ---------- Image placeholder system ---------- */
.placeholder {
  position: relative;
  background:
    repeating-linear-gradient(
      135deg,
      var(--paper-2) 0 14px,
      var(--paper-3) 14px 28px
    );
  border: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  text-align: center;
  padding: 24px;
  overflow: hidden;
}
.placeholder.dark {
  background:
    repeating-linear-gradient(
      135deg,
      #2A2620 0 14px,
      #221E18 14px 28px
    );
  color: #B8AE9C;
  border-color: #3A352D;
}
.placeholder.warm {
  background:
    repeating-linear-gradient(
      135deg,
      oklch(78% 0.08 45) 0 14px,
      oklch(74% 0.09 45) 14px 28px
    );
  color: oklch(35% 0.06 45);
  border-color: oklch(60% 0.08 45);
}
.placeholder .ph-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  background: var(--paper);
  color: var(--ink-mute);
  padding: 4px 8px;
  border: 1px solid var(--rule);
  text-transform: uppercase;
}
.placeholder.dark .ph-tag {
  background: #1A1814;
  color: #B8AE9C;
  border-color: #3A352D;
}

/* ---------- Footer ---------- */
.footer {
  margin-top: 140px;
  border-top: 1px solid var(--rule);
  padding: 60px 0 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  align-items: start;
}
/* Footer nav links — plain, underline only on hover */
.footer nav a.link {
  border-bottom: 0;
  padding-bottom: 0;
  color: var(--ink-mute);
}
.footer nav a.link:hover {
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
}
.footer h4 {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-mute);
  margin: 0 0 16px;
}
.footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.9;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.footer-mark {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(80px, 13vw, 200px);
  line-height: 0.9;
  letter-spacing: -0.03em;
  margin: 60px 0 40px;
  color: var(--ink);
}

/* ---------- Reveal animation ---------- */
/* Content is fully visible by default; JS adds .js-reveal to opt in to the
   fade-up effect only when JS is running. This guarantees screenshots,
   print, and no-JS visitors always see content. */
.js-reveal .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.js-reveal .reveal.in {
  opacity: 1;
  transform: none;
}
.js-reveal .reveal.d1 { transition-delay: .06s; }
.js-reveal .reveal.d2 { transition-delay: .12s; }
.js-reveal .reveal.d3 { transition-delay: .18s; }
.js-reveal .reveal.d4 { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  .js-reveal .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ---------- Utility ---------- */
.row { display: flex; }
.col-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); }
.col-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gutter); }
.col-12 { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gutter); }

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .col-2, .col-3 { grid-template-columns: 1fr; }
  .col-12 { grid-template-columns: repeat(6, 1fr); }
}

/* ---------- Page-specific helpers ---------- */
.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 5px 10px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink-mute);
  margin-right: 6px;
}
