/* rsy-base.css — REasy base styles: reset, tokens, typography, utilities */

/* ============================================================
   CSS Custom Properties (Design Tokens)
   ============================================================ */
:root {
  /* Brand colors */
  --rsy-navy: #0F1F35;
  --rsy-navy-alt: #162840;
  --rsy-accent: #3B6FE8;
  --rsy-accent-aa-light: #1E4DBF;
  --rsy-accent-aa-dark: #6B9EFF;
  --rsy-success: #1A7A4A;
  --rsy-warning: #8A5900;

  /* Foreground tokens */
  --rsy-fg-light-primary: #0F1F35;
  --rsy-fg-light-secondary: #3D5068;
  --rsy-fg-light-muted: #6B7F96;
  --rsy-fg-dark-primary: #EFF3F8;
  --rsy-fg-dark-secondary: #8BAABF;
  --rsy-fg-dark-muted: #5A7A96;

  /* Background tokens */
  --rsy-bg-light: #F5F4F0;
  --rsy-bg-white: #FFFFFF;
  --rsy-bg-dark: #0F1F35;
  --rsy-bg-dark-alt: #162840;
  --rsy-bg-card: #FAFAF8;

  /* Border tokens */
  --rsy-border-light: #DDE2E8;
  --rsy-border-dark: #253D56;

  /* Spacing */
  --rsy-section-v: 80px;
  --rsy-section-v-mobile: 56px;
  --rsy-container: 1200px;
  --rsy-card-radius: 8px;
  --rsy-btn-radius: 6px;
}

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

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: var(--rsy-fg-light-primary);
  background: var(--rsy-bg-white);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

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

address {
  font-style: normal;
}

/* ============================================================
   Container
   ============================================================ */
.rsy-container {
  width: 100%;
  max-width: var(--rsy-container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   Typography — Headings
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

.rsy-display {
  font-size: clamp(40px, 5vw, 54px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.rsy-h1 {
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.rsy-h2 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.rsy-h3 {
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 600;
  line-height: 1.3;
}

.rsy-body-lg {
  font-size: 17px;
  font-weight: 400;
  line-height: 1.7;
}

.rsy-body {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.65;
}

.rsy-small {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
}

.rsy-eyebrow {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  line-height: 1.4;
}

/* Monospace — for HS codes, EORI, duty values */
.rsy-mono {
  font-family: 'JetBrains Mono', 'Consolas', 'Courier New', monospace;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

/* ============================================================
   Color Utility Classes
   ============================================================ */
.rsy-text-dark-primary { color: var(--rsy-fg-light-primary); }
.rsy-text-dark-secondary { color: var(--rsy-fg-light-secondary); }
.rsy-text-dark-muted { color: var(--rsy-fg-light-muted); }
.rsy-text-light-primary { color: var(--rsy-fg-dark-primary); }
.rsy-text-light-secondary { color: var(--rsy-fg-dark-secondary); }
.rsy-text-accent-light { color: var(--rsy-accent-aa-light); }
.rsy-text-accent-dark { color: var(--rsy-accent-aa-dark); }

/* ============================================================
   Section Background Variants
   ============================================================ */
.rsy-bg-dark { background: var(--rsy-bg-dark); }
.rsy-bg-dark-alt { background: var(--rsy-bg-dark-alt); }
.rsy-bg-light { background: var(--rsy-bg-light); }
.rsy-bg-white { background: var(--rsy-bg-white); }
.rsy-bg-card { background: var(--rsy-bg-card); }

/* ============================================================
   Section Layout
   ============================================================ */
.rsy-section {
  padding: var(--rsy-section-v) 0;
}

.rsy-section--sm {
  padding: 48px 0;
}

/* ============================================================
   Buttons
   ============================================================ */
.rsy-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--rsy-btn-radius);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  border: 2px solid transparent;
  transition: all 0.18s ease;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.rsy-btn--primary {
  background: var(--rsy-accent);
  color: #FFFFFF;
  border-color: var(--rsy-accent);
}

.rsy-btn--primary:hover {
  background: var(--rsy-accent-aa-light);
  border-color: var(--rsy-accent-aa-light);
  color: #FFFFFF;
}

.rsy-btn--outline-dark {
  background: transparent;
  color: var(--rsy-fg-dark-primary);
  border-color: rgba(239, 243, 248, 0.4);
}

.rsy-btn--outline-dark:hover {
  background: rgba(239, 243, 248, 0.1);
  border-color: var(--rsy-fg-dark-primary);
  color: var(--rsy-fg-dark-primary);
}

.rsy-btn--outline-light {
  background: transparent;
  color: var(--rsy-accent-aa-light);
  border-color: var(--rsy-accent-aa-light);
}

.rsy-btn--outline-light:hover {
  background: var(--rsy-accent-aa-light);
  color: #FFFFFF;
}

.rsy-btn--ghost-on-dark {
  background: transparent;
  color: var(--rsy-fg-dark-secondary);
  border-color: transparent;
}

.rsy-btn--ghost-on-dark:hover {
  color: var(--rsy-fg-dark-primary);
  background: rgba(255,255,255,0.06);
}

.rsy-btn--ghost-on-light {
  background: transparent;
  color: var(--rsy-fg-light-secondary);
  border-color: transparent;
}

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

.rsy-btn--sm {
  padding: 8px 16px;
  font-size: 13px;
}

/* ============================================================
   Fade-in animation (JS-driven)
   ============================================================ */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Failsafe: after 1.2s, force visible */
@keyframes rsy-reveal {
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: rsy-reveal 0.5s ease 1.2s forwards;
}

/* ============================================================
   Cookie Banner Styles
   ============================================================ */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--rsy-bg-dark-alt);
  border-top: 1px solid var(--rsy-border-dark);
  padding: 16px 24px;
}

.cookie-banner__inner {
  max-width: var(--rsy-container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.cookie-banner__text {
  flex: 1;
  min-width: 240px;
  font-size: 14px;
  color: var(--rsy-fg-dark-secondary);
  line-height: 1.5;
}

.cookie-banner__text a {
  color: var(--rsy-accent-aa-dark);
  text-decoration: underline;
}

.cookie-banner__actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.cookie-banner__btn {
  padding: 9px 18px;
  border-radius: var(--rsy-btn-radius);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.15s ease;
}

.cookie-banner__btn--primary {
  background: var(--rsy-accent);
  color: #FFFFFF;
  border-color: var(--rsy-accent);
}

.cookie-banner__btn--primary:hover {
  background: var(--rsy-accent-aa-dark);
  border-color: var(--rsy-accent-aa-dark);
}

.cookie-banner__btn--secondary {
  background: transparent;
  color: var(--rsy-fg-dark-secondary);
  border-color: var(--rsy-border-dark);
}

.cookie-banner__btn--secondary:hover {
  color: var(--rsy-fg-dark-primary);
  border-color: var(--rsy-fg-dark-secondary);
}

/* Body padding when cookie banner is visible */
body.cookie-visible {
  padding-bottom: 80px;
}

/* ============================================================
   Responsive Base
   ============================================================ */
@media (max-width: 768px) {
  :root {
    --rsy-section-v: 56px;
  }

  .rsy-container {
    padding: 0 16px;
  }

  .cookie-banner__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .cookie-banner__actions {
    width: 100%;
    justify-content: flex-end;
  }
}
