/*
Theme Name:   LangMAC Child
Theme URI:    https://langmac.ca
Description:  Child theme of GeneratePress for the Lang Marketing Analytics Centre working paper series (langmac.ca). Carries the same warm-paper design system as the souravray.ca academic site, plus the header day/night toggle.
Author:       Marketing Analytics Centre, Gordon S. Lang School of Business and Economics
Author URI:   https://www.uoguelph.ca/lang/
Template:     generatepress
Version:      1.1.0
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  langmac-child
*/

/* ==========================================================================
   Do not edit this file to change the site's look.

   All of the design lives in  assets/css/style.css  inside this theme
   folder, which is the same file the standalone version uses. Keeping it
   separate means one stylesheet serves both the static page and WordPress.

   This file only holds the theme header WordPress requires, plus the small
   number of rules needed to make the GeneratePress shell get out of the way.
   ========================================================================== */

/* GeneratePress shell ----------------------------------------------------- */

/* The site header becomes the thin title bar from the schematic: site title
   on the left, day/night toggle hard right. */
.site-header .inside-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: nowrap;
}

.site-header .site-branding {
  min-width: 0;
}

.site-header .main-title {
  font-family: var(--font-display, Georgia, serif);
  font-weight: 400;
  letter-spacing: -0.005em;
}

.site-header .site-description {
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted, #6a6358);
}

/* One page, no menu: keep the header from reserving nav space. */
.main-navigation {
  display: none;
}

/* The page is a single Custom HTML block that supplies its own footer,
   so GeneratePress's own page title and footer bar are suppressed by
   functions.php; this hides the leftover wrapper padding. */
.page .entry-content {
  margin-top: 0;
}

.page .site-content .content-area,
.page .site-content .site-main,
.page .site-content .entry-content {
  margin: 0;
  padding: 0;
  max-width: none;
}

.page .site-content {
  padding: 0;
}

.page .entry-header {
  display: none;
}

.site-footer {
  display: none;
}

/* Below 400px the uppercase tagline is dropped so the title and the toggle
   never collide. */
@media (max-width: 400px) {
  .site-header .site-description {
    display: none;
  }
}


/* ==========================================================================
   GeneratePress shell, part 2 — added in 1.1.0

   GeneratePress wraps every page in its own containers, and those containers
   carry their own background colour and their own maximum width, set in the
   Customizer. Left alone they do two visible things wrong:

     * the page sits in a fixed-width white box, so the full-width section
       bands and the wide reading column of the design never appear;
     * night mode only repaints the design's own elements, leaving the
       GeneratePress box light — pale text on a cream card.

   The rules below hand layout and colour back to the design system. They are
   deliberately written against GeneratePress's own class names so they keep
   working whatever the Customizer is set to, and they are scoped to
   body.mac-site so nothing here can leak into an unrelated theme.
   ========================================================================== */

/* Let the containers span the viewport and inherit the page background,
   instead of drawing a fixed-width card of their own. */
body.mac-site #page,
body.mac-site .site-content,
body.mac-site .content-area,
body.mac-site .site-main,
body.mac-site .inside-article,
body.mac-site .entry-content,
body.mac-site .page .inside-article {
  max-width: none;
  width: auto;
  margin: 0;
  padding: 0;
  background: none;
  background-color: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
}

body.mac-site .site-content {
  display: block;
}

/* Belt and braces: if a sidebar is ever switched back on in the Customizer,
   it stays out of this page's way. functions.php disables it properly. */
body.mac-site .widget-area,
body.mac-site #right-sidebar,
body.mac-site #left-sidebar {
  display: none;
}

/* The header bar. Full-bleed background, inner content aligned to the same
   reading column as the page body. */
body.mac-site .site-header {
  background-color: var(--color-surface, #fdfbf7);
  border-bottom: 1px solid var(--color-divider, #e2dbcd);
  color: var(--color-text, #1f1c18);
  padding: 0;
}

body.mac-site .site-header .inside-header {
  width: 100%;
  max-width: var(--content, 52rem);
  margin-inline: auto;
  padding: var(--space-3, 0.75rem) var(--space-5, 1.5rem);
  min-height: 4.25rem;
}

body.mac-site .site-header .main-title,
body.mac-site .site-header .main-title a {
  color: var(--color-text, #1f1c18);
}

/* Night mode has to reach GeneratePress's own chrome too. */
[data-theme='dark'] body.mac-site .site-header,
[data-theme='dark'] body.mac-site #page,
[data-theme='dark'] body.mac-site .site-content,
[data-theme='dark'] body.mac-site .inside-article {
  background-color: transparent;
}

[data-theme='dark'] body.mac-site .site-header {
  background-color: var(--color-surface);
}

/* GeneratePress paints the html/body background from the Customizer, which
   is a fixed colour and does not know about night mode. The design system
   owns both. */
body.mac-site,
html:has(body.mac-site) {
  background-color: var(--color-bg, #faf7f1);
}

/* The branding block: title and tagline tight together, no link underline.
   Without this the design system's paragraph margins push the tagline a
   long way below the title and the site title renders underlined. */
body.mac-site .site-header .main-title {
  margin: 0;
  line-height: 1.2;
  font-size: var(--text-lg, 1.25rem);
}

body.mac-site .site-header .main-title a {
  text-decoration: none;
  color: var(--color-text, #1f1c18);
}

body.mac-site .site-header .main-title a:hover,
body.mac-site .site-header .main-title a:focus-visible {
  color: var(--color-primary, #8c1c2f);
}

body.mac-site .site-header .site-description {
  margin: 0.1rem 0 0;
}
