/**
 * NCH Design System Tokens
 * Version: 0.1.2
 *
 * Source of truth for all design values.
 * NEVER use raw hex codes or pixel values in components — use these tokens.
 */

.nch-newsletter, .nch-mobile-signup {
  /* ============================================
   * COLORS
   * Semantic naming — what it's FOR, not what it IS
   * ============================================ */

  /* --- Brand --- */
  --color-brand-primary: #6B9CC3;      /* Step circles, main brand blue (from live DOM) */
  --color-brand-primary-dark: #4a7c9e; /* Hover/active states */
  --color-brand-primary-light: #edf4fa;/* Subtle tint backgrounds */
  --color-brand-accent: #8FBAD8;       /* Eyebrow text, lighter accent blue */

  /* --- Text --- */
  --color-text-primary: #0E1C2D;       /* Dark navy headings (from live DOM) */
  --color-text-secondary: #4a4a4a;     /* Subdued text, captions */
  --color-text-muted: #717171;         /* Hints, placeholders */
  --color-text-inverse: #ffffff;       /* Text on dark backgrounds */
  --color-text-link: var(--color-brand-primary);
  --color-text-link-hover: var(--color-brand-primary-dark);

  /* --- Backgrounds --- */
  --color-bg-page: #ffffff;            /* Main page background */
  --color-bg-surface: #f7f8f9;         /* Cards, sections, page background */
  --color-bg-surface-alt: #f0f2f4;     /* Alternating rows, subtle contrast */
  --color-bg-overlay: rgba(0, 0, 0, 0.5); /* Modal overlays */

  /* --- Borders --- */
  --color-border-default: #e0e0e0;     /* Standard borders */
  --color-border-subtle: #eeeeee;      /* Very light dividers */
  --color-border-focus: var(--color-brand-primary); /* Focus rings */

  /* --- Status --- */
  --color-status-success: #28a745;
  --color-status-warning: #ffc107;
  --color-status-error: #dc3545;
  --color-status-info: #17a2b8;


  /* ============================================
   * TYPOGRAPHY
   * ============================================ */

  /* --- Font Families --- */
  --font-family-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-family-heading: var(--font-family-base);
  --font-family-mono: "SF Mono", Monaco, "Cascadia Code", monospace;

  /* --- Font Sizes --- */
  --font-size-xs: 0.75rem;   /* 12px */
  --font-size-sm: 0.875rem;  /* 14px */
  --font-size-base: 1rem;    /* 16px */
  --font-size-lg: 1.125rem;  /* 18px */
  --font-size-xl: 1.25rem;   /* 20px */
  --font-size-2xl: 1.5rem;   /* 24px */
  --font-size-3xl: 1.875rem; /* 30px */
  --font-size-4xl: 2.25rem;  /* 36px */

  /* --- Font Weights --- */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* --- Line Heights --- */
  --line-height-tight: 1.25;
  --line-height-base: 1.5;
  --line-height-relaxed: 1.75;


  /* ============================================
   * SPACING
   * 4px base unit scale
   * ============================================ */

  --space-0: 0;
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-5: 1.25rem;  /* 20px */
  --space-6: 1.5rem;   /* 24px */
  --space-8: 2rem;     /* 32px */
  --space-10: 2.5rem;  /* 40px */
  --space-12: 3rem;    /* 48px */
  --space-16: 4rem;    /* 64px */
  --space-20: 5rem;    /* 80px */
  --space-24: 6rem;    /* 96px */


  /* ============================================
   * BORDER RADIUS
   * ============================================ */

  --radius-none: 0;
  --radius-sm: 0.25rem;   /* 4px - subtle rounding */
  --radius-md: 0.5rem;    /* 8px - standard cards/buttons */
  --radius-lg: 0.75rem;   /* 12px - larger cards */
  --radius-xl: 1rem;      /* 16px - prominent elements */
  --radius-full: 9999px;  /* Pills, circular elements */


  /* ============================================
   * SHADOWS
   * ============================================ */

  --shadow-none: none;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15), 0 10px 10px rgba(0, 0, 0, 0.04);
  --shadow-focus: 0 0 0 3px rgba(107, 156, 195, 0.3); /* Focus ring using brand color #6B9CC3 */


  /* ============================================
   * BREAKPOINTS
   * Mobile-first: use min-width in media queries
   * ============================================ */

  /*
   * CSS custom properties can't be used directly in media queries.
   * Reference these values in your media queries:
   *
   * --breakpoint-sm: 640px   (landscape phones)
   * --breakpoint-md: 768px   (tablets)
   * --breakpoint-lg: 1024px  (laptops)
   * --breakpoint-xl: 1280px  (desktops)
   * --breakpoint-2xl: 1536px (large screens)
   */


  /* ============================================
   * TRANSITIONS
   * ============================================ */

  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;


  /* ============================================
   * Z-INDEX SCALE
   * ============================================ */

  --z-base: 0;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal-backdrop: 300;
  --z-modal: 400;
  --z-toast: 500;
}

/* Modal stays in the browser top layer, above Atlas and IDX; all styles are scoped. */
.nch-newsletter { box-sizing: border-box; width: min(28rem, calc(100vw - var(--space-8))); max-height: calc(100dvh - var(--space-8)); padding: var(--space-8); border: 1px solid var(--color-border-default); border-radius: var(--radius-lg); background: var(--color-bg-page); color: var(--color-text-primary); box-shadow: var(--shadow-xl); font: var(--font-size-base)/var(--line-height-base) var(--nch-shell-font, var(--font-family-base)); overflow: auto; overscroll-behavior: contain; }
.nch-newsletter::backdrop { background: var(--color-bg-overlay); }
.nch-newsletter *, .nch-newsletter *::before, .nch-newsletter *::after { box-sizing: border-box; }
.nch-newsletter .nch-nl-x { position: absolute; top: var(--space-2); right: var(--space-2); width: var(--space-12); height: var(--space-12); padding: 0; border: 0; background: transparent; color: var(--color-text-primary); font-size: var(--font-size-2xl); cursor: pointer; }
.nch-newsletter .nch-nl-k { padding-right: var(--space-8); font-size: var(--font-size-xs); letter-spacing: .12em; text-transform: uppercase; color: var(--color-text-secondary); }
.nch-newsletter .nch-nl-h { font: var(--font-weight-semibold) var(--font-size-2xl)/var(--line-height-tight) var(--font-family-heading); margin: var(--space-3) 0; color: var(--color-text-primary); }
.nch-newsletter .nch-nl-sub { font-size: var(--font-size-sm); margin: 0 0 var(--space-5); }
.nch-newsletter .nch-nl-field { margin-top: var(--space-4); }
.nch-newsletter .nch-nl-lbl { display: block; font-size: var(--font-size-sm); font-weight: var(--font-weight-semibold); margin-bottom: var(--space-2); }
.nch-newsletter input:not([type=checkbox]), .nch-newsletter select, .nch-newsletter textarea { display: block; width: 100%; margin: 0; padding: var(--space-3); border: 1px solid var(--color-border-default); border-radius: var(--radius-sm); background: var(--color-bg-page); color: var(--color-text-primary); font: inherit; font-size: var(--font-size-base); resize: vertical; }
.nch-newsletter .nch-nl-choice { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-3) 0; font-size: var(--font-size-sm); cursor: pointer; }
.nch-newsletter input[type=checkbox] { flex: none; width: var(--space-5); height: var(--space-5); margin: 0; accent-color: var(--color-text-primary); }
.nch-newsletter .nch-nl-next { display: block; width: 100%; min-height: var(--space-12); margin-top: var(--space-5); padding: var(--space-3) var(--space-4); border: 0; border-radius: var(--radius-sm); background: var(--color-text-primary); color: var(--color-text-inverse); font: inherit; font-weight: var(--font-weight-semibold); cursor: pointer; }
.nch-newsletter .nch-nl-next:disabled { opacity: .65; cursor: wait; }
.nch-newsletter .nch-nl-err { display: none; margin: var(--space-3) 0 0; color: var(--color-status-error); font-size: var(--font-size-sm); }
.nch-newsletter.bad .nch-nl-err { display: block; }
.nch-newsletter .err { outline: 2px solid var(--color-status-error); outline-offset: 2px; }
.nch-newsletter :focus-visible { outline: 2px solid var(--color-border-focus); outline-offset: 3px; }
.nch-newsletter [hidden] { display: none !important; }
@media (max-width: 639px) { .nch-newsletter { padding: var(--space-6); } }

.nch-mast .nch-mast__cta { cursor: pointer; }

.nch-mobile-signup { padding: var(--space-3) var(--space-5); border: 1px solid var(--color-border-default); border-radius: var(--radius-sm); background: var(--color-bg-page); color: var(--color-text-primary); font: inherit; font-size: var(--font-size-lg); cursor: pointer; }
.nch-mobile-signup:focus-visible { outline: 2px solid var(--color-border-focus); outline-offset: 3px; }
