/* rtl-base.css — Retailloom base styles: tokens, reset, typography */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  /* Brand palette */
  --rtl-brand-primary: #1B3A2D;
  --rtl-accent-decorative: #2ECC7A;
  --rtl-accent-aa-on-light: #1B6B4A;
  --rtl-accent-aa-on-dark: #4FD494;

  /* Foreground */
  --rtl-fg-on-light-primary: #1A2622;
  --rtl-fg-on-light-secondary: #4A5E57;
  --rtl-fg-on-dark-primary: #F0EDE6;
  --rtl-fg-on-dark-secondary: #A8C4B8;

  /* Backgrounds */
  --rtl-bg-light: #F7F5F0;
  --rtl-bg-white: #FFFFFF;
  --rtl-bg-dark: #1B3A2D;
  --rtl-bg-dark-alt: #0F2619;
  --rtl-bg-mid: #EAE7DF;

  /* CTA */
  --rtl-cta-primary-bg: #1B6B4A;
  --rtl-cta-primary-text: #FFFFFF;
  --rtl-cta-primary-hover: #145C3E;

  /* Data colors */
  --rtl-data-green: #2ECC7A;
  --rtl-data-amber: #D4911B;
  --rtl-data-red: #C0392B;
  --rtl-data-neutral: #8FA89F;

  /* Typography */
  --rtl-font-heading: 'Inter', system-ui, -apple-system, sans-serif;
  --rtl-font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --rtl-font-data: 'IBM Plex Mono', Menlo, Consolas, monospace;

  /* Spacing */
  --rtl-section-pad-light: 80px;
  --rtl-section-pad-dark: 100px;
  --rtl-card-pad: 24px;

  /* Border */
  --rtl-border-light: rgba(26, 38, 34, 0.1);
  --rtl-border-dark: rgba(240, 237, 230, 0.12);

  /* Shadows */
  --rtl-shadow-card: 0 2px 12px rgba(26, 38, 34, 0.08);
  --rtl-shadow-card-hover: 0 8px 32px rgba(26, 38, 34, 0.14);
  --rtl-shadow-nav: 0 1px 0 rgba(26, 38, 34, 0.08);
}

/* ============================================================
   RESET
   ============================================================ */
*, *::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(--rtl-font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--rtl-fg-on-light-primary);
  background: var(--rtl-bg-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

img {
  height: auto;
}

a {
  color: var(--rtl-accent-aa-on-light);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--rtl-brand-primary);
  text-decoration: underline;
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

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

table {
  border-collapse: collapse;
  width: 100%;
}

address {
  font-style: normal;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--rtl-font-heading);
  line-height: 1.2;
  color: var(--rtl-fg-on-light-primary);
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 600; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); font-weight: 600; }
h3 { font-size: clamp(1.125rem, 2.5vw, 1.5rem); font-weight: 500; }
h4 { font-size: 1.125rem; font-weight: 500; }
h5 { font-size: 1rem; font-weight: 600; }
h6 { font-size: 0.875rem; font-weight: 600; }

p {
  line-height: 1.6;
  color: var(--rtl-fg-on-light-secondary);
}

strong { font-weight: 600; color: inherit; }
em { font-style: italic; }

.rtl-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.rtl-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px);
}

.rtl-container--narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px);
}

.rtl-section--light {
  background: var(--rtl-bg-light);
  padding: var(--rtl-section-pad-light) 0;
}

.rtl-section--white {
  background: var(--rtl-bg-white);
  padding: var(--rtl-section-pad-light) 0;
}

.rtl-section--mid {
  background: var(--rtl-bg-mid);
  padding: var(--rtl-section-pad-light) 0;
}

.rtl-section--dark {
  background: var(--rtl-bg-dark);
  padding: var(--rtl-section-pad-dark) 0;
}

.rtl-section--dark-alt {
  background: var(--rtl-bg-dark-alt);
  padding: var(--rtl-section-pad-dark) 0;
}

/* Section headers */
.rtl-section-header {
  margin-bottom: 48px;
}

.rtl-section-header--centered {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}

/* Dark section text colors */
.rtl-section--dark h1,
.rtl-section--dark h2,
.rtl-section--dark h3,
.rtl-section--dark h4,
.rtl-section--dark h5 {
  color: var(--rtl-fg-on-dark-primary);
}

.rtl-section--dark p {
  color: var(--rtl-fg-on-dark-secondary);
}

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

.rtl-section--dark a {
  color: var(--rtl-accent-aa-on-dark);
}

.rtl-section--dark-alt h1,
.rtl-section--dark-alt h2,
.rtl-section--dark-alt h3 {
  color: var(--rtl-fg-on-dark-primary);
}

.rtl-section--dark-alt p {
  color: var(--rtl-fg-on-dark-secondary);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.rtl-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 6px;
  transition: all 0.15s ease;
  white-space: nowrap;
  text-decoration: none;
}

.rtl-btn:hover {
  text-decoration: none;
}

.rtl-btn--primary {
  background: var(--rtl-cta-primary-bg);
  color: var(--rtl-cta-primary-text);
  border: 2px solid var(--rtl-cta-primary-bg);
}

.rtl-btn--primary:hover {
  background: var(--rtl-cta-primary-hover);
  border-color: var(--rtl-cta-primary-hover);
  color: var(--rtl-cta-primary-text);
}

.rtl-btn--outline-light {
  background: transparent;
  color: var(--rtl-fg-on-light-primary);
  border: 2px solid var(--rtl-border-light);
}

.rtl-btn--outline-light:hover {
  border-color: var(--rtl-brand-primary);
  color: var(--rtl-brand-primary);
  background: transparent;
}

.rtl-btn--outline-dark {
  background: transparent;
  color: var(--rtl-fg-on-dark-primary);
  border: 2px solid var(--rtl-border-dark);
}

.rtl-btn--outline-dark:hover {
  border-color: var(--rtl-accent-aa-on-dark);
  color: var(--rtl-accent-aa-on-dark);
  background: transparent;
}

.rtl-btn--ghost-light {
  background: transparent;
  color: var(--rtl-fg-on-light-secondary);
  border: none;
  padding-left: 0;
  padding-right: 0;
}

.rtl-btn--ghost-light:hover {
  color: var(--rtl-fg-on-light-primary);
}

.rtl-btn--sm {
  padding: 8px 16px;
  font-size: 0.875rem;
}

.rtl-btn--lg {
  padding: 16px 32px;
  font-size: 1rem;
}

/* ============================================================
   DATA TYPOGRAPHY
   ============================================================ */
.rtl-data {
  font-family: var(--rtl-font-data);
  font-size: 0.875rem;
  line-height: 1.3;
}

.rtl-data--green { color: var(--rtl-data-green); }
.rtl-data--amber { color: var(--rtl-data-amber); }
.rtl-data--red { color: var(--rtl-data-red); }
.rtl-data--neutral { color: var(--rtl-data-neutral); }

/* ============================================================
   BADGE / TAG
   ============================================================ */
.rtl-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-family: var(--rtl-font-data);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.rtl-badge--cut {
  background: rgba(192, 57, 43, 0.12);
  color: #c0392b;
}

.rtl-badge--keep {
  background: rgba(212, 145, 27, 0.14);
  color: #b87a0f;
}

.rtl-badge--reorder {
  background: rgba(46, 204, 122, 0.14);
  color: #1B6B4A;
}

.rtl-badge--category {
  background: var(--rtl-bg-mid);
  color: var(--rtl-fg-on-light-secondary);
  font-family: var(--rtl-font-body);
  font-size: 0.75rem;
  font-weight: 500;
}

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

:focus-visible {
  outline: 3px solid var(--rtl-accent-aa-on-light);
  outline-offset: 2px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  :root {
    --rtl-section-pad-light: 56px;
    --rtl-section-pad-dark: 64px;
  }
}
