/* ==========================================================================
   Somachir — Design Tokens & Global Styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
  /* Colors */
  --color-accent:       #1B4F8A;
  --color-accent-dark:  #143A6B;
  --color-black:        #111111;
  --color-white:        #FFFFFF;
  --color-bg-light:     #F3F6FA;
  --color-bg-mist:      #E8EDF4;
  --color-border:       #C8D3E0;
  --color-text-muted:   #6B6560;

  /* Typography */
  --font-display: 'Cormorant Display', Georgia, serif;
  --font-body:    'Public Sans', Helvetica, sans-serif;

  --text-xs:   12px;
  --text-sm:   14px;
  --text-base: 16px;
  --text-md:   20px;
  --text-lg:   28px;
  --text-xl:   40px;
  --text-2xl:  56px;
  --text-3xl:  72px;

  --leading-tight:  1.2;
  --leading-body:   1.7;
  --tracking-wide:  0.08em;
  --tracking-wider: 0.12em;

  /* Spacing (8px base grid) */
  --space-xs:  8px;
  --space-sm:  16px;
  --space-md:  32px;
  --space-lg:  64px;
  --space-xl:  96px;
  --space-xxl: 128px;

  /* Layout */
  --max-width:       1200px;
  --max-width-text:  720px;
  --gutter:          var(--space-md);

  /* Borders */
  --border:          1px solid var(--color-border);
  --border-accent:   1px solid var(--color-accent);
}

/* --------------------------------------------------------------------------
   2. Reset & Base
   -------------------------------------------------------------------------- */

*, *::before, *::after {
  box-sizing: border-box;
  border-radius: 0 !important;
  box-shadow: none !important;
}

html {
  font-size: var(--text-base);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  color: var(--color-black);
  background-color: var(--color-white);
  margin: 0;
  padding: 0;
}

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

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

a:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   3. Typography
   -------------------------------------------------------------------------- */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: var(--leading-tight);
  color: var(--color-black);
  margin: 0 0 var(--space-sm);
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }
h5 { font-size: var(--text-md); font-family: var(--font-body); font-weight: 600; }
h6 { font-size: var(--text-base); font-family: var(--font-body); font-weight: 600; }

p {
  margin: 0 0 var(--space-sm);
}

.sp-eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-accent);
  display: block;
  margin-bottom: var(--space-xs);
}

.sp-text-muted {
  color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   4. Buttons
   -------------------------------------------------------------------------- */

.sp-btn {
  display: inline-block;
  padding: 12px 28px;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border: var(--border-accent);
  transition: background 0.2s, color 0.2s;
}

.sp-btn--primary {
  background: var(--color-accent);
  color: var(--color-white);
}

.sp-btn--primary:hover {
  background: transparent;
  color: var(--color-accent);
  text-decoration: none;
}

.sp-btn--outline {
  background: transparent;
  color: var(--color-accent);
}

.sp-btn--outline:hover {
  background: var(--color-accent);
  color: var(--color-white);
  text-decoration: none;
}

.sp-btn--ghost {
  background: transparent;
  color: var(--color-white);
  border-color: var(--color-white);
}

.sp-btn--ghost:hover {
  background: var(--color-white);
  color: var(--color-accent);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   5. Layout Utilities
   -------------------------------------------------------------------------- */

.sp-container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.sp-container--narrow {
  max-width: var(--max-width-text);
}

.sp-section {
  padding-top: var(--space-lg);
  padding-bottom: var(--space-lg);
}

.sp-section--light {
  background-color: var(--color-bg-light);
}

.sp-section--mist {
  background-color: var(--color-bg-mist);
}

.sp-section--dark {
  background-color: var(--color-accent);
  color: var(--color-white);
}

.sp-section--dark h1,
.sp-section--dark h2,
.sp-section--dark h3,
.sp-section--dark h4 {
  color: var(--color-white);
}

.sp-section--black {
  background-color: var(--color-black);
  color: var(--color-white);
}

.sp-section--black h1,
.sp-section--black h2,
.sp-section--black h3,
.sp-section--black h4 {
  color: var(--color-white);
}

/* --------------------------------------------------------------------------
   6. Grid
   -------------------------------------------------------------------------- */

.sp-grid {
  display: grid;
  gap: var(--space-md);
}

.sp-grid--2 { grid-template-columns: repeat(2, 1fr); }
.sp-grid--3 { grid-template-columns: repeat(3, 1fr); }
.sp-grid--4 { grid-template-columns: repeat(4, 1fr); }

.sp-grid--split {
  grid-template-columns: 1fr 1fr;
  align-items: center;
}

/* --------------------------------------------------------------------------
   7. Card
   -------------------------------------------------------------------------- */

.sp-card {
  border: var(--border);
  padding: var(--space-md);
  background: var(--color-white);
}

.sp-card--light {
  background: var(--color-bg-light);
  border-color: transparent;
}

.sp-card__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 400;
  margin-bottom: var(--space-xs);
}

.sp-card__body {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-body);
}

/* --------------------------------------------------------------------------
   8. Dividers
   -------------------------------------------------------------------------- */

.sp-divider {
  border: none;
  border-top: var(--border);
  margin: var(--space-lg) 0;
}

/* --------------------------------------------------------------------------
   9. Elementor overrides — enforce design tokens
   -------------------------------------------------------------------------- */

.elementor-widget-heading .elementor-heading-title {
  font-family: var(--font-display) !important;
  font-weight: 400 !important;
}

.elementor-widget-text-editor {
  font-family: var(--font-body) !important;
  font-size: var(--text-base) !important;
  line-height: var(--leading-body) !important;
}

.elementor-button {
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* --------------------------------------------------------------------------
   10. Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1200px) {
  :root {
    --text-3xl: 56px;
    --text-2xl: 44px;
    --text-xl:  32px;
  }
}

@media (max-width: 768px) {
  :root {
    --text-3xl:  40px;
    --text-2xl:  32px;
    --text-xl:   26px;
    --space-lg:  48px;
    --space-xl:  64px;
    --space-xxl: 96px;
    --gutter:    var(--space-sm);
  }

  .sp-grid--2,
  .sp-grid--3,
  .sp-grid--4,
  .sp-grid--split {
    grid-template-columns: 1fr;
  }
}
