/* ==========================================================================
   MindfulHeads Brand CSS
   Implements typography, colors, layout, and basic components
   ========================================================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&family=Cormorant+Garamond:wght@400;500&display=swap');

/* -------------------------------------------------------------------------- */
/* Root Variables                                                             */
/* -------------------------------------------------------------------------- */

:root {
  /* Neutrals */
  --mh-ink: #0D0D0D;
  --mh-offwhite: #F7F7F5;
  --mh-sand: #E6E2DA;

  /* Accents */
  --mh-blue: #3A668B;
  --mh-blue-hover: #2F516F;
  --mh-earth: #B26E47;
  --mh-olive: #6E7F5F;

  /* Borders & subtle backgrounds */
  --mh-border: #E1DDD4;
  --mh-border-soft: #DAD7D0;

  /* Typography */
  --mh-font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mh-font-serif: 'Cormorant Garamond', 'Georgia', serif;

  /* Layout */
  --mh-max-width: 780px;
  --mh-content-width: 720px;

  /* Spacing scale */
  --mh-space-xxs: 4px;
  --mh-space-xs: 8px;
  --mh-space-sm: 12px;
  --mh-space-md: 16px;
  --mh-space-lg: 24px;
  --mh-space-xl: 32px;
}

/* -------------------------------------------------------------------------- */
/* Global Reset & Base                                                        */
/* -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--mh-offwhite);
  color: var(--mh-ink);
  font-family: var(--mh-font-sans);
  font-size: 16px;
  line-height: 1.6;
}

/* Limit content width and center */

main.content,
main .content,
.main-content,
.page-content {
  max-width: var(--mh-content-width);
  margin: 0 auto;
  padding: var(--mh-space-xl) var(--mh-space-md) var(--mh-space-xl);
}

/* If baseof.html has just <main> without classes, ensure it’s decent: */
main {
  max-width: var(--mh-max-width);
  margin: 0 auto;
  padding: var(--mh-space-xl) var(--mh-space-md) var(--mh-space-xl);
}

/* -------------------------------------------------------------------------- */
/* Typography                                                                 */
/* -------------------------------------------------------------------------- */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--mh-font-sans);
  font-weight: 700;
  line-height: 1.3;
  margin-top: var(--mh-space-lg);
  margin-bottom: var(--mh-space-sm);
  color: var(--mh-ink);
}

h1 {
  font-size: 2.2rem;
  margin-top: var(--mh-space-xl);
}

h2 {
  font-size: 1.8rem;
}

h3 {
  font-size: 1.4rem;
}

h4 {
  font-size: 1.1rem;
}

p {
  margin-top: 0;
  margin-bottom: var(--mh-space-md);
}

/* Serif “special” headings or quotes */

.mh-serif-title,
blockquote.mh-quote,
blockquote.mh-quote p {
  font-family: var(--mh-font-serif);
}

/* Links */

a {
  color: var(--mh-blue);
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

/* Lists */

ul,
ol {
  padding-left: 1.5rem;
  margin-top: 0;
  margin-bottom: var(--mh-space-md);
}

li {
  margin-bottom: var(--mh-space-xs);
}

/* Images */

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Logo convenience */

.mh-logo {
  max-height: 56px;
  margin-bottom: var(--mh-space-lg);
}

/* -------------------------------------------------------------------------- */
/* Header / Navigation (basic)                                               */
/* -------------------------------------------------------------------------- */

header {
  padding: var(--mh-space-md) var(--mh-space-md) 0;
}

header .site-title {
  font-family: var(--mh-font-serif);
  font-size: 1.6rem;
  margin: 0;
}

nav ul {
  list-style: none;
  padding-left: 0;
  margin: var(--mh-space-sm) 0 var(--mh-space-md);
  display: flex;
  flex-wrap: wrap;
  gap: var(--mh-space-md);
}

nav li {
  margin: 0;
}

nav a {
  font-weight: 500;
  color: var(--mh-ink);
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
}

nav a:hover,
nav a:focus {
  color: var(--mh-blue);
  border-bottom-color: var(--mh-blue);
}

/* -------------------------------------------------------------------------- */
/* Buttons                                                                   */
/* -------------------------------------------------------------------------- */

.mh-btn,
button,
input[type="submit"] {
  display: inline-block;
  background-color: var(--mh-blue);
  color: var(--mh-offwhite);
  font-family: var(--mh-font-sans);
  font-weight: 500;
  font-size: 0.95rem;
  padding: var(--mh-space-sm) var(--mh-space-lg);
  border-radius: 6px;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.mh-btn:hover,
button:hover,
input[type="submit"]:hover {
  background-color: var(--mh-blue-hover);
}

.mh-btn-secondary {
  background-color: transparent;
  border: 1px solid var(--mh-blue);
  color: var(--mh-blue);
}

.mh-btn-secondary:hover {
  background-color: var(--mh-blue);
  color: var(--mh-offwhite);
}

/* -------------------------------------------------------------------------- */
/* Cards & Panels                                                            */
/* -------------------------------------------------------------------------- */

.mh-card {
  background-color: #F7F7F5;
  border: 1px solid var(--mh-border-soft);
  border-radius: 6px;
  padding: var(--mh-space-lg);
  margin-bottom: var(--mh-space-lg);
}

.mh-card h3 {
  margin-top: 0;
  color: var(--mh-blue);
}

.mh-card-muted {
  background-color: var(--mh-sand);
  border-color: var(--mh-border);
}

/* Palette demo blocks */

.mh-color-swatch {
  width: 140px;
  height: 80px;
  border-radius: 4px;
  margin-bottom: var(--mh-space-xs);
}

.mh-color-row {
  display: flex;
  gap: var(--mh-space-md);
  align-items: center;
  margin-bottom: var(--mh-space-md);
}

/* -------------------------------------------------------------------------- */
/* Quotes                                                                    */
/* -------------------------------------------------------------------------- */

blockquote {
  margin: var(--mh-space-lg) 0;
  padding-left: var(--mh-space-lg);
  border-left: 3px solid var(--mh-olive);
  color: var(--mh-olive);
  font-family: var(--mh-font-serif);
  font-size: 1.2rem;
}

blockquote.mh-quote {
  font-style: italic;
}

/* -------------------------------------------------------------------------- */
/* Blog & Course-specific helpers                                            */
/* -------------------------------------------------------------------------- */

.mh-article-header {
  margin-bottom: var(--mh-space-lg);
}

.mh-article-header h1 {
  margin-bottom: var(--mh-space-sm);
}

.mh-meta {
  font-size: 0.85rem;
  color: #666666;
}

/* Lesson layout helpers */

.mh-lesson-header {
  margin-bottom: var(--mh-space-lg);
}

.mh-lesson-header h1 {
  font-family: var(--mh-font-serif);
}

.mh-lesson-section {
  margin-bottom: var(--mh-space-xl);
}

/* -------------------------------------------------------------------------- */
/* Footer                                                                    */
/* -------------------------------------------------------------------------- */

footer {
  max-width: var(--mh-max-width);
  margin: 0 auto;
  padding: var(--mh-space-lg) var(--mh-space-md) var(--mh-space-xl);
  font-size: 0.85rem;
  color: #777777;
}

/* -------------------------------------------------------------------------- */
/* Responsive                                                                */
/* -------------------------------------------------------------------------- */

@media (max-width: 768px) {
  main,
  main.content,
  main .content {
    padding: var(--mh-space-lg) var(--mh-space-sm);
  }

  nav ul {
    gap: var(--mh-space-sm);
  }

  .mh-color-row {
    flex-direction: row;
  }
}

@media (max-width: 480px) {
  .mh-color-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* -------------------------------------------------------------------------- */
/* Color Swatch Variants (no inline styles)                                   */
/* -------------------------------------------------------------------------- */

.mh-swatch-ink {
  background-color: var(--mh-ink);
}

.mh-swatch-offwhite {
  background-color: var(--mh-offwhite);
}

.mh-swatch-sand {
  background-color: var(--mh-sand);
}

.mh-swatch-blue {
  background-color: var(--mh-blue);
}

.mh-swatch-earth {
  background-color: var(--mh-earth);
}

.mh-swatch-olive {
  background-color: var(--mh-olive);
}
