/* gws-base.css — GetWhys base styles: tokens, reset, typography */

/* ============================================================
   CSS Custom Properties (Design Tokens)
   ============================================================ */
:root {
  /* Brand palette */
  --gws-brand-primary: #1A1510;
  --gws-brand-warm-mid: #3D2B1A;
  --gws-accent-clay: #C4622D;
  --gws-accent-decorative: #E8845A;
  --gws-accent-aa-on-light: #A34E1F;
  --gws-accent-aa-on-dark: #E8845A;

  /* Foreground tokens */
  --gws-fg-on-light-primary: #1A1510;
  --gws-fg-on-light-secondary: #5C4A3A;
  --gws-fg-on-dark-primary: #F5EFE8;
  --gws-fg-on-dark-secondary: #B8A090;

  /* Background tokens */
  --gws-bg-light: #FDFAF6;
  --gws-bg-cream: #F5EFE8;
  --gws-bg-white: #FFFFFF;
  --gws-bg-dark: #1A1510;
  --gws-bg-dark-alt: #2B1F14;

  /* Typography */
  --gws-font-heading: 'Fraunces', Georgia, serif;
  --gws-font-body: 'Inter', system-ui, sans-serif;
  --gws-font-mono: 'JetBrains Mono', Consolas, monospace;

  /* Spacing */
  --gws-section-pad-desktop: 96px;
  --gws-section-pad-mobile: 64px;
  --gws-container-max: 1120px;
  --gws-content-max: 760px;

  /* Decorative */
  --gws-radius-card: 6px;
  --gws-radius-input: 4px;
  --gws-radius-tag: 2px;
  --gws-shadow-warm: 0 2px 12px rgba(26, 21, 16, 0.08);
  --gws-shadow-warm-md: 0 4px 24px rgba(26, 21, 16, 0.12);
}

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

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

body {
  font-family: var(--gws-font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--gws-fg-on-light-primary);
  background-color: var(--gws-bg-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--gws-accent-aa-on-light);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: inherit;
}

input, textarea, select {
  font-family: inherit;
}

address {
  font-style: normal;
}

/* ============================================================
   Typography Scale
   ============================================================ */
.gws-display {
  font-family: var(--gws-font-heading);
  font-size: clamp(48px, 5vw, 64px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h1, .gws-h1 {
  font-family: var(--gws-font-heading);
  font-size: clamp(36px, 4vw, 48px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h2, .gws-h2 {
  font-family: var(--gws-font-heading);
  font-size: clamp(26px, 2.8vw, 32px);
  font-weight: 500;
  line-height: 1.25;
}

h3, .gws-h3 {
  font-family: var(--gws-font-body);
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 600;
  line-height: 1.35;
}

h4, .gws-h4 {
  font-family: var(--gws-font-body);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}

.gws-body-lg {
  font-size: 18px;
  line-height: 1.7;
}

.gws-body {
  font-size: 16px;
  line-height: 1.6;
}

.gws-caption {
  font-size: 13px;
  line-height: 1.5;
  color: var(--gws-fg-on-light-secondary);
}

.gws-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gws-mono {
  font-family: var(--gws-font-mono);
  font-size: 13px;
}

/* ============================================================
   Layout Utilities
   ============================================================ */
.gws-container {
  width: 100%;
  max-width: var(--gws-container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(20px, 4vw, 40px);
  padding-right: clamp(20px, 4vw, 40px);
}

.gws-content {
  max-width: var(--gws-content-max);
}

/* Section backgrounds */
.gws-section {
  padding-top: var(--gws-section-pad-desktop);
  padding-bottom: var(--gws-section-pad-desktop);
}

.gws-section--light { background-color: var(--gws-bg-light); }
.gws-section--cream { background-color: var(--gws-bg-cream); }
.gws-section--white { background-color: var(--gws-bg-white); }
.gws-section--dark { background-color: var(--gws-bg-dark); }
.gws-section--dark-alt { background-color: var(--gws-bg-dark-alt); }

/* ============================================================
   Buttons
   ============================================================ */
.gws-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--gws-radius-card);
  font-family: var(--gws-font-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  border: 2px solid transparent;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}

.gws-btn:hover {
  text-decoration: none;
  opacity: 0.92;
}

/* Primary — dark section (bg #E8845A text #1A1510) */
.gws-section--dark .gws-btn--primary,
.gws-section--dark-alt .gws-btn--primary {
  background-color: var(--gws-accent-aa-on-dark);
  color: var(--gws-brand-primary);
  border-color: var(--gws-accent-aa-on-dark);
}

.gws-section--dark .gws-btn--primary:hover,
.gws-section--dark-alt .gws-btn--primary:hover {
  background-color: #F09060;
  border-color: #F09060;
  opacity: 1;
}

/* Primary — light section (bg #A34E1F text #FFFFFF) */
.gws-btn--primary {
  background-color: var(--gws-accent-aa-on-light);
  color: #FFFFFF;
  border-color: var(--gws-accent-aa-on-light);
}

.gws-btn--primary:hover {
  background-color: #8C4218;
  border-color: #8C4218;
  opacity: 1;
}

/* Outline on light */
.gws-btn--outline-on-light {
  background-color: transparent;
  color: var(--gws-fg-on-light-primary);
  border-color: var(--gws-fg-on-light-primary);
}

.gws-btn--outline-on-light:hover {
  background-color: var(--gws-fg-on-light-primary);
  color: var(--gws-fg-on-dark-primary);
  opacity: 1;
}

/* Outline on dark */
.gws-btn--outline-on-dark {
  background-color: transparent;
  color: var(--gws-fg-on-dark-primary);
  border-color: rgba(245, 239, 232, 0.5);
}

.gws-btn--outline-on-dark:hover {
  border-color: var(--gws-fg-on-dark-primary);
  opacity: 1;
}

/* Ghost on light */
.gws-btn--ghost-on-light {
  background-color: transparent;
  color: var(--gws-fg-on-light-primary);
  border-color: transparent;
}

.gws-btn--ghost-on-light:hover {
  background-color: rgba(26, 21, 16, 0.06);
  opacity: 1;
}

/* Ghost on dark */
.gws-btn--ghost-on-dark {
  background-color: transparent;
  color: var(--gws-fg-on-dark-primary);
  border-color: transparent;
}

.gws-btn--ghost-on-dark:hover {
  background-color: rgba(245, 239, 232, 0.1);
  opacity: 1;
}

/* Text link */
.gws-btn--text-link {
  background-color: transparent;
  color: var(--gws-accent-aa-on-light);
  border-color: transparent;
  padding-left: 0;
  padding-right: 0;
  font-size: 15px;
}

.gws-btn--text-link::after {
  content: ' →';
  font-weight: 400;
}

.gws-btn--text-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* Dark section text-link */
.gws-section--dark .gws-btn--text-link,
.gws-section--dark-alt .gws-btn--text-link {
  color: var(--gws-accent-aa-on-dark);
}

/* ============================================================
   Tags / Badges
   ============================================================ */
.gws-tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: var(--gws-radius-tag);
  font-family: var(--gws-font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background-color: rgba(196, 98, 45, 0.12);
  color: var(--gws-accent-aa-on-light);
}

.gws-tag--clay {
  background-color: var(--gws-accent-clay);
  color: #FFFFFF;
}

.gws-tag--on-dark {
  background-color: rgba(232, 132, 90, 0.18);
  color: var(--gws-accent-aa-on-dark);
}

/* ============================================================
   Eyebrow label
   ============================================================ */
.gws-eyebrow {
  display: block;
  font-family: var(--gws-font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.gws-section--light .gws-eyebrow,
.gws-section--cream .gws-eyebrow,
.gws-section--white .gws-eyebrow {
  color: var(--gws-accent-aa-on-light);
}

.gws-section--dark .gws-eyebrow,
.gws-section--dark-alt .gws-eyebrow {
  color: var(--gws-accent-aa-on-dark);
}

/* ============================================================
   Divider
   ============================================================ */
.gws-divider {
  border: none;
  border-top: 1px solid rgba(26, 21, 16, 0.1);
  margin: 0;
}

.gws-section--dark .gws-divider,
.gws-section--dark-alt .gws-divider {
  border-top-color: rgba(245, 239, 232, 0.12);
}

/* ============================================================
   Focus styles (accessibility)
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--gws-accent-clay);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ============================================================
   Responsive utilities
   ============================================================ */
@media (max-width: 768px) {
  .gws-section {
    padding-top: var(--gws-section-pad-mobile);
    padding-bottom: var(--gws-section-pad-mobile);
  }
}
