/*
Theme Name: Nautin Kohtuuttomasti
Theme URI: https://nautinkohtuuttomasti.fi
Author: Miikka Salminoja
Description: Tumma, toimituksellinen WordPress-teema ajatuksille, novelleille, piirustuksille ja meemioksennukselle.
Version: 1.1.0
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: nautinkohtuuttomasti
*/

:root {
  --ink: #0f0e0d;
  --ink-soft: #151311;
  --panel: #1c1815;
  --panel-high: #24201c;
  --paper: #f1ece4;
  --paper-soft: #c9c0b6;
  --muted: #948b82;
  --rust: #a64f2b;
  --rust-bright: #ca6a3a;
  --brown: #40281d;
  --line: rgba(241, 236, 228, 0.13);
  --line-strong: rgba(241, 236, 228, 0.28);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --max: 1320px;
  --radius: 2px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
}

body {
  margin: 0;
  color: var(--paper);
  background:
    radial-gradient(circle at 85% 5%, rgba(166, 79, 43, 0.14), transparent 26rem),
    radial-gradient(circle at 5% 65%, rgba(93, 55, 38, 0.1), transparent 32rem),
    var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
  content: "";
  pointer-events: none;
}

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

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button, input, textarea { font: inherit; }
button { color: inherit; }

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

.screen-reader-text:focus {
  top: 8px;
  left: 8px;
  z-index: 9999;
  width: auto;
  height: auto;
  padding: 10px 14px;
  clip: auto;
  background: var(--paper);
  color: var(--ink);
}

.site-shell {
  width: min(calc(100% - 48px), var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 14, 13, 0.9);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 84px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  justify-self: start;
  line-height: 1;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--rust-bright);
  border-radius: 50%;
  color: var(--rust-bright);
  font-family: var(--serif);
  font-size: 17px;
  font-style: italic;
  transform: rotate(-8deg);
}

.brand-mark::after {
  position: absolute;
  width: 10px;
  border-top: 1px solid currentColor;
  content: "";
  transform: rotate(-45deg);
}

.brand-copy {
  display: grid;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand-copy span:last-child { color: var(--paper-soft); }

.primary-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 38px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.primary-nav a {
  position: relative;
  padding: 31px 0 27px;
  color: var(--paper-soft);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  transition: color 180ms ease;
}

.primary-nav a::after {
  position: absolute;
  right: 0;
  bottom: 21px;
  left: 0;
  border-top: 1px solid var(--rust-bright);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.primary-nav a:hover,
.primary-nav a:focus-visible,
.primary-nav .current-menu-item > a { color: var(--paper); }
.primary-nav a:hover::after,
.primary-nav a:focus-visible::after,
.primary-nav .current-menu-item > a::after { transform: scaleX(1); }

.header-side {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 12px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
}

.menu-toggle span,
.menu-toggle::before,
.menu-toggle::after {
  display: block;
  width: 17px;
  margin: 4px auto;
  border-top: 1px solid currentColor;
  content: "";
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(340px, 0.7fr);
  gap: clamp(42px, 7vw, 108px);
  align-items: end;
  min-height: 690px;
  padding: 105px 0 76px;
}

.eyebrow,
.kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 26px;
  color: var(--rust-bright);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.eyebrow::before,
.kicker::before {
  width: 28px;
  border-top: 1px solid currentColor;
  content: "";
}

.hero h1 {
  max-width: 880px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(69px, 9.2vw, 134px);
  font-weight: 400;
  letter-spacing: -0.065em;
  line-height: 0.79;
}

.hero h1 em {
  color: var(--rust-bright);
  font-weight: 400;
}

.hero-lede {
  display: grid;
  grid-template-columns: auto minmax(0, 470px);
  gap: 22px;
  align-items: start;
  margin-top: 48px;
}

.hero-lede .index-number {
  padding-top: 5px;
  color: var(--rust-bright);
  font-family: var(--serif);
  font-size: 14px;
  font-style: italic;
}

.hero-lede p {
  margin: 0;
  color: var(--paper-soft);
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.55;
}

.hero-feature {
  position: relative;
  min-height: 440px;
  padding: 30px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(155deg, rgba(166, 79, 43, 0.17), transparent 60%),
    var(--panel);
}

.hero-feature::before {
  position: absolute;
  top: 54px;
  right: -76px;
  width: 275px;
  height: 275px;
  border: 1px solid rgba(202, 106, 58, 0.5);
  border-radius: 48% 52% 43% 57%;
  content: "";
  transform: rotate(35deg);
}

.hero-feature::after {
  position: absolute;
  right: 50px;
  bottom: 90px;
  width: 130px;
  height: 210px;
  border-right: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
  content: "";
  transform: skew(-17deg) rotate(18deg);
}

.feature-label {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.feature-body {
  position: absolute;
  right: 30px;
  bottom: 30px;
  left: 30px;
  z-index: 1;
}

.feature-body h2 {
  max-width: 390px;
  margin: 0 0 16px;
  font-family: var(--serif);
  font-size: clamp(32px, 3vw, 47px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--paper-soft);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.text-link::after {
  width: 34px;
  border-top: 1px solid currentColor;
  content: "";
  transition: width 180ms ease;
}

.text-link:hover::after { width: 52px; }

.ticker {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: var(--ink-soft);
}

.ticker-track {
  display: flex;
  width: max-content;
  min-width: 100%;
  animation: ticker 35s linear infinite;
}

.ticker-group { display: flex; }
.ticker a,
.ticker span {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  padding: 17px 28px;
  color: var(--paper-soft);
  font-family: var(--serif);
  font-size: 14px;
  font-style: italic;
  white-space: nowrap;
}

.ticker a::after,
.ticker span::after {
  width: 5px;
  height: 5px;
  border: 1px solid var(--rust-bright);
  border-radius: 50%;
  content: "";
}

@keyframes ticker { to { transform: translateX(-50%); } }

.section { padding: 116px 0; }
.section + .section { border-top: 1px solid var(--line); }

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(260px, 0.4fr);
  gap: 50px;
  align-items: end;
  margin-bottom: 54px;
}

.section-heading h2,
.archive-header h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(49px, 6.4vw, 88px);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.95;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.category-tile {
  position: relative;
  display: flex;
  min-height: 420px;
  flex-direction: column;
  justify-content: space-between;
  padding: 25px;
  overflow: hidden;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--ink-soft);
  transition: background 220ms ease, color 220ms ease;
}

.category-tile:hover { background: var(--rust); }
.category-tile:nth-child(even):hover { background: var(--brown); }

.category-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.category-tile:hover .category-top { color: var(--paper); }

.category-glyph {
  position: absolute;
  top: 100px;
  left: 50%;
  width: 130px;
  height: 130px;
  color: var(--rust-bright);
  transform: translateX(-50%);
  transition: color 220ms ease, transform 350ms ease;
}

.category-glyph::before,
.category-glyph::after {
  position: absolute;
  inset: 13px;
  border: 1px solid currentColor;
  content: "";
  transform: rotate(28deg);
}

.category-glyph::after {
  inset: 35px 4px;
  border-radius: 50%;
  transform: rotate(-38deg);
}

.category-tile:nth-child(2) .category-glyph::before { border-radius: 50% 50% 10% 45%; }
.category-tile:nth-child(3) .category-glyph::after { border-radius: 2px; transform: rotate(45deg); }
.category-tile:nth-child(4) .category-glyph::before { border-radius: 50%; transform: scaleX(0.6); }
.category-tile:hover .category-glyph { color: var(--paper); transform: translateX(-50%) rotate(8deg) scale(1.08); }

.category-bottom { position: relative; z-index: 1; }
.category-bottom h3 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: clamp(29px, 3vw, 39px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1;
}

.category-bottom p {
  min-height: 48px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  transition: color 220ms ease;
}

.category-tile:hover .category-bottom p { color: rgba(255,255,255,.72); }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.filter-button {
  padding: 9px 14px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: 180ms ease;
}

.filter-button:hover,
.filter-button.is-active {
  border-color: var(--rust);
  background: var(--rust);
  color: var(--paper);
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 22px;
}

.content-card {
  grid-column: span 4;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--panel);
  transition: transform 200ms ease, border-color 200ms ease;
}

.content-card:nth-child(5n + 1),
.content-card:nth-child(5n + 5) { grid-column: span 6; }
.content-card:hover { border-color: var(--line-strong); transform: translateY(-4px); }
.content-card.is-hidden { display: none; }

.card-visual {
  position: relative;
  display: grid;
  min-height: 245px;
  overflow: hidden;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(166,79,43,.17), transparent 58%),
    var(--panel-high);
}

.content-card:nth-child(even) .card-visual {
  background:
    radial-gradient(circle at 70% 30%, rgba(166,79,43,.25), transparent 25%),
    #171513;
}

.card-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms cubic-bezier(.2,.7,.2,1);
}

.content-card:hover .card-visual img { transform: scale(1.025); }

.visual-word {
  position: relative;
  z-index: 1;
  max-width: 92%;
  color: var(--paper);
  font-family: var(--serif);
  font-size: clamp(44px, 5vw, 76px);
  font-style: italic;
  letter-spacing: -0.06em;
  line-height: .9;
  opacity: .88;
  transform: rotate(-3deg);
}

.visual-word::before {
  position: absolute;
  top: 50%;
  right: -40px;
  left: -40px;
  z-index: -1;
  border-top: 1px solid var(--rust-bright);
  content: "";
}

.card-body { padding: 25px; }
.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.card-meta a { color: var(--rust-bright); }

.card-body h3 {
  margin: 0 0 13px;
  font-family: var(--serif);
  font-size: clamp(27px, 3vw, 37px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.card-body h3 a:hover { color: var(--rust-bright); }
.card-excerpt { margin: 0; color: var(--muted); font-size: 14px; }

.archive-header {
  padding: 110px 0 64px;
  border-bottom: 1px solid var(--line);
}

.archive-description { max-width: 580px; margin: 25px 0 0; color: var(--muted); }
.archive-content { padding: 70px 0 120px; }

.article-wrap {
  display: grid;
  grid-template-columns: minmax(0, 760px);
  justify-content: center;
  padding: 104px 0 130px;
}

.article-header { margin-bottom: 60px; }
.article-header h1 {
  margin: 0 0 26px;
  font-family: var(--serif);
  font-size: clamp(54px, 7vw, 94px);
  font-weight: 400;
  letter-spacing: -0.06em;
  line-height: .93;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 15px 25px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.article-meta a { color: var(--rust-bright); }
.article-image { margin: 0 0 55px; }

.article-content {
  color: #d9d1c8;
  font-family: var(--serif);
  font-size: clamp(19px, 2vw, 22px);
  line-height: 1.75;
}

.article-content > p:first-child::first-letter {
  float: left;
  margin: 9px 10px 0 0;
  color: var(--rust-bright);
  font-size: 4.2em;
  line-height: .72;
}

.article-content h2,
.article-content h3 { color: var(--paper); font-weight: 400; line-height: 1.15; }
.article-content h2 { margin-top: 2em; font-size: 2em; }
.article-content a { color: var(--rust-bright); text-decoration: underline; text-underline-offset: 4px; }
.article-content blockquote {
  margin: 2em 0;
  padding-left: 28px;
  border-left: 1px solid var(--rust-bright);
  color: var(--paper);
  font-size: 1.3em;
  font-style: italic;
}

.pagination { margin-top: 60px; }
.pagination .nav-links { display: flex; gap: 8px; }
.pagination a,
.pagination span {
  display: grid;
  min-width: 40px;
  height: 40px;
  padding: 0 11px;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.pagination .current { border-color: var(--rust); background: var(--rust); color: var(--paper); }

.empty-state {
  grid-column: 1 / -1;
  padding: 70px 30px;
  border: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #0b0a09;
}

.footer-main {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 80px;
  padding: 80px 0;
}

.footer-statement {
  max-width: 680px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(39px, 5vw, 69px);
  letter-spacing: -.05em;
  line-height: 1;
}

.footer-statement em { color: var(--rust-bright); font-weight: 400; }
.footer-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-content: end; }
.footer-nav a { color: var(--muted); font-size: 12px; }
.footer-nav a:hover { color: var(--paper); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  color: #6f6861;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

@media (max-width: 980px) {
  .header-inner { grid-template-columns: 1fr auto; }
  .primary-nav {
    position: absolute;
    top: 84px;
    right: 0;
    left: 0;
    display: none;
    padding: 20px 24px 30px;
    border-bottom: 1px solid var(--line);
    background: var(--ink);
  }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { align-items: stretch; flex-direction: column; gap: 0; }
  .primary-nav a { display: block; padding: 13px 0; font-family: var(--serif); font-size: 24px; letter-spacing: -.01em; text-transform: none; }
  .primary-nav a::after { display: none; }
  .menu-toggle { display: block; }
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 82px; }
  .hero-feature { min-height: 360px; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .content-card, .content-card:nth-child(5n + 1), .content-card:nth-child(5n + 5) { grid-column: span 6; }
  .article-wrap { grid-template-columns: minmax(0, 760px); }
}

@media (max-width: 680px) {
  .site-shell { width: min(calc(100% - 30px), var(--max)); }
  .header-inner { min-height: 70px; }
  .primary-nav { top: 70px; }
  .brand-copy { font-size: 9px; }
  .hero { gap: 45px; padding: 67px 0 48px; }
  .hero h1 { font-size: clamp(68px, 22vw, 90px); }
  .hero h1 em { display: inline-block; font-size: .56em; letter-spacing: -.045em; }
  .hero-lede { grid-template-columns: 1fr; margin-top: 37px; }
  .hero-lede .index-number { display: none; }
  .hero-feature { min-height: 330px; padding: 22px; }
  .feature-body { right: 22px; bottom: 22px; left: 22px; }
  .section { padding: 80px 0; }
  .section-heading { grid-template-columns: 1fr; gap: 20px; margin-bottom: 38px; }
  .category-grid { grid-template-columns: 1fr; }
  .category-tile { min-height: 340px; }
  .category-glyph { top: 65px; }
  .content-card, .content-card:nth-child(5n + 1), .content-card:nth-child(5n + 5) { grid-column: 1 / -1; }
  .card-visual { min-height: 210px; }
  .archive-header { padding: 70px 0 45px; }
  .article-wrap { padding: 72px 0 90px; }
  .footer-main { grid-template-columns: 1fr; gap: 52px; padding: 65px 0; }
  .footer-bottom { align-items: flex-start; flex-direction: column; gap: 8px; }
}
