/* marioengel.com – editorial layout. Tokens from the 2026-09 landing page design. */
@font-face { font-family: "Instrument Serif"; src: url("/assets/fonts/InstrumentSerif-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("/assets/fonts/InstrumentSerif-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  color-scheme: light;
  --paper: #ffffff;
  --ink: #0b2f52;
  --muted: #405c74;
  --line: #aebdca;
  --panel: #eaf1f6;
  --red: #e74725;
  --yellow: #f0e84e;
  --blue: #146b8b;
  --night: #071d32;
  --night-line: #52605e;
  --night-muted: #b9c3bf;
  --mint: #7ed4c7;
  --on-dark: #ffffff;
  --accent-ink: #0b2f52;
  --sans: "Avenir Next", Avenir, "Segoe UI", system-ui, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --top-h: 64px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--top-h) + 12px); }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a, button { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
h1, h2, h3, p, blockquote, ul { margin-top: 0; }
ul { padding-left: 0; list-style: none; }
img { max-width: 100%; }
.wrap { width: min(1180px, calc(100% - 44px)); margin-inline: auto; }
.eyebrow { margin: 8px 0 0; color: var(--muted); font-size: 13px; font-weight: 800; letter-spacing: .02em; }
.no { font: 800 12px/1 var(--sans); }
.out { font-size: 25px; text-align: right; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 14px; background: var(--ink); color: var(--paper); font-weight: 800; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---- Top bar ---- */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 30;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}
.top.scrolled { border-bottom-color: var(--line); background: color-mix(in srgb, var(--paper) 94%, transparent); }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: var(--top-h); }
.brand { font: 400 24px/1 var(--serif); letter-spacing: -.02em; text-decoration: none; }
.primary { display: flex; gap: 4px 22px; }
.primary a { color: var(--muted); font-size: 13px; font-weight: 800; letter-spacing: .02em; text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.primary a:hover { color: var(--ink); border-bottom-color: var(--red); }
.top-tools { display: flex; align-items: center; gap: 10px; }
.lang-switch { display: flex; padding: 3px; border: 1px solid color-mix(in srgb, var(--ink) 38%, transparent); border-radius: 99px; background: color-mix(in srgb, var(--paper) 88%, transparent); }
.lang-switch a { display: inline-flex; align-items: center; justify-content: center; min-width: 43px; min-height: 32px; border-radius: 99px; color: var(--muted); font: 800 12px/1 var(--sans); text-decoration: none; }
.lang-switch a[aria-current="page"] { background: var(--ink); color: var(--paper); }
.lang-switch a:hover:not([aria-current]) { color: var(--ink); }
.menu-btn { display: none; min-height: 38px; padding: 0 14px; border: 1px solid var(--ink); background: transparent; color: var(--ink); font: 800 12px/1 var(--sans); cursor: pointer; }

/* ---- Language hint ---- */
.langhint { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: var(--yellow); color: var(--accent-ink); border-top: 1px solid var(--line); }
.langhint[hidden] { display: none; }
.langhint-inner { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 10px 0; font-size: 14px; font-weight: 700; }
.langhint-inner a { font-weight: 800; }
.langhint-close { margin-left: auto; width: 34px; height: 34px; border: 1px solid var(--ink); background: transparent; color: var(--ink); font-size: 20px; line-height: 1; cursor: pointer; }

/* ---- Hero ---- */
.hero { display: grid; grid-template-columns: minmax(340px, .88fr) minmax(0, 1.12fr); min-height: 100svh; border-bottom: 1px solid var(--line); }
.portrait { position: relative; min-height: 720px; overflow: hidden; background: #806d50; }
.portrait picture, .portrait img { width: 100%; height: 100%; display: block; }
.portrait img { object-fit: cover; object-position: 80% 50%; }
.portrait::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 58%, rgba(10,15,15,.72)); pointer-events: none; }
.portrait-note { position: absolute; z-index: 1; left: clamp(24px, 4vw, 58px); right: 24px; bottom: 34px; margin: 0; color: #fff; font-size: 13px; font-weight: 700; letter-spacing: .02em; }
.hero-content { display: flex; flex-direction: column; justify-content: center; padding: calc(var(--top-h) + 48px) clamp(28px, 6vw, 92px) 70px; }
.role { display: flex; align-items: center; gap: 11px; margin-bottom: 32px; color: var(--muted); font-size: 13px; font-weight: 800; letter-spacing: .02em; }
.role::before { content: ""; flex: none; width: 34px; height: 5px; background: var(--red); }
h1 { max-width: 770px; margin-bottom: 30px; font-family: var(--serif); font-size: clamp(54px, 7vw, 104px); font-weight: 400; line-height: .92; letter-spacing: -.035em; }
h1 em { color: var(--red); font-style: italic; font-weight: 400; }
.hero-copy { max-width: 660px; margin-bottom: 34px; color: var(--muted); font-size: clamp(18px, 1.8vw, 23px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.button { display: inline-flex; align-items: center; justify-content: space-between; gap: 22px; min-height: 52px; padding: 12px 17px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); font-size: 15px; font-weight: 800; text-decoration: none; transition: background .18s ease, border-color .18s ease, color .18s ease; }
.button.secondary { background: transparent; color: var(--ink); }
.button:hover { background: var(--red); border-color: var(--red); color: var(--accent-ink); }
.button.secondary:hover { color: #fff; }

/* ---- Manifesto ---- */
.manifesto { padding: clamp(82px, 10vw, 142px) 0; }
.manifesto-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(42px, 8vw, 122px); }
.manifesto blockquote { max-width: 900px; margin: 0 0 42px; font-family: var(--serif); font-size: clamp(36px, 5vw, 70px); font-weight: 400; line-height: 1.04; letter-spacing: -.025em; }
.manifesto blockquote strong { color: var(--red); font-weight: 400; font-style: italic; }
.manifesto-copy { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 50px; max-width: 850px; color: var(--muted); }
.manifesto-copy p { margin: 0; }

/* ---- Section intro (shared) ---- */
.section-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, .48fr); gap: 42px; align-items: end; margin-bottom: 54px; }
.section-intro h2 { margin: 0; font: 400 clamp(44px, 6vw, 78px)/.98 var(--serif); letter-spacing: -.03em; }
.section-intro p { margin-bottom: 4px; color: var(--muted); }
.section-intro .eyebrow { margin: 0 0 14px; }

/* ---- About / roles ---- */
.about { padding: clamp(80px, 10vw, 126px) 0; background: var(--panel); }
.roles { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.role-card { position: relative; padding: 30px 26px 34px 0; border-bottom: 1px solid var(--line); }
.role-card + .role-card { padding-left: 26px; border-left: 1px solid var(--line); }
.role-card .no { display: block; margin-bottom: 40px; color: var(--blue); }
.role-card h3 { margin: 0 0 12px; font: 400 clamp(28px, 2.6vw, 36px)/1.05 var(--serif); letter-spacing: -.02em; }
.role-card p { margin: 0 0 22px; color: var(--muted); font-size: 15.5px; }
.minor-link { display: inline-block; font-size: 13px; font-weight: 800; letter-spacing: .02em; text-decoration: none; border-bottom: 2px solid var(--red); padding-bottom: 2px; }
.minor-link:hover { color: var(--red); }

/* ---- Destinations ---- */
.destinations { padding: clamp(80px, 10vw, 126px) 0; background: var(--night); color: var(--on-dark); }
.destinations .section-intro p { color: var(--night-muted); }
.destination-list { border-top: 1px solid var(--night-line); }
.destination { display: grid; grid-template-columns: 72px minmax(220px, .72fr) minmax(260px, 1fr) 40px; gap: 22px; align-items: center; min-height: 140px; padding: 27px 2px; border-bottom: 1px solid var(--night-line); color: var(--on-dark); text-decoration: none; transition: padding .18s ease, background .18s ease, color .18s ease; }
.destination:hover, .destination:focus-visible { padding-inline: 18px; background: var(--yellow); color: var(--accent-ink); }
.destination .no { color: var(--mint); }
.destination:hover .no, .destination:focus-visible .no { color: var(--accent-ink); }
.destination h3 { margin: 0; font: 400 clamp(28px, 3.2vw, 42px)/1.06 var(--serif); }
.destination p { margin: 0; color: var(--night-muted); }
.destination:hover p, .destination:focus-visible p { color: var(--accent-ink); }

/* ---- Work / apps ---- */
.work { padding: clamp(88px, 11vw, 148px) 0; }
.work-head { display: grid; grid-template-columns: minmax(0, .8fr) minmax(320px, 1.2fr); gap: 54px; align-items: end; margin-bottom: 72px; }
.work-head h2 { margin: 0; font: 400 clamp(44px, 6vw, 78px)/.98 var(--serif); letter-spacing: -.03em; }
.work-head p { max-width: 660px; margin: 0; color: var(--muted); font-size: 19px; }
.portfolio { display: grid; grid-template-columns: repeat(12, 1fr); border-top: 1px solid var(--line); }
.project { position: relative; display: block; min-height: 250px; padding: 28px 26px 31px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-decoration: none; transition: background .18s ease, color .18s ease; }
.project:nth-child(1) { grid-column: span 7; background: var(--red); color: var(--accent-ink); }
.project:nth-child(2) { grid-column: span 5; background: var(--yellow); color: var(--accent-ink); border-right: 0; }
.project:nth-child(3), .project:nth-child(4), .project:nth-child(5) { grid-column: span 4; }
.project:nth-child(5) { border-right: 0; }
.project:nth-child(n+3):hover { background: var(--panel); }
.project:nth-child(1):hover, .project:nth-child(2):hover { background: var(--ink); color: var(--paper); }
.project-tag { display: block; margin-bottom: 54px; font-size: 12px; font-weight: 850; letter-spacing: .02em; }
.project h3 { margin-bottom: 12px; font: 400 clamp(31px, 3.8vw, 52px)/1 var(--serif); letter-spacing: -.02em; }
.project p { max-width: 440px; margin: 0; color: currentColor; opacity: .8; }
.project .out { position: absolute; top: 24px; right: 26px; }
.catalog { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 35px; padding-top: 40px; }
.catalog-label { margin: 4px 0 0; font-size: 13px; font-weight: 800; color: var(--muted); }
.name-cloud { display: flex; flex-wrap: wrap; gap: 9px 10px; margin: 0; }
.name-cloud a { display: inline-block; padding: 8px 11px; border: 1px solid var(--line); font-size: 14px; font-weight: 750; text-decoration: none; transition: background .15s ease, border-color .15s ease; }
.name-cloud a:hover { background: var(--yellow); border-color: var(--ink); }
.portfolio-link { margin-top: 34px; }

/* ---- Projects directory ---- */
.projects { padding: clamp(80px, 10vw, 126px) 0; background: var(--panel); }
.project-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 60px; }
.group { border-top: 1px solid var(--line); }
.group summary { display: flex; align-items: baseline; gap: 14px; padding: 22px 0 14px; cursor: pointer; list-style: none; }
.group summary::-webkit-details-marker { display: none; }
.group summary h3 { margin: 0; font: 400 clamp(26px, 2.6vw, 34px)/1.05 var(--serif); letter-spacing: -.02em; }
.group .count { color: var(--muted); font: 800 12px/1 var(--sans); }
.group summary::after { content: "+"; margin-left: auto; color: var(--muted); font: 400 26px/1 var(--serif); }
.group[open] summary::after { content: "−"; }
.directory { margin: 0 0 26px; }
.directory li a { display: grid; grid-template-columns: minmax(170px, .95fr) minmax(0, 1.3fr) 22px; gap: 14px; align-items: baseline; padding: 10px 0; border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent); text-decoration: none; transition: background .15s ease; }
.directory li a:hover { background: var(--yellow); margin-inline: -10px; padding-inline: 10px; }
.dir-name { font-size: 15px; font-weight: 800; overflow-wrap: anywhere; }
.dir-desc { color: var(--muted); font-size: 14px; }
.directory .out { font-size: 18px; color: var(--muted); }

/* ---- Facts ---- */
.facts { padding: 0 0 95px; }
.facts-inner { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fact { padding: 38px 32px; border-right: 1px solid var(--line); }
.fact:first-child { padding-left: 0; }
.fact:last-child { border-right: 0; }
.fact strong { display: block; margin-bottom: 7px; font: 400 clamp(52px, 6vw, 78px)/1 var(--serif); letter-spacing: -.03em; }
.fact span { color: var(--muted); font-size: 14px; font-weight: 750; }

/* ---- FAQ ---- */
.faq { padding: clamp(60px, 8vw, 110px) 0 clamp(88px, 11vw, 148px); }
.faq-grid { display: grid; grid-template-columns: minmax(240px, .42fr) minmax(0, 1fr); gap: clamp(42px, 7vw, 100px); align-items: start; }
.faq-head { position: sticky; top: calc(var(--top-h) + 24px); }
.faq-head h2 { margin: 12px 0 18px; font: 400 clamp(44px, 6vw, 78px)/.98 var(--serif); letter-spacing: -.03em; }
.faq-intro { color: var(--muted); max-width: 380px; }
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { display: grid; grid-template-columns: minmax(0, 1fr) 30px; gap: 20px; align-items: center; padding: 22px 0; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h3 { margin: 0; font: 400 clamp(23px, 2.2vw, 29px)/1.15 var(--serif); letter-spacing: -.01em; }
.faq-item summary:hover h3 { color: var(--red); }
.faq-icon { position: relative; width: 26px; height: 26px; border: 1px solid var(--ink); border-radius: 50%; }
.faq-icon::before, .faq-icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; background: var(--ink); transform: translate(-50%, -50%); transition: transform .2s ease; }
.faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-item[open] .faq-icon::after { transform: translate(-50%, -50%) rotate(0); }
.faq-item[open] .faq-icon { background: var(--yellow); }
.faq-answer { padding: 0 56px 26px 0; color: var(--muted); max-width: 720px; }
.faq-answer p { margin: 0 0 12px; }
.faq-answer p:last-child { margin: 0; }
.faq-answer a { color: var(--ink); text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* ---- Contact ---- */
.contact { padding: clamp(80px, 10vw, 126px) 0; background: var(--night); color: var(--on-dark); }
.contact .eyebrow { color: var(--mint); }
.contact h2 { margin: 12px 0 18px; font: 400 clamp(44px, 6vw, 78px)/.98 var(--serif); letter-spacing: -.03em; }
.contact-text { max-width: 560px; margin-bottom: 40px; color: var(--night-muted); font-size: 19px; }
.contact-mail { display: inline-block; margin-bottom: 54px; font: 400 clamp(30px, 4.6vw, 64px)/1.05 var(--serif); letter-spacing: -.02em; text-decoration: none; border-bottom: 3px solid var(--red); padding-bottom: 6px; overflow-wrap: anywhere; }
.contact-mail:hover { color: var(--yellow); border-bottom-color: var(--yellow); }
.social { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 20px; padding-top: 30px; border-top: 1px solid var(--night-line); }
.social .catalog-label { color: var(--night-muted); }
.social ul { display: flex; flex-wrap: wrap; gap: 9px 10px; margin: 0; }
.social a { display: inline-block; padding: 8px 12px; border: 1px solid var(--night-line); color: var(--on-dark); font-size: 14px; font-weight: 750; text-decoration: none; transition: background .15s ease, color .15s ease; }
.social a:hover { background: var(--yellow); color: var(--accent-ink); border-color: var(--yellow); }

/* ---- Footer ---- */
footer { padding: 35px 0 max(35px, env(safe-area-inset-bottom)); background: var(--panel); }
.footer-inner { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 30px; align-items: start; }
.footer-inner strong { display: block; margin-bottom: 6px; font: 400 27px/1 var(--serif); }
.footer-tagline { color: var(--muted); font-size: 13px; }
.footer-meta { color: var(--muted); font-size: 13px; }
.footer-meta p { margin: 0 0 8px; }
.footer-meta a { color: var(--ink); text-decoration-color: var(--line); text-underline-offset: 3px; }
.footer-meta a:hover { text-decoration-color: var(--red); }
.imprint-label { font-weight: 800; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }

/* ---- Motion ---- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.js .portfolio .project.reveal:nth-child(2) { transition-delay: .08s; }
.js .portfolio .project.reveal:nth-child(4) { transition-delay: .08s; }
.js .portfolio .project.reveal:nth-child(5) { transition-delay: .16s; }
.js .roles .role-card:nth-child(2), .js .facts .fact:nth-child(2) { transition-delay: .08s; }
.js .roles .role-card:nth-child(3), .js .facts .fact:nth-child(3) { transition-delay: .16s; }
.js .roles .role-card:nth-child(4) { transition-delay: .24s; }

/* ---- Responsive ---- */
@media (max-width: 1000px) {
  .roles { grid-template-columns: repeat(2, 1fr); }
  .role-card:nth-child(3) { padding-left: 0; border-left: 0; }
}
@media (max-width: 860px) {
  .primary { display: none; }
  .menu-btn { display: inline-flex; align-items: center; }
  .top.open .primary { display: flex; flex-direction: column; gap: 0; position: absolute; left: 0; right: 0; top: 100%; padding: 10px 22px 18px; background: var(--paper); border-bottom: 1px solid var(--line); }
  .top.open .primary a { padding: 12px 0; font-size: 15px; border-bottom: 1px solid var(--panel); }
  .hero { grid-template-columns: .8fr 1.2fr; }
  .portrait { min-height: 680px; }
  .hero-content { padding-inline: 34px; }
  .manifesto-grid, .work-head, .faq-grid { grid-template-columns: 1fr; gap: 28px; }
  .faq-head { position: static; }
  .manifesto-copy { grid-template-columns: 1fr 1fr; }
  .destination { grid-template-columns: 52px minmax(180px, .8fr) 1fr 30px; }
  .portfolio { grid-template-columns: repeat(2, 1fr); }
  .project:nth-child(n) { grid-column: span 1; }
  .project:nth-child(even) { border-right: 0; }
  .project:nth-child(5) { grid-column: span 2; }
  .project-groups { grid-template-columns: 1fr; gap: 0; }
  .footer-inner { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .wrap { width: min(100% - 32px, 1180px); }
  .top-inner { gap: 10px; }
  .brand { font-size: 21px; }
  .lang-switch a { min-width: 38px; min-height: 30px; }
  .top.open .primary { padding-inline: 16px; }
  .hero { display: flex; flex-direction: column; }
  .portrait { order: 0; min-height: 0; height: 58svh; max-height: 590px; margin-top: var(--top-h); }
  .portrait img { object-position: 80% 45%; }
  .hero-content { order: 1; padding: 54px 16px 72px; }
  .role { margin-bottom: 24px; }
  h1 { font-size: clamp(50px, 15vw, 70px); }
  .hero-copy { font-size: 18px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .button { width: 100%; }
  .manifesto-grid { gap: 30px; }
  .manifesto blockquote { font-size: 40px; }
  .manifesto-copy { grid-template-columns: 1fr; gap: 18px; }
  .section-intro { grid-template-columns: 1fr; gap: 20px; }
  .roles { grid-template-columns: 1fr; }
  .role-card, .role-card + .role-card { padding-left: 0; border-left: 0; }
  .role-card .no { margin-bottom: 18px; }
  .destination { grid-template-columns: 34px minmax(0, 1fr) 25px; gap: 12px; min-height: 0; padding: 27px 0; }
  .destination h3 { font-size: 29px; }
  .destination p { grid-column: 2 / -1; font-size: 15px; }
  .work-head { margin-bottom: 46px; }
  .portfolio { display: block; border-top: 1px solid var(--line); }
  .project:nth-child(n) { min-height: 220px; border-right: 0; }
  .catalog, .social { grid-template-columns: 1fr; gap: 20px; }
  .directory li a { grid-template-columns: minmax(0, 1fr) 22px; gap: 2px 14px; }
  .dir-name { grid-column: 1; grid-row: 1; }
  .dir-desc { grid-column: 1; grid-row: 2; }
  .directory .out { grid-column: 2; grid-row: 1 / 3; align-self: center; }
  .facts-inner { grid-template-columns: 1fr; }
  .fact, .fact:first-child { display: grid; grid-template-columns: 125px 1fr; align-items: end; padding: 26px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .fact:last-child { border-bottom: 0; }
  .fact strong { margin: 0; font-size: 48px; }
  .faq-item summary { padding: 18px 0; }
  .faq-answer { padding-right: 0; }
  .footer-links { gap: 8px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
@media print {
  .top, .langhint, .skip, .hero-actions, .portfolio-link { display: none !important; }
  .hero { min-height: 0; display: block; }
  .portrait { display: none; }
  .destinations, .contact { background: none; color: var(--ink); }
  .faq-item[open] .faq-answer, .faq-answer { display: block; }
}
