/* ============================================================
   Brooks Internet Software — site.css
   Brand: "Ember" dark theme (Phil's brand guidelines, draft 0.1).
   Palette is defined once as tokens in :root — change a value there
   to retune the whole site. Experimental; expect iteration.
   ============================================================ */

:root {
  /* Foundation */
  --ink:        #0A1626;  /* base background — the anchor */
  --navy-850:   #0D1D30;  /* raised surfaces: header, nav, footer */
  --slate-800:  #1E2A3A;  /* cards, panels, inputs */
  --border:     #26364a;  /* hairlines / dividers (derived) */

  /* Text on dark */
  --text:       #E8EEF6;  /* Cloud — primary */
  --text-dim:   #9DB0C8;  /* Slate — secondary */
  --text-muted: #6B7E97;  /* Muted */
  --mist:       #CCD6F6;  /* soft tint */
  --white:      #FFFEFF;

  /* Ember accents */
  --primary:    #3B9EE0;  /* azure — links, primary actions */
  --primary-hi: #7cc3f0;  /* azure hover (lightened) */
  --warm:       #FF6B35;  /* orange — key CTAs, badges */
  --warm-hi:    #ff8a5f;  /* orange hover (lightened) */
  --support:    #5AE6E0;  /* cyan — support accent */
}

/* ── Reset / base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, 'Segoe UI', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  background: var(--ink);
  color: var(--text);
}
a { color: var(--primary); }
a:hover { color: var(--primary-hi); }
img { max-width: 100%; height: auto; }

/* ── Typography (brand type scale) ────────────────────────────
   Inter carries headings + body; JetBrains Mono is an accent only
   (eyebrows, numbers, tags, code). Sentence case; nothing > 700. */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', -apple-system, 'Segoe UI', Arial, sans-serif;
  color: var(--text);
  line-height: 1.15;
  margin: 1.5rem 0 0.75rem;
}
h1 { font-size: clamp(2rem, 5vw, 3.375rem); font-weight: 700; letter-spacing: -0.02em; } /* 54px cap */
h2 { font-size: clamp(1.5rem, 3.5vw, 2.375rem); font-weight: 600; letter-spacing: -0.01em; } /* 38px cap */
h3 { font-size: 1.25rem; font-weight: 600; }  /* 20px */
h4 { font-size: 1.05rem; font-weight: 600; }

code, kbd, samp, pre {
  font-family: 'JetBrains Mono', ui-monospace, Consolas, 'Courier New', monospace;
  font-size: 0.9em;
}
pre {
  background: var(--slate-800);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.9rem 1rem;
  border-radius: 4px;
  overflow-x: auto;
}

/* Eyebrow / label — mono accent per brand (uppercase, wide tracking) */
.eyebrow {
  display: inline-block;
  font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
}

/* ── Header top row ───────────────────────────────────────── */
#site-header {
  background: var(--ink);
  border-bottom: 1px solid var(--border);
}
.header-top {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1.5rem;
}
.site-logo img { height: 60px; width: auto; }
.header-banner { flex: 1; }
.banner-tagline { font-size: 1.1rem; font-weight: bold; color: var(--mist); }

/* ── Main nav ─────────────────────────────────────────────── */
.main-nav {
  background: var(--navy-850);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
}
.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.nav-item { position: relative; }

.nav-link {
  display: block;
  padding: 0.6rem 1rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  white-space: nowrap;
}
.nav-link:hover {
  background: var(--slate-800);
  color: var(--white);
}
/* Download call-to-action — warm accent, prominent on every page */
.nav-link.nav-cta {
  margin: 0.2rem 0.5rem;
  padding: 0.4rem 1.1rem;
  background: var(--warm);
  color: var(--ink);
  font-weight: 700;
  border-radius: 4px;
}
.nav-link.nav-cta:hover {
  background: var(--warm-hi);
  color: var(--ink);
}
.dropdown-arrow { font-size: 0.65em; margin-left: 0.3em; }

/* ── Dropdown menu ────────────────────────────────────────── */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--slate-800);
  border: 1px solid var(--border);
  box-shadow: 0 3px 8px rgba(0,0,0,0.4);
  list-style: none;
  margin: 0;
  padding: 0.25rem 0;
  min-width: 200px;
  z-index: 100;
}
.has-dropdown:hover .dropdown-menu,
.has-dropdown:focus-within .dropdown-menu {
  display: block;
}
.dropdown-item {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  white-space: nowrap;
}
.dropdown-item:hover {
  background: var(--navy-850);
  color: var(--primary);
}

/* ── Main content ─────────────────────────────────────────── */
#main-content {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* ── Footer ───────────────────────────────────────────────── */
#site-footer {
  background: var(--navy-850);
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  padding: 2rem 1.5rem 1rem;
  font-size: 0.9rem;
  margin-top: 3rem;
}
#site-footer a { color: var(--text); }
#site-footer a:hover { color: var(--primary-hi); }
#site-footer h4 { margin: 0.5rem 0; color: var(--text); }

.footer-columns {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  max-width: 960px;
  margin: 0 auto 1.5rem;
}
.footer-col p { margin: 0.4rem 0; }
.footer-copyright { color: var(--text); }
.footer-social { display: flex; gap: 0.5rem; margin-top: 0.75rem; align-items: center; }
.footer-social img { display: block; }

/* Green "download free trial" pill in the footer (echoes the old
   right-column button). Scoped to the footer to beat the generic
   #site-footer a color. */
.btn-download {
  display: inline-block;
  padding: 0.55rem 1.35rem;
  border-radius: 999px;
  background: linear-gradient(100deg, #8fe040, #33d6c4);
  color: #06371f;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
  transition: filter 0.15s;
}
.btn-download:hover { filter: brightness(1.07); color: #06371f; }
/* Footer placement + beat the generic #site-footer a color */
#site-footer .btn-download { margin: 0 0 1rem; color: #06371f; }
#site-footer .btn-download:hover { color: #06371f; }

/* ── Lists ────────────────────────────────────────────────── */
ol ol { list-style-type: lower-alpha; }
ol ol ol { list-style-type: lower-roman; }

/* ── Activation / contact forms ──────────────────────────── */
.activation-form { max-width: 560px; }
.form-field {
  display: grid;
  grid-template-columns: 210px 22px 1fr;
  align-items: center;
  gap: 0.4rem 0.5rem;
  margin-bottom: 0.75rem;
}
.field-label { font-weight: 600; font-size: 0.95rem; }
.field-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background: var(--primary);
  color: var(--ink);
  border-radius: 50%;
  font-size: 10px;
  font-style: italic;
  font-weight: bold;
  cursor: help;
  flex-shrink: 0;
  user-select: none;
}
.activation-form input[type="text"],
.activation-form select {
  width: 100%;
  padding: 0.3rem 0.5rem;
  background: var(--slate-800);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 0.95rem;
  box-sizing: border-box;
}
.activation-form input[readonly] { background: var(--ink); color: var(--text-muted); }

.contact-form { max-width: 600px; }
.contact-form .form-field {
  display: block;
  margin-bottom: 1rem;
}
.contact-form .field-label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 0.35rem 0.5rem;
  background: var(--slate-800);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 0.95rem;
  box-sizing: border-box;
  font-family: inherit;
}
.contact-form textarea { resize: vertical; }
.contact-form .field-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}
.form-actions {
  margin-top: 1.25rem;
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}
.form-actions input[type="submit"],
.form-actions input[type="reset"] {
  padding: 0.45rem 1.5rem;
  border-radius: 4px;
  font-size: 0.95rem;
  cursor: pointer;
  border: 2px solid var(--primary);
  transition: background 0.15s, color 0.15s;
}
.form-actions input[type="submit"] { background: var(--primary); color: var(--ink); }
.form-actions input[type="submit"]:hover { background: transparent; color: var(--primary); }
.form-actions input[type="reset"] { background: transparent; color: var(--primary); }
.form-actions input[type="reset"]:hover { background: var(--primary); color: var(--ink); }

/* ── Tables ───────────────────────────────────────────────── */
table { border-collapse: collapse; width: 100%; margin: 1rem 0; }
th, td { border: 1px solid var(--border); padding: 0.5rem 0.75rem; text-align: left; }
th { background: var(--slate-800); color: var(--text); font-weight: bold; }
tr:nth-child(even) td { background: var(--navy-850); }

.contact-table td { padding: 0.75rem 1rem; vertical-align: top; }

/* Phone/fax icons are legacy black-on-transparent PNGs; invert so they
   read as light on the dark background. */
.contact-icon {
  width: 30px;
  height: 30px;
  vertical-align: middle;
  margin-right: 0.4rem;
  filter: invert(1);
  opacity: 0.85;
}

/* Full-color social brand logos — common height, keep their aspect. */
.social-icon {
  height: 20px;
  width: auto;
  vertical-align: middle;
  margin-right: 0.6rem;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 0.45rem 1.1rem;
  border-radius: 4px;
  background: var(--primary);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  border: 2px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  cursor: pointer;
}
.btn:hover {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
/* Warm CTA — reserve for key calls to action (Ember accent) */
.btn-warm { background: var(--warm); color: var(--ink); }
.btn-warm:hover { background: transparent; color: var(--warm-hi); border-color: var(--warm); }
.btn-cart {
  background: #2fa336;
  color: var(--ink);
  border-color: transparent;
}
.btn-cart:hover {
  background: transparent;
  color: #4cc253;
  border-color: #2fa336;
}
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.25rem 0;
}
.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: var(--ink);
}

/* ── Side navigation box ──────────────────────────────────── */
.sidenav {
  float: right;
  clear: right;
  margin: 0 0 1rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  max-width: 240px;
  background: var(--slate-800);
}
.sidenav h3 { margin: 0 0 0.4rem; font-size: 1rem; }
.sidenav ul { margin: 0.25rem 0 0; padding-left: 1.2rem; }
.sidenav li { margin: 0.15rem 0; }

/* ── Image float helpers ──────────────────────────────────── */
.img-right {
  float: right;
  clear: right;
  margin: 0 0 1rem 1.5rem;
  max-width: 300px;
}
.img-left {
  float: left;
  margin: 0 1.5rem 1rem 0;
  max-width: 300px;
}
.img-clear { clear: both; }
.img-right img, .img-left img { width: 100%; height: auto; display: block; }
/* Frame screenshots so light UI captures read as intentional on navy */
.img-right img, .img-left img, figure img {
  background: #fff;
  padding: 4px;
  border-radius: 4px;
}
figcaption {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
  line-height: 1.4;
}

/* ── Header search form ───────────────────────────────────── */
.header-search form { display: flex; gap: 0.25rem; }
.header-search input[type="search"] {
  padding: 0.3rem 0.5rem;
  background: var(--slate-800);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 0.85rem;
  width: 160px;
}
.header-search input[type="search"]::placeholder { color: var(--text-dim); }
.header-search button {
  padding: 0.3rem 0.6rem;
  background: var(--primary);
  color: var(--ink);
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
}
.header-search button:hover { background: var(--primary-hi); }

/* ── Search results page ──────────────────────────────────── */
.search-page { max-width: 800px; }

/* ── Search modal ─────────────────────────────────────────────
   Left intentionally light: Pagefind ships its own light UI inside
   #pagefind-modal-inner. Theming Pagefind to dark is a follow-up. */
#pagefind-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
  z-index: 1000;
}
#pagefind-modal-inner {
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.45);
  padding: 1rem;
  width: min(640px, 90vw);
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}
#pagefind-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
  line-height: 1;
}

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--slate-800);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin-bottom: 1.25rem;
}
.card-header {
  background: var(--navy-850);
  color: var(--white);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.card-header a { color: var(--white); }
.card-body {
  padding: 0.85rem 1rem;
  flex: 1;
  font-size: 0.95rem;
}
.card-body p:first-child { margin-top: 0; }
.card-body p:last-child { margin-bottom: 0; }
.card-badge {
  background: var(--warm);
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Card grid layout */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1rem 0 2rem;
}
.card-grid .card { margin-bottom: 0; }
@media (max-width: 720px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .card-grid { grid-template-columns: 1fr; }
}

/* ── Reseller region cards ────────────────────────────────────
   3-across grid (matches the live site). The region maps are
   pre-processed white silhouettes on transparent backgrounds
   (from d-maps.com, keyed + trimmed), so they render as-is. */
.region-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1rem 0 2rem;
}
.region-cards .card { margin-bottom: 0; }
.region-cards .card-body { text-align: center; }
@media (max-width: 720px) { .region-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .region-cards { grid-template-columns: 1fr; } }
.map-credit { font-size: 0.8rem; color: var(--text-muted); margin-top: 1.5rem; }
.map-credit a { color: var(--text-dim); }

/* Reseller logos sit in the info-table header (empty first cell + logo in the
   second). Give them a white "chip" so dark/transparent logos show on the
   dark theme, and a uniform height so sizes are consistent. */
.page-content thead th:empty + th img {
  height: 64px;
  width: auto;
  max-width: 260px;
  background: #fff;
  padding: 8px;
  border-radius: 4px;
}
/* Logos built for dark backgrounds (white/colored art or a dark baked-in
   background): drop the white chip so they show without a white border. */
.page-content thead th:empty + th img[src*="itec-white"],
.page-content thead th:empty + th img[src*="interfacesystems-logo"],
.page-content thead th:empty + th img[src*="cfc-consulting"],
.page-content thead th:empty + th img[src*="targetware"],
.page-content thead th:empty + th img[src*="cheer-chain"],
.page-content thead th:empty + th img[src*="linksoft_logo"],
.page-content thead th:empty + th img[src*="mak.png"],
.page-content thead th:empty + th img[src*="paradisia_logo_white"] {
  background: transparent;
}

/* Backward compat: H3/H4 as title inside old-style cards (no title param) */
.card-body > h3:first-child,
.card-body > h4:first-child {
  margin-top: 0;
  font-size: 1rem;
  color: var(--primary);
}

/* ── Alert / callout boxes (dark-tinted) ────────────────────── */
.alert {
  padding: 0.9rem 1rem 0.9rem 1.25rem;
  margin: 1.25rem 0;
  border-radius: 0 4px 4px 0;
  color: var(--text);
}
.alert-success { background: rgba(46,204,113,0.12); border-left: 5px solid #2ecc71; color: #bff3d4; }
.alert-info    { background: rgba(59,158,224,0.12); border-left: 5px solid var(--primary); color: var(--mist); }
.alert-warning { background: rgba(255,107,53,0.12); border-left: 5px solid var(--warm); color: #ffd3c1; }
.alert-danger  { background: rgba(255,90,90,0.13); border-left: 5px solid #ff5a5a; color: #ffcccc; }
.alert p:first-child { margin-top: 0; }
.alert p:last-child  { margin-bottom: 0; }

/* ── Announcement strip (temporary site-wide notice) ────────── */
.announce-bar {
  background: var(--slate-800);
  color: var(--text);
  font-size: 0.95rem;
  border-top: 2px solid var(--primary);
  border-bottom: 1px solid var(--border);
}
.announce-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.5rem 3rem 0.5rem 1.5rem; /* right pad leaves room for close btn */
  position: relative;
}
.announce-msg { margin: 0; text-align: center; }
.announce-tag {
  display: inline-block;
  background: var(--primary);
  color: var(--ink);
  border-radius: 3px;
  padding: 0.05rem 0.4rem;
  margin-right: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.announce-bar a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
}
.announce-bar a:hover { text-decoration: none; color: var(--primary-hi); }
.announce-close {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  padding: 0 0.25rem;
  background: none;
  border: 0;
  color: var(--text-dim);
  font-size: 1.4rem;
  line-height: 1;
  opacity: 0.8;
  cursor: pointer;
}
.announce-close:hover { opacity: 1; color: var(--text); }

/* ── Video embeds ───────────────────────────────────────────── */
/* Hugo's {{< youtube >}} shortcode outputs a fully responsive
   wrapper with inline styles; we just cap the width. */
.single-page iframe[src*="youtube"] {
  max-width: 100%;
}
.video-portal-entry {
  margin-bottom: 2.5rem;
}
.video-portal-entry > div {
  max-width: 720px;
}

/* ── Responsive header ────────────────────────────────────────
   Let the header row wrap on small screens: logo + search stay on
   top, the tagline drops to its own full-width line, centered. */
@media (max-width: 720px) {
  .header-top {
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    padding: 0.5rem 1rem;
  }
  .header-banner {
/* ── Responsive header ────────────────────────────────────────
   Let the header row wrap on small screens: logo + search stay on
   top, the tagline drops to its own full-width line, centered. */
@media (max-width: 720px) {
rem 1rem;
    padding: 0.5rem 1rem;
  }
  .header-banner {
    order: 3;              /* push tagline below the logo/search row */
    flex-basis: 100%;
  }
  .banner-tagline {
    display: block;
    text-align: center;
    font-size: 0.95rem;
    line-height: 1.3;
  }
  .header-search { margin-left: auto; }   /* keep search at right of row 1 */
  .header-search input[type="search"] { width: 130px; }
}

@media (max-width: 480px) {
  .site-logo img { height: 44px; }
  .banner-tagline { font-size: 0.85rem; }
  .header-search form { width: 100%; }
  .header-search input[type="search"] { width: 100%; flex: 1; }
}
