/*
Theme Name: Healthy Habits For You
Theme URI: https://healthyhabitsforyou.com
Author: Healthy Habits For You
Author URI: https://healthyhabitsforyou.com
Description: A premium health and wellness blogging theme with a clean, modern design. Supports Elementor Free, One Click Demo Import, and full Customizer control. Features reading progress, AJAX filtering, category icons, expert review cards, and a complete wellness blogging toolkit.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hhfy
Tags: blog, health, wellness, clean, modern, responsive, elementor, customizer, one-column, two-columns, custom-colors, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ============================================================
   DESIGN SYSTEM — Healthy Habits For You
   Fraunces display · DM Sans body · Cream page · Forest green
   ============================================================ */

:root {

  /* ── Green (Primary) ──────────────────────────────────── */
  --green-50:  #ECF5EE;
  --green-100: #D7EADD;
  --green-200: #AED5BB;
  --green-300: #7FB994;
  --green-400: #519671;
  --green-500: #2E7D52;
  --green-600: #246642;
  --green-700: #1C5034;
  --green-800: #153D27;
  --green-900: #0E2A1B;

  --color-primary:        var(--green-500);
  --color-primary-hover:  var(--green-600);
  --color-primary-active: var(--green-700);
  --color-primary-tint:   var(--green-50);
  --color-primary-soft:   var(--green-100);
  --color-primary-dark:   var(--green-800);

  /* ── Amber (Accent) ───────────────────────────────────── */
  --amber-50:  #FDF6E7;
  --amber-100: #FBEACB;
  --amber-200: #F7D497;
  --amber-300: #F4BC63;
  --amber-400: #F5A623;
  --amber-500: #E08F0E;
  --amber-600: #B97208;
  --amber-700: #8B5408;

  --color-accent:        var(--amber-400);
  --color-accent-hover:  var(--amber-500);
  --color-accent-active: var(--amber-600);
  --color-accent-tint:   var(--amber-50);
  --color-accent-soft:   var(--amber-100);

  /* ── Warm Neutrals ────────────────────────────────────── */
  --cream-50:  #FAF7F0;
  --cream-100: #F4EFE3;
  --cream-200: #ECE5D2;
  --warm-300:  #D9D1BD;
  --warm-400:  #B5AC95;
  --warm-500:  #8A8270;
  --warm-600:  #635D4F;
  --warm-700:  #443F35;
  --warm-800:  #2A2620;
  --warm-900:  #1A1814;

  /* ── Surfaces ─────────────────────────────────────────── */
  --bg-page:        var(--cream-50);
  --bg-surface:     #FFFFFF;
  --bg-surface-alt: var(--cream-100);
  --bg-inset:       var(--cream-100);
  --bg-overlay:     rgba(26, 24, 20, 0.55);

  --border-subtle: rgba(26, 24, 20, 0.06);
  --border-soft:   rgba(26, 24, 20, 0.10);
  --border-strong: rgba(26, 24, 20, 0.16);
  --divider:       var(--cream-200);

  /* ── Text ─────────────────────────────────────────────── */
  --fg-1: var(--warm-900);
  --fg-2: var(--warm-700);
  --fg-3: var(--warm-500);
  --fg-4: var(--warm-400);
  --fg-on-primary: #FFFFFF;
  --fg-on-accent:  var(--warm-900);
  --fg-link:       var(--green-600);
  --fg-link-hover: var(--green-700);

  /* ── Semantic ─────────────────────────────────────────── */
  --success:        #3C8F5A;
  --success-bg:     #E7F2EB;
  --success-border: #BFD9C8;
  --warning:        #D98A0E;
  --warning-bg:     #FBEACB;
  --warning-border: #F0CE83;
  --info:           #2F7A8F;
  --info-bg:        #E1EFF3;
  --info-border:    #B6D3DB;
  --error:          #B6452C;
  --error-bg:       #F7E4DD;
  --error-border:   #E6BAA9;

  /* ── Typography ───────────────────────────────────────── */
  --font-display: 'Fraunces', ui-serif, Georgia, 'Times New Roman', serif;
  --font-body:    'DM Sans', ui-sans-serif, system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --font-ui:      'DM Sans', ui-sans-serif, system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  --fs-display:  clamp(2.75rem, 5vw + 1rem, 4.5rem);
  --fs-h1:       clamp(2.25rem, 3vw + 1rem, 3.25rem);
  --fs-h2:       clamp(1.75rem, 2vw + 0.75rem, 2.5rem);
  --fs-h3:       1.75rem;
  --fs-h4:       1.375rem;
  --fs-h5:       1.125rem;
  --fs-h6:       1rem;
  --fs-body-lg:  1.125rem;
  --fs-body:     1rem;
  --fs-body-sm:  0.9375rem;
  --fs-small:    0.875rem;
  --fs-caption:  0.8125rem;
  --fs-label:    0.75rem;

  --lh-tight:   1.1;
  --lh-snug:    1.25;
  --lh-normal:  1.45;
  --lh-relaxed: 1.65;
  --lh-loose:   1.8;

  --ls-tight:   -0.02em;
  --ls-snug:    -0.01em;
  --ls-normal:  0;
  --ls-wide:    0.04em;
  --ls-label:   0.08em;

  --fw-regular:  400;
  --fw-medium:   500;
  --fw-semibold: 600;
  --fw-bold:     700;
  --fw-display:  600;

  /* ── Spacing (4px base) ───────────────────────────────── */
  --space-0:   0;
  --space-1:   4px;
  --space-2:   8px;
  --space-3:   12px;
  --space-4:   16px;
  --space-5:   24px;
  --space-6:   32px;
  --space-7:   48px;
  --space-8:   64px;
  --space-9:   96px;
  --space-10:  128px;

  /* ── Layout ───────────────────────────────────────────── */
  --container-narrow:   680px;
  --container-standard: 1120px;
  --container-wide:     1320px;
  --gutter:             24px;
  --gutter-lg:          32px;

  --bp-sm: 640px;
  --bp-md: 768px;
  --bp-lg: 1024px;
  --bp-xl: 1280px;

  /* ── Radii ────────────────────────────────────────────── */
  --radius-xs:   4px;
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-pill: 999px;

  /* ── Shadows (warm, brown-tinted) ─────────────────────── */
  --shadow-xs: 0 1px 2px rgba(50, 40, 25, 0.06);
  --shadow-sm: 0 1px 3px rgba(50, 40, 25, 0.06), 0 1px 2px rgba(50, 40, 25, 0.04);
  --shadow-md: 0 4px 12px rgba(50, 40, 25, 0.08), 0 2px 4px rgba(50, 40, 25, 0.04);
  --shadow-lg: 0 12px 28px rgba(50, 40, 25, 0.10), 0 4px 10px rgba(50, 40, 25, 0.05);
  --shadow-xl: 0 24px 48px rgba(50, 40, 25, 0.14), 0 8px 16px rgba(50, 40, 25, 0.06);
  --shadow-inset: inset 0 1px 2px rgba(50, 40, 25, 0.05);
  --shadow-focus: 0 0 0 3px rgba(46, 125, 82, 0.25);

  /* ── Motion ───────────────────────────────────────────── */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast:    140ms;
  --dur-base:    220ms;
  --dur-slow:    420ms;

  /* ── Header ───────────────────────────────────────────── */
  --header-height: 72px;

  /* ── Progress ─────────────────────────────────────────── */
  --progress-height: 3px;
  --progress-color:  var(--color-primary);

  /* ── Z-index ──────────────────────────────────────────── */
  --z-below:          -1;
  --z-base:            0;
  --z-raised:         10;
  --z-dropdown:      100;
  --z-sticky:        200;
  --z-fixed:         300;
  --z-modal-backdrop:350;
  --z-modal:         400;
  --z-toast:         500;
  --z-tooltip:       600;

}

/* ── Base Reset ──────────────────────────────────────────── */

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background: var(--bg-page);
  color: var(--fg-1);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-relaxed);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

p { margin: 0; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--fw-display);
  letter-spacing: var(--ls-tight);
  line-height: var(--lh-tight);
  color: var(--fg-1);
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); line-height: var(--lh-snug); }
h3 { font-size: var(--fs-h3); line-height: var(--lh-snug); }
h4 { font-size: var(--fs-h4); font-weight: var(--fw-semibold); letter-spacing: var(--ls-snug); }
h5 { font-size: var(--fs-h5); font-family: var(--font-ui); font-weight: var(--fw-semibold); letter-spacing: var(--ls-snug); line-height: var(--lh-snug); }
h6 { font-size: var(--fs-h6); font-family: var(--font-ui); font-weight: var(--fw-semibold); line-height: var(--lh-snug); }

a {
  color: var(--fg-link);
  text-decoration: none;
  text-decoration-color: rgba(46, 125, 82, 0.35);
  text-underline-offset: 3px;
  transition: color var(--dur-fast) var(--ease-out);
}
a:hover { color: var(--fg-link-hover); }
a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

ul, ol { list-style: none; margin: 0; padding: 0; }

button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}

::selection { background: var(--amber-200); color: var(--warm-900); }

code, .mono {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--cream-100);
  color: var(--warm-800);
  padding: 0.1em 0.4em;
  border-radius: var(--radius-xs);
}

/* ── Skip Link ───────────────────────────────────────────── */

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  z-index: var(--z-toast);
  padding: var(--space-3) var(--space-5);
  background: var(--color-primary);
  color: var(--fg-on-primary);
  font-family: var(--font-ui);
  font-weight: var(--fw-semibold);
  border-radius: var(--radius-md);
  transition: top var(--dur-fast);
}
.skip-link:focus { top: var(--space-4); }

/* ── Screen Reader ───────────────────────────────────────── */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── WordPress Alignment ─────────────────────────────────── */

.alignleft  { float: left; margin: 0 var(--space-5) var(--space-4) 0; }
.alignright { float: right; margin: 0 0 var(--space-4) var(--space-5); }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignwide   { margin-left: calc(-1 * var(--space-6)); margin-right: calc(-1 * var(--space-6)); }
.alignfull   { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); width: 100vw; }

.wp-caption { max-width: 100%; }
.wp-caption-text, .gallery-caption {
  font-size: var(--fs-small);
  color: var(--fg-3);
  margin-top: var(--space-2);
  font-style: italic;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-4);
}
.gallery-item img { width: 100%; height: auto; border-radius: var(--radius-sm); }

.wp-block-separator {
  border: none;
  border-top: 1px solid var(--divider);
  margin: var(--space-7) 0;
}

.has-primary-background-color { background-color: var(--color-primary) !important; }
.has-accent-background-color   { background-color: var(--color-accent) !important; }
.has-primary-color             { color: var(--color-primary) !important; }
.has-accent-color              { color: var(--color-accent) !important; }
