/* ==========================================================================
   cardinalos-mochi.css — CardinalOS Spotlight, Product Page & Mochi Mascot
   Aligned with CodLab «Europa» visual identity:
   - Aqua (#54a8c7 / #7fd0ea / #1d617a) for eyebrows, badges and calm accents
   - Amber (#ea7a24 with #0b1220 ink, 7.18:1) strictly for primary CTAs
   - Static layout containers only: Mochi never floats over or covers content.
   ========================================================================== */

.cos-spotlight {
  position: relative;
  padding-block: clamp(56px, 6vw, 88px);
  background: linear-gradient(180deg, #0d1422 0%, #121b2d 100%);
  color: #e6edf7;
  border-top: 1px solid rgba(127, 208, 234, 0.18);
  border-bottom: 1px solid rgba(127, 208, 234, 0.18);
}

.cos-spotlight .container {
  max-width: 1220px;
  margin-inline: auto;
  padding-inline: 24px;
}

.cos-spotlight--projects {
  border-top: 1px solid rgba(127, 208, 234, 0.24);
}

.cos-eyebrow-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-bottom: 18px;
}

.cos-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(84, 168, 199, 0.16);
  border: 1px solid rgba(127, 208, 234, 0.42);
  font-family: var(--wow-mono, ui-monospace, monospace);
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9be0f5;
}

.cos-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7fd0ea;
}

.cos-kicker-note {
  font-family: var(--wow-mono, ui-monospace, monospace);
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b8c7dc;
}

.cos-spotlight-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: 40px 48px;
  align-items: start;
}

.cos-copy h2 {
  margin: 0 0 18px !important;
  font-family: var(--wow-serif, Georgia, serif);
  font-weight: 400;
  font-size: clamp(30px, 3.4vw, 46px) !important;
  line-height: 1.12 !important;
  letter-spacing: -0.02em;
  color: #ffffff !important;
}

.cos-copy h2 em {
  font-style: italic;
  color: #8ad6ef;
}

.cos-lead {
  margin: 0 0 22px !important;
  max-width: 60ch;
  font-size: 17px;
  line-height: 1.68;
  color: #dce5f2;
}

.cos-pillars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
  list-style: none;
  padding: 0;
  margin: 0 0 26px;
}

.cos-pillars li {
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(184, 199, 220, 0.18);
  font-size: 14px;
  line-height: 1.55;
  color: #d6e0ee;
}

.cos-pillars li strong {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.cos-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  margin-top: 8px;
}

.cos-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 999px;
  background: #ea7a24;
  border: 2px solid #ea7a24;
  color: #0b1220 !important;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none !important;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.cos-btn-primary:hover,
.cos-btn-primary:focus-visible {
  background: #ffb877;
  border-color: #ffb877;
  color: #0b1220 !important;
}

.cos-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 999px;
  background: rgba(20, 30, 48, 0.9);
  border: 1px solid rgba(138, 214, 239, 0.55);
  color: #ffffff !important;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none !important;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.cos-btn-secondary:hover,
.cos-btn-secondary:focus-visible {
  background: rgba(84, 168, 199, 0.22);
  border-color: #9be0f5;
  color: #ffffff !important;
}

.cos-text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding-inline: 4px;
  color: #8ad6ef !important;
  font-size: 15px;
  font-weight: 600;
  text-decoration: underline !important;
  text-underline-offset: 4px;
}

.cos-text-link:hover,
.cos-text-link:focus-visible {
  color: #ffffff !important;
}

.cos-spotlight :is(a, button):focus-visible,
.cos-page :is(a, button):focus-visible,
.mochi-codlab-widget :is(a, button):focus-visible {
  outline: 3px solid #ffb877 !important;
  outline-offset: 4px !important;
}

.cos-status-note {
  margin: 18px 0 0 !important;
  font-size: 13px;
  line-height: 1.6;
  color: #b8c7dc;
}

.cos-visual-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.cos-figure {
  margin: 0;
  padding: 14px;
  border-radius: 16px;
  background: #162136;
  border: 1px solid rgba(138, 214, 239, 0.24);
  box-shadow: 0 16px 38px rgba(4, 8, 16, 0.35);
}

.cos-figure-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.cos-brand-lockup {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  font-weight: 700;
  font-size: 15px;
  color: #ffffff;
}

.cos-brand-lockup img {
  width: 28px !important;
  height: 28px !important;
  margin: 0 !important;
  flex: none;
}

.cos-figure-tag {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  text-align: right;
  overflow-wrap: break-word;
  font-family: var(--wow-mono, ui-monospace, monospace);
  font-size: 11px;
  line-height: 1.35;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9be0f5;
}

.cos-figure-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.cos-figure figcaption {
  margin-top: 10px;
  font-size: 12.5px;
  line-height: 1.55;
  color: #c2d0e3;
}

/* ==========================================================================
   Mochi Mascot Card (dark & light variants, strictly static in layout)
   ========================================================================== */

.mochi-codlab-widget {
  position: static;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px 20px;
  align-items: center;
  padding: 18px 20px;
  border-radius: 16px;
  background: #152034;
  border: 1px solid rgba(138, 214, 239, 0.26);
  color: #e2eaf5;
}

.mochi-codlab-widget--light {
  background: #f6f8fb;
  border: 1px solid #cfd8e3;
  color: #273244;
}

.mochi-codlab-stage {
  width: 96px;
  height: 96px;
  border-radius: 18px;
  background: radial-gradient(circle at 50% 38%, rgba(127, 208, 234, 0.18), rgba(11, 18, 32, 0.65));
  border: 1px solid rgba(138, 214, 239, 0.24);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: none;
}

.mochi-codlab-widget--light .mochi-codlab-stage {
  background: radial-gradient(circle at 50% 38%, #1e293b 0%, #0f172a 100%);
  border-color: #94a3b8;
}

.mochi-codlab-canvas {
  display: block;
  width: 88px;
  height: 88px;
  pointer-events: none;
}

.mochi-codlab-body {
  min-width: 0;
}

.mochi-codlab-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 6px;
}

.mochi-codlab-eyebrow {
  font-family: var(--wow-mono, ui-monospace, monospace);
  font-size: 11.5px;
  line-height: 1.4;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8ad6ef;
}

.mochi-codlab-widget--light .mochi-codlab-eyebrow {
  color: #195b73;
}

.mochi-codlab-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  min-width: 36px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(184, 199, 220, 0.35);
  color: #f1f5f9;
  font-family: var(--wow-mono, ui-monospace, monospace);
  font-size: 11.5px;
  line-height: 1.3;
  cursor: pointer;
}

.mochi-codlab-toggle[hidden],
.mochi-codlab-widget[data-reduced-motion="true"] .mochi-codlab-toggle {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .mochi-codlab-toggle {
    display: none !important;
  }
}

.mochi-codlab-toggle:hover {
  background: rgba(138, 214, 239, 0.2);
  border-color: #9be0f5;
}

.mochi-codlab-widget--light .mochi-codlab-toggle {
  background: #ffffff;
  border-color: #64748b;
  color: #14181f;
}

.mochi-codlab-widget--light .mochi-codlab-toggle:hover {
  background: #eef2f6;
  border-color: #14181f;
}

.mochi-codlab-widget--light :is(a, button):focus-visible {
  outline: 3px solid #a85211 !important;
  outline-offset: 3px !important;
}

.mochi-codlab-title {
  margin: 0 0 6px !important;
  font-size: 16.5px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  color: #ffffff !important;
}

.mochi-codlab-widget--light .mochi-codlab-title {
  color: #14181f !important;
}

.mochi-codlab-text {
  margin: 0 0 8px !important;
  font-size: 14px;
  line-height: 1.58;
  color: #d4dfee;
}

.mochi-codlab-widget--light .mochi-codlab-text {
  color: #334155;
}

.mochi-codlab-credit {
  margin: 0 !important;
  font-size: 12.5px;
  line-height: 1.55;
  color: #c0cee0;
}

.mochi-codlab-widget--light .mochi-codlab-credit {
  color: #475569;
}

.mochi-codlab-credit a {
  color: #8ad6ef !important;
  font-weight: 600;
  text-decoration: underline !important;
  text-underline-offset: 3px;
}

.mochi-codlab-widget--light .mochi-codlab-credit a {
  color: #195b73 !important;
}

.mochi-about-section {
  padding-block: 48px 56px;
  background: #ffffff;
  border-top: 1px solid rgba(20, 24, 31, 0.08);
}

.mochi-about-section .container {
  max-width: 920px;
  margin-inline: auto;
  padding-inline: 24px;
}

/* ==========================================================================
   Dedicated Product Page (/projects/cardinalos/)
   ========================================================================== */

.cos-page {
  background: #f6f7f9;
  color: #273244;
}

.cos-page .container {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 24px;
}

.cos-hero {
  padding-block: clamp(64px, 7vw, 104px) clamp(52px, 6vw, 80px);
  background: linear-gradient(180deg, #0c1320 0%, #141e32 100%);
  color: #eef3fa;
}

.cos-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  font-family: var(--wow-mono, ui-monospace, monospace);
  font-size: 12.5px;
  color: #b8c7dc;
}

.cos-breadcrumb a {
  color: #8ad6ef !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cos-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 40px 48px;
  align-items: center;
}

.cos-hero h1 {
  margin: 0 0 20px !important;
  font-family: var(--wow-serif, Georgia, serif);
  font-weight: 400;
  font-size: clamp(34px, 4.2vw, 56px) !important;
  line-height: 1.08 !important;
  letter-spacing: -0.02em;
  color: #ffffff !important;
}

.cos-hero h1 em {
  font-style: italic;
  color: #8ad6ef;
}

.cos-hero-sub {
  margin: 0 0 24px !important;
  max-width: 58ch;
  font-size: 18px;
  line-height: 1.68;
  color: #dce5f2;
}

.cos-section {
  padding-block: clamp(52px, 6vw, 80px);
  border-bottom: 1px solid #d9e0e8;
}

.cos-section--white {
  background: #ffffff;
}

.cos-section-head {
  max-width: 68ch;
  margin-bottom: 32px;
}

.cos-section-kicker {
  margin: 0 0 10px !important;
  font-family: var(--wow-mono, ui-monospace, monospace);
  font-size: 12.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #195b73;
}

.cos-section h2 {
  margin: 0 0 14px !important;
  font-family: var(--wow-serif, Georgia, serif);
  font-weight: 400;
  font-size: clamp(28px, 3vw, 40px) !important;
  line-height: 1.15 !important;
  color: #14181f !important;
}

.cos-section-intro {
  margin: 0 !important;
  font-size: 17px;
  line-height: 1.68;
  color: #334155;
}

.cos-cards-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.cos-cards-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.cos-card {
  padding: 26px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #d5dde7;
}

.cos-section--white .cos-card {
  background: #f6f8fb;
}

.cos-card h3 {
  margin: 0 0 10px !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  color: #14181f !important;
}

.cos-card p {
  margin: 0 !important;
  font-size: 15.5px;
  line-height: 1.65;
  color: #334155;
}

.cos-card .cos-card-limit {
  margin-top: 14px !important;
  padding-top: 12px;
  border-top: 1px solid #d9e1eb;
  font-size: 13.5px;
  line-height: 1.55;
  color: #475569;
}

.cos-apps-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.cos-app-tile {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #d5dde7;
}

.cos-app-tile img {
  width: 44px !important;
  height: 44px !important;
  margin: 0 !important;
}

.cos-app-tile h3 {
  margin: 0 !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  color: #14181f !important;
}

.cos-app-tile p {
  margin: 0 !important;
  font-size: 13.5px;
  line-height: 1.5;
  color: #475569;
}

.cos-app-tile a {
  margin-top: auto;
  font-size: 13.5px;
  font-weight: 600;
  color: #a85211 !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cos-captures-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.cos-capture-card {
  margin: 0;
  padding: 16px;
  border-radius: 16px;
  background: #141c2c;
  color: #e2eaf5;
  border: 1px solid #2a3954;
}

.cos-capture-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.cos-capture-card figcaption {
  margin-top: 12px;
  font-size: 13.5px;
  line-height: 1.55;
  color: #cad6e8;
}

.cos-blog-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.cos-blog-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #d5dde7;
}

.cos-blog-card h3 {
  margin: 0 0 10px !important;
  font-size: 18.5px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  color: #14181f !important;
}

.cos-blog-card p {
  margin: 0 0 16px !important;
  font-size: 14.5px;
  line-height: 1.6;
  color: #334155;
}

.cos-blog-card a {
  margin-top: auto;
  font-size: 15px;
  font-weight: 600;
  color: #a85211 !important;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.cos-cta-band {
  padding-block: clamp(52px, 6vw, 76px);
  background: #0f1728;
  color: #e6edf7;
}

.cos-cta-band-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 32px 44px;
  align-items: center;
}

.cos-cta-band h2 {
  margin: 0 0 14px !important;
  font-family: var(--wow-serif, Georgia, serif);
  font-weight: 400;
  font-size: clamp(28px, 3vw, 38px) !important;
  line-height: 1.15 !important;
  color: #ffffff !important;
}

.cos-cta-band p {
  margin: 0 0 22px !important;
  max-width: 58ch;
  font-size: 16.5px;
  line-height: 1.65;
  color: #dce5f2;
}

.cos-trademark {
  margin-top: 24px !important;
  padding-top: 16px;
  border-top: 1px solid rgba(184, 199, 220, 0.22);
  font-size: 12.5px !important;
  line-height: 1.6 !important;
  color: #b8c7dc !important;
}

/* ==========================================================================
   Responsive Breakpoints (991px tablet, 767px mobile down to 360px/390px)
   ========================================================================== */

@media (max-width: 991px) {
  .cos-spotlight-grid,
  .cos-hero-grid,
  .cos-cta-band-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .cos-cards-3,
  .cos-blog-links {
    grid-template-columns: 1fr;
  }

  .cos-apps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .cos-spotlight {
    padding-block: 44px;
  }

  .cos-figure-tag {
    font-size: 10.5px;
    letter-spacing: 0.05em;
  }

  .cos-pillars,
  .cos-cards-2,
  .cos-captures-grid {
    grid-template-columns: 1fr;
  }

  .cos-apps-grid {
    grid-template-columns: 1fr;
  }

  .cos-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cos-btn-primary,
  .cos-btn-secondary {
    width: 100%;
    text-align: center;
  }

  .mochi-codlab-widget {
    grid-template-columns: 1fr;
    justify-items: start;
    padding: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cos-btn-primary,
  .cos-btn-secondary {
    transition: none !important;
  }
}

/* ==========================================================================
   CardinalOS Blog Articles (scoped strictly to cardinalos-* slugs so legacy
   articles keep prod/servito styles untouched — D-I)
   ========================================================================== */
[data-cardinalos-post] article.prose {
  color: #1e293b;
  line-height: 1.78;
}

[data-cardinalos-post] article.prose p,
[data-cardinalos-post] article.prose li {
  color: #1e293b;
  line-height: 1.78;
}

[data-cardinalos-post] article.prose p[data-aeo-lead="true"] {
  background: #f6f7f9;
  border-left: 3px solid #1d556c;
  padding: 1.05rem 1.25rem;
  border-radius: 0 0.5rem 0.5rem 0;
  color: #14181f;
  font-size: 1.03rem;
  line-height: 1.72;
  margin-bottom: 1.85rem;
}

[data-cardinalos-post] article.prose h2 {
  color: #14181f;
  font-family: var(--wow-serif, Georgia, serif);
  line-height: 1.25;
  letter-spacing: -0.015em;
  border-top: 1px solid #e2e8f0;
  padding-top: 1.45rem;
  margin-top: 2.4rem;
}

[data-cardinalos-post] article.prose h2:first-of-type {
  border-top: 0;
  padding-top: 0;
}

[data-cardinalos-post] article.prose h3 {
  color: #1e293b;
  line-height: 1.32;
  margin-top: 1.8rem;
}

[data-cardinalos-post] article.prose a {
  color: #1d556c !important;
  text-decoration: underline !important;
  text-decoration-line: underline !important;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1.5px;
  font-weight: 500;
}

[data-cardinalos-post] article.prose a:hover {
  color: #a85211 !important;
  text-decoration-thickness: 2px;
}

[data-cardinalos-post] article.prose :is(a, button, summary, [tabindex]):focus-visible {
  outline: 2px solid #a85211 !important;
  outline-offset: 3px;
  border-radius: 2px;
}

[data-cardinalos-post] article.prose :not(pre) > code {
  color: #14181f !important;
  background-color: #f1f5f9 !important;
  border: 1px solid #cbd5e1;
  padding: 0.14rem 0.38rem;
  border-radius: 0.28rem;
  font-family: var(--wow-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 0.87em;
}

[data-cardinalos-post] article.prose #article-faq .accordion-button {
  color: #14181f !important;
  font-weight: 600;
}

[data-cardinalos-post] article.prose pre {
  max-width: 100%;
  overflow-x: auto !important;
  overflow-y: visible !important;
  box-sizing: border-box;
}

[data-cardinalos-post] article.prose pre code {
  display: block;
  max-width: 100%;
  box-sizing: border-box;
  white-space: pre-wrap !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  font-family: var(--wow-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  line-height: 1.62;
}

[data-cardinalos-post] article.prose pre code .hljs-comment,
[data-cardinalos-post] article.prose pre code .hljs-quote {
  color: #94a3b8 !important;
}

@media (max-width: 640px) {
  [data-cardinalos-post] article.prose pre code {
    padding: 0.95rem 1rem !important;
    font-size: 0.76rem !important;
    line-height: 1.55 !important;
  }
}
