/* Enge.Studio – shared styles for every page (header, footer, controls, content templates). */

:root {
  --navy: #1D3D59;
  --koralle: #FA6161;
  --nebel: #E3EAF0;
  --weiss: #FAF8F5;
  --grau: #999999;

  --fs-display: clamp(48px, 7.4vw, 124px);
  --fs-h2: clamp(34px, 4.4vw, 70px);
  --fs-statement: clamp(22px, 2.2vw, 34px);
  --fs-row: clamp(28px, 1.2rem + 3vw, 58px);
  --fs-body: clamp(17px, 0.3vw + 16px, 19px);
  --fs-small: 15px;

  --margin: clamp(16px, 3vw, 48px);
  --gap: clamp(16px, 2.2vw, 36px);
  --section: clamp(96px, 11vw, 180px);
  --tan: 0.2493; /* tan(14°): the signet's cut */
  --bar-h: 84px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --t-press: 140ms;
  --t-hover: 200ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--weiss); color: var(--navy); font-family: "Hanken Grotesk", system-ui, sans-serif; font-size: var(--fs-body); -webkit-font-smoothing: antialiased; overflow-x: clip; }
::selection { background: var(--navy); color: var(--weiss); }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
[data-ground="navy"] :focus-visible, .foot :focus-visible { outline-color: var(--weiss); }

/* the template parts and main sit flush, every section brings its own spacing */
.wp-site-blocks > * + * { margin-block-start: 0; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: var(--margin); top: -80px; z-index: 50; background: var(--navy); color: var(--weiss); padding: 12px 16px; font-weight: 700; }
.skip:focus { top: 12px; }

.wrap { padding-inline: var(--margin); max-width: 1680px; margin-inline: auto; }

/* the coral full stop: the same square as the dot in the logo */
.brand-dot { color: var(--koralle); }
.stop { display: inline-block; width: 0.155em; height: 0.16em; margin-left: 0.05em; background: var(--koralle); vertical-align: baseline; }

/* ---------- controls ---------- */
.btn {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; min-height: 54px; padding: 0 26px; border: 0; cursor: pointer;
  font-size: 19px; font-weight: 700; line-height: 1.2; text-decoration: none; letter-spacing: -0.01em;
  transition: transform 320ms var(--ease-out), background-color var(--t-hover) ease, color var(--t-hover) ease;
}
.btn::before {
  content: ""; position: absolute; left: 0; top: 0; height: 100%; width: calc(54px * var(--tan));
  clip-path: polygon(0 0, 100% 0, 0 100%); transform: translate(-101%, 0); transition: transform 260ms var(--ease-out);
}
.btn:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .btn:hover { transform: scale(1.05); } .btn:hover:active { transform: scale(0.99); } }
.btn-coral { background: var(--koralle); color: var(--navy); }
.btn-coral::before { background: var(--navy); }
.btn-navy { background: var(--navy); color: var(--weiss); }
.btn-navy::before { background: var(--koralle); }
.btn:focus-visible::before { transform: none; }
@media (hover: hover) and (pointer: fine) { .btn:hover::before { transform: none; } }

.link { text-decoration: underline; text-decoration-thickness: 0.07em; text-underline-offset: 0.22em; text-decoration-color: transparent; transition: text-decoration-color var(--t-hover) ease; }
.link:focus-visible, .link[aria-current] { text-decoration-color: currentColor; }
@media (hover: hover) and (pointer: fine) { .link:hover { text-decoration-color: currentColor; } }

/* coral wedges instead of bullets (brand list style) */
.keils li, .site-main ul.wp-block-list > li { position: relative; padding-left: 1.1em; list-style: none; }
.keils li::before, .site-main ul.wp-block-list > li::before { content: ""; position: absolute; left: 0; top: 0.28em; width: 0.26em; height: 1.02em; background: var(--koralle); clip-path: polygon(0 0, 100% 0, 0 100%); }

/* ---------- header ---------- */
.bar { position: fixed; top: 0; left: 0; right: 0; z-index: 30; display: flex; align-items: center; gap: 40px; padding: 18px var(--margin); background: var(--weiss); transition: transform 380ms var(--ease-out); }
.admin-bar .bar { top: var(--wp-admin--admin-bar--height, 32px); }
.bar.is-hidden { transform: translateY(-100%); }
.bar.is-open { z-index: 45; }
.bar-logo img { display: block; height: 40px; width: auto; }
.bar-menu { display: flex; align-items: center; gap: 40px; margin-left: auto; }
.bar-nav { display: flex; gap: 28px; font-size: var(--fs-small); font-weight: 600; }
.bar-nav a { padding: 8px 0; color: inherit; }
.bar-cta { min-height: 48px; }
.bar-burger { display: none; width: 48px; height: 48px; margin: -4px -10px -4px auto; padding: 0; border: 0; background: none; color: var(--navy); cursor: pointer; align-items: center; justify-content: center; }
/* three bars, the middle one shortened to 70 % like the E */
.bar-burger span, .bar-burger span::before, .bar-burger span::after { display: block; height: 3px; background: currentColor; transition: transform 260ms var(--ease-out), opacity 160ms ease; }
.bar-burger span { position: relative; width: 26px; background: linear-gradient(currentColor, currentColor) 0 0 / 70% 100% no-repeat; }
.bar-burger span::before, .bar-burger span::after { content: ""; position: absolute; left: 0; width: 26px; }
.bar-burger span::before { top: -8px; }
.bar-burger span::after { top: 8px; }
.bar-burger[aria-expanded="true"] span { background-size: 0 100%; }
.bar-burger[aria-expanded="true"] span::before { transform: translateY(8px) rotate(45deg); }
.bar-burger[aria-expanded="true"] span::after { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 1024px) { .bar-nav { gap: 20px; } .bar-menu { gap: 28px; } }

@media (max-width: 960px) {
  /* without script the menu simply wraps below the logo */
  .bar { flex-wrap: wrap; gap: 10px 16px; }
  .bar-menu { width: 100%; margin: 0; flex-wrap: wrap; justify-content: space-between; gap: 10px 20px; }
  html:not(.js) .bar { position: relative; }
  .js .bar { flex-wrap: nowrap; }
  .js .bar-burger { display: inline-flex; }
  .js .bar-menu { position: absolute; top: 100%; left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; gap: 28px; margin: 0; padding: 8px var(--margin) 32px; background: var(--weiss); border-top: 1px solid var(--nebel); /* taste-skill-ignore: the panel floats over the page */ box-shadow: 0 24px 40px -24px rgba(29, 61, 89, 0.35); max-height: calc(100svh - 100%); overflow-y: auto; }
  .js .bar.is-open .bar-menu { display: flex; }
  .js .bar-nav { flex-direction: column; gap: 0; font-size: 24px; font-weight: 700; letter-spacing: -0.015em; }
  .js .bar-nav a { padding: 14px 0; border-bottom: 1px solid var(--nebel); }
  .js .bar-cta { justify-content: center; min-height: 56px; }
}
@media (max-width: 720px) {
  :root { --bar-h: 72px; }
  .bar { padding-top: 16px; padding-bottom: 16px; }
  .bar-logo img { height: 32px; }
  .bar-nav { font-size: 14px; }
}

/* ---------- footer ---------- */
.foot { position: relative; background: var(--navy); color: var(--weiss); padding: 88px 0 40px; overflow: hidden; }
.foot p { margin: 0; max-width: none; }
.foot a { color: inherit; }
.foot-word { display: block; width: clamp(300px, 45vw, 700px); max-width: 100%; height: auto; }
.foot-social { display: flex; flex-wrap: wrap; gap: 0 28px; margin-top: 34px; font-size: var(--fs-body); font-weight: 600; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; margin-top: 72px; font-size: var(--fs-small); line-height: 1.55; padding-right: clamp(80px, 10vw, 160px); }
.foot-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0 28px; }
/* at least 24 px to tap (WCAG 2.5.8) */
.foot-nav a, .foot-social a { display: inline-block; padding-block: 6px; }
.foot .link { text-decoration-color: currentColor; }
.gegenkeil { position: absolute; right: 0; bottom: 0; width: clamp(56px, 8vw, 128px); aspect-ratio: 1 / 4; background: var(--koralle); clip-path: polygon(100% 0, 100% 100%, 0 100%); }
@media (max-width: 720px) {
  .foot { padding-top: 72px; }
  .foot-row { margin-top: 48px; padding-right: 64px; }
}

/* ---------- post image with the signet's cut: a 14° wedge off the top left, lifted 10px ---------- */
.post-img { position: relative; display: block; aspect-ratio: 3 / 2; }
.post-img img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; transition: transform 500ms var(--ease-out), clip-path 500ms var(--ease-out); }
/* at rest the main copy is whole and the wedge copy lies on top, so no seam shows along the cut */
.pi-main { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
.pi-keil { clip-path: polygon(0 0, 16.6% 0, 0 100%); }
/* hover breaks the wedge off: gap opens, wedge lifts 10px */
@media (hover: hover) and (pointer: fine) {
  :is(.post, .cards > li):hover .pi-keil { transform: translateY(-10px); }
  :is(.post, .cards > li):hover .pi-main { clip-path: polygon(calc(16.6% + 8px) 0, 100% 0, 100% 100%, 8px 100%); }
}

/* ---------- content templates ---------- */
.site-main { padding-top: calc(var(--bar-h) + clamp(48px, 7vw, 120px)); padding-bottom: var(--section); }
.site-main.is-flush { padding-top: var(--bar-h); padding-bottom: 0; }
.site-main :is(h1, h2, h3, h4, h5, h6) { text-wrap: balance; }
p { text-wrap: pretty; }
/* long URLs and words must not push the page wider than the phone */
:is(.beitrag-text, .seite-text) { overflow-wrap: break-word; }
:is(.beitrag-text, .seite-text) a { overflow-wrap: anywhere; }
.site-main a:where(:not(.wp-element-button):not(.btn)) { text-decoration-thickness: 0.07em; text-underline-offset: 0.2em; }
.site-main a:where(:not(.wp-element-button):not(.btn)):hover { text-decoration-color: var(--koralle); }

.page-title { margin-block: 0; font-size: var(--wp--preset--font-size--xx-large); line-height: 1.02; letter-spacing: -0.035em; }
.page-head > * + * { margin-top: 24px; }
.page-lead { font-size: var(--fs-statement); font-weight: 500; line-height: 1.3; letter-spacing: -0.01em; }

/* blog, archive, search: cards */
.enge-liste { margin-top: clamp(48px, 6vw, 96px); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 64px var(--gap); margin: 0; padding: 0; list-style: none; }
.cards > li { position: relative; display: flex; flex-direction: column; gap: 14px; margin: 0; }
.cards > li > * { margin: 0; }
.cards .wp-block-post-featured-image { margin-bottom: 6px; }
.card-title { font-size: 22px; line-height: 1.2; letter-spacing: -0.015em; }
.card-title a { text-decoration: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; } /* the whole card is the link */
.cards > li:hover .card-title a { text-decoration: underline; text-decoration-thickness: 0.07em; text-underline-offset: 0.18em; }
.cards > li:focus-within { outline: 3px solid var(--navy); outline-offset: 6px; }
.cards > li:focus-within .card-title a:focus-visible { outline: 0; }
.cards .wp-block-post-excerpt__excerpt { margin: 0; }
.card-date { font-size: var(--fs-small); font-weight: 600; }

.wp-block-query-pagination { margin-top: clamp(56px, 6vw, 96px); gap: 8px; font-weight: 700; }
.wp-block-query-pagination a, .wp-block-query-pagination .current { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; min-height: 48px; padding: 0 14px; text-decoration: none; }
.wp-block-query-pagination-numbers { display: flex; gap: 4px; }
.wp-block-query-pagination .current { background: var(--navy); color: var(--weiss); }
.wp-block-query-pagination a:hover { background: var(--nebel); }

.enge-search { margin-top: 32px; }
.page-head .enge-search { max-width: 34rem; }
.enge-search .wp-block-search__input { min-height: 54px; padding: 0 16px; border: 2px solid var(--navy); border-radius: 0; background: var(--weiss); color: var(--navy); font: inherit; }
.enge-search .wp-block-search__button { margin-left: 0; min-height: 54px; }

/* single post */
.beitrag > .page-title, .seite-titel { font-size: clamp(36px, 4.6vw, 68px); line-height: 1.05; letter-spacing: -0.03em; hyphens: auto; }
.seite-stand { font-size: var(--fs-small); font-weight: 600; }
.enge-meta { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 24px; font-size: var(--fs-small); font-weight: 600; }
.enge-meta .lesezeit { position: relative; padding-left: 20px; }
.enge-meta .lesezeit::before { content: ""; position: absolute; left: 0; top: 0.2em; width: 0.28em; height: 1.1em; background: var(--koralle); clip-path: polygon(0 0, 100% 0, 0 100%); }
.beitrag-bild { margin-top: clamp(40px, 5vw, 72px); }
.beitrag-bild .post-img { aspect-ratio: 16 / 9; }
.beitrag-text { margin-top: clamp(40px, 5vw, 72px); }
.beitrag-nav { margin-top: var(--section); padding-top: 32px; border-top: 1px solid var(--nebel); gap: 24px 48px; font-weight: 700; }
.beitrag-nav a { display: inline-block; padding-block: 8px; text-decoration: none; }
.beitrag-nav a:hover { text-decoration: underline; }

/* running text: calm, readable, about 70 characters a line */
:is(.beitrag-text, .seite-text) { line-height: 1.65; }
:is(.beitrag-text, .seite-text) > :is(h2, h3, h4) { margin-block-start: 2.2em; }
:is(.beitrag-text, .seite-text) > :is(h2, h3, h4) + * { margin-block-start: 0.8em; }
.beitrag-text > p:first-child { font-size: var(--fs-statement); font-weight: 500; line-height: 1.35; letter-spacing: -0.01em; }
.beitrag-text :is(ul, ol) { padding-left: 1.2em; }
.beitrag-text ul.wp-block-list { padding-left: 0; }
.beitrag-text li + li { margin-top: 0.4em; }
.site-main .wp-block-quote { margin-block: 2em; padding-left: 1.4em; border: 0; position: relative; }
.site-main .wp-block-quote::before { content: ""; position: absolute; left: 0; top: 0.15em; width: 0.42em; height: 1.66em; background: var(--koralle); clip-path: polygon(0 0, 100% 0, 0 100%); }
.site-main .wp-block-quote cite { display: block; margin-top: 12px; font-size: var(--fs-small); font-style: normal; font-weight: 600; }
.site-main :is(.wp-block-image, .wp-block-embed) figcaption { margin-top: 10px; font-size: var(--fs-small); }
.site-main hr.wp-block-separator { border: 0; border-top: 1px solid var(--nebel); }
.site-main table { border-collapse: collapse; width: 100%; font-size: var(--fs-small); }
.site-main :is(th, td) { padding: 10px 12px; border-bottom: 1px solid var(--nebel); text-align: left; vertical-align: top; }
.site-main code { font-size: 0.9em; background: var(--nebel); padding: 0.1em 0.3em; }

.wp-block-button__link { transition: background-color var(--t-hover) ease, color var(--t-hover) ease; }

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