/* Monhe.IT — one stylesheet for the whole site.
   Carried over from the WordPress pages: #1a1a1a ground, system font, the
   #3b82f6 blue, and the nav's corner-bracket hover. */
:root {
  --bg: #1a1a1a;
  --panel: #2d2d2d;
  --panel-2: #242424;
  --line: #444444;
  --text: #b0b0b0;
  --text-strong: #ffffff;
  --muted: #888888;
  --blue: #3b82f6;
  --blue-2: #60a5fa;
  --link: #4a9eff;
  --ok: #46b450;
  --warn: #d4a017;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); }
h1, h2, h3, h4 { color: var(--text-strong); line-height: 1.25; }
:focus-visible { outline: 2px solid var(--blue-2); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 2000; background: var(--blue); color: #fff; padding: 8px 14px; }

/* ---- navigation ---- */
.site-nav { background-color: var(--bg); position: sticky; top: 0; z-index: 1000; }
.nav-container { max-width: 1400px; margin: 0 auto; padding: 0 40px; display: flex; justify-content: space-between; align-items: center; height: 65px; position: relative; }
.logo { font-size: 22px; font-weight: 700; color: #fff; text-decoration: none; letter-spacing: 0.5px; }
/* One tight group on the right: the page links, then Portal last. */
.nav-menu { display: flex; list-style: none; gap: 4px; align-items: center; margin-left: auto; }
.nav-menu li { position: relative; }
.nav-menu a { text-decoration: none; color: #fff; font-size: 15px; font-weight: 500; padding: 12px 24px; position: relative; display: inline-block; transition: color 0.3s ease; }
/* corner brackets: bottom-left and top-right, drawn in on hover */
.nav-menu a::before, .nav-menu a::after { content: ''; position: absolute; width: 0; height: 0; opacity: 0; transition: all 0.3s ease; border: 2px solid transparent; }
.nav-menu a::before { bottom: 0; left: 0; border-right: none; border-top: none; }
.nav-menu a::after { top: 0; right: 0; border-left: none; border-bottom: none; }
.nav-menu a:hover { color: var(--blue); }
.nav-menu a:hover::before, .nav-menu a:hover::after { width: 10px; height: 10px; opacity: 1; border-color: var(--blue); }
.nav-menu a.active { color: var(--blue-2); }
/* Portal looks like every other menu link (same hover brackets), only placed at the right edge. */
.nav-menu a.portal-btn { font-weight: 500; }
.menu-toggle { display: none; flex-direction: column; cursor: pointer; gap: 5px; background: none; border: none; padding: 8px; }
.menu-toggle span { width: 25px; height: 3px; background-color: #fff; transition: all 0.3s ease; }
@media (max-width: 960px) {
  .nav-container { padding: 0 20px; }
  .menu-toggle { display: flex; }
  .nav-menu { position: absolute; top: 65px; left: 0; right: 0; background-color: var(--bg); flex-direction: column; gap: 0; padding: 20px; display: none; border-bottom: 1px solid var(--line); }
  .nav-menu li.portal-item { margin-top: 8px; }
  .nav-menu.active { display: flex; }
  .nav-menu li { width: 100%; text-align: center; padding: 10px 0; }
}

/* ---- shared page furniture ---- */
.page { max-width: 1140px; margin: 0 auto; padding: 56px 24px 72px; }
.page > h1 { text-align: center; font-size: 2.4em; margin-bottom: 40px; }
.btn { display: inline-block; background: var(--blue); color: #fff; text-decoration: none; font-weight: 600; font-size: 16px; padding: 13px 28px; border-radius: 6px; border: 2px solid var(--blue); cursor: pointer; transition: background 0.3s ease, border-color 0.3s ease; font-family: inherit; }
.btn:hover { background: #2563eb; border-color: #2563eb; }
.btn.ghost { background: transparent; border-color: #fff; }
.btn.ghost:hover { border-color: var(--blue-2); color: var(--blue-2); background: transparent; }
.site-footer { border-top: 1px solid #2a2a2a; padding: 28px 24px; text-align: center; font-size: 14px; color: var(--muted); }
.site-footer p + p { margin-top: 6px; }
.site-footer a { color: var(--text); text-decoration: none; }
.site-footer a:hover { color: var(--blue-2); }

/* ---- home ---- */
.hero { min-height: 78vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 80px 24px; background: linear-gradient(rgba(10, 14, 26, 0.55), rgba(26, 26, 26, 0.92)), url('../img/hero.webp') center / cover fixed; }
.hero h1 { font-size: clamp(2.8em, 8vw, 5em); letter-spacing: 1px; }
.hero p { color: #dbe4f3; font-size: 1.25em; max-width: 620px; margin: 18px auto 34px; }
.hero .cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.section-title { text-align: center; font-size: 1.9em; margin-bottom: 36px; }
.section + .section { margin-top: 72px; }
.center { text-align: center; margin-top: 32px; }

/* ---- cards: services, team, posts ---- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px; }
.card { background: var(--panel-2); border: 1px solid #333; border-radius: 10px; overflow: hidden; text-align: center; }
.card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.card h2, .card h3 { font-size: 1.3em; margin: 22px 20px 10px; }
.card p { margin: 0 22px 26px; }
.team { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 40px; max-width: 860px; margin: 0 auto; }
.member { text-align: center; }
.member img { width: 180px; height: 180px; border-radius: 50%; margin: 0 auto 20px; }
.member h2 { font-size: 1.3em; margin-bottom: 12px; }
.member p + p { margin-top: 10px; }
.post-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px; }
.post-card { display: block; background: var(--panel-2); border: 1px solid #333; border-radius: 10px; padding: 28px; text-decoration: none; color: var(--text); transition: border-color 0.3s ease, transform 0.3s ease; }
.post-card:hover { border-color: var(--blue); transform: translateY(-3px); }
.post-card h2 { font-size: 1.3em; margin: 10px 0 12px; }
.post-meta { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--blue-2); }
.post-meta a { color: inherit; }
.read-more { display: inline-block; margin-top: 16px; color: var(--blue); font-weight: 600; }

/* ---- FAQ ---- */
.faq { max-width: 860px; margin: 0 auto; }
.faq details { border-bottom: 1px solid #333; }
.faq summary { cursor: pointer; padding: 20px 36px 20px 4px; color: #fcfcfc; font-size: 1.1em; font-weight: 600; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 8px; top: 16px; font-size: 1.4em; color: var(--blue); }
.faq details[open] summary::after { content: '\2212'; }
.faq summary:hover { color: var(--blue-2); }
.faq .answer { padding: 0 4px 22px; }
.faq .answer p + p { margin-top: 12px; }
.faq .answer strong { color: #fff; }
.tagline { text-align: center; margin-top: 48px; font-size: 1.3em; }

/* ---- contact ---- */
.contact-form { max-width: 620px; margin: 0 auto; background: var(--panel-2); border: 1px solid #333; border-radius: 10px; padding: 32px; }
.contact-form label { display: block; color: #fff; font-weight: 600; margin-bottom: 6px; }
.contact-form input, .contact-form textarea { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; color: #fff; padding: 12px 14px; font: inherit; margin-bottom: 20px; }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--blue); outline: none; }
.contact-form textarea { min-height: 160px; resize: vertical; }
.contact-form .trap { position: absolute; left: -9999px; }
/* The form before it is connected: the original site's loading look — a
   title, a bar and a percentage that creeps up and never reaches 100. */
.contact-form.loading { background: none; border: none; padding: 80px 0; }
.contact-form .form-loading { display: flex; flex-direction: column; align-items: center; gap: 18px; color: #fff; }
.contact-form .loading-title { font-size: 20px; font-weight: 600; margin: 0; }
.contact-form .loading-bar { width: 100%; max-width: 550px; height: 32px; background: #2a2a2a; border-radius: 16px; overflow: hidden; }
.contact-form .loading-fill { display: block; height: 100%; width: 0; background: var(--blue); border-radius: 16px; transition: width 0.6s ease; }
.contact-form .loading-pct { font-size: 18px; font-weight: 600; margin: 0; }
/* The reason it never loads: a period-correct error dialog. */
.contact-form .flash-dialog { max-width: 440px; margin: 0 auto; background: #ece9d8; color: #000; border: 1px solid #0a246a; border-radius: 8px 8px 0 0; box-shadow: 0 12px 40px rgba(0,0,0,.6); font-family: Tahoma, 'Segoe UI', Arial, sans-serif; font-size: 13px; text-align: left; }
.contact-form .flash-title { display: flex; justify-content: space-between; align-items: center; background: linear-gradient(#0a5fd8, #0846a6); color: #fff; font-weight: 700; padding: 6px 8px 6px 10px; border-radius: 7px 7px 0 0; }
.contact-form .flash-x { background: #c75050; border: 1px solid #fff; border-radius: 3px; width: 20px; height: 18px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
.contact-form .flash-body { display: flex; gap: 14px; padding: 18px 16px 8px; line-height: 1.45; }
.contact-form .flash-body p { margin: 0 0 8px; color: #000; }
.contact-form .flash-icon { flex: none; width: 32px; height: 32px; border-radius: 50%; background: #d23b2f; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; box-shadow: inset 0 -2px 0 rgba(0,0,0,.25); }
.contact-form .flash-buttons { display: flex; justify-content: flex-end; gap: 8px; padding: 8px 12px 14px; }
.contact-form .flash-btn { font: inherit; padding: 4px 16px; min-width: 84px; background: #f4f3ee; border: 1px solid #003c74; border-radius: 3px; color: #000; cursor: pointer; }
.contact-form .flash-btn:disabled { color: #a0a0a0; border-color: #c3c3c3; cursor: default; }
.contact-form .flash-btn.flash-ok:hover { background: #fff; }
.form-status { margin-top: 16px; min-height: 1.6em; }
.form-status.error { color: #f87171; }
.thanks { max-width: 680px; margin: 0 auto; text-align: center; }
.thanks p { font-size: 1.1em; margin-bottom: 14px; }
.thanks .signature { margin-top: 36px; font-style: italic; }
.notfound { text-align: center; padding-top: 110px; }
.notfound .code { font-size: 1em; letter-spacing: 3px; text-transform: uppercase; color: var(--blue-2); }
.notfound h1 { font-size: 2.6em; margin: 12px 0; }
.notfound p { margin-bottom: 28px; }

/* ---- legal pages ---- */
.legal { max-width: 960px; margin: 0 auto; background-color: var(--panel); padding: 40px; border-radius: 8px; }
.legal h1 { text-align: center; font-size: 2.3em; margin-bottom: 10px; letter-spacing: 2px; }
.legal .effective-date { text-align: center; font-style: italic; margin-bottom: 30px; color: var(--muted); }
.legal h2 { font-size: 1.5em; margin-top: 30px; margin-bottom: 15px; border-bottom: 2px solid var(--line); padding-bottom: 5px; }
.legal h3 { font-size: 1.2em; margin-top: 20px; margin-bottom: 10px; }
.legal p { margin-bottom: 15px; }
.legal ul, .legal ol { margin-bottom: 20px; padding-left: 40px; }
.legal li { margin-bottom: 10px; }
.legal strong { color: #fff; }
.legal a { text-decoration: none; }
.legal a:hover { text-decoration: underline; }
.legal .contact-info { margin-top: 20px; line-height: 1.8; }
.legal .highlight-box { background-color: var(--bg); border-left: 4px solid var(--link); padding: 15px; margin: 20px 0; border-radius: 4px; }
.legal .acknowledgment { text-align: center; margin-top: 40px; padding: 20px; background-color: var(--bg); border: 1px solid var(--line); border-radius: 5px; font-style: italic; font-size: 0.9em; color: var(--muted); }
.legal .divider { text-align: center; font-weight: bold; margin: 30px 0; font-size: 1.5em; color: #666; }

/* ---- articles ---- */
.article { max-width: 860px; margin: 0 auto; padding: 56px 24px 72px; color: #e0e0e0; font-size: 17px; line-height: 1.75; }
.article h1 { font-size: 2.2em; margin: 10px 0 28px; }
.article h2 { font-size: 1.55em; margin: 38px 0 14px; }
.article h3 { font-size: 1.25em; margin: 28px 0 10px; }
.article h4 { font-size: 1.05em; margin: 22px 0 8px; }
.article p { margin-bottom: 16px; }
.article ul, .article ol { margin: 0 0 18px 26px; }
.article li { margin-bottom: 8px; }
.article hr { border: none; border-top: 1px solid var(--line); margin: 36px 0; }
.article strong { color: #fff; }
.article code { font-family: 'Courier New', Courier, monospace; font-size: 90%; background: var(--panel); padding: 2px 6px; border-radius: 3px; color: #e0e0e0; }
.article .tip, .article .warning { padding: 15px 18px; margin: 20px 0; border-left: 4px solid #0a7ea4; background: #1a2b3d; border-radius: 4px; }
.article .warning { background: #3d3520; border-left-color: var(--warn); }
.article .tip > :last-child, .article .warning > :last-child { margin-bottom: 0; }
.code-block-wrapper { position: relative; margin: 15px 0; }
.code-block-wrapper pre { margin: 0; padding: 44px 15px 15px; background-color: var(--panel); border: 1px solid var(--line); border-radius: 5px; overflow-x: auto; }
.code-block-wrapper pre code { background: none; padding: 0; font-size: 14px; line-height: 1.5; }
.copy-button { position: absolute; top: 8px; right: 8px; padding: 5px 12px; background-color: #0a7ea4; color: #fff; border: none; border-radius: 3px; cursor: pointer; font-size: 12px; font-weight: bold; transition: background-color 0.3s; z-index: 10; }
.copy-button:hover { background-color: #0c5d7a; }
.copy-button.copied { background-color: var(--ok); }
.inline-code-wrapper { display: inline-flex; align-items: center; gap: 4px; background-color: var(--panel); padding: 2px 6px; border-radius: 3px; }
.inline-code-wrapper code { background: none; padding: 0; }
.inline-copy-btn { background: none; border: none; cursor: pointer; font-size: 14px; padding: 0 2px; opacity: 0.6; transition: opacity 0.2s, transform 0.1s; line-height: 1; }
.inline-copy-btn:hover, .inline-copy-btn.copied { opacity: 1; transform: scale(1.1); }

@media (max-width: 640px) {
  .page { padding: 40px 18px 56px; }
  .legal { padding: 24px 18px; }
  .legal ul, .legal ol { padding-left: 22px; }
  .hero { background-attachment: scroll; }
}

main > .legal { margin: 56px auto 72px; }
@media (max-width: 1000px) { main > .legal { margin: 24px 14px 48px; } }

/* ---- blocks from the page designer ---- */
.block-heading { margin: 48px 0 28px; font-size: 1.9em; }
.block-heading.center { text-align: center; }
.page > .block-heading:first-child { margin-top: 0; }
h1.block-heading { font-size: 2.4em; margin-bottom: 40px; }
h3.block-heading { font-size: 1.4em; margin: 32px 0 16px; }
.block-text { max-width: 860px; margin: 0 auto 24px; font-size: 1.05em; }
.block-text.center { text-align: center; }
.block-text p + p, .block-text ul + p, .block-text p + ul { margin-top: 14px; }
.block-text ul { padding-left: 24px; }
.block-text strong { color: #fff; }
.block-image { margin: 28px auto; }
.block-image img { width: 100%; border-radius: 10px; }
.block-image.small { max-width: 360px; }
.block-image.medium { max-width: 720px; }
.block-button { margin: 32px 0; }
.block-button.center { text-align: center; }
.block-divider { border: none; border-top: 1px solid #333; margin: 48px 0; }
.page > .code-block-wrapper { max-width: 860px; margin: 20px auto; }
.page > .contact-form { margin-top: 8px; }
.member p + p { margin-top: 10px; }

/* ---- page transitions ----
   Cross-fade between pages instead of a hard cut; a plain fade-in where the
   browser has no view transitions; nothing at all for reduced-motion. */
@view-transition { navigation: auto; }
::view-transition-group(root) { animation-duration: 220ms; animation-timing-function: ease-out; }
@keyframes soft-in { from { opacity: 0; } to { opacity: 1; } }
@supports not (view-transition-name: none) {
  body { animation: soft-in 200ms ease-out; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  body { animation: none !important; }
}

/* ---- callouts, and designer blocks inside articles and document pages ---- */
.callout { padding: 15px 18px; margin: 20px 0; border-left: 4px solid #0a7ea4; background: #1a2b3d; border-radius: 4px; }
.callout.warning { background: #3d3520; border-left-color: var(--warn); }
.callout.box { background: var(--bg); border-left-color: var(--link); }
.callout.notice { text-align: center; margin-top: 40px; padding: 20px; background: var(--bg); border: 1px solid var(--line); border-radius: 5px; font-style: italic; font-size: 0.9em; color: var(--muted); }
.callout p + p, .callout p + ul, .callout ul + p { margin-top: 10px; }
.callout ul, .callout ol { padding-left: 24px; }
.callout > :last-child { margin-bottom: 0; }
.callout strong { color: #fff; }
.page > .callout { max-width: 860px; margin-left: auto; margin-right: auto; }
.article .block-text, .legal .block-text { font-size: inherit; max-width: none; margin: 0; }
.article .block-text p + p, .legal .block-text p + p, .article .block-text ul + p, .legal .block-text ul + p,
.article .block-text p + ul, .legal .block-text p + ul { margin-top: 0; }
.article .block-text ul, .article .block-text ol { padding-left: 0; }
.article li > ul, .article li > ol { margin: 8px 0 0 26px; }
.legal li > ul, .legal li > ol { margin-top: 10px; margin-bottom: 0; }
.legal h1.block-heading { font-size: 2.3em; margin: 0 0 10px; letter-spacing: 2px; }
.legal .block-heading { text-align: left; }
.legal h1.block-heading.center { text-align: center; }
.legal .block-text.center { text-align: center; margin-bottom: 30px; color: var(--muted); }
.legal .block-divider { border: none; height: auto; margin: 30px 0; text-align: center; }
.legal .block-divider::before { content: '* * *'; font-weight: bold; font-size: 1.5em; color: #666; }
.article .block-divider { border-top: 1px solid var(--line); margin: 36px 0; }
.legal h2.block-heading { font-size: 1.5em; margin: 30px 0 15px; }
.legal h3.block-heading { font-size: 1.2em; margin: 20px 0 10px; }
.legal h4.block-heading { font-size: 1.05em; margin: 16px 0 8px; }
.article h3.block-heading { font-size: 1.25em; margin: 28px 0 10px; }
.article h4.block-heading { font-size: 1.05em; margin: 22px 0 8px; }
h4.block-heading { font-size: 1.15em; margin: 24px 0 12px; }
