/* Kropelnik — editorial analytics stylesheet */
:root {
  --ink: #1c1814;
  --ink-soft: #3a322c;
  --muted: #6a5f55;
  --line: #e0d6c8;
  --paper: #f6f0e6;
  --surface: #fffdf9;
  --accent: #0f7a68;
  --accent-deep: #0a5548;
  --accent-soft: #e4f3ef;
  --warm: #c4a574;
  --radius: 2px;
  --max: 1120px;
  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
  --shadow: 0 1px 0 rgba(28, 24, 20, 0.06);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse 90% 55% at 0% 0%, rgba(15, 122, 104, 0.12), transparent 55%),
    radial-gradient(ellipse 70% 45% at 100% 8%, rgba(196, 165, 116, 0.18), transparent 50%),
    linear-gradient(180deg, rgba(246, 240, 230, 0.92), rgba(246, 240, 230, 0.97)),
    url("/images/bg-desk-soft.jpg");
  background-size: auto, auto, auto, 480px;
  background-attachment: scroll;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 0.2s var(--ease);
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 1000;
}

.skip-link:focus {
  left: 0;
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 240, 230, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}

.brand img,
.brand svg {
  height: 2rem;
  width: auto;
}

.brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 0.45rem 0.7rem;
  font: inherit;
  cursor: pointer;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 600;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent);
}

/* Hero — full-bleed composition */
.hero {
  position: relative;
  overflow: hidden;
  min-height: min(88vh, 720px);
  display: flex;
  align-items: flex-end;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media picture,
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% center;
}

.hero-media img {
  animation: heroDrift 22s var(--ease) infinite alternate;
  transform: scale(1.06);
}

@keyframes heroDrift {
  from {
    transform: scale(1.06) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.1) translate3d(-1.5%, -1%, 0);
  }
}

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(
      100deg,
      rgba(246, 240, 230, 0.97) 0%,
      rgba(246, 240, 230, 0.88) 34%,
      rgba(246, 240, 230, 0.35) 58%,
      rgba(28, 24, 20, 0.15) 100%
    ),
    linear-gradient(0deg, rgba(246, 240, 230, 0.55) 0%, transparent 42%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 4.5rem 0 3.5rem;
  max-width: 34rem;
  animation: heroIn 0.9s var(--ease) both;
}

@keyframes heroIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.85rem, 7vw, 4.6rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
  color: var(--ink);
  text-shadow: 0 1px 0 rgba(255, 253, 249, 0.5);
}

.hero-brand span {
  color: var(--accent);
}

.hero-lead {
  max-width: 32rem;
  font-size: 1.22rem;
  color: var(--ink-soft);
  margin: 0 0 1.75rem;
}

.hero .btn-ghost {
  background: rgba(255, 253, 249, 0.55);
  backdrop-filter: blur(6px);
  border-color: rgba(28, 24, 20, 0.18);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.25rem;
  font: inherit;
  font-weight: 650;
  font-size: 0.95rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-deep);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Sections */
.section {
  padding: 3.25rem 0;
}

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

.section-head {
  margin-bottom: 1.75rem;
  max-width: 40rem;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
  line-height: 1.2;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

/* Review grid — not card-heavy: border-top rule lists */
.review-list {
  display: grid;
  gap: 0;
}

.review-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem 1.5rem;
  padding: 1.35rem 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: background 0.2s var(--ease);
}

.review-item:last-child {
  border-bottom: 1px solid var(--line);
}

.review-item:hover {
  background: rgba(15, 122, 104, 0.045);
}

.review-thumb {
  margin: 0;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--accent-soft);
}

.review-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s var(--ease);
}

.review-item:hover .review-thumb img {
  transform: scale(1.04);
}

.review-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.tag {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  background: var(--accent-soft);
  color: var(--accent-deep);
  border-radius: var(--radius);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.tag.is-active,
.tag:hover {
  background: var(--accent);
  color: #fff;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.25rem;
}

.review-item h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 0 0 0.35rem;
  line-height: 1.25;
}

.review-item p {
  margin: 0;
  color: var(--muted);
  max-width: 48rem;
}

@media (min-width: 720px) {
  .review-item {
    grid-template-columns: 11.5rem 1fr;
    align-items: center;
  }

  .review-item.has-thumb {
    grid-template-columns: 13rem minmax(0, 1fr);
  }
}

/* Mission visual strip */
.mission-visual {
  margin: 0;
  overflow: hidden;
  min-height: 14rem;
  background: var(--accent-soft);
}

.mission-visual img {
  width: 100%;
  height: 100%;
  min-height: 14rem;
  object-fit: cover;
  animation: softRise 1.1s var(--ease) both;
}

@keyframes softRise {
  from {
    opacity: 0;
    transform: scale(1.03);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.atmosphere-band {
  position: relative;
  min-height: 12rem;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.atmosphere-band img {
  width: 100%;
  height: 12rem;
  object-fit: cover;
  object-position: center 40%;
  filter: saturate(1.05);
}

.atmosphere-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(246, 240, 230, 0.55),
    transparent 40%,
    rgba(246, 240, 230, 0.35)
  );
  pointer-events: none;
}

/* Calculator / comparison */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.panel h3 {
  font-family: var(--font-display);
  margin: 0 0 1rem;
  font-size: 1.25rem;
}

.calc-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .calc-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field label {
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--ink-soft);
}

.field input,
.field select {
  font: inherit;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
}

.calc-result {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 560px) {
  .calc-result {
    grid-template-columns: repeat(3, 1fr);
  }
}

.metric strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--accent-deep);
  letter-spacing: -0.02em;
}

.metric span {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin-top: 1.5rem;
}

.compare-table th,
.compare-table td {
  text-align: left;
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid var(--line);
}

.compare-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 700;
}

.compare-table tbody tr {
  cursor: pointer;
  transition: background 0.15s var(--ease);
}

.compare-table tbody tr:hover,
.compare-table tbody tr.is-selected {
  background: var(--accent-soft);
}

/* Contact / hours block */
.info-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 720px) {
  .info-grid {
    grid-template-columns: 1.2fr 1fr;
  }
}

.info-block h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0 0 0.75rem;
}

.info-block dl {
  margin: 0;
  display: grid;
  gap: 0.65rem;
}

.info-block dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 700;
  margin: 0;
}

.info-block dd {
  margin: 0.15rem 0 0;
}

.hours-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.hours-table td {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--line);
}

.hours-table td:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Accordion */
.accordion {
  border-top: 1px solid var(--line);
}

.accordion-item {
  border-bottom: 1px solid var(--line);
}

.accordion-trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  background: none;
  border: none;
  font: inherit;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
}

.accordion-trigger::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 0.25s var(--ease);
}

.accordion-item.is-open .accordion-trigger::after {
  content: "−";
}

.accordion-panel {
  display: none;
  padding: 0 0 1.1rem;
  color: var(--muted);
}

.accordion-item.is-open .accordion-panel {
  display: block;
  animation: fadeIn 0.3s var(--ease);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Glossary term links + popup */
.term {
  color: var(--accent-deep);
  border-bottom: 1px dotted var(--accent);
  cursor: help;
  font-weight: 600;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  padding: 0;
  font: inherit;
  font-weight: 600;
}

.term-popup {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(26, 31, 46, 0.45);
}

.term-popup.is-open {
  display: flex;
  animation: fadeIn 0.2s var(--ease);
}

.term-popup-dialog {
  background: var(--surface);
  border: 1px solid var(--line);
  max-width: 28rem;
  width: 100%;
  padding: 1.5rem;
  box-shadow: 0 12px 40px rgba(26, 31, 46, 0.18);
}

.term-popup-dialog h4 {
  font-family: var(--font-display);
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}

.term-popup-dialog p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.term-popup-close {
  font: inherit;
  font-weight: 650;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 0.45rem 0.9rem;
  cursor: pointer;
}

/* Article / prose */
.page-hero {
  padding: 2.5rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(120deg, rgba(15, 122, 104, 0.08), transparent 55%),
    linear-gradient(0deg, rgba(246, 240, 230, 0.4), transparent),
    url("/images/bg-desk-soft.jpg");
  background-size: auto, auto, 420px;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}

.page-hero .lede {
  max-width: 40rem;
  color: var(--muted);
  margin: 0;
  font-size: 1.1rem;
}

.prose {
  max-width: 42rem;
  padding: 2rem 0 3rem;
}

.prose h2 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  margin: 2rem 0 0.75rem;
  letter-spacing: -0.01em;
}

.prose h3 {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.5rem;
}

.prose p,
.prose ul,
.prose ol {
  margin: 0 0 1rem;
  color: var(--ink-soft);
}

.prose ul,
.prose ol {
  padding-left: 1.25rem;
}

.prose li {
  margin-bottom: 0.35rem;
}

.formula {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  padding: 0.85rem 1rem;
  margin: 1.25rem 0;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.9rem;
  overflow-x: auto;
}

/* Glossary list */
.glossary-list {
  display: grid;
  gap: 0;
}

.glossary-entry {
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
}

.glossary-entry:last-child {
  border-bottom: 1px solid var(--line);
}

.glossary-entry h3 {
  font-family: var(--font-display);
  margin: 0 0 0.4rem;
  font-size: 1.2rem;
}

.glossary-entry p {
  margin: 0;
  color: var(--muted);
}

/* Vacancy / partnership */
.vacancy {
  padding: 1.35rem 0;
  border-top: 1px solid var(--line);
}

.vacancy:last-of-type {
  border-bottom: 1px solid var(--line);
}

.vacancy h3 {
  font-family: var(--font-display);
  margin: 0 0 0.35rem;
}

.vacancy .meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: #c5cad6;
  padding: 3rem 0 2rem;
  margin-top: 2rem;
}

.site-footer a {
  color: #e8ebea;
}

.site-footer a:hover {
  color: #fff;
}

.footer-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: #fff;
  letter-spacing: 0.04em;
  margin: 0 0 0.75rem;
}

.footer-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.footer-nav a {
  text-decoration: none;
  font-size: 0.95rem;
}

.footer-heading {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8b93a5;
  margin: 0 0 0.75rem;
  font-weight: 700;
}

.disclaimer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.85rem;
  line-height: 1.55;
  color: #9aa3b5;
}

.footer-copy {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: #7a8498;
}

/* Cookie bar */
.cookie-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 150;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 1rem;
  box-shadow: 0 -4px 24px rgba(26, 31, 46, 0.08);
  display: none;
}

.cookie-bar.is-visible {
  display: block;
}

.cookie-bar .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
}

.cookie-bar p {
  margin: 0;
  flex: 1 1 16rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Utilities */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.muted {
  color: var(--muted);
}

.mt-0 {
  margin-top: 0;
}

/* Mobile nav */
@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    display: none;
    padding: 0.75rem 1rem 1rem;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0.15rem;
  }

  .site-nav a {
    display: block;
    padding: 0.55rem 0;
  }

  .header-inner {
    position: relative;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .hero-media img {
    transform: none;
  }
}

.article-cover {
  margin: 0 0 1.75rem;
  overflow: hidden;
  max-width: 42rem;
}

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