/* ============================================================
   MONTERA SYSTEMS — BASE
   Design tokens, reset, typography
   ============================================================ */

/* Google Fonts are loaded via <link> in HTML */

/* ============================================================
   CUSTOM PROPERTIES
   ============================================================ */
:root {
  /* --- Color System --- */
  --color-bg:           #CEC6B9;
  --color-surface:      #E6E3E0;
  --color-surface-2:    #D8D2CA;
  --color-surface-3:    #C5BDB5;

  --color-border:       rgba(53, 48, 42, 0.15);
  --color-border-hover: rgba(53, 48, 42, 0.35);
  --color-border-focus: rgba(53, 48, 42, 0.5);

  --color-accent:       #35302A;
  --color-accent-2:     #574E46;
  --color-accent-light: rgba(53, 48, 42, 0.08);
  --color-accent-2-light: rgba(87, 78, 70, 0.08);

  --color-gradient:     #35302A;
  --color-gradient-glow: rgba(53, 48, 42, 0.04);
  --color-gradient-text: #35302A;

  --color-text:         #35302A;
  --color-text-muted:   #574E46;
  --color-text-subtle:  #797068;
  --color-text-disabled: #999691;

  --color-success:      #4A7C5A;
  --color-error:        #9B4040;
  --color-warning:      #8A6F3A;

  /* --- Typography --- */
  --font-heading: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Jost', system-ui, sans-serif;

  /* --- Type Scale --- */
  --text-xs:    0.75rem;    /* 12px */
  --text-sm:    0.875rem;   /* 14px */
  --text-base:  1rem;       /* 16px */
  --text-lg:    1.125rem;   /* 18px */
  --text-xl:    1.25rem;    /* 20px */
  --text-2xl:   1.5rem;     /* 24px */
  --text-3xl:   1.875rem;   /* 30px */
  --text-4xl:   2.25rem;    /* 36px */
  --text-5xl:   3rem;       /* 48px */
  --text-6xl:   3.75rem;    /* 60px */
  --text-7xl:   4.5rem;     /* 72px */

  /* Fluid heading scale */
  --heading-1: clamp(2.5rem, 5.5vw, 4.5rem);
  --heading-2: clamp(1.875rem, 3.5vw, 3rem);
  --heading-3: clamp(1.25rem, 2.2vw, 1.875rem);
  --heading-4: clamp(1.1rem, 1.5vw, 1.375rem);

  /* --- 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-8:   2rem;
  --space-10:  2.5rem;
  --space-12:  3rem;
  --space-14:  3.5rem;
  --space-16:  4rem;
  --space-20:  5rem;
  --space-24:  6rem;
  --space-28:  7rem;
  --space-32:  8rem;

  /* Section vertical rhythm */
  --section-py: clamp(4rem, 8vw, 7rem);

  /* --- Layout --- */
  --container-max:  1200px;
  --container-wide: 1400px;
  --container-px:   clamp(1rem, 4vw, 2rem);

  /* --- Border Radius --- */
  --radius-sm:   4px;
  --radius-md:   10px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-2xl:  32px;
  --radius-full: 9999px;

  /* --- Shadows --- */
  --shadow-sm:    0 1px 3px rgba(53, 48, 42, 0.08);
  --shadow-md:    0 4px 16px rgba(53, 48, 42, 0.1);
  --shadow-lg:    0 8px 32px rgba(53, 48, 42, 0.12);
  --shadow-xl:    0 16px 48px rgba(53, 48, 42, 0.15);
  --shadow-glow:  none;
  --shadow-glow-sm: none;
  --shadow-glow-cyan: none;
  --shadow-card:  0 2px 12px rgba(53, 48, 42, 0.08);

  /* --- Transitions --- */
  --ease-out:      cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:   cubic-bezier(0.45, 0, 0.55, 1);
  --ease-spring:   cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast:   150ms;
  --duration-base:   250ms;
  --duration-slow:   400ms;
  --duration-slower: 600ms;

  /* --- Z-index layers --- */
  --z-below:   -1;
  --z-base:     0;
  --z-raised:   10;
  --z-dropdown: 100;
  --z-nav:      200;
  --z-overlay:  300;
  --z-modal:    400;
  --z-toast:    500;
}

/* ============================================================
   RESET
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg);
}
::-webkit-scrollbar-thumb {
  background: #999691;
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent);
}

/* Selection */
::selection {
  background: rgba(53, 48, 42, 0.2);
  color: var(--color-text);
}

/* Media */
img,
video,
svg {
  display: block;
  max-width: 100%;
}

/* Links */
a {
  color: inherit;
  text-decoration: none;
}

/* Lists */
ul,
ol {
  list-style: none;
}

/* Inputs */
button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.15;
  letter-spacing: 0.01em;
  color: var(--color-text);
}

h1 { font-size: var(--heading-1); font-weight: 400; }
h2 { font-size: var(--heading-2); font-weight: 400; }
h3 { font-size: var(--heading-3); font-weight: 500; }
h4 { font-size: var(--heading-4); font-weight: 500; letter-spacing: 0.02em; }
h5 { font-size: var(--text-lg);   font-weight: 500; }
h6 { font-size: var(--text-base); font-weight: 500; }

p {
  line-height: 1.75;
  color: var(--color-text-muted);
}

p + p {
  margin-top: var(--space-4);
}

strong { font-weight: 600; color: var(--color-text); }
em { font-style: italic; }

/* ============================================================
   GRADIENT TEXT UTILITY (flat accent color)
   ============================================================ */
.gradient-text {
  color: var(--color-accent);
  display: inline-block;
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
