/* ==========================================================================
   Morongwa Stores - Global Design System
   Use this file on every page. Do not redefine typography or colors locally
   unless adding a page-specific module that extends these tokens.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Color - surfaces */
  --color-bg: #ffffff;
  --color-bg-soft: #f6f5f3;
  --color-bg-muted: #eeece8;
  --color-ink: #161412;
  --color-ink-soft: #2a2622;
  --color-muted: #6f6a64;
  --color-line: #e7e4df;
  --color-line-strong: #d4d0c9;

  /* Color - brand accents */
  --color-beauty: #a85d6c;
  --color-beauty-soft: #f5e8eb;
  --color-leather: #7e380d;
  --color-leather-soft: #f3ebe2;
  --color-whatsapp: #1fad52;
  --color-whatsapp-ink: #ffffff;

  /* Typography - families */
  --font-display: "Syne", sans-serif;
  --font-body: "Figtree", sans-serif;

  /* Typography - sizes (fluid where useful). Site minimum text size: 14px */
  --text-min: 14px;
  --text-xs: 0.875rem; /* 14px */
  --text-sm: 0.875rem; /* 14px */
  --text-base: 1rem;
  --text-md: 1.0625rem;
  --text-lg: 1.25rem;
  --text-xl: clamp(1.35rem, 2.2vw, 1.7rem);
  --text-2xl: clamp(1.75rem, 3vw, 2.25rem);
  /* H1 / H2: desktop targets 100px / 75px, scale down on smaller screens */
  --text-h1: clamp(3rem, 9vw, 100px);
  --text-h2: clamp(2.25rem, 6.5vw, 75px);
  --text-3xl: var(--text-h2);
  --text-4xl: clamp(2.6rem, 6vw, 4.6rem);
  --text-display: var(--text-h1);

  /* Typography - weights */
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-extrabold: 800;

  /* Typography - rhythm */
  --leading-tight: 1.05;
  --leading-snug: 1.25;
  --leading-body: 1.55;
  --tracking-tight: -0.03em;
  --tracking-display: -0.02em;
  --tracking-label: 0.18em;

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-7: 2rem;
  --space-8: 2.5rem;
  --space-9: 3rem;
  --space-10: 4rem;
  --space-11: 5rem;
  --space-12: 6rem;

  /* Layout */
  --wrap: 1080px;
  --wrap-wide: 1280px;
  --wrap-narrow: 720px;
  --gutter: 1.25rem;
  --section-y: clamp(4rem, 8vw, 6rem);
  --header-h: 4rem;
  --radius-none: 0;
  --radius-sm: 2px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-fast: 0.2s;
  --duration: 0.35s;
  --duration-slow: 0.75s;

  /* Elevation */
  --shadow-soft: 0 12px 30px rgba(22, 20, 18, 0.1);
  --shadow-dock: 0 12px 30px rgba(22, 20, 18, 0.18);
}

/* --------------------------------------------------------------------------
   2. Reset / base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 100%;
}

body {
  font-family: var(--font-body);
  font-size: max(var(--text-min), var(--text-base));
  font-weight: var(--weight-regular);
  line-height: var(--leading-body);
  color: var(--color-ink);
  background: var(--color-bg);
  overflow-x: hidden;
}

/* Floor: no utility text smaller than 14px */
small,
.text-xs,
.text-sm,
.eyebrow,
.label,
.btn--sm {
  font-size: max(var(--text-min), 0.875rem);
}

.d-none {
  display: none !important;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

ul,
ol {
  list-style: none;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */
.wrap {
  width: min(var(--wrap), calc(100% - (var(--gutter) * 2)));
  margin-inline: auto;
}

.wrap--wide {
  width: min(var(--wrap-wide), calc(100% - (var(--gutter) * 2)));
}

.wrap--narrow {
  width: min(var(--wrap-narrow), calc(100% - (var(--gutter) * 2)));
}

.section {
  padding-block: var(--section-y);
}

.section--soft {
  background: var(--color-bg-soft);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.stack--sm { gap: var(--space-2); }
.stack--md { gap: var(--space-6); }
.stack--lg { gap: var(--space-8); }

.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: var(--space-5);
}

.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 900px) {
  .grid-3,
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .grid-2,
  .grid-3,
  .grid-4 { grid-template-columns: 1fr; }
}

.divider {
  border: 0;
  border-top: 1px solid var(--color-line);
  margin: 0;
}

/* --------------------------------------------------------------------------
   4. Typography - global heading & text styles
   -------------------------------------------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6,
.brand,
.text-display {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-ink);
}

h1,
.text-h1 {
  font-size: var(--text-h1);
  font-weight: var(--weight-bold);
}

h2,
.text-h2 {
  font-size: var(--text-h2);
}

h3,
.text-h3 {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  line-height: var(--leading-snug);
}

h4,
.text-h4 {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-snug);
  letter-spacing: -0.015em;
}

h5,
.text-h5 {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  letter-spacing: 0;
}

h6,
.text-h6 {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.brand,
.text-brand {
  font-size: var(--text-4xl);
  font-weight: var(--weight-extrabold);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.text-display {
  font-size: var(--text-display);
  font-weight: var(--weight-extrabold);
}

.eyebrow,
.text-eyebrow {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-muted);
}

.lead,
.text-lead {
  font-size: var(--text-md);
  color: var(--color-muted);
  max-width: 40ch;
}

.body,
.text-body {
  font-size: var(--text-base);
  color: var(--color-ink);
}

.text-muted {
  color: var(--color-muted);
}

.text-sm { font-size: var(--text-sm); }
.text-xs { font-size: var(--text-xs); }

.text-beauty { color: var(--color-beauty); }
.text-leather { color: var(--color-leather); }

a.link {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

a.link:hover {
  color: var(--color-ink-soft);
}

/* Section intro pattern - use on every major section */
.section-head {
  max-width: 36rem;
  margin-bottom: var(--space-8);
}

.section-head .eyebrow {
  margin-bottom: var(--space-3);
}

.section-head h2 {
  margin-bottom: var(--space-3);
}

.section-head p {
  color: var(--color-muted);
}

/* --------------------------------------------------------------------------
   5. Buttons (global)
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 2.9rem;
  padding: 0.7rem 1.25rem;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition:
    transform var(--duration-fast) var(--ease),
    background var(--duration-fast) var(--ease),
    color var(--duration-fast) var(--ease),
    border-color var(--duration-fast) var(--ease),
    filter var(--duration-fast) var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:focus-visible {
  outline: 2px solid var(--color-ink);
  outline-offset: 2px;
}

.btn--primary {
  background: var(--color-ink);
  color: #ffffff;
}

.btn--primary:hover {
  background: var(--color-ink-soft);
}

.btn--secondary {
  border-color: var(--color-ink);
  color: var(--color-ink);
}

.btn--secondary:hover {
  background: var(--color-ink);
  color: #ffffff;
}

.btn--soft {
  background: var(--color-bg-soft);
  border-color: var(--color-line);
  color: var(--color-ink);
}

.btn--soft:hover {
  border-color: var(--color-ink);
}

.btn--beauty {
  background: var(--color-beauty);
  color: #ffffff;
}

.btn--leather {
  background: var(--color-leather);
  color: #ffffff;
}

.btn--whatsapp {
  background: var(--color-whatsapp);
  color: var(--color-whatsapp-ink);
}

.btn--whatsapp:hover {
  filter: brightness(1.05);
}

.btn--text {
  min-height: auto;
  padding: 0.2rem 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  border-radius: 0;
}

.btn--text:hover {
  opacity: 0.65;
  transform: none;
}

.btn--sm {
  min-height: 2.4rem;
  padding: 0.45rem 0.9rem;
  font-size: var(--text-xs);
}

/* --------------------------------------------------------------------------
   6. Form primitives (for later pages)
   -------------------------------------------------------------------------- */
.label {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

.input,
.textarea {
  width: 100%;
  min-height: 2.9rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--color-line-strong);
  background: var(--color-bg);
  color: var(--color-ink);
}

.input:focus,
.textarea:focus {
  outline: none;
  border-color: var(--color-ink);
}

.textarea {
  min-height: 8rem;
  resize: vertical;
}

/* --------------------------------------------------------------------------
   7. Media helpers
   -------------------------------------------------------------------------- */
.media {
  overflow: hidden;
  background: var(--color-bg-soft);
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media--4x5 { aspect-ratio: 4 / 5; }
.media--16x9 { aspect-ratio: 16 / 9; }
.media--1x1 { aspect-ratio: 1 / 1; }

/* --------------------------------------------------------------------------
   8. Surface helpers
   -------------------------------------------------------------------------- */
.surface {
  background: var(--color-bg);
  border: 1px solid var(--color-line);
  padding: var(--space-6);
}

.surface--soft {
  background: var(--color-bg-soft);
}

.swatch {
  min-height: 6.5rem;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border: 1px solid var(--color-line);
}

.swatch span {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   9. Motion helpers
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity var(--duration-slow) var(--ease),
    transform var(--duration-slow) var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
