/* ============================================================
   Selma Vinter — folio ©2026
   Nordic editorial: warm paper, ink, one vermillion accent.
   ============================================================ */

:root {
  --paper: #f2eee3;
  --paper-dim: #e9e4d5;
  --ink: #1c1914;
  --ink-soft: #4a443a;
  --muted: #8a8270;
  --accent: #e04e1c;
  --line: rgba(28, 25, 20, 0.16);

  --font-display: "Fraunces", "Georgia", serif;
  --font-mono: "Azeret Mono", "SFMono-Regular", monospace;

  --pad: clamp(1.25rem, 4vw, 4rem);
}

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

html { scroll-behavior: smooth; overflow-x: clip; }

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-display);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

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

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

em {
  font-style: italic;
  font-variation-settings: "opsz" 60;
}

/* ---------- mono utility ---------- */
.section-label,
.site-head__nav,
.site-head__status,
.hero__meta,
.work__index, .work__cat, .work__year,
.services__index,
.footer__bottom,
.marquee,
.preloader__count,
.link-line {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-label {
  color: var(--muted);
  margin-bottom: clamp(2rem, 5vw, 4rem);
}
.section-label--light { color: rgba(242, 238, 227, 0.5); }

.arrow { font-family: var(--font-display); }

/* ============================================================
   Preloader
   ============================================================ */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  align-items: flex-end;
  /* failsafe: if JS/CDN fails entirely, lift the curtain anyway */
  animation: preloader-failsafe 0.6s ease 5s forwards;
}
@keyframes preloader-failsafe {
  to { opacity: 0; visibility: hidden; }
}
.preloader__inner {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: var(--pad);
}
.preloader__name {
  font-style: italic;
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  font-variation-settings: "opsz" 144;
}
.preloader__count {
  font-size: clamp(3rem, 10vw, 7rem);
  line-height: 1;
  color: var(--accent);
}

/* ============================================================
   Cursor & grain
   ============================================================ */
.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  z-index: 950;
  transform: translate(-50%, -50%);
  transition: width 0.25s ease, height 0.25s ease, opacity 0.25s ease;
  opacity: 0;
  mix-blend-mode: multiply;
}
.cursor.is-active { opacity: 1; }
.cursor.is-hover { width: 56px; height: 56px; }
/* suppressed while an info card is open so it never sits over the text */
.cursor.is-muted { opacity: 0; }
@media (hover: none) { .cursor { display: none; } }

.grain {
  position: fixed;
  inset: -50%;
  z-index: 900;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 8s steps(10) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -2%); }
  80% { transform: translate(3%, 3%); }
}

/* ============================================================
   Header
   ============================================================ */
.site-head {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 800;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: clamp(1rem, 2.5vw, 2rem) var(--pad);
  mix-blend-mode: multiply;
}
.site-head__logo {
  font-size: 1.3rem;
  font-weight: 600;
  font-variation-settings: "opsz" 144;
}
.site-head__logo sup { color: var(--accent); font-size: 0.6em; }
.site-head__nav { display: flex; gap: 1.75rem; }
.site-head__nav a { position: relative; padding-bottom: 2px; }
.site-head__nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1);
}
.site-head__nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.site-head__status { display: flex; align-items: center; gap: 0.5rem; color: var(--ink-soft); }
.site-head__status .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

@media (max-width: 720px) {
  .site-head__status { display: none; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--pad);
  padding-top: clamp(6rem, 14vh, 9rem);
}

.hero__topo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero__title {
  position: relative;
  z-index: 1;
  font-size: clamp(3.2rem, 13vw, 12rem);
  line-height: 0.86;
  font-weight: 480;
  letter-spacing: -0.035em;
  font-variation-settings: "opsz" 144, "WONK" 1;
  text-transform: uppercase;
}
/* padding extends the reveal mask above cap height so Ä/Ö dots aren't clipped */
.hero__line {
  display: block;
  overflow: hidden;
  padding-top: 0.16em;
  margin-top: -0.16em;
}
.hero__line--indent { margin-left: clamp(1.25rem, 5vw, 5rem); }
.hero__amp {
  color: var(--accent);
  font-size: 0.32em;
  vertical-align: 0.85em;
  margin-right: 0.18em;
}

/* split chars — hidden state only once JS confirms it will animate them */
.ch { display: inline-block; }
html.js-anim .ch {
  transform: translateY(115%) rotate(4deg);
  will-change: transform;
}

.hero__tagline {
  position: relative;
  z-index: 1;
  max-width: 24ch;
  margin: clamp(1rem, 3vh, 2rem) 0 clamp(2rem, 5vh, 3.5rem) auto;
  font-size: clamp(1.05rem, 1.6vw, 1.4rem);
  line-height: 1.45;
  font-variation-settings: "opsz" 30;
  color: var(--ink-soft);
  /* cartographic label halo — clears the contour lines under the text */
  padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1.75rem, 3.5vw, 3rem);
  background: radial-gradient(
    closest-side,
    var(--paper) 50%,
    rgba(242, 238, 227, 0.85) 72%,
    transparent 100%
  );
}
.hero__tagline em { color: var(--accent); }

.hero__meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 1.1rem;
  color: var(--ink-soft);
}
.hero__meta-item--accent { color: var(--accent); }
.hero__meta .arrow { display: inline-block; animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

@media (max-width: 720px) {
  .hero__meta { flex-wrap: wrap; row-gap: 0.6rem; }
  .hero__meta-item:nth-child(3) { display: none; }
  .hero__tagline { margin-left: 0; margin-right: auto; max-width: 28ch; }
}

/* ============================================================
   Marquee
   ============================================================ */
.marquee {
  background: var(--ink);
  color: var(--paper);
  padding: 0.9rem 0;
  overflow: hidden;
  transform: rotate(-1.2deg) scale(1.02);
  white-space: nowrap;
}
.marquee__track {
  display: inline-flex;
  animation: marquee 26s linear infinite;
}
.marquee__track span { padding-right: 0.5rem; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============================================================
   Manifesto
   ============================================================ */
.manifesto {
  padding: clamp(7rem, 16vh, 12rem) var(--pad);
}
.manifesto__text {
  font-size: clamp(1.9rem, 5vw, 4.2rem);
  line-height: 1.18;
  letter-spacing: -0.015em;
  font-weight: 420;
  font-variation-settings: "opsz" 144;
  max-width: 20em;
}
.manifesto__text em { color: var(--accent); }
.manifesto__text .w { display: inline-block; }
html.js-anim .manifesto__text .w { opacity: 0.12; }
.manifesto__foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  margin-top: clamp(3rem, 7vh, 5rem);
}
.manifesto__foot p {
  max-width: 44ch;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-soft);
  font-variation-settings: "opsz" 14;
}
.link-line {
  color: var(--accent);
  border-bottom: 1px solid currentColor;
  padding-bottom: 3px;
  white-space: nowrap;
}
@media (max-width: 720px) {
  .manifesto__foot { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   Work
   ============================================================ */
.work { padding: clamp(4rem, 10vh, 8rem) var(--pad); }

.work__list { list-style: none; border-top: 1px solid var(--line); }

.work__row { position: relative; border-bottom: 1px solid var(--line); }
.work__row > a {
  display: grid;
  grid-template-columns: 3rem 1fr auto 4rem;
  align-items: baseline;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: clamp(1.4rem, 3.5vh, 2.6rem) 0;
  transition: padding-left 0.45s cubic-bezier(0.65, 0, 0.35, 1);
}
.work__index, .work__year { color: var(--muted); }
.work__year { text-align: right; }
.work__name {
  font-size: clamp(1.7rem, 4.6vw, 4rem);
  line-height: 1;
  font-weight: 460;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 144, "WONK" 1;
  transition: color 0.3s ease;
}
.work__cat { color: var(--ink-soft); }

@media (hover: hover) {
  .work__row:hover > a { padding-left: clamp(1rem, 3vw, 3rem); }
  .work__row:hover .work__name { color: var(--accent); }
}

@media (max-width: 720px) {
  .work__row > a {
    grid-template-columns: 2rem 1fr auto;
    grid-template-areas: "i n y" ". c c";
  }
  .work__index { grid-area: i; }
  .work__name { grid-area: n; }
  .work__year { grid-area: y; }
  .work__cat { grid-area: c; }
}

/* cursor-following info cards (desktop) */
.preview {
  position: fixed;
  top: 0; left: 0;
  width: clamp(300px, 26vw, 380px);
  z-index: 700;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%);
}
.preview__card {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  background: var(--ink);
  color: var(--paper);
  border-radius: 6px;
  padding: 1.4rem 1.6rem 1.5rem;
  opacity: 0;
  transition: opacity 0.25s ease;
  /* the .preview anchor is a zero-height point at the cursor — center on it */
  transform: translateY(-50%) rotate(-1.5deg);
}
.preview__card.is-active { opacity: 1; }
.preview__head {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
}
.preview__desc {
  font-size: 1.02rem;
  line-height: 1.5;
  font-variation-settings: "opsz" 30;
  color: rgba(242, 238, 227, 0.92);
}
.preview__tags {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(242, 238, 227, 0.55);
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(242, 238, 227, 0.15);
}
@media (hover: none) { .preview { display: none; } }

/* ============================================================
   Services
   ============================================================ */
.services { padding: clamp(4rem, 10vh, 8rem) var(--pad) clamp(7rem, 16vh, 12rem); }

.services__row {
  display: grid;
  grid-template-columns: 6rem 1fr 1.2fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
  border-top: 1px solid var(--line);
  padding: clamp(1.8rem, 4vh, 3rem) 0;
}
.services__row:last-child { border-bottom: 1px solid var(--line); }
.services__index { color: var(--accent); padding-top: 0.6rem; }
.services__name {
  font-size: clamp(1.6rem, 3.4vw, 2.8rem);
  font-weight: 460;
  letter-spacing: -0.015em;
  font-variation-settings: "opsz" 144;
}
.services__desc {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 46ch;
  font-variation-settings: "opsz" 14;
}
@media (max-width: 720px) {
  .services__row { grid-template-columns: 1fr; gap: 0.8rem; }
  .services__index { padding-top: 0; }
}

/* ============================================================
   Recognition
   ============================================================ */
.recognition { padding: clamp(4rem, 10vh, 8rem) var(--pad) clamp(7rem, 16vh, 12rem); }

.recognition figure { margin: 0; }

.recognition__lead {
  border-left: 3px solid var(--accent);
  padding-left: clamp(1.5rem, 4vw, 3rem);
  max-width: 56rem;
}
.recognition__lead blockquote {
  font-size: clamp(1.4rem, 2.6vw, 2.1rem);
  line-height: 1.35;
  font-style: italic;
  font-variation-settings: "opsz" 60;
  color: var(--ink);
}
.recognition__lead blockquote p + p { margin-top: 1.2em; }

.recognition figcaption {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 1.6rem;
}

.recognition__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  margin-top: clamp(4rem, 9vh, 7rem);
}
.recognition__item {
  border-top: 1px solid var(--line);
  padding-top: 1.6rem;
}
.recognition__item blockquote {
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--ink-soft);
  font-variation-settings: "opsz" 14;
}
.recognition__item figcaption { margin-top: 1.2rem; }

@media (max-width: 900px) {
  .recognition__grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(4rem, 10vh, 7rem) var(--pad) clamp(1.5rem, 4vh, 2.5rem);
  border-radius: 24px 24px 0 0;
}

.footer__cta {
  display: block;
  font-size: clamp(4.5rem, 17vw, 16rem);
  line-height: 0.88;
  text-transform: uppercase;
  font-weight: 480;
  letter-spacing: -0.03em;
  font-variation-settings: "opsz" 144, "WONK" 1;
  width: fit-content;
}
.footer__cta-line { display: block; overflow: hidden; }
.footer__cta-line--accent {
  color: var(--accent);
  font-style: italic;
  margin-left: clamp(2rem, 12vw, 12rem);
}
.footer__cta:hover .footer__cta-line--accent { text-decoration: underline; text-decoration-thickness: 0.04em; }

.footer__email {
  font-family: var(--font-mono);
  font-size: clamp(0.85rem, 1.4vw, 1.05rem);
  letter-spacing: 0.06em;
  margin-top: clamp(2.5rem, 6vh, 4rem);
  color: rgba(242, 238, 227, 0.7);
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-top: clamp(4rem, 10vh, 7rem);
  padding-top: 1.2rem;
  border-top: 1px solid rgba(242, 238, 227, 0.15);
  color: rgba(242, 238, 227, 0.55);
}
.footer__social { display: flex; gap: 1.5rem; }
.footer__social a:hover { color: var(--accent); }
@media (max-width: 720px) {
  .footer__bottom { flex-wrap: wrap; }
  .footer__bottom > span:last-child { display: none; }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .marquee__track, .grain, .hero__meta .arrow, .site-head__status .dot {
    animation: none !important;
  }
}
