/* =========================================================================
   Shrock Services, LLC — site.css
   Mobile-first responsive stylesheet for the dev/ rebuild.
   Brand: maroon #710000 + blue accent #3169C6 on white.
   ========================================================================= */

:root {
  /* Black-and-red palette: deep red accents on near-black structure. */
  --maroon: #8a1212;        /* deep red — headings, buttons, borders, accents */
  --maroon-dark: #6b0d0d;   /* red hover */
  --maroon-darker: #141414; /* near-black — footer */
  --black: #1b1b1b;         /* near-black — nav bar */
  --blue: #1d1d1d;          /* (repurposed) near-black secondary */
  --blue-dark: #7a1010;     /* (repurposed) deep red for links / eyebrow */
  --ink: #232323;
  --muted: #5d5d5d;
  --line: #e4e4e4;
  --bg: #ffffff;
  --bg-soft: #f6f5f3;
  --bg-band: #f7f6f4;
  --warm-grey: #adaa9c;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 6px 20px rgba(0,0,0,.05);
  --container: 1000px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---- Reset / base ------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: #e7e4e0;
}

/* The whole site sits in a white "card" framed in thin maroon, floated off the page. */
.app-frame {
  max-width: var(--container);
  margin: 14px auto;
  background: var(--bg);
  border: 1px solid var(--maroon);
  border-radius: 16px;
  box-shadow: 0 10px 34px rgba(0,0,0,.16);
  overflow: hidden;
}
@media (max-width: 1040px) { .app-frame { margin: 16px; border-radius: 12px; } }
img { max-width: 100%; height: auto; }
iframe { max-width: 100%; }
a { color: var(--blue-dark); }
a:hover { color: var(--maroon); }
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; color: var(--maroon); margin: 0 0 .5em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.7rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 18px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--maroon); color: #fff; padding: 10px 16px; z-index: 1000;
}
.skip-link:focus { left: 8px; top: 8px; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* ---- Header / brand bar ------------------------------------------------- */
.site-header { background: var(--bg); }
.header-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px 24px; padding-top: 14px; padding-bottom: 14px;
}
.brand { display: inline-flex; align-items: center; gap: 13px; text-decoration: none; }
.brand-mark {
  display: block; flex: 0 0 auto;
  width: 52px; height: 52px; border-radius: 12px;
  box-shadow: 0 2px 6px rgba(138,18,18,.35);
}
.brand-name { display: flex; flex-direction: column; line-height: 1.04; }
.brand-name-top { font-weight: 800; font-size: 1.6rem; letter-spacing: -.01em; color: var(--ink); }
.brand-name-top .brand-first { color: var(--maroon); }
.brand-name-top .brand-llc { font-weight: 600; font-size: .62em; color: var(--muted); vertical-align: .12em; letter-spacing: .04em; }
.brand-name-sub { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
@media (max-width: 480px) {
  .brand-mark { width: 44px; height: 44px; }
  .brand-name-top { font-size: 1.3rem; }
  .brand-name-sub { font-size: .64rem; letter-spacing: .1em; }
}
.brand-meta { font-size: .92rem; line-height: 1.5; color: var(--ink); text-align: right; }
.brand-meta a { color: var(--ink); text-decoration: none; }
.brand-meta a:hover { color: var(--maroon); text-decoration: underline; }

/* ---- Navigation --------------------------------------------------------- */
/* Nav bar is inset to the centered container width (not full-bleed), maroon. */
.site-nav { background: transparent; }
.nav-inner { position: relative; background: var(--maroon-dark); }
.nav-toggle {
  display: none; align-items: center; gap: 8px;
  background: transparent; border: 0; color: #fff; font: inherit; font-weight: 600;
  padding: 14px 0; cursor: pointer;
}
.nav-toggle-bar { display: block; width: 22px; height: 2px; background: #fff; position: relative; }
.nav-toggle-bar + .nav-toggle-bar { margin-top: 5px; }
.nav-toggle-label { margin-left: 6px; }

.nav-menu { list-style: none; display: flex; flex-wrap: wrap; margin: 0; padding: 0; }
.nav-item { position: relative; }
.nav-item > a {
  display: block; padding: 14px 16px; color: #fff; text-decoration: none;
  font-weight: 600; font-size: .98rem;
}
.nav-item > a:hover, .nav-item > a[aria-current="page"] { background: var(--maroon); color: #fff; }

.submenu-toggle { display: none; }

.submenu {
  list-style: none; margin: 0; padding: 6px 0; min-width: 220px;
  position: absolute; top: 100%; left: 0; z-index: 50;
  background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--blue);
  box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(4px);
  transition: opacity .12s ease, transform .12s ease;
}
.nav-item.has-children:hover > .submenu,
.nav-item.has-children:focus-within > .submenu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.submenu a {
  display: block; padding: 9px 16px; color: var(--ink); text-decoration: none; font-size: .95rem;
}
.submenu a:hover, .submenu a[aria-current="page"] { background: var(--bg-soft); color: var(--maroon); }

/* ---- Mobile nav --------------------------------------------------------- */
@media (max-width: 860px) {
  .header-inner { justify-content: center; text-align: center; }
  .brand-meta { text-align: center; }
  .nav-toggle { display: inline-flex; }
  .nav-menu {
    display: none; flex-direction: column; width: 100%;
    border-top: 1px solid rgba(255,255,255,.2);
  }
  .nav-menu.open { display: flex; }
  .nav-item { width: 100%; }
  .nav-item > a { padding: 13px 4px; border-bottom: 1px solid rgba(255,255,255,.12); }
  .submenu-toggle {
    display: block; position: absolute; top: 4px; right: 0;
    width: 46px; height: 46px; background: transparent; border: 0;
    color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer;
  }
  .submenu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; border-top: 0; display: none;
    background: rgba(0,0,0,.16); min-width: 0;
  }
  .submenu.open { display: block; }
  .submenu a { color: #fff; padding-left: 22px; }
  .submenu a:hover, .submenu a[aria-current="page"] { background: rgba(0,0,0,.25); color: #fff; }
}

/* ---- Main / layout helpers --------------------------------------------- */
main.container { padding-top: 30px; padding-bottom: 48px; }
.page-header { margin-bottom: 1.5rem; }
.page-header p.lead { font-size: 1.12rem; color: var(--muted); }
.prose { max-width: 900px; }
.prose ul, .prose ol { margin: 0 0 1rem; padding-left: 1.3em; }
.prose li { margin-bottom: .4rem; }

/* ---- Hero --------------------------------------------------------------- */
.hero {
  display: grid; grid-template-columns: 160px 1fr; gap: 28px; align-items: center;
  background: var(--bg-band); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; margin-bottom: 32px;
}
.hero img.portrait { width: 160px; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
.eyebrow { color: var(--blue-dark); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: .82rem; margin-bottom: .3rem; }
@media (max-width: 640px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding: 22px; }
  .hero img.portrait { margin: 0 auto; width: 140px; }
}

/* ---- Cards -------------------------------------------------------------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin: 24px 0; }
/* Home service row: force a single row of 3 on tablet/desktop, wrap only on phones. */
@media (min-width: 720px) { .card-grid-3 { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.card h3 { margin-top: 0; }
.card p { color: var(--muted); flex: 1; }
.card a.card-link { font-weight: 600; text-decoration: none; }
.card a.card-link::after { content: " \2192"; }

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-block; background: var(--maroon); color: #fff !important; text-decoration: none;
  padding: 12px 22px; border-radius: 8px; font-weight: 600; border: 0; cursor: pointer; font: inherit; font-weight: 600;
}
.btn:hover { background: var(--maroon-dark); color: #fff; }
.btn-blue { background: var(--blue); }
.btn-blue:hover { background: var(--blue-dark); }

/* ---- Bands / callouts --------------------------------------------------- */
.band { background: var(--bg-soft); border-radius: var(--radius); padding: 24px; margin: 28px 0; }
.testimonial { border-left: 4px solid var(--blue); padding: 6px 0 6px 20px; color: var(--ink); font-style: italic; }
.testimonial cite { display: block; margin-top: .5rem; font-style: normal; font-weight: 600; color: var(--muted); }

/* ---- Forms -------------------------------------------------------------- */
.form-wrap { max-width: 680px; }
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-weight: 600; margin-bottom: 5px; }
.form-row input:not([type="submit"]):not([type="button"]):not([type="image"]),
.form-row select, .form-row textarea {
  width: 100%; padding: 11px 12px; font: inherit; color: var(--ink);
  border: 1px solid #bcbcbc; border-radius: 8px; background: #fff;
}
.form-row input[type="submit"], .form-row button { width: auto; }
.form-row textarea { min-height: 130px; resize: vertical; }
.form-row.req label::after { content: " *"; color: var(--maroon); }
.form-note { font-size: .9rem; color: var(--muted); }

/* ---- Code block --------------------------------------------------------- */
pre.code {
  background: #1f1f1f; color: #f0e9e9; padding: 16px 18px; border-radius: 8px;
  overflow-x: auto; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: .9rem; line-height: 1.5; border-left: 4px solid var(--maroon);
}
.prose code { background: var(--bg-soft); padding: 1px 5px; border-radius: 4px; font-size: .92em; }
.prose pre.code code { background: none; padding: 0; }

/* ---- Tables ------------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
table.data { border-collapse: collapse; width: 100%; }
table.data th, table.data td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
table.data th { background: var(--bg-soft); }

/* ---- Responsive media embeds ------------------------------------------- */
.embed { position: relative; padding-top: 56.25%; height: 0; margin: 18px 0; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---- Lesson video placeholder ------------------------------------------- */
.video-placeholder {
  max-width: 760px; background: var(--bg-soft); border: 1px dashed var(--maroon);
  border-radius: 8px; padding: 22px 24px; color: var(--ink);
}
.video-placeholder p { margin: 0 0 .6rem; }
.video-placeholder p:last-child { margin-bottom: 0; }

/* ---- Lesson pager ------------------------------------------------------- */
.lesson-pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.lesson-pager a:only-child { margin-left: auto; }

/* ---- Footer ------------------------------------------------------------- */
.site-footer { margin-top: 44px; color: #f3e7e7; }
.footer-inner {
  max-width: var(--container); margin: 0 auto;
  background: var(--maroon-dark);
}
.footer-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px; padding: 34px 28px 14px;
}
.footer-heading { color: #fff; font-size: 1.05rem; border-bottom: 1px solid rgba(255,255,255,.2); padding-bottom: 6px; margin-bottom: 12px; }
.site-footer a { color: #f7d9d9; }
.site-footer a:hover { color: #fff; }
.footer-links ul { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 8px; }
.badge-row { display: flex; gap: 12px; align-items: center; }
.badge-row img { background: #fff; border-radius: 8px; padding: 4px; }
.footer-tagline { margin-top: 14px; font-weight: 600; color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); padding: 14px 28px 22px; }
.affiliate-note { font-size: .85rem; color: #d8c2c2; margin-bottom: .3rem; }
.copyright { font-size: .85rem; color: #e8d3d3; margin: 0; }

/* ---- Utilities ---------------------------------------------------------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
