/* ==========================================================================
   Grafrath Consulting — static site styles
   Brand: building blocks (LEGO-inspired) · primary blue / red / yellow
   ========================================================================== */

:root {
  --blue: #0b5fbf;
  --blue-dark: #0a4f9e;
  --red: #e0281f;
  --yellow: #ffc60b;
  --ink: #16202f;
  --muted: #5a6472;
  --bg: #ffffff;
  --alt: #f3f6fb;
  --line: #e4e9f1;
  --card: #ffffff;
  --shadow: 0 1px 2px rgba(16,32,60,.06), 0 8px 24px rgba(16,32,60,.08);
  --shadow-lg: 0 4px 12px rgba(16,32,60,.10), 0 24px 48px rgba(16,32,60,.14);
  --radius: 14px;
  --wrap: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration-thickness: 1.5px; text-underline-offset: 2px; }

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

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 100;
}
.skip-link:focus { left: 0; }

:where(a, button, input, .contact-card):focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5em;
  font-weight: 700; font-size: 1rem; line-height: 1;
  padding: 14px 22px; border-radius: 10px;
  text-decoration: none; cursor: pointer; border: 2px solid transparent;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn-sm { padding: 9px 16px; font-size: .92rem; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 4px 0 var(--blue-dark); }
.btn-primary:hover { transform: translateY(-1px); background: #0c68ce; }
.btn-primary:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--blue-dark); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn-ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.btn-dark { background: var(--ink); color: #fff; box-shadow: 0 4px 0 #060b14; }
.btn-dark:hover { transform: translateY(-1px); background: #1e2b3d; }
.btn-dark:active { transform: translateY(2px); box-shadow: 0 2px 0 #060b14; }
@media (prefers-reduced-motion: reduce) { .btn:hover, .btn:active { transform: none; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 20px; min-height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); font-weight: 800; }
.brand img { width: 44px; height: 44px; }
.brand-name { font-size: 1.08rem; letter-spacing: -.01em; }
.site-nav { display: flex; gap: 26px; margin-left: auto; }
.site-nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .96rem; }
.site-nav a:hover { color: var(--ink); }
.header-actions { display: flex; }

/* ---------- Shared brick background (JS momentum parallax) ---------- */
.bricks-bg { position: relative; overflow: hidden; isolation: isolate; }
.bricks-bg > .wrap { position: relative; z-index: 2; }
.parallax-bg {
  position: absolute; left: -3%; right: -3%; top: -42%; height: 184%;
  background: url("assets/block-bg.jpg") center/cover no-repeat;
  z-index: 0; will-change: transform; transform: translate3d(0, 0, 0);
}

/* ---------- Hero ---------- */
.hero { color: #fff; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(105deg, rgba(5,22,54,.85) 0%, rgba(5,22,54,.50) 50%, rgba(5,22,54,.20) 100%);
}
.hero-inner { padding: 110px 22px 122px; max-width: var(--wrap); }
.hero h1 {
  font-size: clamp(1.9rem, 5.7vw, 4.1rem); line-height: 1.05; margin: 0 0 20px;
  font-weight: 800; letter-spacing: -.02em; text-shadow: 0 2px 22px rgba(0,0,0,.55);
  white-space: nowrap;
}
.hero h1 .hl { color: var(--yellow); }
.lede { font-size: clamp(1.05rem, 2.2vw, 1.3rem); max-width: 100%; margin: 0; color: #fff; text-shadow: 0 1px 16px rgba(0,0,0,.55); }

/* ---------- Sections ---------- */
.section { padding: 76px 0; }
.section--alt { background: var(--alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-title { font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 800; letter-spacing: -.02em; margin: 0 0 8px; }
.section-intro { color: var(--muted); font-size: 1.06rem; max-width: 640px; margin: 0 0 22px; }
.section-intro--tight { margin-top: 30px; }

/* ---------- Cards (bricks) ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; margin-top: 30px; }
.card {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-top: 5px solid var(--accent, var(--blue)); border-radius: var(--radius);
  padding: 30px 26px 26px; box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card::before {
  content: ""; position: absolute; top: 15px; left: 26px;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--accent, var(--blue));
  box-shadow: 24px 0 0 var(--accent, var(--blue));
  opacity: .85;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
@media (prefers-reduced-motion: reduce) { .card:hover { transform: none; } }
.card h3 { margin: 26px 0 10px; font-size: 1.3rem; font-weight: 800; }
.card p { margin: 0 0 12px; color: #34404f; }
.card p:last-child { margin-bottom: 0; }
.card-note { font-size: .96rem; color: var(--muted); }
.card--blue { --accent: var(--blue); }
.card--red { --accent: var(--red); }
.card--yellow { --accent: var(--yellow); }

/* ---------- Chips (brick tags) ---------- */
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; }
.chips li {
  background: #fff; border: 1px solid var(--line);
  border-radius: 9px; padding: 10px 15px; font-weight: 600; font-size: .95rem;
  box-shadow: 0 1px 2px rgba(16,32,60,.05);
}
.chips--soft li { background: var(--alt); }
.chips--cap li { background: rgba(11,95,191,.09); border-color: rgba(11,95,191,.30); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); gap: 16px; margin-top: 28px; }
.contact-card {
  display: grid; grid-template-columns: auto 1fr; column-gap: 15px; row-gap: 2px; align-items: center;
  padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; text-decoration: none; color: var(--ink); box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.contact-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #c9d6ea; }
@media (prefers-reduced-motion: reduce) { .contact-card:hover { transform: none; } }
.contact-icon { grid-column: 1; grid-row: 1 / span 2; display: inline-flex; align-items: center; color: var(--blue); }
.contact-icon svg { width: 30px; height: 30px; display: block; }
.contact-label { grid-column: 2; font-size: .78rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-weight: 700; }
.contact-value { grid-column: 2; font-size: 1.12rem; font-weight: 700; }

/* Contact sits on the brick backdrop — the bottom "bricks" bookend */
#contact::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(6,18,46,.64), rgba(6,18,46,.74));
}
#contact .section-title { color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,.5); }
#contact .contact-card { background: #fff; border-color: transparent; }
#contact .contact-label { color: #5a6472; }
#contact .contact-value { color: #16202f; }

.badges { display: flex; justify-content: center; align-items: center; gap: 32px; margin-top: 42px; flex-wrap: wrap; }
.badges a { display: inline-flex; transition: transform .15s ease; }
.badges a:hover { transform: translateY(-3px) scale(1.03); }
.badges img { width: 152px; height: 152px; display: block; filter: drop-shadow(0 8px 22px rgba(0,0,0,.5)); }

/* ---------- Footer ---------- */
/* Fixed dark background (NOT var(--ink), which inverts to light in dark mode). */
.site-footer { background: #0f1826; color: #b3becd; }
.footer-inner { display: flex; align-items: center; gap: 18px 30px; padding: 34px 22px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; }
.footer-brand img { width: 36px; height: 36px; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; margin-left: auto; }
.footer-links a { color: #c7d2e0; text-decoration: none; font-weight: 600; }
.footer-links a:hover { color: #fff; text-decoration: underline; }
.footer-legal { width: 100%; margin: 6px 0 0; font-size: .88rem; color: #7c8898; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .site-nav { display: none; }
  .hero-inner { padding: 74px 22px 82px; }
  .section { padding: 56px 0; }
}
@media (max-width: 600px) {
  .hero h1 { white-space: normal; } /* let the headline wrap when one line would be too small */
}

/* ---------- Dark mode adaptation ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8edf4; --muted: #9aa6b4; --bg: #0e1420; --alt: #131b29;
    --line: #253145; --card: #131b29;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.4);
    --shadow-lg: 0 4px 12px rgba(0,0,0,.5), 0 24px 48px rgba(0,0,0,.55);
  }
  .site-header { background: rgba(14,20,32,.85); }
  .card p { color: #c4cddb; }
  .chips li { background: #131b29; }
  .chips--soft li { background: #0e1420; }
  .contact-card { background: #131b29; }
  .btn-ghost { color: #fff; }
}
