/*
  MACRec site styles (dark theme). Shared by every page.
  Page HTML is generated by ../build.py from ../src/; edit there, not in site/.
*/

/* === Colors (dark theme) === */
:root {
  --bg: #0f1419;          /* page background */
  --bg-alt: #151c23;      /* alternating bar background */
  --surface: #1b242d;     /* cards, menus */
  --text: #e6e9ee;        /* main text, high contrast on --bg */
  --muted: #a8b2bf;       /* secondary text, still WCAG AA on --bg */
  --accent: #3fb8a9;      /* teal: buttons, links, highlights */
  --accent-dark: #2e8f83;
  --line: #26313c;        /* thin borders */
  --prune: #e0a64a;       /* amber outline for PRUNE boxes (draft only) */
  --max: 1140px;
}

/* === Base === */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text);
       font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; line-height: 1.6; }
a { color: var(--accent); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.bar { padding: 64px 0; }
.bar.alt { background: var(--bg-alt); }
.center { text-align: center; }
h2 { font-size: 1.9rem; margin: 0 0 16px; }
h3 { margin: 0 0 10px; }
p { margin: 0 0 16px; }
.muted, .bar p, .bar li { color: var(--muted); }
ul.list { padding-left: 22px; margin: 0 0 16px; }
ul.list li { margin-bottom: 6px; }

/* === Buttons === */
.btn { display: inline-block; background: var(--accent); color: #0b1013; font-weight: 700; text-decoration: none;
       padding: 13px 28px; border-radius: 4px; letter-spacing: .04em; text-transform: uppercase; font-size: .9rem; border: 0; cursor: pointer; }
.btn:hover { background: var(--accent-dark); color: #fff; }
.btn.ghost { background: transparent; color: var(--accent); border: 2px solid var(--accent); }
.btnrow { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }

/* === PRUNE box: a macrx bar or link with no honest MACRec version yet (draft only) === */
.prune { border: 2px dashed var(--prune); color: var(--prune) !important; padding: 14px 18px; border-radius: 6px; font-size: .92rem; margin: 0 0 16px; }
.prune b { letter-spacing: .1em; }
.prune-inline { border: 1px dashed var(--prune); color: var(--prune) !important; padding: 0 6px; border-radius: 4px; }

/* === Utility strip (top) === */
.util { background: #0a0e12; font-size: .85rem; }
/* Full window width (not the centered content column) so the box hugs the right edge at any size. */
.util .wrap { display: flex; justify-content: flex-end; flex-wrap: wrap; max-width: none; padding: 0; }
/* Teal box behind the three top links (macrx: colored strip behind Careers / Newsletter / Pay Online). */
.util .box { display: flex; gap: 34px; background: var(--accent); padding: 9px 28px; }
.util a { color: #0b1013; text-decoration: none; font-weight: 600; }
.util a:hover { color: #fff; }

/* === Header + nav with dropdowns === */
header { background: var(--bg); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
/* Tall header (bigger than macrx's 116px, by Sixy's call). Logo is 112px tall. */
header .wrap { display: flex; align-items: center; justify-content: space-between; height: 150px;
               /* Logo stays lined up with the page column; the nav runs to the window's right edge like the teal box. */
               max-width: none; padding-left: max(24px, calc((100vw - var(--max)) / 2 + 24px)); padding-right: 28px; }
.logo { display: flex; align-items: center; text-decoration: none; }
/* Nav fills the space from the logo to the right edge; extra width becomes spacing between the words. */
nav { display: flex; gap: 26px; white-space: nowrap; flex: 1; justify-content: space-evenly; margin-left: 40px; }
nav .item { position: relative; }
/* Tall link padding so the dropdown menu sits right under the header edge. */
nav a { color: var(--text); text-decoration: none; font-weight: 600; font-size: 1.2rem; padding: 61px 0; display: inline-block; }
nav a:hover, nav a.on { color: var(--accent); }
nav .caret { font-size: 1em; margin-left: 4px; position: relative; top: -1px; }
nav .menu { display: none; position: absolute; top: 100%; left: -16px; background: var(--surface); border: 1px solid var(--line);
            border-top: 3px solid var(--accent); min-width: 230px; padding: 8px 0; }
nav .item:hover .menu, nav .item:focus-within .menu { display: block; }
nav .menu a { display: block; padding: 8px 16px; font-weight: 500; }

/* === Home hero === */
.hero { padding: 104px 0 96px; background: linear-gradient(135deg, #0f1419 0%, #13202a 100%); }
.kicker { color: var(--accent); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .85rem; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.12; margin: 12px 0 18px; max-width: 760px; }
.hero p { color: var(--muted); font-size: 1.15rem; max-width: 620px; margin: 0 0 32px; }
/* Hero with the stock photo: dark fade on the left keeps the headline readable. */
/* Left half fully solid so no half-visible face shows behind the text; photo fades in on the right. */
/* Many stops = a long soft fade, no visible edge where the photo starts. */
.hero.photo { background: linear-gradient(90deg, rgba(15,20,25,1) 0%, rgba(15,20,25,1) 30%, rgba(15,20,25,.95) 38%, rgba(15,20,25,.86) 46%,
                          rgba(15,20,25,.72) 54%, rgba(15,20,25,.55) 62%, rgba(15,20,25,.38) 70%, rgba(15,20,25,.22) 79%,
                          rgba(15,20,25,.1) 89%, rgba(15,20,25,.03) 100%),
                          url(img/hero.jpg) right 25% / cover no-repeat; padding: 150px 0 140px; }
.hero.photo p { color: #c9d1da; }
.hero-copy { display: inline-block; max-width: 640px; }
.hero-copy .go { text-align: right; }
/* Highlighted words in a headline: accent color + underline. */
.hl { white-space: nowrap; color: var(--accent); text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 8px; }

/* === Bars with a stock photo behind them (macrx uses three of these) === */
.bar.photo { background-size: cover; background-position: center; background-repeat: no-repeat; padding: 96px 0; }
.bar.photo p { color: #c9d1da; }
.bar.photo-why { background-image: linear-gradient(90deg, rgba(15,20,25,.25) 0%, rgba(15,20,25,.85) 50%, rgba(15,20,25,.97) 100%), url(img/chart-review.jpg); }
.bar.photo-webinar { background-image: linear-gradient(rgba(15,20,25,.82), rgba(15,20,25,.82)), url(img/tablet-team.jpg); }
/* One photo per page so the link panels don't repeat the home page's picture. */
.bar.photo-about    { background-image: linear-gradient(rgba(15,20,25,.82), rgba(15,20,25,.82)), url(img/about-consult.jpg); }
.bar.photo-services { background-image: linear-gradient(rgba(15,20,25,.84), rgba(15,20,25,.84)), url(img/services-monitors.jpg); }
.bar.photo-pricing  { background-image: linear-gradient(rgba(15,20,25,.82), rgba(15,20,25,.82)), url(img/pricing-laptop.jpg); }

/* === Service area map bar === */
.mapgrid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.mapgrid img { width: 100%; height: auto; display: block; }

/* === Inner page title band === */
.pagehead { padding: 72px 0 56px; background: linear-gradient(135deg, #0f1419 0%, #13202a 100%); border-bottom: 1px solid var(--line); }
.pagehead h1 { font-size: clamp(2rem, 4.5vw, 2.9rem); margin: 8px 0 10px; }
.pagehead p { color: var(--muted); font-size: 1.1rem; margin: 0; max-width: 820px; }
.pagehead p + p { margin-top: 14px; }

/* Page title placed inside a content section instead of its own band (About page). */
.inline-title { font-size: clamp(2rem, 4.5vw, 2.9rem); margin: 8px 0 18px; }
.two h2.apart { margin-top: 38px; }   /* lines the right column up under the title */

/* === Cards === */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.card { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--accent); padding: 30px 26px; border-radius: 6px; }
.card h3 { font-size: 1.25rem; }
.card p { color: var(--muted); margin: 0 0 18px; }
/* Home service cards: centered with a line-art icon on top (mirrors macrx's icon cards). */
.iconcards .card { text-align: center; display: flex; flex-direction: column; }
.iconcards .card a.more { margin-top: auto; }  /* keeps the three LEARN MORE links on one line */
.card img.ico { width: 72px; height: 72px; display: block; margin: 0 auto 18px; }
.card a.more { font-weight: 700; text-decoration: none; letter-spacing: .05em; font-size: .85rem; text-transform: uppercase; }

/* === Two-column text === */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }

/* === CTA bands === */
.band p { max-width: 700px; margin: 0 auto 24px; }

/* === Forms (contact, newsletter, webinar) === */
form.f { max-width: 640px; display: grid; gap: 14px; }
form.f label { font-weight: 600; font-size: .9rem; }
form.f input, form.f textarea { width: 100%; background: var(--surface); color: var(--text); border: 1px solid var(--line);
                                border-radius: 4px; padding: 11px 12px; font: inherit; }
form.f .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
form.f .hp { display: none; }                      /* spam trap field */
.form-status { margin: 4px 0 0; font-weight: 600; min-height: 1.4em; }
.form-status.ok { color: var(--accent); }
.form-status.err { color: #e07a6a; }

/* === Footer === */
footer { background: #0a0e12; color: var(--muted); font-size: .88rem; padding: 40px 0; border-top: 1px solid var(--line); }
/* Four columns: logo | mailing address | Contact button | icons + copyright. Equal widths, so the gaps match. */
footer .cols { display: grid; grid-template-columns: auto 1fr 1fr auto; gap: 32px; align-items: center; }
footer .cols > div:last-child { justify-self: end; }
footer .foot-right { align-self: end; text-align: right; }   /* bottom-right corner */
footer .foot-btn { text-align: center; }
footer a { color: var(--muted); }
footer p { margin: 4px 0; color: var(--muted); }
footer .btn.small { padding: 8px 18px; font-size: .78rem; color: #0b1013; margin-top: 6px; }
footer .foot-mid { text-align: center; white-space: nowrap; }
footer .foot-mid .label { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
footer .foot-icons { display: flex; gap: 14px; align-items: center; justify-content: flex-end; }
footer .copy { font-size: .8rem; margin-top: 12px; text-align: right; white-space: nowrap; }
footer .fine { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 16px; font-size: .8rem; }

/* === Newsletter popup (built by popup.js) === */
.pop-back { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.pop { position: relative; background: var(--surface); border: 10px solid #26413f; outline: 1px solid var(--accent);
       max-width: 560px; width: 100%; padding: 40px 32px 32px; text-align: center; border-width: 6px; }
.pop-x { position: absolute; top: 10px; right: 14px; background: none; border: 0; color: var(--text); font-size: 1.8rem; line-height: 1; cursor: pointer; }
.pop-x:hover { color: var(--accent); }
.pop-kicker { letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; color: var(--text); margin-bottom: 10px; }
.pop-line { font-size: 1.15rem; line-height: 1.4; color: var(--text); margin: 0 auto 18px; max-width: 460px; }
.pop hr { width: 60px; border: 0; border-top: 1px solid var(--muted); margin: 0 auto 20px; }
.pop .btn { padding: 10px 22px; font-size: .8rem; }

/* === Two side-by-side call-out panels with icons (macrx: pricing | talk) === */
.split { display: grid; grid-template-columns: 1fr 1fr; }
.split > div { display: flex; gap: 20px; align-items: flex-start; padding: 4px 36px; text-align: left; }
.split > div + div { border-left: 2px solid var(--accent); }
.split img { width: 56px; height: 56px; flex: none; }
.split h2 { font-size: 1.2rem; color: var(--accent); margin-bottom: 10px; }
.split p { font-size: .92rem; }
.split .btn { padding: 10px 22px; font-size: .8rem; }
.bar.photo:has(.split) { padding: 64px 0; }

/* === Small screens === */
@media (max-width: 860px) {
  .two, .mapgrid, .split, form.f .pair, footer .cols { grid-template-columns: 1fr; }
  footer .cols > div { justify-self: center; text-align: center; }
  .split > div + div { border-left: 0; border-top: 2px solid var(--accent); padding-top: 32px; margin-top: 24px; }
  .pop { padding: 52px 22px 36px; } .pop-line { font-size: 1.2rem; }
  .hero.photo { padding: 80px 0 72px; }
  header .wrap { height: auto; flex-direction: column; padding-top: 10px; }
  nav { gap: 14px; flex-wrap: wrap; justify-content: center; }
  nav a { padding: 8px 0; font-size: .85rem; }
  .hero { padding: 64px 0 56px; }
  .util .wrap { justify-content: center; }
}
