/* Munkáink – esettanulmány. Design system: ink / paper / coral, Bebas Neue + Petrona. */

@font-face {
  font-family: "Petrona";
  src: url("../fonts/petrona-regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

.swd-case-study-page {
  --paper: #f0f1e9;
  --paper-2: #e4e6dc;
  --paper-3: #f7f8f3;
  --ink: #0a3039;
  --ink-2: #133f4a;
  --accent: #e65252;
  --muted: #4a6168;
  --line: rgba(10, 48, 57, 0.16);
  --line-dark: rgba(240, 241, 233, 0.16);
  --display: "Bebas Neue", sans-serif;
  --body: "Petrona", Georgia, serif;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 19px;
  line-height: 1.6;
  overflow-x: clip;
}
.swd-case-study-page *,
.swd-case-study-page *::before,
.swd-case-study-page *::after { box-sizing: border-box; }
.swd-case-study-page ::selection { background: var(--ink); color: var(--paper); }
.swd-case-study-page .site-header-menu .sub-menu { background: var(--paper); }
.swd-case-study-page :focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
/* the footer is the shared one from footer.php; keep its home-page look (ink, Barlow) */
.swd-case-study-page footer { font-family: var(--primary-font-family, "Barlow", sans-serif); font-size: 16px; line-height: var(--main-line-height, 1.5); }
.swd-case-study-page footer .content-width { box-sizing: content-box; } /* same outer width as on the home page */

/* same content width as the home page: 1400px incl. 40px side padding */
.cs-wrap { width: min(1320px, calc(100% - 80px)); margin-inline: auto; }

.cs h1, .cs h2, .cs h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1.05;
}
.cs h2 { font-size: clamp(36px, 4vw, 56px); }
/* no colour accents inside headings (owner rule) */
.cs h1 em, .cs h2 em, .cs h3 em { font-style: normal; color: inherit; }
.cs p { margin: 0; }
.cs a { color: inherit; text-underline-offset: 4px; }
.cs img { display: block; width: 100%; height: auto; }
.cs figure { margin: 0; }

/* ---------- hero ---------- */
.cs-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: clamp(28px, 4vw, 56px) 0 clamp(24px, 3vw, 36px);
  font: 400 18px/1 var(--display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
}
.cs-back:hover { color: var(--ink); }
.cs-title { font-size: clamp(72px, 11vw, 168px); line-height: 0.92; letter-spacing: 0.005em; max-width: 9em; }
.cs-title em { display: block; }
.cs-tags { display: flex; flex-wrap: wrap; gap: 8px 0; list-style: none; margin: clamp(24px, 3vw, 36px) 0 clamp(32px, 4vw, 56px); padding: 0; }
.cs-tags li { font: 400 18px/1.2 var(--display); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); }
.cs-tags li + li::before { content: "/"; margin: 0 14px; color: var(--accent); }

.cs-full { border-radius: 8px; overflow: hidden; background: var(--paper-2); margin-top: 24px; }
.cs-hero-image { margin-top: 0; }

/* ---------- text sections ---------- */
.cs-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 40px clamp(48px, 6vw, 96px);
  padding: clamp(64px, 8vw, 120px) 0 clamp(56px, 7vw, 100px);
  align-items: start;
}
.cs-split h2 { max-width: 10em; }
.cs-prose p { margin: 0 0 18px; }
.cs-prose p:last-child { margin-bottom: 0; }
.cs-prose a { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }

.cs-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin: 36px 0 0; padding-top: 28px; border-top: 1px solid var(--line); font-size: 17px; line-height: 1.45; }
.cs-facts div { min-width: 0; }
.cs-facts dt { font: 400 15px/1.2 var(--display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.cs-facts dd { margin: 0; overflow-wrap: anywhere; }
.cs-facts a { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }

.cs-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  font: 400 22px/1 var(--display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 4px;
}
.cs-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; list-style: none; margin: 40px 0 0; padding: 0; }
.cs-stats b { display: block; font: 400 clamp(44px, 4.4vw, 64px)/1 var(--display); color: var(--accent); font-variant-numeric: tabular-nums; }
.cs-stats span { display: block; margin-top: 8px; font-size: 15px; line-height: 1.45; color: var(--muted); }

/* ---------- image pair ---------- */
.cs-duo { display: grid; grid-template-columns: 900fr 1380fr; gap: 24px; margin-top: 24px; }
.cs-duo-item { border-radius: 8px; overflow: hidden; background: var(--paper-2); }
.cs-duo-item img { height: 100%; object-fit: cover; }

/* ---------- previous / next ---------- */
.cs-next { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; padding: clamp(56px, 8vw, 110px) 0 clamp(48px, 6vw, 90px); }
.cs-next-link { display: inline-flex; align-items: center; gap: 18px; text-decoration: none; }
.cs-next-right { justify-self: end; text-align: right; }
.cs-next-thumb { flex: none; width: 88px; height: 88px; border-radius: 6px; background: var(--paper-2) center / cover no-repeat; }
.cs-next-text { display: flex; flex-direction: column; gap: 4px; }
.cs-next-text small { font: 400 15px/1.2 var(--display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.cs-next-text b { font: 400 26px/1.1 var(--display); letter-spacing: 0.03em; text-transform: uppercase; color: var(--ink); }
.cs-next-link:hover b { color: var(--accent); }
.cs-next-all { justify-self: center; font: 400 20px/1 var(--display); letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; border-bottom: 2px solid var(--accent); padding-bottom: 4px; }

/* ---------- CTA ---------- */
.cs-cta { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); border-radius: 8px; overflow: hidden; margin-bottom: clamp(56px, 8vw, 110px); background: var(--ink); color: var(--paper); }
.cs-cta-art {
  position: relative;
  min-height: 340px;
  display: grid;
  place-items: center;
  background-color: var(--ink-2);
  background-image: radial-gradient(rgba(240, 241, 233, 0.18) 1.4px, transparent 1.4px);
  background-size: 24px 24px;
}
.cs-cta-art svg { width: 220px; height: auto; }
.cs-cta-art svg [fill="#0A3039"] { fill: var(--paper); }
.cs-cta-text { padding: clamp(40px, 5vw, 64px); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 14px; }
.cs-cta-text h2 { font-size: clamp(36px, 4vw, 56px); max-width: 12em; }
.cs-cta-text p { color: rgba(240, 241, 233, 0.8); max-width: 30em; }
.cs-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  margin-top: 12px;
  padding: 0 22px;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font: 400 22px/1 var(--display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.18s ease, background-color 0.18s ease;
}
.cs-btn:hover { background: #d04545; transform: translateY(-1px); }

/* ---------- responsive ---------- */
@media (max-width: 991px) {
  .swd-case-study-page { font-size: 18px; }
  .cs-wrap { width: calc(100% - 40px); }
  .cs-split { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 64px 0 56px; }
  .cs-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-cta { grid-template-columns: minmax(0, 1fr); }
  .cs-cta-art { min-height: 240px; }
}
@media (max-width: 640px) {
  .cs-title { font-size: clamp(56px, 17vw, 80px); }
  .cs-tags li { font-size: 16px; }
  .cs-duo { grid-template-columns: minmax(0, 1fr); }
  .cs-stats { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .cs-next { grid-template-columns: minmax(0, 1fr); justify-items: start; gap: 20px; }
  .cs-next-right { justify-self: start; text-align: left; flex-direction: row-reverse; }
  .cs-next-all { justify-self: start; }
  .cs-cta-art svg { width: 160px; }
  .cs-btn { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .cs *, .cs *::before, .cs *::after { transition: none !important; }
}
