
    :root {
      --forest: #17251f;
      --forest-deep: #101c17;
      --forest-soft: #2c4136;
      --cream: #f7f5ef;
      --paper: #eeece4;
      --white: #ffffff;
      --ink: #25302a;
      --muted: #6d746b;
      --gold: #c9ab72;
      --gold-light: #e8d1a6;
      --border: rgba(25, 42, 32, .14);
      --container: 1180px;
      --serif: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
      --sans: 'DM Sans', 'Segoe UI', sans-serif;
    }
    *, *::before, *::after { box-sizing: border-box; }
    html { scroll-behavior: smooth; scroll-padding-top: 85px; }
    body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--sans); font-size: 16px; -webkit-font-smoothing: antialiased; }
    a { color: inherit; text-decoration: none; }
    button { font: inherit; }
    img { display: block; max-width: 100%; }
    :focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
    .container { width: min(var(--container), calc(100% - 48px)); margin-inline: auto; }
    .skip { position: absolute; top: -80px; left: 20px; padding: 12px 18px; background: #fff; z-index: 20; }
    .skip:focus { top: 10px; }
    .eyebrow { font-size: .73rem; font-weight: 700; text-transform: uppercase; letter-spacing: .22em; }
    .eyebrow.gold { color: var(--gold); }
    .eyebrow.olive { color: #64755a; }
    .section-heading { max-width: 760px; }
    .section-heading.center { text-align: center; margin-inline: auto; }
    h1, h2, h3, p { margin-top: 0; }
    h1, h2, h3 { font-family: var(--serif); font-weight: 400; }
    h2 { font-size: clamp(2.1rem, 4vw, 3.65rem); line-height: 1.22; letter-spacing: -.045em; }
    h3 { font-size: 1.35rem; line-height: 1.4; }
    p { line-height: 1.85; }
    .lead { color: var(--muted); font-size: 1.06rem; max-width: 690px; }
    .site-header { position: absolute; z-index: 10; inset: 0 0 auto; border-bottom: 1px solid rgba(255,255,255,.13); }
    .header-inner { min-height: 94px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
    .brand { display: inline-flex; gap: 15px; align-items: center; min-width: 0; color: white; flex-shrink: 0; }
    .brand-mark { width: 43px; height: 49px; border: 1px solid rgba(231,210,165,.65); display: grid; place-items: center; color: var(--gold-light); font-family: Georgia, serif; font-size: 33px; line-height: 1; }
    .brand-type { display: flex; flex-direction: column; }
    .brand-type small { font-size: 12px; letter-spacing: .055em; line-height: 1.5; }
    .brand-type strong { font-family: var(--serif); font-size: clamp(1.05rem, 1.8vw, 1.5rem); font-style: italic; line-height: 1.25; letter-spacing: -.04em; font-weight: 700; }
    .nav { display: flex; align-items: center; gap: clamp(17px, 2.7vw, 37px); }
    .nav a { font-size: .88rem; font-weight: 600; color: rgba(255,255,255,.81); transition: color .2s ease; }
    .nav a:hover, .nav a:focus-visible { color: var(--gold-light); }
    .nav .nav-contact { border: 1px solid rgba(229,212,175,.6); color: #fff; padding: 13px 20px; border-radius: 2px; }
    .nav .nav-contact:hover { color: var(--forest); background: var(--gold-light); }
    .menu-toggle { display: none; width: 46px; height: 46px; border: 1px solid rgba(255,255,255,.45); background: transparent; color: #fff; cursor: pointer; border-radius: 2px; align-items: center; justify-content: center; }
    .menu-toggle svg { width: 23px; height: 23px; }
    .hero { position: relative; min-height: min(810px, 94vh); min-height: 760px; background: var(--forest-deep); color: white; display: flex; align-items: center; isolation: isolate; overflow: hidden; }
    .hero::before { content: ''; position: absolute; inset: 0; z-index: -2; background-image: url('https://images.unsplash.com/photo-1504052434569-70ad5836ab65?auto=format&fit=crop&w=2200&q=85'); background-size: cover; background-position: center center; opacity: .8; }
    .hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(10,22,17,.95) 0%, rgba(13,27,21,.88) 35%, rgba(16,26,20,.48) 69%, rgba(16,25,19,.32) 100%), linear-gradient(0deg, rgba(13,26,20,.55), transparent 38%); }
    .hero-content { padding-top: 143px; padding-bottom: 122px; }
    .hero-content .eyebrow { display: inline-flex; gap: 12px; align-items: center; margin-bottom: 25px; }
    .line-dash { width: 34px; height: 1px; background: var(--gold); display: inline-block; }
    .hero h1 { font-size: clamp(3.35rem, 7vw, 6.85rem); line-height: 1.14; letter-spacing: -.068em; max-width: 790px; margin-bottom: 26px; }
    .hero h1 em { font-style: italic; color: var(--gold-light); }
    .hero-description { max-width: 595px; font-size: clamp(1.05rem, 1.7vw, 1.22rem); line-height: 1.85; color: #e3e7df; margin-bottom: 37px; }
    .buttons { display: flex; flex-wrap: wrap; gap: 13px; }
    .btn { display: inline-flex; align-items: center; justify-content: center; gap: 13px; min-height: 53px; padding: 15px 25px; border-radius: 2px; font-weight: 700; font-size: .89rem; transition: background .2s, color .2s, transform .2s; }
    .btn:hover { transform: translateY(-2px); }
    .btn.primary { color: #19261e; background: var(--gold-light); }
    .btn.primary:hover { background: white; }
    .btn.outline { color: #fff; border: 1px solid rgba(255,255,255,.6); }
    .btn.outline:hover { background: rgba(255,255,255,.13); }
    .btn.dark { color: white; background: var(--forest); }
    .btn.dark:hover { background: #31483b; }
    .hero-footer { position: absolute; inset: auto 0 0; border-top: 1px solid rgba(255,255,255,.17); }
    .hero-footer .container { display: flex; align-items: center; justify-content: space-between; min-height: 66px; color: rgba(255,255,255,.75); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; }
    .hero-footer a { display: flex; align-items: center; gap: 10px; }
    .hero-footer a:hover { color: white; }
    .mission { padding: 75px 0; border-bottom: 1px solid var(--border); background: #fcfaf5; }
    .mission-inner { display: grid; grid-template-columns: 220px 1fr; gap: 58px; align-items: center; }
    .verse-label { display: flex; align-items: center; gap: 14px; color: #7d765d; font-weight: 700; letter-spacing: .15em; font-size: .76rem; text-transform: uppercase; }
    .verse-label::before { content: ''; display: block; width: 3px; height: 49px; background: var(--gold); }
    .mission blockquote { margin: 0; font-family: var(--serif); font-size: clamp(1.5rem, 2.65vw, 2.5rem); letter-spacing: -.045em; line-height: 1.6; color: #2d392e; }
    .intro, .gospel, .visit, .contact { padding: clamp(85px, 10vw, 136px) 0; }
    .intro { background: var(--cream); }
    .intro-layout { display: grid; grid-template-columns: .95fr 1.05fr; gap: clamp(45px, 8vw, 135px); align-items: center; }
    .intro h2, .gospel h2, .visit h2, .contact h2 { margin: 18px 0 21px; }
    .intro-copy p { color: var(--muted); }
    .intro-copy .small-rule { width: 51px; height: 2px; background: var(--gold); margin-top: 32px; }
    .belief-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
    .belief-card { min-height: 215px; padding: 29px; background: #fff; border: 1px solid #e8e4da; box-shadow: 0 18px 50px rgba(27,37,29,.035); }
    .belief-card:nth-child(2) { transform: translateY(28px); }
    .belief-card:nth-child(4) { transform: translateY(28px); }
    .belief-icon { display: grid; place-items: center; width: 43px; height: 43px; border: 1px solid #e4d7bf; margin-bottom: 19px; color: #9c8050; }
    .belief-icon svg { width: 23px; height: 23px; stroke-width: 1.5; }
    .belief-card h3 { margin-bottom: 9px; font-size: 1.08rem; }
    .belief-card p { color: var(--muted); font-size: .86rem; line-height: 1.7; margin: 0; }
    .gospel { background: var(--forest); color: #fff; position: relative; overflow: hidden; }
    .gospel::before { content:''; position:absolute; width: 720px; height: 720px; border: 1px solid rgba(201,171,114,.1); border-radius: 50%; left: -250px; top: -290px; box-shadow: 0 0 0 120px rgba(201,171,114,.025), 0 0 0 255px rgba(201,171,114,.018); pointer-events:none; }
    .gospel .section-heading { position: relative; }
    .gospel .lead { color: #cbd4cb; }
    .question { display: block; margin-top: 22px; color: var(--gold-light); font-family: var(--serif); font-style: italic; font-size: 1.04rem; line-height: 1.7; }
    .steps { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; margin-top: 59px; position: relative; }
    .step { border-top: 1px solid rgba(234,216,179,.5); padding: 24px 15px 0 0; }
    .step-number { color: var(--gold); font-size: .83rem; letter-spacing: .16em; font-weight: 700; margin-bottom: 23px; }
    .step h3 { margin-bottom: 16px; font-size: 1.28rem; }
    .step p { font-size: .91rem; line-height: 1.8; color: #c2cec4; margin-bottom: 18px; }
    .step-ref { font-size: .79rem; letter-spacing: .05em; color: var(--gold-light); }
    .gospel-action { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 25px; margin-top: 65px; padding: 33px 39px; background: #263b30; border: 1px solid rgba(233,213,167,.18); }
    .gospel-action p { margin: 0; color: #edf2eb; line-height: 1.6; }
    .gospel-action strong { display: block; font-family: var(--serif); font-size: 1.33rem; font-weight: 400; margin-bottom: 7px; }
    .visit { background: #f3efe6; }
    .visit-grid { display: grid; grid-template-columns: 1fr .95fr; gap: clamp(55px, 8vw, 115px); align-items: center; }
    .visit-text .lead { margin-bottom: 29px; }
    .visit-note { border-left: 3px solid var(--gold); background: rgba(255,255,255,.65); padding: 18px 21px; font-size: .91rem; line-height: 1.8; color: #59645a; margin-top: 26px; }
    .visit-card { padding: clamp(30px, 5vw, 55px); background: white; border: 1px solid #e8e0d2; box-shadow: 0 26px 80px rgba(44,40,31,.08); }
    .visit-card .mini-label { display: flex; align-items: center; gap: 10px; color: #7c806d; font-size: .75rem; text-transform: uppercase; letter-spacing: .17em; font-weight: 700; margin-bottom: 25px; }
    .visit-card .mini-label::before { content: ''; background: var(--gold); width: 26px; height: 1px; }
    .visit-row { display: block; padding: 15px 0; border-bottom: 1px solid #e7e5df; }
    .visit-row svg { width: 25px; height: 25px; color: #a78b59; stroke-width: 1.45; }
    .visit-row strong { display: block; font-size: 1.02rem; margin-bottom: 7px; }
    .visit-row span { color: var(--muted); font-size: .91rem; line-height: 1.7; }
    .visit-card .visit-bottom { margin-top: 28px; color: #697167; line-height: 1.7; font-size: .88rem; }
    .contact { background: var(--cream); }
    .contact-inner { padding: clamp(36px, 7vw, 78px); background: #e9e9df; display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: 60px; position: relative; overflow: hidden; }
    .contact-inner::after { content: ''; position: absolute; right: 4%; bottom: -155px; width: 235px; height: 420px; background: rgba(65,91,68,.055); clip-path: polygon(42% 0,58% 0,58% 27%,100% 27%,100% 43%,58% 43%,58% 100%,42% 100%,42% 43%,0 43%,0 27%,42% 27%); pointer-events: none; }
    .contact-inner h2 { font-size: clamp(2.2rem,4vw,3.8rem); margin: 18px 0 23px; }
    .contact-inner p { color: #647065; max-width: 570px; }
    .contact-box { position: relative; z-index: 1; background: #fff; padding: 30px; border: 1px solid #deded0; }
    .contact-box h3 { font-size: 1.12rem; margin-bottom: 17px; }
    .contact-box p { margin-bottom: 10px; font-size: .91rem; }
    .detail { border-top: 1px solid #e9e9e0; padding: 15px 0 3px; }
    .detail span { display: block; text-transform: uppercase; letter-spacing: .11em; color: #888b7b; font-size: .7rem; font-weight: 700; margin-bottom: 6px; }
    .detail strong { color: #38493a; font-weight: 600; font-size: .92rem; }
    .footer { background: var(--forest-deep); color: #d3ddd3; padding: 56px 0 25px; }
    .footer-top { display: flex; justify-content: space-between; align-items: center; gap: 30px; padding-bottom: 41px; }
    .footer p { color: #aab9ae; max-width: 380px; margin: 0; line-height: 1.8; font-size: .87rem; }
    .footer-links { display: flex; flex-wrap: wrap; gap: 25px; font-size: .86rem; }
    .footer-links a:hover { color: var(--gold-light); }
    .footer-bottom { border-top: 1px solid rgba(255,255,255,.15); padding-top: 23px; display: flex; justify-content: space-between; gap: 20px; color: #829589; font-size: .75rem; }
    .footer-bottom small { font-size: inherit; }
    .backtop { display: inline-flex; gap: 8px; align-items: center; }
    .backtop:hover { color: white; }
    @media (max-width: 1000px) {
      .nav { gap: 17px; }
      .nav a { font-size: .82rem; }
      .steps { grid-template-columns: repeat(2,1fr); gap: 45px 32px; }
      .intro-layout { grid-template-columns: 1fr; gap: 52px; }
      .intro-copy { max-width: 750px; }
      .belief-grid { max-width: 820px; }
      .visit-grid { gap: 35px; }
    }
    @media (max-width: 740px) {
      .container { width: min(var(--container), calc(100% - 38px)); }
      .header-inner { min-height: 82px; }
      .brand-mark { width: 36px; height: 41px; font-size: 28px; }
      .brand-type small { font-size: 11px; }
      .brand-type strong { font-size: 1.09rem; }
      .menu-toggle { display: flex; }
      .nav { display: none; position: absolute; left: 0; right: 0; top: 82px; flex-direction: column; align-items: stretch; background: #18271e; padding: 18px 20px 24px; gap: 0; box-shadow: 0 20px 30px rgba(0,0,0,.2); }
      .nav.open { display: flex; }
      .nav a { font-size: 1rem; padding: 14px 5px; }
      .nav .nav-contact { margin-top: 10px; padding: 14px 16px; text-align: center; }
      .hero { min-height: 750px; }
      .hero::before { background-position: 64% center; }
      .hero::after { background: linear-gradient(90deg, rgba(10,22,17,.93), rgba(13,27,21,.76)), linear-gradient(0deg, rgba(13,26,20,.45), transparent 50%); }
      .hero-content { padding-top: 150px; padding-bottom: 126px; }
      .hero h1 { font-size: clamp(3.35rem, 11vw, 5.2rem); }
      .hero-description { font-size: 1rem; }
      .hero-footer .container { font-size: .66rem; }
      .mission { padding: 58px 0; }
      .mission-inner { grid-template-columns: 1fr; gap: 18px; }
      .verse-label::before { height: 24px; }
      .mission blockquote { font-size: 1.5rem; }
      .visit-grid, .contact-inner { grid-template-columns: 1fr; }
      .contact-inner { gap: 26px; }
      .footer-top { align-items: flex-start; flex-direction: column; }
    }
    @media (max-width: 480px) {
      .container { width: calc(100% - 32px); }
      .hero { min-height: 730px; }
      .hero h1 { font-size: 3.45rem; }
      .buttons { flex-direction: column; align-items: stretch; }
      .belief-grid { grid-template-columns: 1fr; }
      .belief-card:nth-child(n) { transform: none; min-height: 0; }
      .steps { grid-template-columns: 1fr; gap: 34px; }
      .gospel-action { padding: 27px; }
      .visit-card { padding: 27px; }
      .contact-inner { padding: 28px 21px; }
      .contact-box { padding: 23px; }
      .footer-bottom { flex-direction: column; }
      .hero-footer .container span:last-child { display: none; }
    }
    @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }
  .video-preview{aspect-ratio:16/9;max-width:900px;margin:32px auto 0;background:#080808;color:#e8d1a6;display:grid;place-items:center;text-align:center;padding:24px;border:1px solid #6b604b}.video-preview h3{font-size:clamp(1.2rem,4vw,2.4rem)}.video-preview small{color:#ccc}.section-heading.center .lead{margin-inline:auto}
    .lead.lead-centered { margin-inline: auto; }
    .container.centered-padded { text-align: center; padding-block: 0; }
    #seelengewinnen { padding-block: clamp(36px, 5vw, 65px); }
    #seelengewinnen h2 { margin: 12px 0 20px; overflow-wrap: anywhere; hyphens: auto; }
    #seelengewinnen p { margin: 0 0 20px; }

/* Gottesdienst: Standortkarte und lesbare Kontaktdaten */
.visit-card .visit-map { display: block; width: 100%; height: 260px; border: 1px solid #e8e0d2; margin: 0 0 12px; background: #f3efe6; }
.visit-card .btn { margin-top: 20px; }
.visit-card .visit-row > div { min-width: 0; }
.visit-card .visit-row span { overflow-wrap: normal; }
@media (max-width: 480px) { .visit-card .visit-map { height: 220px; } }

/* Rechtliche Hinweise – bestehendes Footer-Layout bleibt unverändert. */
.footer-legal { white-space: nowrap; }
.footer-legal-link:hover, .footer-legal-link:focus-visible { color: var(--gold-light); }
.legal-dialog { position: fixed; inset: 0; margin: auto; width: min(960px, calc(100% - 32px)); max-width: none; max-height: 90vh; max-height: 90dvh; overflow-y: auto; padding: clamp(24px, 5vw, 44px); border: 1px solid var(--gold); background: var(--cream); color: var(--ink); box-shadow: 0 24px 80px rgba(0,0,0,.25); }
.legal-dialog::backdrop { background: rgba(16,28,23,.72); }
html:not(.legal-modal-enabled) .legal-dialog:target:not([open]) { display: block; z-index: 1000; box-shadow: 0 0 0 100vmax rgba(16,28,23,.72); }
.legal-dialog h2 { color: var(--forest); font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 0 38px 24px 0; }
.legal-dialog h3 { color: var(--forest); font-size: 1.1rem; margin: 20px 0 8px; }
.legal-dialog p { margin: 0 0 16px; line-height: 1.7; }
.legal-dialog p a { text-decoration: underline; }
.legal-close { position: absolute; top: 14px; right: 18px; width: 40px; height: 40px; display: grid; place-items: center; font-size: 30px; color: var(--forest); }
.legal-dialog .legal-dismiss { margin-top: 12px; }

/* Pastor: bestehendes Overlay-Design wiederverwenden. */
.visit-text .pastor-link { margin-top: 12px; }
.pastor-dialog .pastor-photo-placeholder { display: grid; place-items: center; min-height: 150px; aspect-ratio: 16 / 9; max-height: 260px; margin: 0 0 24px; background: #eae5da; border: 1px solid var(--border); color: var(--muted); font-size: .9rem; }
.pastor-dialog .pastor-photo { display: block; width: auto; max-width: min(100%, 340px); height: auto; max-height: min(260px, 35vh); object-fit: contain; margin: 0 auto 20px; }

/* WhatsApp contact shortcut */
.visit-row .contact-phone, .detail .contact-phone { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.contact-phone .whatsapp-link { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 32px; width: 32px; height: 32px; border-radius: 6px; background: transparent; color: #16834b; text-decoration: none; transition: color .18s ease, transform .18s ease; }
.contact-phone .whatsapp-link:hover, .contact-phone .whatsapp-link:focus-visible { background: transparent; color: #086c39; transform: translateY(-1px); }
.contact-phone .whatsapp-link:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.contact-phone .whatsapp-link svg { display: block; width: 30px; height: 30px; color: inherit; fill: currentColor; stroke: none; }

/* Balance the weekly services section without changing the global design. */
.visit { padding-block: clamp(72px, 8vw, 112px); }
.visit-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(40px, 6vw, 85px); }
.visit-text h2 { font-size: clamp(2.35rem, 4.5vw, 4.1rem); margin-block: 20px 28px; }
.visit-text p { font-size: clamp(1.05rem, 1.4vw, 1.2rem); line-height: 1.85; margin-bottom: 22px; max-width: 39em; }
.visit-text .pastor-link { margin-top: 16px; }
.visit-card { padding: clamp(26px, 3.2vw, 40px); }
.visit-card .mini-label { margin-bottom: 18px; }
.visit-card .visit-map { height: 230px; }
.visit-card .visit-row { padding-block: 12px; }
.visit-card .btn { margin-top: 18px; }
.visit-row .contact-phone .whatsapp-link svg { display: block; width: 30px; height: 30px; color: inherit; fill: currentColor; stroke: none; }
@media (max-width: 1000px) { .visit-grid { gap: 35px; } }
@media (max-width: 740px) { .visit-grid { grid-template-columns: 1fr; } .visit-text h2 { font-size: clamp(2.1rem, 7vw, 3.2rem); } .visit-card { padding: 27px; } }
@media (max-width: 480px) { .visit-card .visit-map { height: 220px; } }

/* Align the monochrome WhatsApp brand mark with the phone number. */
.contact-phone .whatsapp-link { flex: 0 0 30px; width: 30px; height: 30px; color: #128c4a; }
.contact-phone .whatsapp-link svg, .visit-row .contact-phone .whatsapp-link svg { width: 25px; height: 25px; flex: none; overflow: visible; }

/* Gospel video preview and responsive player dialog. */
.gospel .gospel-video-link { position: relative; text-decoration: none; color: #e8d1a6; cursor: pointer; transition: border-color .2s, background .2s; }
.gospel .gospel-video-link:hover { border-color: var(--gold); background: #111710; }
.gospel .gospel-video-link:focus-visible { outline: 3px solid var(--gold); outline-offset: 5px; }
.video-preview-content { position: relative; display: grid; justify-items: center; gap: clamp(12px, 2.5vw, 26px); width: 100%; }
.video-preview-content h3, .video-preview-content p { margin: 0; }
.video-play { display: grid; place-items: center; width: clamp(56px, 8vw, 84px); aspect-ratio: 1; border-radius: 50%; background: var(--gold-light); color: var(--forest); box-shadow: 0 0 0 7px rgba(201,171,114,.14); transition: transform .2s; }
.video-play svg { width: 46%; height: 46%; margin-left: 4%; }
.gospel-video-link:hover .video-play { transform: scale(1.08); }
.gospel-video-dialog { width: min(1120px, calc(100% - 32px)); padding: clamp(18px, 3vw, 32px); }
.gospel-video-player { display: grid; place-items: center; background: #080808; color: #ddd; aspect-ratio: 16/9; width: 100%; max-height: 65vh; max-height: 65dvh; text-align: center; }
.gospel-video-player p { margin: 0; padding: 18px; }
.gospel-video-player video, .gospel-video-player iframe { display: block; width: 100%; height: 100%; max-height: 65vh; max-height: 65dvh; border: 0; object-fit: contain; }
.gospel-video-dialog .video-credit { margin-top: 16px; }
@media (max-width: 480px) { .gospel .gospel-video-link { min-height: 210px; padding: 15px; } .video-preview-content { gap: 12px; } }

/* Gentle opening animation for every overlay. */
@keyframes overlay-enter { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes overlay-backdrop-enter { from { opacity: 0; } to { opacity: 1; } }
.legal-dialog[open], html:not(.legal-modal-enabled) .legal-dialog:target:not([open]) { animation: overlay-enter 280ms cubic-bezier(.2,.75,.25,1) both; }
.legal-dialog[open]::backdrop { animation: overlay-backdrop-enter 280ms ease-out both; }
@media (prefers-reduced-motion: reduce) { .legal-dialog[open], html:not(.legal-modal-enabled) .legal-dialog:target:not([open]), .legal-dialog[open]::backdrop { animation: none; } }

/* Soft closing animation; keep the native dialog open until the fade ends. */
@keyframes overlay-exit { from { opacity: 1; transform: translateY(0) scale(1); } to { opacity: 0; transform: translateY(8px) scale(.985); } }
@keyframes overlay-backdrop-exit { from { opacity: 1; } to { opacity: 0; } }
.legal-dialog[open].is-closing { animation: overlay-exit 220ms ease-in both; }
.legal-dialog[open].is-closing::backdrop { animation: overlay-backdrop-exit 220ms ease-in both; }
@media (prefers-reduced-motion: reduce) { .legal-dialog[open].is-closing, .legal-dialog[open].is-closing::backdrop { animation: none; } }

/* Platform-independent vector icons and mobile title sizing. */
.brand-mark .brand-cross { display: block; width: 23px; height: 29px; }
.ui-arrow { display: inline-block; width: 1.15em; height: 1.15em; flex: 0 0 auto; vertical-align: -.2em; }
.ui-spark { display: inline-block; width: 1em; height: 1em; vertical-align: -.1em; }
.nav-contact .ui-arrow { margin-left: .2em; }
@media (max-width: 740px) {
  .brand-mark .brand-cross { width: 19px; height: 24px; }
  .hero h1 { font-size: clamp(1.75rem, 8.2vw, 4.5rem); max-width: 100%; overflow-wrap: anywhere; }
  .hero h1 em { white-space: normal; }
  .contact-inner::after { width: 175px; height: 310px; bottom: -95px; right: 3%; }
}

/* Keep background stationary while a native overlay is open, including iOS. */
html.overlay-scroll-lock { overflow: hidden; scrollbar-gutter: stable; scroll-behavior: auto; }
html.overlay-scroll-lock body {
  position: fixed;
  top: var(--overlay-scroll-top, 0px);
  left: var(--overlay-scroll-left, 0px);
  width: calc(100% - var(--overlay-scroll-compensation, 0px));
  overflow: hidden;
}
.legal-dialog { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }

/* Adaptive desktop hero height, capped for tall displays. */
@media (min-width: 741px) {
  .hero { min-height: clamp(760px, 100vh, 950px); }
}
