/* ====================================================================
 *  Xin Xiao Mu Eco-Wood — Design Tokens
 *  Source:  "Artisanal Industrialist" design system (DESIGN.md)
 *  Generated for prototype. Will be ported to WordPress theme later.
 * ==================================================================== */

:root {
  /* ——— Color: Brand ——— */
  --color-primary:          #072417;  /* Deep Forest Green — brand primary (logo/headings/footer) */
  --color-primary-dark:     #042013;  /* darker green */
  --color-primary-container:#0f3a27;
  --color-on-primary:       #ffffff;
  --color-on-primary-container: #aeceb9;

  /* ——— Color: Action (CTA accent) ——— */
  --color-secondary:        #F26522;  /* Brand Orange — CTA & accent */
  --color-secondary-dark:   #C9500F;  /* deeper orange for hover/text */
  --color-secondary-container: #FFE3D3; /* light orange tint */
  --color-on-secondary:     #ffffff;
  --color-on-secondary-container: #7a2e00;

  /* ——— Color: Tertiary / success ——— */
  --color-tertiary:         #0d4a32;  /* Deep Green — success/cert accents, same family as primary */
  --color-tertiary-container: #06251a;
  --color-on-tertiary:      #ffffff;

  /* ——— Color: Surface ——— */
  --color-background:       #f8f9fa;  /* Soft Off-White */
  --color-surface:          #ffffff;  /* Cards/panels pure white */
  --color-surface-dim:      #d9dadb;
  --color-surface-bright:   #f8f9fa;
  --color-surface-container-lowest: #ffffff;
  --color-surface-container-low:    #f3f4f5;
  --color-surface-container:        #edeeef;
  --color-surface-container-high:   #e7e8e9;
  --color-surface-container-highest:#e1e3e4;
  --color-surface-variant:  #e1e3e4;
  --color-on-surface:       #191c1d;
  --color-on-surface-variant: #414844;
  --color-on-background:    #191c1d;

  /* ——— Color: Outline ——— */
  --color-outline:          #717973;
  --color-outline-variant:  #c1c8c2;
  --color-border-subtle:    #E9ECEF;  /* card border in design system */
  --color-border-input:     #c1c8c2;

  /* ——— Color: Status ——— */
  --color-error:            #ba1a1a;
  --color-on-error:         #ffffff;
  --color-success:          #2D6A4F;
  --color-warning:          #D4A373;

  /* ——— Typography ——— */
  --font-serif:   "Montserrat", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;  /* headings */
  --font-sans:    "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, Arial, sans-serif;  /* body */
  --font-mono:    "JetBrains Mono", "SF Mono", Consolas, Monaco, monospace;

  --text-display-lg: 48px;
  --text-headline-lg: 32px;
  --text-headline-md: 24px;
  --text-headline-sm: 20px;
  --text-body-lg:     18px;
  --text-body-md:     16px;
  --text-body-sm:     14px;
  --text-label-md:    14px;
  --text-label-sm:    12px;

  --leading-tight: 1.15;
  --leading-snug:  1.3;
  --leading-base:  1.5;
  --leading-relaxed: 1.75;

  --tracking-tight:  -0.02em;
  --tracking-normal:  0;
  --tracking-wide:    0.05em;

  /* ——— Spacing: base 8 ——— */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-32: 128px;

  --margin-mobile:  16px;
  --margin-desktop: 64px;

  --container-max: 1280px;
  --gutter:        24px;

  /* ——— Radius: Soft-Industrial ——— */
  --radius-sm:   2px;
  --radius:      4px;   /* default 0.25rem */
  --radius-md:   6px;
  --radius-lg:   8px;
  --radius-xl:   12px;
  --radius-full: 9999px;

  /* ——— Shadow: soft ambient & floating (Material 3) ——— */
  --shadow-none: none;
  --shadow-input-focus: 0 0 0 2px rgba(242, 101, 34, 0.25);
  --shadow-ambient:  0 4px 12px rgba(25, 28, 29, 0.04);
  --shadow-floating: 0 8px 24px rgba(25, 28, 29, 0.08);
  --shadow-card:     var(--shadow-ambient);

  /* ——— Motion ——— */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 150ms;
  --duration:      250ms;
  --duration-slow: 400ms;

  /* ——— z-index ——— */
  --z-sticky:   40;
  --z-overlay:  50;
  --z-modal:    60;
  --z-toast:    70;
}

/* ——— Breakpoints reference (use as media queries) ——— */
/*
  Mobile:  < 768px
  Tablet:  768-1023px
  Desktop: >= 1024px
*/

/* ——— Element resets / base ——— */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-body-md);
  line-height: var(--leading-base);
  color: var(--color-on-background);
  background-color: var(--color-background);
  font-family: var(--font-sans), system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5, h6 { font-family: var(--font-serif); font-weight: 600; line-height: var(--leading-tight); margin: 0; letter-spacing: var(--tracking-tight); }
h1 { font-size: var(--text-display-lg); }
h2 { font-size: var(--text-headline-lg); }
h3 { font-size: var(--text-headline-md); }
h4 { font-size: var(--text-headline-sm); }
p  { margin: 0; }
a  { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img, video { max-width: 100%; height: auto; display: block; }
button { font: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
input, select, textarea { font: inherit; color: inherit; }

/* ——— Utility: container ——— */
.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding-left: var(--margin-mobile); padding-right: var(--margin-mobile); }
@media (min-width: 1024px) { .container { padding-left: 32px; padding-right: 32px; } }

/* ——— Utility: label (uppercase tracking stamped) ——— */
.label { font-family: var(--font-sans); font-size: var(--text-label-sm); font-weight: 500; line-height: 16px; letter-spacing: var(--tracking-wide); text-transform: uppercase; }
.label-md { font-size: var(--text-label-md); line-height: 20px; font-weight: 600; }

/* ——— Button system ——— */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 24px; border-radius: var(--radius); font-weight: 600; font-size: var(--text-body-md); line-height: 1; transition: all var(--duration) var(--ease-out); min-height: 44px; cursor: pointer; border: 1px solid transparent; white-space: nowrap; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--color-primary); color: var(--color-on-primary); }
.btn-primary:hover { background: var(--color-primary-dark); }
.btn-cta { background: var(--color-secondary); color: #ffffff; border-color: var(--color-secondary); }
.btn-cta:hover { background: var(--color-secondary-dark); border-color: var(--color-secondary-dark); }
.btn-secondary { background: transparent; color: var(--color-primary); border-color: var(--color-primary); }
.btn-secondary:hover { background: var(--color-primary); color: var(--color-on-primary); }
.btn-ghost { background: transparent; color: var(--color-primary); }
.btn-ghost:hover { background: rgba(242, 101, 34, 0.08); }
.btn-sm { padding: 8px 16px; min-height: 36px; font-size: var(--text-body-sm); }
.btn-lg { padding: 16px 32px; min-height: 52px; font-size: var(--text-body-lg); }
.btn-block { width: 100%; }

/* ——— Card ——— */
.card { background: #fff; border: 1px solid var(--color-border-subtle); border-radius: var(--radius); overflow: hidden; }
.card-product { transition: border-color var(--duration) var(--ease-out), transform var(--duration) var(--ease-out); }
.card-product:hover { border-color: var(--color-secondary); transform: translateY(-2px); }

/* ——— Input ——— */
.input, .select, .textarea { width: 100%; padding: 12px 16px; border: 1px solid var(--color-border-input); border-radius: var(--radius); background: #fff; color: var(--color-on-surface); font-size: 16px; min-height: 44px; transition: border-color var(--duration) var(--ease-out), box-shadow var(--duration) var(--ease-out); }
.textarea { min-height: 120px; resize: vertical; font-family: var(--font-sans); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--color-secondary); box-shadow: var(--shadow-input-focus); }
.field-label { display: block; font-family: var(--font-sans); font-size: var(--text-label-md); font-weight: 600; letter-spacing: var(--tracking-wide); text-transform: uppercase; margin-bottom: 8px; color: var(--color-on-surface-variant); }

/* ——— Section spacing ——— */
.section { padding: var(--space-12) 0; }
@media (min-width: 1024px) { .section { padding: var(--space-20) 0; } }
.section-title { margin-bottom: var(--space-8); text-align: center; }
.section-title h2 { margin-bottom: 12px; }
.section-title p  { color: var(--color-on-surface-variant); max-width: 720px; margin: 0 auto; font-size: var(--text-body-lg); }

/* ——— Badge / Cert seal ——— */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: var(--radius-full); font-size: var(--text-label-sm); font-weight: 600; letter-spacing: var(--tracking-wide); text-transform: uppercase; }
.badge-success { background: rgba(7, 36, 23, 0.08); color: var(--color-tertiary); }
.badge-warning { background: rgba(212, 163, 115, 0.18); color: #7d562d; }
.badge-info    { background: rgba(27, 67, 50, 0.10); color: var(--color-primary); }

/* ——— Cert seal (circular stamped) ——— */
.cert-seal { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 96px; height: 96px; border-radius: 50%; border: 2px solid var(--color-primary); background: rgba(7, 36, 23, 0.06); color: var(--color-primary); font-family: var(--font-serif); font-size: 11px; font-weight: 700; line-height: 1.1; text-align: center; letter-spacing: 0.05em; padding: 8px; }
.cert-seal strong { font-size: 16px; display: block; margin-bottom: 2px; }

/* ——— Visually hidden ——— */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ——— Sticky mobile bottom bar ——— */
@media (max-width: 767px) {
  body { padding-bottom: 72px; }
}
