/* ---------- Tokens ---------- */
:root {
  --bg: #f6f4ef;
  --bg-elev: #ffffff;
  --surface: #fbfaf6;
  --ink: #0b1f3a;
  --ink-soft: #41506a;
  --ink-mute: #6b7a93;
  --line: #e5e0d4;
  --accent: #d97742;
  --accent-soft: #f0a36b;
  --gold: #c8a35a;
  --navy: #0b1f3a;
  --navy-2: #16315a;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(11, 31, 58, 0.06), 0 4px 14px rgba(11, 31, 58, 0.04);
  --shadow-md: 0 8px 30px rgba(11, 31, 58, 0.08);
  --maxw: 1180px;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
ul, ol { list-style: none; padding: 0; margin: 0; }

/* ---------- Background decoration ---------- */
.bg-grid {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(11, 31, 58, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(11, 31, 58, 0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}
.bg-glow {
  position: fixed; z-index: -1; pointer-events: none;
  top: -260px; left: 50%; transform: translateX(-50%);
  width: 1100px; height: 700px;
  background: radial-gradient(closest-side, rgba(217, 119, 66, 0.18), transparent 70%);
  filter: blur(20px);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 56px);
  background: rgba(246, 244, 239, 0.78);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease;
}
.site-header.scrolled { border-color: var(--line); }

.brand {
  display: inline-flex; align-items: center; gap: 12px;
  font-weight: 600; letter-spacing: -0.01em;
}
.brand-mark {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--navy); color: var(--gold);
  font-weight: 700; font-size: 14px; letter-spacing: 0.02em;
}
.brand-name { font-size: 16px; }

.primary-nav {
  display: flex; gap: 6px; align-items: center;
}
.primary-nav a {
  padding: 8px 14px; border-radius: 999px;
  color: var(--ink-soft); font-size: 14.5px; font-weight: 500;
  transition: background .2s ease, color .2s ease;
}
.primary-nav a:hover { background: rgba(11, 31, 58, 0.06); color: var(--ink); }

.nav-toggle {
  display: none; width: 40px; height: 40px; border-radius: 10px;
  align-items: center; justify-content: center; gap: 4px; flex-direction: column;
}
.nav-toggle span {
  width: 18px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Layout ---------- */
main { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(20px, 5vw, 40px); }
.section { padding: clamp(40px, 6vw, 72px) 0; }
.section-head { margin-bottom: 28px; }
.section-head.between {
  display: flex; align-items: end; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.kicker {
  text-transform: uppercase; letter-spacing: 0.16em;
  font-size: 12px; font-weight: 600; color: var(--accent);
  margin: 0 0 12px;
}
h1, h2, h3 { margin: 0; font-family: var(--font-serif); font-weight: 500; letter-spacing: -0.01em; color: var(--navy); }
h1 { font-size: clamp(40px, 6vw, 68px); line-height: 1.04; }
h2 { font-size: clamp(28px, 3.4vw, 42px); line-height: 1.12; }
h3 { font-size: clamp(18px, 1.6vw, 22px); line-height: 1.25; font-weight: 600; }
p { margin: 0 0 1em; }

.accent { color: var(--accent); font-style: italic; font-weight: 500; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px;
  font-weight: 600; font-size: 14.5px; letter-spacing: 0.01em;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  border: 1px solid transparent;
}
.btn.primary { background: var(--navy); color: #fff; box-shadow: var(--shadow-sm); }
.btn.primary:hover { background: var(--navy-2); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn.ghost { background: transparent; color: var(--ink); border-color: rgba(11, 31, 58, 0.18); }
.btn.ghost:hover { border-color: var(--navy); transform: translateY(-1px); }

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.45fr 1fr; gap: 56px;
  align-items: center;
  padding: clamp(48px, 8vw, 96px) 0 clamp(48px, 8vw, 80px);
}
.hero-inner > p.eyebrow { color: var(--accent); font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; font-size: 12px; margin-bottom: 18px; }
.lede { font-size: clamp(16px, 1.2vw, 19px); color: var(--ink-soft); max-width: 56ch; margin: 22px 0 32px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 44px; }

.hero-stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px; margin: 0; padding: 22px 0 0;
  border-top: 1px solid var(--line);
}
.hero-stats dt {
  font-family: var(--font-serif); font-size: 28px; font-weight: 600; color: var(--navy);
}
.hero-stats dd { margin: 4px 0 0; color: var(--ink-mute); font-size: 13.5px; }

/* Hero card */
.hero-card {
  position: relative;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow-md);
  transform: rotate(.6deg);
}
.hero-card::before {
  content: ""; position: absolute; inset: -1px;
  border-radius: 24px; padding: 1px;
  background: linear-gradient(160deg, rgba(217,119,66,.5), transparent 40%, rgba(11,31,58,.15));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
.profile-photo {
  position: relative;
  width: 100%; aspect-ratio: 4 / 3; border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(160deg, #1a3463, #0b1f3a 70%);
}
.profile-photo img {
  width: 100%;
  object-fit: cover;
  display: block;
}
.profile-meta { padding: 18px 4px 4px; }
.profile-name { font-family: var(--font-serif); font-size: 22px; font-weight: 600; margin: 0; }
.profile-role { color: var(--ink-soft); margin: 4px 0 8px; }
.profile-loc { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-mute); font-size: 13.5px; margin: 0; }
.profile-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding-top: 16px; border-top: 1px dashed var(--line); margin-top: 16px;
}
.profile-tags li {
  font-size: 12px; padding: 5px 10px;
  border: 1px solid var(--line); border-radius: 999px; color: var(--ink-soft);
  background: var(--surface);
}

/* ---------- Prose ---------- */
.prose p { color: var(--ink-soft); font-size: 17px; }
.prose strong { color: var(--ink); font-weight: 600; }
.two-col { columns: 2; column-gap: 56px; }
.two-col p { break-inside: avoid; }

/* ---------- Cards grid ---------- */
.cards {
  display: grid; gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(11, 31, 58, 0.18);
}
.card-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(217, 119, 66, 0.12); color: var(--accent);
  margin-bottom: 16px;
}
.card-icon svg { width: 22px; height: 22px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--ink-soft); font-size: 14.5px; margin: 0; }

/* ---------- Timeline ---------- */
.timeline { position: relative; margin: 0; padding-left: 34px; }
.timeline::before {
  content: ""; position: absolute; left: 12px; top: 6px; bottom: 6px;
  width: 2px; background: linear-gradient(var(--line), transparent);
}
.timeline > li {
  position: relative; padding: 0 0 36px 8px;
}
.t-marker {
  position: absolute; left: -28px; top: 8px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(217,119,66,0.12);
}
.t-meta { font-size: 12.5px; letter-spacing: 0.04em; color: var(--ink-mute); text-transform: uppercase; margin: 0 0 6px; }
.t-content h3 { margin-bottom: 8px; }
.t-content p { color: var(--ink-soft); font-size: 15.5px; margin: 0 0 10px; max-width: 70ch; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips li {
  font-size: 12px; padding: 4px 10px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-soft);
}
.footnote { color: var(--ink-mute); font-size: 14px; margin-top: 8px; }
.footnote a { color: var(--accent); border-bottom: 1px solid currentColor; }

/* ---------- Blog ---------- */
.posts {
  display: grid; gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.post {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.post:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: rgba(11,31,58,.18); }
.post-meta { color: var(--ink-mute); font-size: 12.5px; margin: 0; letter-spacing: 0.02em; }
.post h3 { margin: 4px 0 0; }
.post p { color: var(--ink-soft); font-size: 14.5px; margin: 0; }
.post-tag {
  align-self: flex-start; margin-top: 8px;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(11, 31, 58, 0.06); color: var(--navy);
}
.link-arrow {
  color: var(--accent); font-weight: 600; font-size: 14.5px;
  border-bottom: 1px solid transparent; transition: border-color .2s ease;
}
.link-arrow:hover { border-color: var(--accent); }

/* ---------- Kontakt ---------- */
.contact-card {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px;
  background: var(--navy);
  color: #ecedf2;
  border-radius: 28px;
  padding: clamp(28px, 4vw, 56px);
  box-shadow: 0 30px 80px -30px rgba(11,31,58,0.45);
  position: relative; overflow: hidden;
}
.contact-card::after {
  content: ""; position: absolute; inset: auto -100px -180px auto;
  width: 460px; height: 460px; border-radius: 50%;
  background: radial-gradient(circle, rgba(217,119,66,.45), transparent 60%);
  pointer-events: none;
}
.contact-card .kicker { color: var(--accent-soft); }
.contact-card h2 { color: #fff; }
.contact-text p { color: rgba(236, 237, 242, 0.78); max-width: 44ch; }
.contact-links { margin-top: 28px; display: grid; gap: 14px; }
.contact-links li {
  display: grid; grid-template-columns: 90px 1fr; gap: 12px; align-items: baseline;
  padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.contact-links li > span:first-child {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em;
  color: rgba(236,237,242,0.55);
}
.contact-links a { color: #fff; border-bottom: 1px solid rgba(255,255,255,0.25); }
.contact-links a:hover { border-color: var(--accent-soft); color: var(--accent-soft); }

.contact-form {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 24px;
  display: grid; gap: 14px;
  position: relative; z-index: 1;
}
.contact-form label {
  display: grid; gap: 6px; font-size: 13px; color: rgba(236,237,242,0.78);
}
.contact-form input,
.contact-form textarea {
  font: inherit;
  width: 100%;
  padding: 12px 14px;
  background: rgba(255,255,255,0.06);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  outline: none;
  transition: border-color .2s ease, background .2s ease;
}
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--accent-soft); background: rgba(255,255,255,0.09); }
.contact-form textarea { resize: vertical; min-height: 96px; }
.contact-form .btn.primary { background: var(--accent); color: #fff; }
.contact-form .btn.primary:hover { background: var(--accent-soft); }
.form-status { margin: 0; min-height: 1em; font-size: 13.5px; color: var(--accent-soft); }

/* ---------- Footer ---------- */
.site-footer {
  max-width: var(--maxw); margin: 60px auto 0;
  padding: 32px clamp(20px, 5vw, 40px) 48px;
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: center;
  border-top: 1px solid var(--line);
  color: var(--ink-mute); font-size: 14px;
}
.site-footer .brand-name { font-family: var(--font-serif); font-size: 18px; color: var(--navy); margin: 0; }
.site-footer p { margin: 0; }
.site-footer nav { display: flex; gap: 14px; justify-self: center; }
.site-footer nav a { color: var(--ink-soft); }
.site-footer nav a:hover { color: var(--ink); }
.site-footer .copy { justify-self: end; }

/* ---------- Blog page ---------- */
.page-hero {
  padding: clamp(72px, 10vw, 120px) 0 32px;
}
.post-list {
  display: grid; gap: 18px;
}
.post-list .post {
  display: grid; grid-template-columns: 180px 1fr auto; gap: 28px; align-items: center;
}
.post-list .post .post-tag { justify-self: end; }

.article {
  max-width: 720px; margin: 0 auto;
  padding: clamp(48px, 8vw, 96px) 0;
}
.article h1 { font-size: clamp(32px, 4vw, 48px); margin-bottom: 16px; }
.article .post-meta { margin-bottom: 36px; }
.article p { color: var(--ink-soft); font-size: 17.5px; line-height: 1.7; margin-bottom: 1.2em; }
.article h2 { margin-top: 1.6em; margin-bottom: 0.4em; font-size: clamp(22px, 2.4vw, 30px); }
.article h3 { margin-top: 1.4em; margin-bottom: 0.3em; }
.article ul { padding-left: 1.2em; list-style: disc; color: var(--ink-soft); margin-bottom: 1.2em; }
.article ul li { margin-bottom: 0.4em; }
.article blockquote {
  margin: 1.6em 0; padding: 18px 22px;
  border-left: 3px solid var(--accent);
  background: var(--surface); border-radius: 0 12px 12px 0;
  font-family: var(--font-serif); font-size: 19px; color: var(--navy);
}
.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink-soft); font-size: 14px; margin-bottom: 24px;
}
.back-link:hover { color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 36px; }
  .hero-card { transform: none; }
  .cards, .posts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-card { grid-template-columns: 1fr; gap: 28px; }
  .two-col { columns: 1; }
  .post-list .post { grid-template-columns: 1fr; gap: 8px; }
  .post-list .post .post-tag { justify-self: start; }
}

@media (max-width: 720px) {
  .primary-nav { display: none; }
  .primary-nav.open {
    display: flex; flex-direction: column; align-items: stretch; gap: 4px;
    position: absolute; top: 70px; right: 16px; left: 16px;
    background: var(--bg-elev); border: 1px solid var(--line);
    border-radius: 14px; padding: 8px; box-shadow: var(--shadow-md);
  }
  .primary-nav.open a { padding: 12px 14px; }
  .nav-toggle { display: inline-flex; }

  .cards, .posts { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .site-footer { grid-template-columns: 1fr; text-align: center; }
  .site-footer nav { justify-self: center; flex-wrap: wrap; justify-content: center; }
  .site-footer .copy { justify-self: center; }
}

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
