/* ═══════════════════════════════════════════════════════════════
   ECP Predictor — styles.css
   Approved palette:
     dark_olive   #494623
     golden_ochre #C3892B
     olive        #8E883D
     muted_olive  #8F7C2F
     grey         #666666
     pale_green   #E6F2CC
     cream        #E9E7D8
     white        #FFFFFF
═══════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --dark-olive:  #494623;
  --gold:        #C3892B;
  --olive:       #8E883D;
  --mut-olive:   #8F7C2F;
  --grey:        #666666;
  --pale-green:  #E6F2CC;
  --cream:       #E9E7D8;
  --white:       #FFFFFF;
  --bg:          #F8F6F0;
  --text:        #2a2a1a;
  --border:      #d4ceba;
  --radius:      10px;
  --shadow:      0 2px 16px rgba(73,70,35,0.10);
}

html { scroll-behavior: smooth; }
body { font-family: 'Segoe UI', system-ui, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }

/* ── layout ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
.section    { padding: 4rem 0; }
.section-alt{ background: var(--cream); }

/* ── header ── */
.site-header { background: var(--dark-olive); color: var(--white); position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 8px rgba(0,0,0,0.25); }
.header-inner { max-width: 1100px; margin: 0 auto; padding: 0.75rem 1.5rem; display: flex; align-items: center; justify-content: space-between; }
.header-logo  { display: flex; align-items: center; gap: 0.75rem; }
.logo-icon    { font-size: 2rem; }
.header-logo h1 { font-size: 1.25rem; font-weight: 700; color: var(--white); }
.header-logo p  { font-size: 0.78rem; opacity: 0.8; color: var(--pale-green); }
.header-nav a   { color: var(--pale-green); text-decoration: none; margin-left: 1.5rem; font-size: 0.9rem; transition: color 0.2s; }
.header-nav a:hover { color: var(--white); }

/* ── hero ── */
.hero { background: linear-gradient(135deg, var(--dark-olive) 0%, var(--mut-olive) 100%); color: var(--white); padding: 5rem 1.5rem; text-align: center; }
.hero-inner { max-width: 800px; margin: 0 auto; }
.hero h2    { font-size: 2.4rem; font-weight: 700; margin-bottom: 1rem; line-height: 1.2; }
.hero p     { font-size: 1.1rem; opacity: 0.9; margin-bottom: 2rem; }
.hero-stats { display: flex; justify-content: center; gap: 2rem; margin-bottom: 2.5rem; flex-wrap: wrap; }
.stat       { text-align: center; }
.stat-num   { display: block; font-size: 2.2rem; font-weight: 800; color: var(--pale-green); }
.stat-label { font-size: 0.8rem; opacity: 0.8; text-transform: uppercase; letter-spacing: 0.05em; }
.btn-primary { background: var(--gold); color: var(--white); border: none; padding: 0.85rem 2.5rem; border-radius: 50px; font-size: 1rem; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block; transition: transform 0.15s, box-shadow 0.15s; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.25); }

/* ── section titles ── */
.section-title { font-size: 1.9rem; font-weight: 700; color: var(--dark-olive); margin-bottom: 0.5rem; }
.section-sub   { color: var(--grey); margin-bottom: 2rem; max-width: 700px; }

/* ── predictor layout ── */
.predictor-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
@media (max-width: 768px) { .predictor-layout { grid-template-columns: 1fr; } }

.input-card, .result-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}
.input-card h3, .result-card h3 { color: var(--dark-olive); font-size: 1.05rem; margin-bottom: 1rem; border-bottom: 2px solid var(--pale-green); padding-bottom: 0.5rem; }

/* ── form ── */
.form-group  { margin-bottom: 1.1rem; }
.form-row    { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }
label        { display: block; font-size: 0.85rem; font-weight: 600; color: var(--dark-olive); margin-bottom: 0.35rem; }
.req         { color: var(--gold); }
input[type="number"], select {
  width: 100%; padding: 0.55rem 0.75rem; border: 1px solid var(--border);
  border-radius: 6px; font-size: 0.9rem; background: var(--bg);
  transition: border-color 0.2s, box-shadow 0.2s; color: var(--text);
}
input[type="number"]:focus, select:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(195,137,43,0.15);
}
input[type="range"] { width: 100%; accent-color: var(--gold); margin-bottom: 0.4rem; }
.range-row   { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; color: var(--grey); }
.range-row input { width: 80px; }
.hint        { display: block; font-size: 0.75rem; color: var(--grey); margin-top: 0.2rem; }

/* ── uv panel ── */
.uv-panel { background: var(--pale-green); border-radius: var(--radius); padding: 1rem; margin-top: 0.75rem; border: 1px solid var(--olive); }
.uv-panel h3 { color: var(--mut-olive); border-bottom-color: var(--olive); }

/* ── buttons ── */
.btn-predict {
  width: 100%; padding: 0.85rem; background: var(--dark-olive); color: var(--white);
  border: none; border-radius: 8px; font-size: 1rem; font-weight: 700;
  cursor: pointer; margin-top: 1rem; transition: background 0.2s, transform 0.1s;
  letter-spacing: 0.03em;
}
.btn-predict:hover { background: var(--mut-olive); transform: translateY(-1px); }
.btn-reset {
  width: 100%; padding: 0.65rem; background: transparent; color: var(--grey);
  border: 1px solid var(--border); border-radius: 8px; font-size: 0.9rem;
  cursor: pointer; margin-top: 0.5rem; transition: background 0.2s;
}
.btn-reset:hover { background: var(--cream); }
.btn-secondary {
  padding: 0.55rem 1.2rem; background: var(--cream); color: var(--dark-olive);
  border: 1px solid var(--border); border-radius: 6px; font-size: 0.85rem;
  cursor: pointer; margin-top: 0.6rem; margin-right: 0.4rem;
  transition: background 0.2s;
}
.btn-secondary:hover { background: var(--pale-green); }

/* ── result placeholder ── */
.result-placeholder { text-align: center; padding: 3rem 1rem; color: var(--grey); }
.placeholder-icon   { font-size: 3rem; display: block; margin-bottom: 0.75rem; }

/* ── result badges ── */
.result-badges { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.result-badge  { padding: 0.5rem 1rem; border-radius: 50px; font-size: 0.85rem; font-weight: 700; text-align: center; }
.badge-toc  { background: var(--dark-olive); color: var(--white); }
.badge-cod  { background: var(--gold); color: var(--white); }
.badge-uv   { background: var(--olive); color: var(--white); }

/* ── gauges ── */
.gauge-row  { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.gauge      { flex: 1; min-width: 100px; text-align: center; }
.gauge-label{ font-size: 0.78rem; font-weight: 700; color: var(--grey); text-transform: uppercase; margin-bottom: 0.4rem; }
.gauge-bar  { height: 10px; background: var(--cream); border-radius: 5px; overflow: hidden; margin-bottom: 0.3rem; }
.gauge-fill { height: 100%; border-radius: 5px; transition: width 0.8s ease; }
.gauge-val  { font-size: 1.5rem; font-weight: 800; }
.fill-toc   { background: var(--dark-olive); }
.fill-cod   { background: var(--gold); }
.fill-uv    { background: var(--olive); }

/* ── confidence box ── */
.confidence-box { background: var(--cream); border-radius: 8px; padding: 1rem; margin-bottom: 1rem; border-left: 4px solid var(--gold); }
.confidence-box h4 { font-size: 0.85rem; color: var(--dark-olive); margin-bottom: 0.5rem; }
.conf-item      { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; margin-bottom: 0.3rem; }
.conf-dot       { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.dot-high  { background: var(--olive); }
.dot-med   { background: var(--gold); }
.dot-low   { background: #AB7100; }

/* ── input summary ── */
.input-summary { font-size: 0.8rem; color: var(--grey); background: var(--bg); border-radius: 6px; padding: 0.75rem; margin-bottom: 0.75rem; }
.input-summary strong { color: var(--dark-olive); }

/* ── chart section ── */
.chart-section { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.75rem; margin-top: 2rem; box-shadow: var(--shadow); }
.chart-section h3 { color: var(--dark-olive); margin-bottom: 0.3rem; }

/* ── performance grid ── */
.perf-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }
@media (max-width: 768px) { .perf-grid { grid-template-columns: 1fr; } }
.perf-card { background: var(--white); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); border-top: 4px solid var(--dark-olive); }
.perf-target { font-size: 1.05rem; font-weight: 700; color: var(--dark-olive); margin-bottom: 1rem; }
.perf-metric { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; font-size: 0.9rem; }
.metric-label{ color: var(--grey); }
.metric-val  { font-weight: 700; color: var(--text); }
.metric-val.best   { color: var(--olive); }
.metric-val.good   { color: var(--mut-olive); }
.metric-val.medium { color: var(--gold); }
.metric-val.caution{ color: #AB7100; }
.perf-badge  { margin-top: 0.75rem; padding: 0.35rem 0.85rem; border-radius: 50px; font-size: 0.78rem; font-weight: 600; text-align: center; display: inline-block; }
.perf-badge.high   { background: var(--pale-green); color: var(--dark-olive); }
.perf-badge.medium { background: #fff3cd; color: #7a5c00; }
.perf-badge.low    { background: #fde8cc; color: #7a4800; }
.disclaimer-box { background: #fff8ed; border: 1px solid var(--gold); border-radius: 8px; padding: 1rem 1.25rem; margin-top: 2rem; font-size: 0.9rem; color: var(--text); }

/* ── about grid ── */
.about-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1.5rem; }
@media (max-width: 768px) { .about-grid { grid-template-columns: 1fr; } }
.about-card { background: var(--white); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.about-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.about-card h3 { color: var(--dark-olive); margin-bottom: 0.5rem; }
.about-card p  { font-size: 0.9rem; color: var(--grey); }

/* ── footer ── */
.site-footer { background: var(--dark-olive); color: var(--pale-green); text-align: center; padding: 1.5rem; font-size: 0.88rem; }

/* ── utility ── */
.hidden { display: none !important; }

/* ── loading spinner ── */
.spinner { display: inline-block; width: 20px; height: 20px; border: 3px solid rgba(255,255,255,0.3); border-top-color: white; border-radius: 50%; animation: spin 0.7s linear infinite; vertical-align: middle; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── LOGO STYLES ── */

/* Header logos */
.logo-img {
  height: 52px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
  filter: brightness(1.05);
}
.logo-right {
  height: 48px;
}
.logo-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.lab-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--pale-green);
  letter-spacing: 0.02em;
  line-height: 1.3;
}
.lab-sub {
  font-size: 0.72rem;
  opacity: 0.75;
  color: var(--pale-green);
  line-height: 1.2;
}
.header-right-logo {
  display: flex;
  align-items: center;
}

/* Header layout adjustment to fit 3-column: logo | nav | right-logo */
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 0 0 auto;
}
.header-nav {
  flex: 1;
  text-align: center;
}

/* Hero logos bar */
.hero-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin-bottom: 1rem;
}
.hero-logo-img {
  height: 64px;
  width: auto;
  object-fit: contain;
  filter: brightness(1.1) drop-shadow(0 2px 6px rgba(0,0,0,0.35));
  transition: transform 0.2s;
}
.hero-logo-img:hover {
  transform: scale(1.05);
}
.hero-lab-tag {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--pale-green);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  opacity: 0.95;
}

/* Footer logos */
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.footer-logos {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.footer-logo-img {
  height: 44px;
  width: auto;
  object-fit: contain;
  opacity: 0.88;
  filter: brightness(1.1);
  transition: opacity 0.2s;
}
.footer-logo-img:hover {
  opacity: 1;
}
.footer-text {
  text-align: center;
  color: var(--pale-green);
}
.footer-text p {
  font-size: 0.88rem;
}

/* ── Responsive logo adjustments ── */
@media (max-width: 768px) {
  .header-inner    { flex-wrap: wrap; justify-content: center; gap: 0.75rem; }
  .header-logo     { justify-content: center; }
  .header-right-logo { display: none; }   /* hide right logo on mobile */
  .logo-img        { height: 40px; }
  .hero-logo-img   { height: 48px; }
  .header-nav      { width: 100%; text-align: center; }
  .footer-inner    { flex-direction: column; gap: 1rem; }
}

/* ── CIRCULAR LOGO FRAMES ── */

/* Header circles */
.logo-circle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2.5px solid var(--pale-green);
  background: rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(230,242,204,0.18);
  transition: box-shadow 0.2s, transform 0.2s;
}
.logo-circle:hover {
  box-shadow: 0 0 0 5px rgba(230,242,204,0.35);
  transform: scale(1.04);
}
.logo-circle-gold {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(195,137,43,0.22);
}
.logo-circle-gold:hover {
  box-shadow: 0 0 0 5px rgba(195,137,43,0.38);
}
.logo-circle img {
  width: 90%;
  height: 90%;
  object-fit: contain;
  border-radius: 50%;
}
/* override old logo-img size inside circles */
.logo-circle .logo-img,
.logo-circle .logo-right {
  height: auto;
  width: 90%;
  filter: none;
}

/* Hero circles */
.hero-logo-circle {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 3px solid rgba(230,242,204,0.7);
  background: rgba(255,255,255,0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0,0,0,0.28), 0 0 0 5px rgba(230,242,204,0.12);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
}
.hero-logo-circle:hover {
  transform: scale(1.07);
  box-shadow: 0 6px 24px rgba(0,0,0,0.35), 0 0 0 7px rgba(230,242,204,0.2);
}
.hero-logo-circle-gold {
  border-color: var(--gold);
  box-shadow: 0 4px 18px rgba(0,0,0,0.28), 0 0 0 5px rgba(195,137,43,0.18);
}
.hero-logo-circle-gold:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.35), 0 0 0 7px rgba(195,137,43,0.30);
}
.hero-logo-circle img {
  width: 88%;
  height: 88%;
  object-fit: contain;
  border-radius: 50%;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.20));
}
/* remove old hero-logo-img standalone styles */
.hero-logo-img {
  height: auto;
  width: 88%;
  filter: none;
  transition: none;
}

/* Footer circles */
.footer-logo-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid rgba(230,242,204,0.55);
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
}
.footer-logo-circle:hover {
  transform: scale(1.06);
  border-color: rgba(230,242,204,0.9);
}
.footer-logo-circle-gold {
  border-color: rgba(195,137,43,0.65);
}
.footer-logo-circle-gold:hover {
  border-color: var(--gold);
}
.footer-logo-circle img {
  width: 88%;
  height: 88%;
  object-fit: contain;
  border-radius: 50%;
  opacity: 0.92;
}
/* override old footer-logo-img */
.footer-logo-img {
  height: auto;
  width: 88%;
  opacity: 1;
  filter: none;
}

/* Link wrapper around circles — remove default link styling */
a .logo-circle,
a .hero-logo-circle,
a .footer-logo-circle {
  text-decoration: none;
  display: flex;
}

/* ── Mobile responsive ── */
@media (max-width: 768px) {
  .logo-circle      { width: 42px; height: 42px; }
  .hero-logo-circle { width: 68px; height: 68px; }
  .footer-logo-circle { width: 42px; height: 42px; }
}
