/*
Theme Name:   Help Sell My Cars
Theme URI:    https://helpsellmycars.com/
Description:  Astra child theme for Help Sell My Cars. Carries the site header, the site footer and the shared design tokens, so every page inherits the same chrome instead of each page carrying its own copy.
Author:       HelpSellMyCars
Author URI:   https://helpsellmycars.com/
Template:     astra
Version:      1.0.0
License:      GNU General Public License v2 or later
License URI:  https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  helpsellmycars
*/

/* ===========================================================================
   Design tokens

   Taken from the page CSS already running on the site rather than reinvented,
   so the chrome rendered by this theme and the content still rendered by the
   pages resolve to exactly the same values. If a page ever stops shipping its
   own :root block, these keep it looking the same.
   =========================================================================== */

:root {
  --ink:      #14161a;
  --asphalt:  #1d2126;
  --paper:    #f2f3f0;   /* label stock, cool rather than cream */
  --card:     #ffffff;
  --signal:   #ffd100;   /* FTC Buyer's Guide yellow */
  --alert:    #b3271e;
  --rule:     #ccccc4;
  --muted:    #6b7079;

  --display: 'Archivo', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;

  --shell: 1180px;
}

/* ===========================================================================
   Astra reset

   Astra wraps content in its own container with its own padding and max width.
   The pages are built as full-width blocks that manage their own shell, so the
   theme container is flattened rather than fought with inside every page.
   =========================================================================== */

.hsmc .site-content .ast-container,
.hsmc .entry-content,
.hsmc .site-content > .ast-container {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
  margin-left: 0;
  margin-right: 0;
}

.hsmc .entry-content > * {
  margin-block-start: 0;
}

.hsmc .site-content { padding: 0; }
.hsmc .ast-container { display: block; }

/*
 * Astra's own header and footer.
 *
 * functions.php unhooks them, which is the mechanism that should do the work.
 * This is the fallback: if a future Astra release renames those callbacks the
 * unhook silently stops matching, and without this the site would render two
 * headers rather than one. Hiding them cannot produce a broken page, so it is
 * the safe side to fail to.
 */
.hsmc #masthead.site-header,
.hsmc .site-footer:not(.hsmc-footer),
.hsmc .ast-above-header,
.hsmc .ast-below-header {
  display: none !important;
}

body.hsmc {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ===========================================================================
   Shared shell
   =========================================================================== */

.hsmc .shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===========================================================================
   Site header

   Markup and styling lifted from the header the pages were already rendering,
   so moving it into the theme changes where it comes from and nothing about
   how it looks.
   =========================================================================== */

.hsmc-bar {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 50;
}

.hsmc-bar__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.hsmc-bar__in > * { margin-right: 16px; }
.hsmc-bar__in > *:last-child { margin-right: 0; }

.hsmc-brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -.02em;
  font-size: 18px;
  color: var(--ink);
  text-decoration: none;
}

.hsmc-brand span {
  margin-left: 9px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--muted);
  font-weight: 500;
}

.hsmc-bar__cta {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  font-weight: 600;
  color: var(--ink);
  border: 1.5px solid var(--ink);
  padding: 9px 15px;
  background: var(--signal);
}

.hsmc-bar__cta:hover {
  background: var(--ink);
  color: var(--signal);
}

/* ===========================================================================
   Site footer
   =========================================================================== */

.hsmc-footer {
  border-top: 1px solid var(--rule);
  background: var(--paper);
  padding: 28px 0;
  margin-top: 0;
}

.hsmc-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--muted);
  text-transform: uppercase;
}

.hsmc-foot a { color: inherit; text-decoration: none; }
.hsmc-foot a:hover { color: var(--ink); }

/* ===========================================================================
   Narrow screens

   The CTA is hidden on small screens, matching the behaviour the pages
   already had, so the brand keeps the bar to itself rather than wrapping.
   =========================================================================== */

@media (max-width: 760px) {
  .hsmc-bar__in { padding: 15px 0; height: auto; }
  .hsmc-bar__cta { display: none; }
  .hsmc .shell { padding: 0 18px; }
  .hsmc-foot { flex-direction: column; gap: 6px; }
}
