/* ============================================================
   Cloura Docs — identidad de marca
   Paleta oficial (Brand Kit) + tipografía Poppins. Negro + teal.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800&display=swap');

:root {
  /* Marca */
  --ink:        #141414;
  --gray:       #6E6F74;
  --black:      #0A0A0B;
  --ink-rev:    #F4F4F5;
  --gray-rev:   #9A9CA3;
  --white:      #ffffff;

  /* Acento Cloura (teal) */
  --accent:        #0b9d8e;
  --accent-strong: color-mix(in srgb, var(--accent) 82%, #000);
  --accent-2:      color-mix(in srgb, var(--accent) 70%, #2563eb 30%);
  --accent-soft:   color-mix(in srgb, var(--accent) 10%, transparent);
  --accent-line:   color-mix(in srgb, var(--accent) 26%, transparent);

  /* Superficies (contenido claro) */
  --bg:        #ffffff;
  --bg-soft:   #f7f8fa;
  --bg-sunken: #eef0f4;
  --surface:   #ffffff;
  --text:   #141414;
  --text-2: #54585f;
  --text-3: #8a8d96;
  --border:        rgba(20, 20, 20, 0.09);
  --border-strong: rgba(20, 20, 20, 0.14);

  --ok:   #1f9d63;
  --warn: #c98a16;
  --risk: #d6492f;

  --shadow-sm: 0 1px 2px rgba(10,10,11,.05), 0 1px 1px rgba(10,10,11,.04);
  --shadow-md: 0 2px 6px rgba(10,10,11,.05), 0 10px 30px rgba(10,10,11,.08);
  --shadow-lg: 0 1px 3px rgba(10,10,11,.06), 0 24px 60px -14px rgba(10,10,11,.24);

  --r-sm: 8px; --r-md: 12px; --r-lg: 18px; --r-xl: 26px;
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --sidebar-w: 280px;
  --maxw: 860px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.68;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; }

.layout { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }

/* ============================ SIDEBAR (negra) ============================ */
.sidebar {
  position: sticky; top: 0; align-self: start;
  height: 100vh; overflow-y: auto;
  background: var(--black);
  color: var(--gray-rev);
  border-right: 1px solid rgba(255,255,255,.06);
  padding: 26px 16px 44px;
  position: relative;
}
/* Isotipo como marca de agua sutil al pie de la banda */
.sidebar::after {
  content: ""; position: absolute; left: 16px; bottom: 20px; width: 116px; height: 116px;
  background: url('/logos/cloura-isotype-white.svg') no-repeat center / contain;
  opacity: .05; pointer-events: none;
}
.brand { display: block; margin: 2px 8px 26px; }
.brand img { width: 150px; height: auto; display: block; }
.brand .tag {
  display: inline-block; margin: 12px 0 0 2px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft);
  padding: 3px 10px; border-radius: 999px; border: 1px solid var(--accent-line);
}
.nav-group { margin-bottom: 22px; }
.nav-group > .nav-title {
  font-size: 10.5px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase;
  color: var(--gray); margin: 0 10px 8px;
}
.nav-group a {
  display: block; position: relative; padding: 8px 12px; margin: 1px 0;
  border-radius: var(--r-sm); color: var(--gray-rev); font-size: 14.5px; font-weight: 400;
  transition: background .16s var(--ease), color .16s var(--ease);
}
.nav-group a:hover { background: rgba(255,255,255,.05); color: var(--ink-rev); text-decoration: none; }
.nav-group a.active {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: #eafffb; font-weight: 500;
}
.nav-group a.active::before {
  content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--accent);
}

/* ============================ CONTENIDO ============================ */
.content { padding: 44px clamp(20px, 5vw, 76px) 100px; }
.content-inner { max-width: var(--maxw); margin: 0 auto; }
.breadcrumb { font-size: 13px; color: var(--text-3); margin-bottom: 16px; font-weight: 400; }
.breadcrumb a { color: var(--text-3); }

.content h1 { font-size: 36px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; margin: 0 0 10px; }
.content .lede { font-size: 18.5px; color: var(--text-2); font-weight: 400; margin: 0 0 34px; max-width: 62ch; }
.content h2 { font-size: 23px; font-weight: 600; letter-spacing: -.01em; margin: 46px 0 12px; }
.content h3 { font-size: 17px; font-weight: 600; margin: 28px 0 8px; }
.content p, .content li { color: var(--text); }
.content ul, .content ol { padding-left: 22px; }
.content li { margin: 6px 0; }
.content strong { font-weight: 600; }
.content code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: .86em; background: var(--bg-sunken);
  padding: 2px 6px; border-radius: 6px; border: 1px solid var(--border);
}
.content pre {
  background: var(--black); color: var(--ink-rev); padding: 16px 18px;
  border-radius: var(--r-md); overflow-x: auto; font-size: 13.5px; line-height: 1.55;
  border: 1px solid rgba(255,255,255,.08);
}
.content pre code { background: none; border: none; padding: 0; color: inherit; }

/* Hero (home) */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 140% at 88% -10%, color-mix(in srgb, var(--accent) 34%, transparent), transparent 60%),
    var(--black);
  color: var(--ink-rev);
  border-radius: var(--r-xl); padding: 40px 40px 44px; margin: 0 0 40px;
  box-shadow: var(--shadow-lg);
}
.hero::after {
  content: ""; position: absolute; right: -30px; bottom: -40px; width: 260px; height: 260px;
  background: url('/logos/cloura-isotype-white.svg') no-repeat center / contain;
  opacity: .08; pointer-events: none;
}
.hero img.hero-logo { width: 232px; height: auto; margin: 0 0 20px; display: block; }
.hero h1 { color: var(--ink-rev); font-size: 34px; margin: 0 0 10px; }
.hero p { color: var(--gray-rev); font-size: 18px; margin: 0; max-width: 60ch; }

/* Callouts */
.note {
  border: 1px solid var(--border); border-left: 3px solid var(--accent);
  background: var(--accent-soft); border-radius: var(--r-md);
  padding: 14px 16px; margin: 22px 0; font-size: 14.5px;
}
.note.warn { border-left-color: var(--warn); background: color-mix(in srgb, var(--warn) 8%, transparent); }
.note strong { display: block; margin-bottom: 3px; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(224px, 1fr)); gap: 14px; margin: 26px 0; }
.card {
  position: relative; overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 20px 18px 18px; background: var(--surface); box-shadow: var(--shadow-sm);
  transition: box-shadow .2s var(--ease), transform .2s var(--ease), border-color .2s var(--ease);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--accent-line); text-decoration: none; }
.card h3 { margin: 10px 0 4px; }
.card p { margin: 0; font-size: 14px; color: var(--text-2); }
.card .ico { font-size: 22px; }

/* Role badges */
.badge {
  display: inline-block; font-size: 12px; font-weight: 600;
  padding: 2px 10px; border-radius: 999px; border: 1px solid var(--border-strong);
  color: var(--text-2); vertical-align: middle;
}
.badge.admin { color: var(--accent-strong); border-color: var(--accent-line); background: var(--accent-soft); }
.badge.lector { color: var(--text-2); background: var(--bg-sunken); }

.footer { margin-top: 60px; padding-top: 24px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-3); }

/* Tarjeta de terminal para los comandos CLI */
.cmd { margin: 18px 0; border: 1px solid var(--border-strong); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-sm); }
.cmd-head {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-sunken); padding: 9px 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--text-3);
  border-bottom: 1px solid var(--border);
}
.cmd-head .dots { display: inline-flex; gap: 6px; margin-right: 4px; }
.cmd-head .dots i { width: 10px; height: 10px; border-radius: 50%; }
.cmd-head .dots i:nth-child(1){ background:#ff5f57; } .cmd-head .dots i:nth-child(2){ background:#febc2e; } .cmd-head .dots i:nth-child(3){ background:#28c840; }
.cmd pre { margin: 0; border: 0; border-radius: 0; }

/* Sub-navegación por proveedor */
.prov-toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 8px; }
.prov-toc a {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px;
  border: 1px solid var(--border); border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--text-2);
  background: var(--surface);
}
.prov-toc a:hover { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-strong); text-decoration: none; }
.prov-h {
  scroll-margin-top: 16px; display: flex; align-items: center; gap: 12px;
  margin: 48px 0 4px; padding-bottom: 12px; border-bottom: 2px solid var(--border);
}
.prov-h .pm { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font: 700 11px/1 ui-monospace, Menlo, monospace; }
.prov-h .pm.aws   { background: color-mix(in srgb, #ff9900 14%, transparent); color: #b26a00; }
.prov-h .pm.azure { background: color-mix(in srgb, #0078d4 14%, transparent); color: #0067b8; }
.prov-h .pm.gcp   { background: color-mix(in srgb, #ea4335 14%, transparent); color: #c5221f; }

/* ============================ MOCKUPS (marco navegador) ============================ */
figure.mock { margin: 26px 0; }
figure.mock figcaption { font-size: 13px; color: var(--text-3); margin-top: 10px; text-align: center; }
.browser {
  border: 1px solid var(--border-strong); border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow-lg); background: var(--surface);
}
.browser .bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; background: #f2f3f6; border-bottom: 1px solid var(--border);
}
.browser .dots { display: flex; gap: 6px; }
.browser .dots i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.browser .dots i:nth-child(1){ background:#ff5f57; } .browser .dots i:nth-child(2){ background:#febc2e; } .browser .dots i:nth-child(3){ background:#28c840; }
.browser .url {
  flex: 1; text-align: center; font-size: 12px; color: var(--text-3);
  background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; margin: 0 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.browser .app { padding: 22px; background: linear-gradient(180deg, #fbfcfe, #f6f8fb); }

/* Chrome de app Cloura dentro del mock */
.appbar { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.appbar .lg { width: 104px; height: auto; }
.appbar .spacer { flex: 1; }
.pill { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); border: 1px solid var(--accent-line); }

/* Wizard */
.wz-steps { display: flex; align-items: center; gap: 0; margin: 4px 0 20px; }
.wz-steps .st { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-3); font-weight: 500; }
.wz-steps .st .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-sunken); color: var(--text-3); font-size: 12px; font-weight: 600; }
.wz-steps .st.done .n { background: var(--accent); color: #fff; }
.wz-steps .st.active .n { background: var(--ink); color: #fff; }
.wz-steps .st.active { color: var(--ink); }
.wz-steps .line { flex: 1; height: 2px; background: var(--border); margin: 0 12px; border-radius: 2px; }
.wz-steps .line.done { background: var(--accent); }

.clouds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cloud {
  border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px; text-align: center;
  background: #fff; font-weight: 600; font-size: 14px; color: var(--text-2);
}
.cloud .g { font-size: 26px; display: block; margin-bottom: 6px; }
.cloud.sel { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); color: var(--ink); }
.cloud small { display: block; font-weight: 400; font-size: 11.5px; color: var(--text-3); margin-top: 2px; }

.field { margin: 10px 0; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 4px; }
.field .inp { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; background: #fff; border: 1px solid var(--border-strong); border-radius: 8px; padding: 9px 12px; color: var(--ink); }
.btn-mock { display: inline-block; background: var(--ink); color: #fff; font-weight: 600; font-size: 13.5px; padding: 9px 18px; border-radius: 10px; }
.btn-mock.teal { background: var(--accent); }
.ro-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, transparent); border: 1px solid color-mix(in srgb, var(--ok) 26%, transparent); border-radius: 999px; padding: 3px 10px; }

/* Dashboard / hallazgos */
.dash { display: grid; grid-template-columns: 190px 1fr; gap: 16px; align-items: start; }
.score { border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px; text-align: center; background: #fff; }
.gauge { width: 120px; height: 120px; border-radius: 50%; margin: 4px auto 8px;
  background: conic-gradient(var(--accent) 0 78%, var(--bg-sunken) 78% 100%);
  display: grid; place-items: center; }
.gauge > span { width: 92px; height: 92px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 28px; font-weight: 700; color: var(--ink); }
.score .lbl { font-size: 12px; color: var(--text-3); font-weight: 500; }
.score .delta { font-size: 12px; font-weight: 600; color: var(--ok); }
.finds { display: grid; gap: 10px; }
.find { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 14px; background: #fff; }
.sev { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; }
.sev.high { color: #fff; background: var(--risk); }
.sev.med { color: #7a5300; background: color-mix(in srgb, var(--warn) 24%, #fff); }
.sev.low { color: var(--text-2); background: var(--bg-sunken); }
.find .t { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.find .t small { display: block; font-weight: 400; font-size: 12px; color: var(--text-3); font-family: ui-monospace, Menlo, monospace; }
.find .save { font-size: 13px; font-weight: 700; color: var(--ok); white-space: nowrap; }

/* ============================ Mobile ============================ */
.menu-btn { display: none; }
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; z-index: 40; width: 84%; max-width: 320px;
    transform: translateX(-102%); transition: transform .2s var(--ease); box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: translateX(0); }
  .menu-btn {
    display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 30;
    width: 100%; padding: 13px 18px; background: var(--black); color: var(--ink-rev); border: none;
    font: inherit; font-weight: 600; cursor: pointer;
  }
  .dash { grid-template-columns: 1fr; }
  .clouds { grid-template-columns: 1fr; }
}
