
/* Riske™ minimal-modern styles */
:root{
  --bg:#0e0f11;
  --panel:#131416;
  --muted:#a6a8ad;
  --text:#e8e9ec;
  --accent:#ff4d4d;
  --accent-2:#2ecc71;
  --link:#9cc9ff;
  --border:#1f2023;
  --shadow:0 10px 30px rgba(0,0,0,.3);
}
*{box-sizing:border-box}
html,body{margin:0;padding:0;background:var(--bg);color:var(--text);font:16px/1.6 Inter,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif}
img{max-width:100%;height:auto}
a{color:var(--link);text-decoration:none}
a:hover{text-decoration:underline}
.container{width:min(1100px,92vw);margin:0 auto}
header{position:sticky;top:0;background:rgba(14,15,17,.8);backdrop-filter:saturate(140%) blur(6px);border-bottom:1px solid var(--border);z-index:1000}
.nav{display:flex;align-items:center;justify-content:space-between;padding:14px 0}
.brand{display:flex;align-items:center;gap:12px}
.brand img{width:34px;height:34px}
.brand .wordmark{font-weight:800;letter-spacing:.2px}
.badge{font-size:.72rem;background:linear-gradient(90deg,var(--accent),var(--accent-2));padding:2px 6px;border-radius:6px;color:#0b0c0d;margin-left:6px}
nav ul{display:flex;gap:18px;list-style:none;margin:0;padding:0}
nav a{padding:8px 12px;border-radius:8px}
nav a.active,nav a:hover{background:#17191c}
.button{display:inline-block;padding:12px 18px;border-radius:10px;background:linear-gradient(90deg,var(--accent),var(--accent-2));color:#0b0c0d;font-weight:700;border:0;box-shadow:var(--shadow)}
.button.ghost{background:transparent;color:var(--text);border:1px solid var(--border);box-shadow:none}
.hero{display:grid;grid-template-columns:1.1fr .9fr;gap:36px;align-items:center;padding:56px 0}
.hero .card{background:var(--panel);border:1px solid var(--border);padding:26px;border-radius:18px;box-shadow:var(--shadow)}
h1{font-size:clamp(28px,4vw,48px);line-height:1.15;margin:0 0 12px}
h2{font-size:clamp(22px,3vw,32px);margin:26px 0 10px}
.muted{color:var(--muted)}
.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
.card{background:var(--panel);border:1px solid var(--border);padding:20px;border-radius:16px;box-shadow:var(--shadow)}
.kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-top:16px}
.kpis .kpi{background:#0f1114;border:1px dashed var(--border);padding:16px;border-radius:12px;text-align:center}
.tag{display:inline-flex;align-items:center;gap:8px;padding:6px 10px;border:1px solid var(--border);border-radius:999px;background:#0f1114;color:var(--muted);font-size:.85rem}
.section{padding:44px 0;border-top:1px solid var(--border)}
footer{padding:44px 0;border-top:1px solid var(--border);color:var(--muted)}
.icon{width:22px;height:22px;display:inline-block;border-radius:6px;background:linear-gradient(180deg,#2a2b2f,#1b1c1f);border:1px solid var(--border)}
.accordion{border:1px solid var(--border);border-radius:14px;overflow:hidden}
.accordion details{border-top:1px solid var(--border);background:#0f1114}
.accordion summary{cursor:pointer;list-style:none;padding:18px 20px;font-weight:700}
.accordion summary::-webkit-details-marker{display:none}
.accordion .content{padding:0 20px 18px}
.contact-form{display:grid;gap:12px}
input,textarea,select{background:#0f1114;border:1px solid var(--border);border-radius:10px;color:var(--text);padding:12px;font:inherit}
input:focus,textarea:focus,select:focus{outline:2px solid #2a2d31;border-color:#2a2d31}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.notice{border-left:4px solid var(--accent);background:#111214;padding:12px 14px;border-radius:10px}
@media (max-width:900px){
  .hero{grid-template-columns:1fr}
  .grid{grid-template-columns:1fr}
  .kpis{grid-template-columns:1fr 1fr}
  .grid-2{grid-template-columns:1fr}
}

/* Header wordmark tweaks */
.wordmark .e-green{ color: var(--accent-2); }
.wordmark .tm{ font-size:.62em; vertical-align: super; margin-left:2px; color: var(--muted); }
/* Icon style for KPI/Focus grid */
.ico{ width:22px; height:22px; vertical-align:-4px; margin-right:8px; }
.kpis-modern{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-top:16px}
.kpis-modern .kpi{background:#0f1114;border:1px solid var(--border);padding:18px;border-radius:12px}
.kpis-modern h4{margin:0 0 6px; font-size:1rem;}
@media (max-width:900px){
  .kpis-modern{grid-template-columns:1fr 1fr}
}

/* Nav alignment normalization */
nav a{display:inline-flex;align-items:center;justify-content:center;line-height:1;height:38px}
.button{display:inline-flex;align-items:center;justify-content:center;height:38px;line-height:1}
nav ul li{display:flex;align-items:center}

/* Normalize feature card proportions */
.kpis-modern .kpi{display:flex;flex-direction:column;justify-content:flex-start;align-items:flex-start;height:100%}
.kpis-modern .iconbox{height:48px;display:flex;align-items:center;margin-bottom:8px}
.kpis-modern .iconbox img{width:42px;height:42px;display:block}
.kpis-modern h4{min-height:22px;margin:0 0 6px}
.kpis-modern .muted{min-height:22px}

/* Equalize feature card heights on desktop explicitly */
.kpis-modern{align-items:stretch}
.kpis-modern .kpi{min-height:190px}
@media (min-width:901px){
  .kpis-modern .kpi{min-height:210px}
}

/* --- Desktop-only precision alignment for feature cards --- */
@media (min-width: 901px){
  .kpis-modern{align-items:stretch}
  .kpis-modern .kpi{
    display:grid;
    grid-template-rows: 56px auto auto; /* icon row + title + desc */
    gap:8px;
    padding-top:18px;
    padding-bottom:18px;
  }
  .kpis-modern .iconbox{
    height:56px;
    display:flex;
    align-items:center;
    justify-content:flex-start;
  }
  .kpis-modern .iconbox img{
    height:52px; width:auto; object-fit:contain; display:block;
  }
  .kpis-modern h4{ margin:0; line-height:1.1; }
  .kpis-modern .muted{ margin:0; line-height:1.25; }
}

/* --- Desktop equal column width and visual consistency --- */
@media (min-width: 901px){
  .kpis-modern{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;align-items:stretch}
  .kpis-modern .kpi{flex:1;min-width:0;box-sizing:border-box;height:100%;display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start;padding:20px}
  .kpis-modern .iconbox img{height:56px;width:auto;object-fit:contain;margin-bottom:8px}
}

/* --- Desktop card text containment & typography tuning --- */
@media (min-width: 901px){
  .kpis-modern .kpi{
    padding:22px 18px 28px; /* more bottom padding to prevent visual overflow */
    overflow:hidden; /* safeguard */
  }
  .kpis-modern .kpi h4{
    font-size:1.05rem;
  }
  .kpis-modern .kpi .muted{
    font-size:.98rem;
    word-break:normal;
    overflow-wrap:break-word;
  }
}

/* --- Desktop card typography/flow fix (override previous grid) --- */
@media (min-width: 901px){
  .kpis-modern .kpi{
    display:flex !important;
    flex-direction:column !important;
    justify-content:flex-start !important;
    align-items:flex-start !important;
    min-height:230px !important;
    padding:20px 18px 22px !important;
    overflow:visible !important; /* allow text to be fully visible */
  }
  .kpis-modern .iconbox{height:56px !important; display:flex; align-items:center}
  .kpis-modern .iconbox img{height:52px !important; width:auto; object-fit:contain}
  .kpis-modern .kpi h4{font-size:1rem !important; margin:8px 0 4px !important; white-space:normal}
  .kpis-modern .kpi .muted{
    font-size:.95rem !important;
    line-height:1.35 !important;
    white-space:normal !important;
    overflow-wrap:anywhere !important; /* wrap long words nicely */
    word-break:normal !important;
  }
}

/* About page layout */
.about-hero{padding:34px 0 22px;border-bottom:1px solid var(--border)}
.about-hero .wrap{display:grid;grid-template-columns:1.1fr .9fr;gap:26px;align-items:center}
.about-hero img{max-height:260px;border-radius:16px;border:1px solid var(--border);box-shadow:var(--shadow)}
.about-hero h1{margin:0 0 8px}
.about-hero .lede{color:var(--muted)}

.about-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.about-card{background:var(--panel);border:1px solid var(--border);border-radius:16px;padding:20px;box-shadow:var(--shadow)}
.about-list{margin:0;padding-left:18px}
.about-list li{margin:.4rem 0}

@media (max-width:900px){
  .about-hero .wrap{grid-template-columns:1fr}
  .about-grid{grid-template-columns:1fr}
  .about-hero img{max-height:220px}
}

/* --- Engage form enhancements --- */
.contact-form {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 28px 36px;
  box-shadow: var(--shadow);
  max-width: 800px;
  margin: 0 auto;
}
.contact-form label {
  display: flex;
  flex-direction: column;
  font-weight: 500;
  color: var(--text);
  gap: 4px;
}
.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
}
.contact-form .grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 800px){
  .contact-form .grid-2 { grid-template-columns: 1fr; }
}
.contact-form .notice {
  font-size: .9rem;
  margin-top: 8px;
}
.contact-form .math-check {
  margin: 18px 0 10px;
  font-size: .95rem;
  display:flex;
  align-items:center;
  gap:8px;
}
.contact-form .success {
  display:none;
  margin-top:14px;
  padding:10px 12px;
  background:rgba(0,255,0,0.08);
  border:1px solid rgba(0,255,0,0.2);
  border-radius:6px;
  font-size:.95rem;
}

.brand .risk-red{color:#c0392b}
.brand .e-green{color:#2ecc71}

/* --- Header hybrid: larger logo + hidden wordmark on small screens --- */
.brand{display:flex;align-items:center;gap:10px}
.brand img{height:28px; width:auto}        /* base size */
.brand .wordmark{display:inline-flex;align-items:center;gap:2px;font-weight:700}
@media (min-width:901px){
  .brand img{height:34px}                   /* ~20% larger on desktop */
  .brand{gap:8px}                           /* tighten spacing slightly */
}
@media (max-width:600px){
  .brand .wordmark{display:none}            /* logo-only on small screens */
}

/* --- Responsive logo polish: larger logo on small screens --- */
@media (max-width:768px){.brand img{height:63px !important; width:auto;}
  .brand .wordmark{display:none !important;}
}

/* --- Final brand polish (desktop only) --- */
@media (min-width:901px){
  .brand .wordmark{gap:0}                 /* remove inter-span gap */
  .brand .risk-red{letter-spacing:0}
  .brand .e-green{
    display:inline-block;
    transform:skewX(-10deg);              /* subtle forward lean to echo logo */
    margin-left:-1px;                     /* tighten kerning between k and e */
  }
}
