/**
 * Chill-LOC Theme v2
 * Consolidated design system extracted from official logo
 */

/* ═══════════════════════════════════════════════════════════════════
   TOKENS - Design Variables
   ═══════════════════════════════════════════════════════════════════ */
:root {
  /* Palette extracted from Chill-LOC logo */
  --bg-0: #0E0E13;   /* deepest */
  --bg-1: #131218;   /* deep */
  --surface: rgba(25, 35, 65, 0.72);      /* #192341 */
  --surface-solid: #192341;
  --surface-2: rgba(20, 24, 38, 0.70);    /* #141826 */

  --text: #C8EFFC;      /* frost white */
  --muted: rgba(200, 239, 252, 0.72);
  --muted-2: rgba(200, 239, 252, 0.55);

  --primary: #2150A7;   /* logo deep blue */
  --primary-2: #66A8DE; /* logo glow blue */
  --frost: #C8EFFC;

  --line: rgba(102, 168, 222, 0.18);
  --line-strong: rgba(102, 168, 222, 0.30);

  /* Status colors */
  --success: #2ecc71;
  --warning: #f39c12;
  --danger: #e74c3c;
  --info: #3498db;

  /* Radii */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 24px;

  /* Shadows */
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 38px rgba(102, 168, 222, 0.40);

  /* Typography */
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* Gradients */
  --hero-glow: radial-gradient(circle at 52% 16%,
    rgba(102, 168, 222, 0.22) 0%,
    rgba(33, 80, 167, 0.14) 24%,
    rgba(14, 14, 19, 0) 64%);

  --page-grad:
    radial-gradient(circle at 18% 10%,
      rgba(102, 168, 222, 0.12) 0%,
      rgba(14, 14, 19, 0) 55%),
    radial-gradient(circle at 92% 36%,
      rgba(33, 80, 167, 0.10) 0%,
      rgba(14, 14, 19, 0) 58%);

  /* Animation */
  --ease: cubic-bezier(.2,.8,.2,1);
  --dur: 220ms;
}

/* ═══════════════════════════════════════════════════════════════════
   BASE - Reset & Typography
   ═══════════════════════════════════════════════════════════════════ */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{height:100%;margin:0;padding:0}
body{height:100%;margin:0;padding:0}
#auditorBanner:empty{display:none}
canvas#mist,canvas#snow{display:block;margin:0;padding:0;line-height:0}
body>*:first-child{margin-top:0!important}
body{
  margin:0;
  font-family:var(--font);
  color:var(--text);
  background-color:var(--bg-0);
  background-image:var(--page-grad);
  overflow-x:hidden;
  line-height: 1.5;
}

/* Subtle grain texture */
body::before{
  content:"";
  position:fixed; inset:0; pointer-events:none;
  opacity:.08; mix-blend-mode:overlay;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");
  z-index: -1;
}

a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}
.container{width:min(1120px,calc(100% - 48px));margin:0 auto}
h1,h2,h3,h4,h5,h6{margin:0 0 12px;letter-spacing:-.02em;color:var(--text)}
h1{font-size:clamp(42px,5vw,64px);line-height:1.02}
h2{font-size:clamp(26px,3vw,36px);line-height:1.15}
h3{font-size:18px;line-height:1.2}
p{margin:0 0 12px}
.lead{font-size:16.5px;line-height:1.55;color:var(--muted);max-width:56ch}
.muted{color:var(--muted)}
.tiny{font-size:12px}
.text-accent{
  background:linear-gradient(90deg,var(--primary-2),var(--frost));
  -webkit-background-clip:text;background-clip:text;color:transparent;
}
.link{display:inline-flex;gap:8px;align-items:center;color:var(--primary-2);font-weight:700}
.link:hover{filter:brightness(1.1)}

/* ═══════════════════════════════════════════════════════════════════
   LAYOUT - Structure & Sections
   ═══════════════════════════════════════════════════════════════════ */
canvas#mist,canvas#snow{
  display:block;
  margin:0!important;
  padding:0!important;
  line-height:0;
  font-size:0;
  position:fixed!important;
  top:0!important;
  left:0!important;
  right:0;
  bottom:0;
  width:100%!important;
  height:100%!important;
  z-index:0;
  pointer-events:none;
}
canvas#mist{opacity:.6}
header,header.nav,.nav{margin-top:0!important}

.site-header{
  position:sticky;top:0;z-index:10;
  backdrop-filter:blur(12px);
  background:linear-gradient(180deg,rgba(14,14,19,.88),rgba(14,14,19,.38));
  border-bottom:1px solid var(--line);
}
.header-inner{display:flex;align-items:center;gap:18px;padding:14px 0}
.brand{display:flex;align-items:center;gap:10px;min-width:260px}
.brand-mark{width:26px;height:26px;border-radius:8px;box-shadow:var(--shadow-glow)}
.brand-name{font-weight:850;letter-spacing:.02em}

.site-nav{display:flex;gap:16px;color:var(--muted);font-weight:700}
.site-nav a{padding:8px 10px;border-radius:10px;transition:background var(--dur) var(--ease), color var(--dur) var(--ease)}
.site-nav a:hover{background:rgba(255,255,255,.04);color:var(--text)}

.header-actions{margin-left:auto;display:flex;gap:10px}

.hero{position:relative;z-index:1;padding:54px 0 30px;background-image:var(--hero-glow)}
.hero-grid{display:grid;grid-template-columns:1.2fr .85fr;gap:28px;align-items:start}
@media(max-width:980px){.hero-grid{grid-template-columns:1fr}.brand{min-width:unset}.site-nav{display:none}}

.pill{
  display:inline-flex;gap:10px;align-items:center;
  padding:10px 12px;border-radius:999px;
  border:1px solid var(--line);
  background:rgba(25,35,65,.26);
  color:var(--muted);margin-bottom:16px;
}
.pill .dot{width:10px;height:10px;border-radius:999px;background:var(--primary-2);box-shadow:0 0 18px rgba(102,168,222,.75)}

.hero-cta{display:flex;gap:12px;margin:18px 0;flex-wrap:wrap}
.hero-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:18px}
@media(max-width:980px){.hero-metrics{grid-template-columns:1fr}}

.hero-panel{display:grid;gap:12px}

.logo-stage{
  border-radius:var(--r-xl);
  border:1px solid var(--line);
  background:
    radial-gradient(circle at 40% 40%, rgba(102,168,222,.18), rgba(0,0,0,0) 62%),
    rgba(20,24,38,.38);
  padding:18px;box-shadow:var(--shadow-soft);overflow:hidden;
}
.logo-stage img{width:100%;height:auto;border-radius:16px}

.section{position:relative;z-index:1;padding:52px 0}
.section-alt{background:linear-gradient(180deg,rgba(25,35,65,.18),rgba(14,14,19,0));border-top:1px solid var(--line)}
.section-head{max-width:70ch;margin-bottom:18px}

.grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.grid-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.grid-4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
@media(max-width:980px){.grid-2,.grid-3,.grid-4{grid-template-columns:1fr}}

.split{display:grid;grid-template-columns:1fr .95fr;gap:16px;align-items:start}
@media(max-width:980px){.split{grid-template-columns:1fr}}

.site-footer{position:relative;z-index:1;padding:26px 0 42px;border-top:1px solid var(--line)}
.footer-inner{display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap}

.callouts{display:grid;gap:12px;margin-top:18px}
.callout{display:flex;gap:12px;align-items:center}
.callout-icon{width:44px;height:44px;display:grid;place-items:center;border-radius:16px;background:rgba(25,35,65,.35);border:1px solid var(--line)}
.callout-title{font-weight:800}

/* ═══════════════════════════════════════════════════════════════════
   COMPONENTS - UI Elements
   ═══════════════════════════════════════════════════════════════════ */

/* Buttons */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:10px;
  padding:12px 16px;border-radius:12px;border:1px solid transparent;
  background:rgba(255,255,255,.04);color:var(--text);font-weight:800;
  transition:transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease), background var(--dur) var(--ease);
  cursor:pointer;user-select:none;
  text-decoration: none;
}
.btn:hover{transform:translateY(-1px);background:rgba(255,255,255,.06)}
.btn:active{transform:translateY(0)}
.btn-lg{padding:14px 20px;border-radius:14px}
.btn-sm{padding:8px 12px;border-radius:8px;font-size:14px}

.btn-primary{
  background:linear-gradient(90deg,var(--primary),var(--primary-2));
  border-color:rgba(255,255,255,.08);
  box-shadow:0 0 26px rgba(102,168,222,.32);
}
.btn-primary:hover{box-shadow:0 0 34px rgba(102,168,222,.52)}

.btn-success{
  background:linear-gradient(90deg,#27ae60,#2ecc71);
  border-color:rgba(255,255,255,.08);
  box-shadow:0 0 26px rgba(46,204,113,.32);
}
.btn-success:hover{box-shadow:0 0 34px rgba(46,204,113,.52)}

.btn-danger{
  background:linear-gradient(90deg,#c0392b,#e74c3c);
  border-color:rgba(255,255,255,.08);
  box-shadow:0 0 26px rgba(231,76,60,.32);
}
.btn-danger:hover{box-shadow:0 0 34px rgba(231,76,60,.52)}

.btn-outline{background:rgba(20,24,38,.22);border-color:var(--line-strong)}
.btn-outline:hover{border-color:rgba(102,168,222,.45)}

.btn-ghost{background:transparent;border-color:rgba(255,255,255,.08)}
.btn-ghost:hover{border-color:var(--line-strong)}

/* Badges */
.badge{display:inline-flex;align-items:center;padding:6px 10px;border-radius:999px;font-size:12px;font-weight:850;letter-spacing:.02em}
.badge-soft{background:rgba(25,35,65,.34);border:1px solid var(--line);color:var(--muted)}
.badge-glow{background:rgba(102,168,222,.14);border:1px solid var(--line-strong);color:var(--frost);box-shadow:0 0 18px rgba(102,168,222,.24)}
.badge-success{background:rgba(46,204,113,.2);border:1px solid rgba(46,204,113,.4);color:#2ecc71}
.badge-warning{background:rgba(243,156,18,.2);border:1px solid rgba(243,156,18,.4);color:#f39c12}
.badge-danger{background:rgba(231,76,60,.2);border:1px solid rgba(231,76,60,.4);color:#e74c3c}

/* Cards */
.card{
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--r-lg);
  padding:18px;
  box-shadow:var(--shadow-soft);
  backdrop-filter:blur(12px);
}
.card-soft{background:rgba(25,35,65,.40);box-shadow:0 18px 45px rgba(0,0,0,.22)}
.card-hover{transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);}
.card-hover:hover{transform:translateY(-4px);box-shadow:0 24px 60px rgba(0,0,0,.35)}

.metric-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.metric-kicker{font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted-2);font-weight:900}
.metric-value{font-size:18px;font-weight:900;margin-bottom:6px}
.metric-sub{color:var(--muted);font-size:13px;line-height:1.45}

.panel-head{display:flex;justify-content:space-between;gap:12px;align-items:start}
.panel-title{font-weight:900}
.panel-sub{color:var(--muted);font-size:13px;margin-top:4px}
.panel-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:14px 0}

.mini{border-radius:14px;border:1px solid var(--line);background:rgba(14,14,19,.28);padding:12px}
.mini-label{color:var(--muted-2);font-weight:850;font-size:12px}
.mini-value{font-weight:950;margin-top:6px}

.panel-actions{display:flex;gap:10px;flex-wrap:wrap}

/* Forms */
.form{display:grid;gap:12px}
.field{display:grid;gap:8px;font-weight:800;color:var(--muted)}
.input, .form-control{
  width:100%;padding:12px 12px;border-radius:12px;
  border:1px solid var(--line);
  background:rgba(14,14,19,.22);
  color:var(--text);
  outline:none;
  font-family: var(--font);
  font-size: 16px;
  transition:border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
}
.input:focus, .form-control:focus{border-color:rgba(102,168,222,.55);box-shadow:0 0 0 4px rgba(102,168,222,.12);background:rgba(14,14,19,.34)}
textarea.input, textarea.form-control{resize:vertical;min-height:110px}

select.input, select.form-control{
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23C8EFFC'%3E%3Cpath d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* Tables */
.table{
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.table th, .table td{
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.table th{
  background: rgba(0,0,0,.2);
  font-weight: 800;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.table tr:last-child td{border-bottom: none}
.table tr:hover td{background: rgba(102,168,222,.05)}

/* Alerts */
.alert{
  padding: 16px 20px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.alert-success{border-color: rgba(46,204,113,.4);background: rgba(46,204,113,.1)}
.alert-warning{border-color: rgba(243,156,18,.4);background: rgba(243,156,18,.1)}
.alert-danger{border-color: rgba(231,76,60,.4);background: rgba(231,76,60,.1)}
.alert-info{border-color: rgba(52,152,219,.4);background: rgba(52,152,219,.1)}

/* Feature Cards (Landing Page) */
.feature-card{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.feature-card:hover{
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
  border-color: var(--line-strong);
}
.feature-card h3{
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--text);
}
.feature-card p{
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.feature-icon{
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 16px;
  box-shadow: 0 0 24px rgba(102,168,222,.3);
}

/* Hub Cards */
.hub-card{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  text-align: center;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
  text-decoration: none;
  color: var(--text);
}
.hub-card:hover{
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
  border-color: var(--primary-2);
}
.hub-card-icon{
  font-size: 32px;
  margin-bottom: 12px;
}
.hub-card-title{
  font-weight: 800;
  font-size: 16px;
  margin-bottom: 4px;
}
.hub-card-desc{
  font-size: 13px;
  color: var(--muted);
}

/* Section Title */
.section-title{
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 900;
  margin-bottom: 24px;
  color: var(--text);
}
.hub-section-title{
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

/* Update Banner */
.update-banner{
  background: linear-gradient(90deg, rgba(33,80,167,.2), rgba(102,168,222,.1));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px 24px;
  margin-bottom: 32px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.update-tag{
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .05em;
}
.update-title{
  font-weight: 800;
  margin-bottom: 8px;
}
.update-list{
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 14px;
}
.update-list li{margin-bottom: 4px}
.update-actions{
  margin-left: auto;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Pricing Cards */
.pricing-card{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 32px 24px;
  text-align: center;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.pricing-card:hover{
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}
.pricing-card.featured{
  border-color: var(--primary-2);
  box-shadow: 0 0 40px rgba(102,168,222,.25);
}
.pricing-price{
  font-size: 36px;
  font-weight: 900;
  color: var(--frost);
  margin: 16px 0;
}
.pricing-price span{
  font-size: 16px;
  color: var(--muted);
}

/* Tabs */
.nav-tabs{
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--line);
  margin-bottom: 24px;
}
.nav-tabs .nav-link{
  padding: 12px 20px;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  color: var(--muted);
  font-weight: 700;
  transition: all var(--dur) var(--ease);
  border: none;
  background: transparent;
  cursor: pointer;
}
.nav-tabs .nav-link:hover{
  color: var(--text);
  background: rgba(255,255,255,.04);
}
.nav-tabs .nav-link.active{
  color: var(--text);
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
}

/* Modals */
.modal-content{
  background: linear-gradient(180deg, var(--bg-1), var(--bg-0));
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  color: var(--text);
}
.modal-header{
  border-bottom: 1px solid var(--line);
  padding: 20px 24px;
}
.modal-body{padding: 24px}
.modal-footer{
  border-top: 1px solid var(--line);
  padding: 16px 24px;
}
.modal-title{font-weight: 900}
.btn-close{filter: invert(1);opacity: .6}
.btn-close:hover{opacity: 1}

/* Progress Bar */
.progress{
  height: 8px;
  background: rgba(0,0,0,.3);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar{
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  border-radius: 999px;
  transition: width .3s ease;
}

/* Utility Classes */
.text-center{text-align: center}
.text-left{text-align: left}
.text-right{text-align: right}
.text-success{color: var(--success) !important}
.text-warning{color: var(--warning) !important}
.text-danger{color: var(--danger) !important}
.text-info{color: var(--info) !important}
.text-muted{color: var(--muted) !important}

.mt-0{margin-top: 0}.mt-1{margin-top: 4px}.mt-2{margin-top: 8px}.mt-3{margin-top: 16px}.mt-4{margin-top: 24px}.mt-5{margin-top: 32px}
.mb-0{margin-bottom: 0}.mb-1{margin-bottom: 4px}.mb-2{margin-bottom: 8px}.mb-3{margin-bottom: 16px}.mb-4{margin-bottom: 24px}.mb-5{margin-bottom: 32px}
.me-1{margin-right: 4px}.me-2{margin-right: 8px}.me-3{margin-right: 16px}
.ms-1{margin-left: 4px}.ms-2{margin-left: 8px}.ms-auto{margin-left: auto}

.d-flex{display: flex}.d-grid{display: grid}.d-none{display: none}.d-block{display: block}
.flex-wrap{flex-wrap: wrap}
.align-items-center{align-items: center}
.justify-content-center{justify-content: center}
.justify-content-between{justify-content: space-between}
.gap-1{gap: 4px}.gap-2{gap: 8px}.gap-3{gap: 16px}.gap-4{gap: 24px}

.w-100{width: 100%}
.rounded{border-radius: var(--r-md)}
.shadow{box-shadow: var(--shadow-soft)}

/* Scrollbar */
::-webkit-scrollbar{width: 8px;height: 8px}
::-webkit-scrollbar-track{background: rgba(0,0,0,.2);border-radius: 4px}
::-webkit-scrollbar-thumb{background: var(--primary);border-radius: 4px}
::-webkit-scrollbar-thumb:hover{background: var(--primary-2)}

/* Selection */
::selection{background: rgba(102,168,222,.3);color: var(--frost)}
