/* =============================================
   THE DE-RISK MATRIX — Shared Stylesheet
   ============================================= */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-bg:        #ffffff;
  --color-text:      #1a1a1a;
  --color-muted:     #555555;
  --color-accent:    #1d4ed8;        /* brand blue */
  --color-accent2:   #0ea5e9;        /* lighter blue */
  --color-dark:      #0f172a;        /* near-black nav */
  --color-section:   #f5f7fa;
  --color-border:    #e2e8f0;
  --font-sans:       'Inter', 'Helvetica Neue', Arial, sans-serif;
  --max-w:           1200px;
  --nav-h:           72px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  font-size: 16px;
}

img { max-width: 100%; height: auto; display: block; }
a  { color: inherit; text-decoration: none; }

/* --- Typography --- */
h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.1rem; }

p  { color: var(--color-muted); font-size: 1.05rem; }

.underline-anim {
  position: relative;
  display: inline;
}
.underline-anim::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 100%; height: 3px;
  background: var(--color-accent);
  transform: scaleX(1);
  transform-origin: left;
  transition: transform .3s ease;
}

/* --- Layout Helpers --- */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 2rem; }
.section    { padding: 80px 0; }
.section--alt { background: var(--color-section); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.text-center { text-align: center; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2.5rem; }
.mt-5 { margin-top: 4rem; }

/* --- Navigation --- */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--color-dark);
  display: flex; align-items: center;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.site-nav .container {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
}
.nav-logo {
  display: flex; align-items: center; gap: .75rem;
  color: #fff; font-weight: 800; font-size: 1.1rem; letter-spacing: .02em;
  white-space: nowrap;
}
.nav-logo .logo-mark {
  width: 36px; height: 36px;
  background: var(--color-accent);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 900; color: #fff; letter-spacing: 0;
  flex-shrink: 0;
}
.nav-links {
  display: flex; align-items: center; gap: .25rem;
  list-style: none;
}
.nav-links > li { position: relative; }
.nav-links > li > a {
  color: rgba(255,255,255,.85);
  padding: .5rem .75rem;
  border-radius: 6px;
  font-size: .9rem; font-weight: 500;
  transition: background .2s, color .2s;
  display: flex; align-items: center; gap: .3rem;
  white-space: nowrap;
}
.nav-links > li > a:hover,
.nav-links > li > a.active { color: #fff; background: rgba(255,255,255,.1); }
.nav-links > li > a .arrow { font-size: .65rem; opacity: .7; }

/* Dropdown */
.dropdown {
  position: absolute; top: calc(100% + 8px); left: 0;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,.15);
  min-width: 220px;
  padding: .5rem 0;
  opacity: 0; visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .2s, transform .2s, visibility .2s;
}
.nav-links > li:hover .dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown a {
  display: block;
  padding: .6rem 1.2rem;
  color: var(--color-text);
  font-size: .88rem;
  transition: background .15s;
}
.dropdown a:hover { background: var(--color-section); }

.nav-cart { color: rgba(255,255,255,.85); font-size: 1.1rem; padding: .5rem; cursor: pointer; }

/* Hamburger */
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: .5rem; }
.hamburger span { display: block; width: 24px; height: 2px; background: #fff; border-radius: 2px; transition: .3s; }

/* --- Hero --- */
.hero {
  min-height: 100vh;
  background: var(--color-dark);
  display: flex; align-items: center;
  padding-top: var(--nav-h);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(29,78,216,.25) 0%, transparent 60%);
  pointer-events: none;
}
.hero .container { padding-top: 4rem; padding-bottom: 4rem; }
.hero-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.hero-text { }
.hero-tag {
  display: inline-block;
  background: rgba(29,78,216,.2);
  border: 1px solid rgba(29,78,216,.4);
  color: var(--color-accent2);
  padding: .35rem .85rem;
  border-radius: 999px;
  font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.hero h1 { color: #fff; margin-bottom: 1rem; }
.hero-sub {
  color: rgba(255,255,255,.7);
  font-size: clamp(1rem, 2vw, 1.2rem);
  margin-bottom: 2rem;
  max-width: 520px;
}
.hero-desc {
  color: rgba(255,255,255,.6);
  font-size: 1rem;
  margin-bottom: 2.5rem;
  max-width: 500px;
}
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .85rem 2rem;
  border-radius: 8px;
  font-weight: 600; font-size: .95rem;
  cursor: pointer; border: none;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.btn-primary { background: var(--color-accent); color: #fff; }
.btn-primary:hover { background: #1e40af; }
.btn-outline { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.3); }
.btn-outline:hover { border-color: #fff; background: rgba(255,255,255,.05); }
.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; }

.free-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  margin-top: 1.5rem;
  color: #4ade80;
  font-weight: 700; font-size: .95rem;
}
.free-badge::before { content: '✓'; font-size: 1.1rem; }

.hero-visual {
  display: flex; justify-content: center; align-items: center;
}
.matrix-diagram {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  padding: 2rem;
  width: 100%;
  max-width: 480px;
}
/* Placeholder matrix visual */
.matrix-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(5, 1fr);
  gap: 4px;
  aspect-ratio: 1;
  margin: 0 auto 1rem;
}
.matrix-cell {
  border-radius: 4px;
}
.cell-red    { background: #ef4444; }
.cell-orange { background: #f97316; }
.cell-yellow { background: #eab308; }
.cell-green  { background: #22c55e; }
.cell-blue   { background: #3b82f6; }
.matrix-legend {
  display: flex; justify-content: space-between;
  color: rgba(255,255,255,.6); font-size: .75rem; margin-top: .5rem;
}
.matrix-title { color: rgba(255,255,255,.9); font-size: .85rem; font-weight: 600; text-align: center; margin-bottom: .75rem; }

/* --- Section headings --- */
.section-label {
  color: var(--color-accent);
  font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  margin-bottom: .75rem;
}
.section-title { margin-bottom: 1rem; }
.section-title + p { max-width: 680px; }
.text-center .section-title + p { margin: 0 auto; }
.divider {
  width: 48px; height: 4px; background: var(--color-accent);
  border-radius: 4px; margin: 1rem 0 2rem;
}
.text-center .divider { margin-left: auto; margin-right: auto; }

/* --- Cards --- */
.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 2rem;
  transition: box-shadow .25s, transform .25s;
}
.card:hover { box-shadow: 0 8px 32px rgba(0,0,0,.09); transform: translateY(-3px); }
.card-icon {
  width: 48px; height: 48px;
  background: rgba(29,78,216,.1);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}
.card-icon img { width: 28px; height: 28px; object-fit: contain; }

/* Nav logo image */
.nav-logo img { display: block; max-height: 38px; width: auto; }
.card h3 { margin-bottom: .5rem; font-size: 1.2rem; }
.card p  { font-size: .95rem; }

/* --- Three pillars --- */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 3rem; }
.pillar {
  background: #fff;
  border-radius: 14px;
  padding: 2rem;
  border-top: 4px solid transparent;
  box-shadow: 0 2px 16px rgba(0,0,0,.06);
}
.pillar--goals  { border-color: #22c55e; }
.pillar--risks  { border-color: #ef4444; }
.pillar--culture { border-color: #a855f7; }
.pillar-icon { font-size: 2rem; margin-bottom: .75rem; }
.pillar h3  { margin-bottom: .5rem; }

/* --- Process steps --- */
.process-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-top: 3rem; }
.step {
  text-align: center;
  position: relative;
}
.step::after {
  content: '→';
  position: absolute; top: 28px; right: -18px;
  color: var(--color-accent); font-size: 1.2rem;
}
.step:last-child::after { display: none; }
.step-num {
  width: 56px; height: 56px;
  background: var(--color-accent);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; font-weight: 800;
  margin: 0 auto 1rem;
}
.step h4 { margin-bottom: .4rem; font-size: 1rem; }
.step p  { font-size: .88rem; }

/* --- Tools compatibility --- */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; margin-top: 2.5rem; }
.tool-badge {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: .85rem 1rem;
  text-align: center;
  font-size: .88rem; font-weight: 600; color: var(--color-text);
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}

/* --- Quote / profile --- */
.profile-section { background: var(--color-dark); color: #fff; }
.profile-section p { color: rgba(255,255,255,.7); }
.profile-section h2 { color: #fff; }
.profile-section .section-label { color: var(--color-accent2); }
.profile-section .divider { background: var(--color-accent2); }
.profile-img-wrap {
  width: 280px; height: 320px;
  border-radius: 16px;
  overflow: hidden;
  border: 3px solid rgba(255,255,255,.1);
  flex-shrink: 0;
  background: rgba(255,255,255,.07);
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem;
}
.profile-inner { display: flex; gap: 3rem; align-items: flex-start; }
blockquote {
  border-left: 4px solid var(--color-accent2);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  font-size: 1.1rem;
  color: rgba(255,255,255,.85) !important;
  font-style: italic;
  line-height: 1.7;
}

/* --- Prerequisites --- */
.prereq-list { list-style: none; margin-top: 2.5rem; display: flex; flex-direction: column; gap: 1rem; }
.prereq-item {
  display: flex; align-items: flex-start; gap: 1rem;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
}
.prereq-num {
  width: 36px; height: 36px; flex-shrink: 0;
  background: var(--color-accent);
  color: #fff;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .9rem;
}
.prereq-item h4 { margin-bottom: .25rem; }
.prereq-item p  { font-size: .92rem; margin: 0; }

/* --- Word cloud placeholder --- */
.wordcloud {
  background: var(--color-dark);
  border-radius: 16px;
  padding: 3rem;
  text-align: center;
  margin: 3rem auto;
  max-width: 800px;
}
.wordcloud-words {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem 1.2rem;
  line-height: 2;
}
.ww { color: rgba(255,255,255,.6); font-weight: 600; }
.ww-lg  { font-size: 2rem;   color: rgba(255,255,255,.95); }
.ww-md  { font-size: 1.4rem; color: rgba(255,255,255,.8); }
.ww-sm  { font-size: 1rem;   color: rgba(255,255,255,.65); }
.ww-xs  { font-size: .85rem; color: rgba(255,255,255,.45); }
.ww-accent { color: var(--color-accent2); }

/* --- Services page --- */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 3rem; }
.service-card {
  border-radius: 16px;
  padding: 2.5rem 2rem;
  border: 1px solid var(--color-border);
  transition: box-shadow .25s, transform .25s;
}
.service-card:hover { box-shadow: 0 10px 40px rgba(0,0,0,.1); transform: translateY(-4px); }
.service-icon { font-size: 2.5rem; margin-bottom: 1.25rem; }
.service-card h3 { margin-bottom: .75rem; font-size: 1.4rem; }

/* --- Contact form --- */
.contact-form { max-width: 600px; margin: 2.5rem auto 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.form-group { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1rem; }
.form-group label { font-size: .88rem; font-weight: 600; color: var(--color-text); }
.form-group input,
.form-group textarea,
.form-group select {
  padding: .75rem 1rem;
  border: 1.5px solid var(--color-border);
  border-radius: 8px;
  font-size: .95rem;
  font-family: var(--font-sans);
  transition: border-color .2s;
  outline: none;
  width: 100%;
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--color-accent); }
.form-group textarea { min-height: 120px; resize: vertical; }

/* --- Footer --- */
.site-footer {
  background: var(--color-dark);
  color: rgba(255,255,255,.6);
  padding: 3rem 0 2rem;
}
.footer-inner {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem; margin-bottom: 2rem;
}
.footer-brand .nav-logo { margin-bottom: 1rem; }
.footer-brand p { font-size: .88rem; max-width: 280px; }
.footer-col h5 { color: #fff; font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.footer-col ul a { font-size: .88rem; color: rgba(255,255,255,.55); transition: color .2s; }
.footer-col ul a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 1.5rem;
  display: flex; justify-content: space-between; align-items: center;
  font-size: .83rem;
}
.social-links { display: flex; gap: .75rem; }
.social-link {
  width: 34px; height: 34px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.6);
  font-size: .8rem;
  transition: background .2s, color .2s;
}
.social-link:hover { background: rgba(255,255,255,.1); color: #fff; }

/* --- Cookie banner --- */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #1e293b;
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 1rem 2rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  z-index: 2000;
  font-size: .88rem; color: rgba(255,255,255,.8);
}
.cookie-banner.hidden { display: none; }
.cookie-btns { display: flex; gap: .75rem; flex-shrink: 0; }
.cookie-btns button {
  padding: .5rem 1.2rem;
  border-radius: 6px;
  font-size: .83rem; font-weight: 600;
  cursor: pointer; border: none;
}
.btn-accept { background: var(--color-accent); color: #fff; }
.btn-decline { background: transparent; color: rgba(255,255,255,.7); border: 1px solid rgba(255,255,255,.25) !important; }

/* --- Methodology page --- */
.method-nav {
  background: #f8fafc;
  border-bottom: 1px solid var(--color-border);
  position: sticky; top: var(--nav-h); z-index: 100;
}
.method-nav ul {
  list-style: none;
  display: flex; gap: 0;
  overflow-x: auto;
  max-width: var(--max-w); margin: 0 auto;
  padding: 0 2rem;
}
.method-nav ul a {
  display: block;
  padding: 1rem 1.25rem;
  font-size: .88rem; font-weight: 500;
  color: var(--color-muted);
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: color .2s, border-color .2s;
}
.method-nav ul a:hover,
.method-nav ul a.active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .hero-inner     { grid-template-columns: 1fr; }
  .hero-visual    { display: none; }
  .grid-2         { grid-template-columns: 1fr; }
  .pillars        { grid-template-columns: 1fr; }
  .process-steps  { grid-template-columns: 1fr 1fr; }
  .step::after    { display: none; }
  .services-grid  { grid-template-columns: 1fr; }
  .footer-inner   { grid-template-columns: 1fr 1fr; }
  .profile-inner  { flex-direction: column; align-items: center; }
}

@media (max-width: 640px) {
  .nav-links  { display: none; }
  .hamburger  { display: flex; }
  .process-steps { grid-template-columns: 1fr; }
  .form-row   { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .cookie-banner { flex-direction: column; align-items: flex-start; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
  .hero-btns  { flex-direction: column; }
  .grid-3     { grid-template-columns: 1fr; }
}

/* Mobile menu open state */
.nav-links.open {
  display: flex;
  flex-direction: column;
  position: fixed; top: var(--nav-h); left: 0; right: 0;
  background: var(--color-dark);
  padding: 1rem 2rem 2rem;
  border-top: 1px solid rgba(255,255,255,.1);
  gap: 0;
}
.nav-links.open > li > a { padding: .85rem .5rem; border-bottom: 1px solid rgba(255,255,255,.07); }
.nav-links.open .dropdown {
  position: static;
  opacity: 1; visibility: visible; transform: none;
  box-shadow: none; background: transparent;
  padding: 0 0 0 1rem;
}
.nav-links.open .dropdown a { color: rgba(255,255,255,.6); }
