/* ==========================================================================
   NRLC.ai — Windows 98 × Early Apple Aesthetic
   Retro-futuristic blend: Windows 98's functional charm meets early Mac's
   playful sophistication. Think System 7, colorful icons, Chicago font,
   and that distinctive early Apple personality.
   ========================================================================== */

/* 0) CSS Reset harmonized with 98.css quirks */
*,
*::before,
*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
img, svg, video, canvas { display:block; max-width:100%; height:auto; }
button, input, select, textarea { font: inherit; }

/* 1) Early Apple × Windows 98 Design Tokens - Retro-Futuristic */
:root{
  /* Layout tokens - Early Apple's playful spacing */
  --container-max: 72rem;          /* ≈1152px */
  --container-max-wide: 80rem;     /* ≈1280px */
  --gutter: clamp(20px, 4vw, 40px);  /* Playful but functional */
  --section-pad-y: clamp(32px, 6vw, 80px);  /* Early Apple rhythm */

  /* Typography - Early Apple's font stack */
  --font-body: "Chicago", "Geneva", "Helvetica", "Arial", sans-serif;
  --font-mono: "Monaco", "Courier New", monospace;
  --prose-measure: 65ch;           /* Classic reading width */

  /* Early Apple × Win98 palette - Colorful, playful, functional */
  --win-bg: #c0c0c0;               /* Classic Win98 gray */
  --win-face: #e8e8e8;             /* Early Apple light gray */
  --win-dark: #808080;             /* Win98 dark gray */
  --win-light: #ffffff;             /* Pure white */
  --win-text: #000000;             /* Classic black text */
  --brand: #0066cc;                /* Early Apple blue */
  --brand-ink: #003366;            /* Darker blue */

  /* Early Apple's vibrant state colors */
  --ok: #00cc00;                   /* Classic Apple green */
  --warn: #ff9900;                 /* Early Apple orange */
  --err: #cc0000;                  /* Classic Apple red */
  --accent: #ff6600;               /* Early Apple accent */

  /* Early Apple's distinctive effects */
  --focus-ring: 0 0 0 2px var(--brand);
  --shadow-subtle: 2px 2px 0 0 rgba(0,0,0,0.1);
  --shadow-medium: 4px 4px 0 0 rgba(0,0,0,0.2);
  --border-radius: 4px;            /* Early Apple's subtle radius */
}

/* 2) Early Apple Typography - Playful, Readable, Distinctive */
html, body { height: 100%; }
body{
  font-family: var(--font-body);
  color: var(--win-text);
  background: var(--win-bg);
  line-height: 1.4;                /* Early Apple's tighter line height */
  text-rendering: optimizeLegibility;
  font-weight: 400;                 /* Classic weight */
  letter-spacing: 0;                /* No letter spacing */
}
a { 
  color: var(--brand); 
  text-decoration: underline;
  transition: color 0.15s ease;
}
a:hover { 
  color: var(--accent);
  text-decoration: none;
}
p { 
  margin: 0 0 1rem 0;              /* Classic paragraph spacing */
  font-size: 14px;                  /* Early Apple's standard size */
}
.prose { 
  max-width: var(--prose-measure); 
  margin-inline:auto; 
  font-size: 14px;
  line-height: 1.4;
}
.lead { 
  font-weight: 600; 
  font-size: 16px;
  line-height: 1.3;
  color: var(--win-text);
}

/* 3) Containers & Sections */
.section{ padding-block: var(--section-pad-y); }
.container{
  width: min(100% - 2*var(--gutter), var(--container-max));
  margin-inline: auto;
}
.container--wide{
  width: min(100% - 2*var(--gutter), var(--container-max-wide));
}
.full-bleed{
  margin-inline: calc(50% - 50vw);
  width: 100vw;
}

/* 4) Early Apple × Win98 Components - Playful, Functional, Distinctive */
.window { 
  margin-bottom: 1.5rem; 
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-medium);
  overflow: hidden;
  border: 2px solid var(--win-dark);
}
.window .window-body { 
  background: var(--win-face); 
  padding: 20px 24px 20px 20px;
}
.title-bar-text { 
  white-space: nowrap; 
  overflow: hidden; 
  text-overflow: ellipsis;
  font-weight: 600;
  font-size: 14px;
}

/* Early Apple's Buttons - Playful, Clickable, Distinctive */
.btn{
  display:inline-block;
  padding: 8px 16px;
  background: var(--win-face);
  border: 2px outset var(--win-light);
  border-radius: var(--border-radius);
  color: var(--win-text);
  cursor:pointer;
  user-select:none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.1s ease;
  box-shadow: var(--shadow-subtle);
}
.btn:hover{ 
  background: #f0f0f0;
  border-color: var(--brand);
}
.btn:active{ 
  border: 2px inset var(--win-light);
  background: #e0e0e0;
  transform: translateY(1px);
}
.btn--primary{ 
  color:#fff; 
  background: var(--brand); 
  border-color: var(--brand);
}
.btn--primary:hover {
  background: var(--brand-ink);
}
.btn--ghost{ 
  background: transparent; 
  border: 2px dashed var(--win-dark);
  color: var(--brand);
}
.btn--ghost:hover {
  background: rgba(0, 102, 204, 0.1);
  border-style: solid;
}

/* Focus styles for a11y */
:where(button, [href], input, select, textarea, summary):focus-visible{
  outline: none;
  box-shadow: var(--focus-ring);
}

/* Navigation - Horizontal Layout */
.menu-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--win-face);
  border: 1px solid var(--win-dark);
  padding: 8px 16px 8px 8px;
}

.menu-item {
  display: inline-block;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
}

.menu-item a {
  display: block;
  padding: 8px 12px;
  color: var(--win-text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.1s ease;
  border-radius: 2px;
}

.menu-item a:hover {
  background: var(--brand);
  color: white;
  text-decoration: none;
}

.menu-item a:active {
  background: var(--brand-ink);
}

/* 5) Layout primitives */
.grid{ display:grid; gap: clamp(12px,2vw,20px); }
.grid-2{ grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3{ grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-auto-fit{ 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
  gap: 1rem; 
}
@media (max-width: 960px){
  .grid-3{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px){
  .grid-2, .grid-3, .grid-auto-fit{ grid-template-columns: 1fr; }
  
  /* Mobile hero optimization */
  .hero-content {
    flex-direction: column !important;
    text-align: center !important;
    gap: 1rem !important;
  }
  
  .hero-logo {
    height: 60px !important;
    max-width: 200px !important;
  }
  
  .hero-heading {
    font-size: 1.5rem !important;
    line-height: 1.3 !important;
  }
  
  .lead {
    font-size: 1rem !important;
    text-align: center !important;
  }
}

/* Early Apple's Cards - Playful, Distinctive, Functional */
.card{
  background: var(--win-face);
  border: 2px groove var(--win-light);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-subtle);
  padding: 16px;
  transition: all 0.15s ease;
}
.card:hover {
  box-shadow: var(--shadow-medium);
  border-color: var(--brand);
}

/* 6) Early Apple's Utilities - Playful, Consistent, Distinctive */
.hide{ display:none !important; }
.muted{ 
  opacity: 0.7; 
  color: var(--win-dark);
}
.small{ 
  font-size: 12px; 
  line-height: 1.3;
}

/* FAQ Styling - Consistent with site colors */
details.card summary {
  color: var(--win-text);
  font-weight: 600;
  font-size: 14px;
}

details.card summary:hover {
  color: var(--brand);
}

details.card p.small.muted {
  color: var(--win-text);
  opacity: 0.8;
  font-size: 13px;
  line-height: 1.4;
  margin: 8px 0 0 0;
}
.center{ text-align:center; }
.right{ text-align:right; }
.wide{ max-width: none !important; }
.pad-y{ padding-block: var(--section-pad-y); }
.pad-x{ padding-inline: var(--gutter); }
.max-72{ max-width: var(--container-max); margin-inline:auto; }
.box-padding{ padding: 1rem; }
.margin-top-20{ margin-top: 2rem; }

/* Early Apple's Typography Scale */
.h1 { 
  font-size: 24px; 
  font-weight: 700; 
  line-height: 1.2; 
  margin: 0 0 16px 0;
  color: var(--win-text);
}
.h2 { 
  font-size: 18px; 
  font-weight: 600; 
  line-height: 1.3; 
  margin: 0 0 12px 0;
  color: var(--win-text);
}
.h3 { 
  font-size: 16px; 
  font-weight: 600; 
  line-height: 1.3;
  margin: 0 0 8px 0;
  color: var(--win-text);
}

/* 7) Ripple.js hooks — keep CSS minimal; JS draws the effect */
[data-ripple]{ position: relative; overflow: hidden; }

/* 8) Early Apple's Hero Meter - Playful, Colorful, Distinctive */
.meter{
  --h: 12px;
  height: var(--h);
  background: linear-gradient(90deg, var(--err) 0%, var(--warn) 50%, var(--ok) 100%);
  border: 2px inset var(--win-light);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
}
.meter__bar{ 
  height: 100%; 
  width: 0%; 
  background: rgba(0, 0, 0, 0.2);
  transition: width 0.2s ease;
}

/* 9) Early Apple's Tables - Functional, Distinctive, Playful */
.table{
  width:100%; 
  border-collapse: collapse; 
  background: var(--win-face);
  border: 2px groove var(--win-light);
  box-shadow: var(--shadow-subtle);
}
.table th, .table td{ 
  padding: 8px 12px; 
  border: 1px solid var(--win-dark);
  text-align: left;
  font-size: 14px;
}
.table thead th{ 
  background: #e0e0e0; 
  font-weight: 600;
  font-size: 14px;
  color: var(--win-text);
}
.table tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.05);
}
.table tbody tr:hover {
  background: rgba(0, 102, 204, 0.1);
}

/* 10) Early Apple's Forms - Functional, Distinctive, Playful */
.input, select, textarea{
  background: var(--win-light);
  border: 2px inset var(--win-light);
  border-radius: var(--border-radius);
  padding: 6px 8px;
  width: 100%;
  font-size: 14px;
  font-family: var(--font-body);
  transition: all 0.1s ease;
  box-shadow: var(--shadow-subtle);
}
.input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: var(--focus-ring);
}
label{ 
  display:block; 
  margin-bottom: 4px; 
  font-weight: 600; 
  font-size: 14px;
  color: var(--win-text);
}

/* 11) Early Apple's Dark Mode - Retro-Futuristic */
@media (prefers-color-scheme: dark){
  :root{
    --win-bg: #2a2a2a; 
    --win-face: #3a3a3a; 
    --win-dark: #808080; 
    --win-light: #ffffff;
    --win-text: #ffffff; 
    --brand: #4a9eff; 
    --brand-ink: #7bb3ff;
    --shadow-subtle: 2px 2px 0 0 rgba(0,0,0,0.3);
    --shadow-medium: 4px 4px 0 0 rgba(0,0,0,0.4);
  }
  .btn--primary{ 
    color: #ffffff; 
    background: var(--brand);
  }
  .card {
    background: var(--win-face);
    border-color: var(--win-dark);
  }
  /* Override dark mode for window bodies to maintain light theme */
  .window .window-body {
    background: #e8e8e8 !important;
    color: #000000 !important;
  }
  .window .title-bar {
    background: #c0c0c0 !important;
    color: #000000 !important;
  }
  .window .title-bar-text {
    color: #000000 !important;
  }
  /* Override dark mode for all text elements */
  .window h1, .window h2, .window h3, .window h4, .window h5, .window h6,
  .window p, .window span, .window div, .window a, .window li {
    color: #000000 !important;
  }
  .window a {
    color: #0066cc !important;
  }
  .window a:hover {
    color: #ff6600 !important;
  }
  /* Override dark mode for buttons */
  .window .btn {
    background: #e8e8e8 !important;
    color: #000000 !important;
    border-color: #ffffff !important;
  }
  .window .btn--primary {
    background: #0066cc !important;
    color: #ffffff !important;
  }
}

/* 12) Early Apple's Print Style - Functional, Clean */
@media print{
  .title-bar, .status-bar, .btn{ display:none !important; }
  .window, .card{ 
    box-shadow: none; 
    border: 1px solid #000; 
    border-radius: 0;
  }
  body {
    background: white;
    color: black;
  }
}

/* 13) Early Apple's Utility Classes - Playful, Functional, Distinctive */
.muted-text { 
  color: var(--win-dark); 
  font-size: 12px; 
  margin-bottom: 16px; 
  opacity: 0.7;
}
.field-row-center { 
  display: flex; 
  justify-content: center; 
  margin-top: 20px; 
  gap: 12px;
}
.grid-auto-fit { 
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
  gap: 16px; 
  margin-top: 20px; 
}
.grid-gap-4 { gap: 8px; }
.flex-wrap { 
  display: flex; 
  gap: 12px; 
  flex-wrap: wrap; 
  align-items: center;
}
.margin-top-20 { margin-top: 20px; }

/* Footer Styling */
.footer {
  background: var(--win-face);
  border: 2px groove var(--win-light);
  padding: 16px;
  margin-top: 32px;
  text-align: center;
  box-shadow: var(--shadow-subtle);
}

.footer small {
  display: block;
  color: var(--win-dark);
  font-size: 12px;
  line-height: 1.4;
  margin-bottom: 4px;
}

.footer small:last-child {
  margin-bottom: 0;
  opacity: 0.8;
}

.footer-links {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--brand);
  text-decoration: underline;
  font-size: 12px;
  font-weight: 500;
  transition: color 0.1s ease;
}

.footer-links a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* Performance optimizations */
.btn, .card, .menu-item a, details.card summary, .table tbody tr, .footer-links a {
  will-change: auto;
  transition: all 0.1s ease;
}

/* Disable animations on low-end devices */
@media (prefers-reduced-motion: reduce) {
  .btn, .card, .menu-item a, details.card summary, .table tbody tr, .footer-links a {
    transition: none;
  }
}

/* END Early Apple × Windows 98 — Retro-Futuristic, Playful, Distinctive */