/* Cognaire marketing site — shared styles
 * Extends colors_and_type.css with marketing-specific primitives:
 * top nav, hero, sections, cards, footer, responsive grid.
 */

@import url("./colors_and_type.css");

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--surface-default);
  color: var(--fg-primary);
  font-size: 16px;
  line-height: 1.55;
  text-wrap: pretty;
}

img, svg { max-width: 100%; display: block; }

/* =====================================================================
 * ACCENT / THEME KNOBS
 * ===================================================================== */
:root {
  --accent: var(--brand-navy);
  --accent-deep: var(--brand-navy-deep);
  --accent-soft: rgba(14, 48, 72, 0.06);
  --accent-rgb: 14, 48, 72;

  --marketing-max: 1200px;
  --marketing-gutter: clamp(20px, 4vw, 48px);

  --nav-height: 64px;
}
:root[data-accent="teal"] {
  --accent: var(--brand-teal);
  --accent-deep: var(--brand-teal-deep);
  --accent-soft: rgba(19, 92, 121, 0.06);
  --accent-rgb: 19, 92, 121;
}

/* =====================================================================
 * LAYOUT PRIMITIVES
 * ===================================================================== */
.container {
  max-width: var(--marketing-max);
  margin: 0 auto;
  padding-left: var(--marketing-gutter);
  padding-right: var(--marketing-gutter);
}

.section {
  padding: clamp(48px, 7vw, 96px) 0;
}
.section--tight { padding: clamp(32px, 4vw, 56px) 0; }
.section--tinted { background: var(--surface-background); }
.section--navy {
  background: var(--brand-navy);
  color: #e6eef3;
}
.section--navy h1,
.section--navy h2,
.section--navy h3,
.section--navy h4 { color: #ffffff; }

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.section--navy .eyebrow { color: #7db6cc; }

h1.display, .display-1 {
  font-size: clamp(40px, 5.2vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  font-weight: 700;
  margin: 0 0 20px;
  color: var(--fg-primary);
  text-wrap: balance;
}
h2.display, .display-2 {
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--fg-primary);
  text-wrap: balance;
}
.section--navy h1.display,
.section--navy h2.display,
.section--navy .display-1,
.section--navy .display-2 { color: #ffffff; }

.lede {
  font-size: clamp(17px, 1.3vw, 20px);
  line-height: 1.55;
  color: var(--fg-secondary);
  max-width: 64ch;
  margin: 0 0 24px;
}
.section--navy .lede { color: #b9c7d1; }

/* =====================================================================
 * BUTTONS (marketing scale)
 * ===================================================================== */
.btn-m {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  height: 44px;
  border-radius: 4px;
  border: 1px solid transparent;
  font: 500 15px/1 var(--font-sans);
  cursor: pointer;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .05s ease;
  white-space: nowrap;
}
.btn-m i { font-size: 13px; }
.btn-m:active { transform: translateY(1px); }

.btn-m--primary {
  background: var(--accent);
  color: #ffffff;
}
.btn-m--primary:hover { background: var(--accent-deep); color: #fff; text-decoration: none; }

.btn-m--outline {
  background: transparent;
  color: var(--fg-primary);
  border-color: rgba(0,0,0,0.15);
}
.btn-m--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.section--navy .btn-m--outline {
  color: #ffffff;
  border-color: rgba(255,255,255,0.35);
}
.section--navy .btn-m--outline:hover {
  border-color: #ffffff;
  background: rgba(255,255,255,0.06);
  color: #ffffff;
}

.btn-m--ghost {
  background: transparent;
  color: var(--fg-primary);
  padding: 10px 4px;
  height: auto;
}
.btn-m--ghost:hover { color: var(--accent); text-decoration: none; }

.btn-m--sm { height: 36px; padding: 8px 14px; font-size: 14px; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* =====================================================================
 * NAV
 * ===================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border-subtle);
  height: var(--nav-height);
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--brand-navy);
  text-decoration: none;
  flex-shrink: 0;
}
.brand img { height: 28px; width: auto; }
.brand:hover { text-decoration: none; }

.topnav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  margin-left: 16px;
}
.topnav__item {
  position: relative;
}
.topnav__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  height: 36px;
  line-height: 1;
  border-radius: 4px;
  color: var(--fg-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  font-style: normal;
  letter-spacing: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-decoration: none;
  text-rendering: optimizeLegibility;
  cursor: pointer;
  background: transparent;
  border: none;
  box-sizing: border-box;
  vertical-align: middle;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}
a.topnav__link,
button.topnav__link {
  font-weight: 500 !important;
  font-family: var(--font-sans) !important;
  line-height: 1 !important;
}
.topnav__link:hover,
.topnav__link[aria-expanded="true"] {
  background: var(--accent-soft);
  color: var(--accent);
  text-decoration: none;
}
.topnav__link .chev {
  font-size: 10px;
  opacity: 0.6;
  transition: transform .15s ease;
}
.topnav__link[aria-expanded="true"] .chev { transform: rotate(180deg); }

.topnav__menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 320px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  box-shadow: var(--shadow-dropdown);
  padding: 8px;
  display: none;
  z-index: 60;
}
.topnav__item.is-open .topnav__menu { display: block; }
.topnav__menu-item {
  display: block;
  padding: 10px 12px;
  border-radius: 4px;
  color: var(--fg-primary);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.4;
}
.topnav__menu-item:hover {
  background: var(--accent-soft);
  color: var(--accent);
  text-decoration: none;
}
.topnav__menu-item__title {
  font-weight: 600;
  margin-bottom: 2px;
}
.topnav__menu-item__desc {
  font-size: 12px;
  color: var(--fg-secondary);
}

.topbar__ctas {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.topbar__ctas .btn-m { height: 36px; padding: 0 14px; font-size: 14px; }

/* Mobile */
.topnav__burger { display: none; }
@media (max-width: 960px) {
  .topnav { display: none; }
  .topbar__ctas .btn-m--outline { display: none; }
  .topnav__burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border: none;
    background: transparent;
    color: var(--fg-primary);
    font-size: 18px;
    cursor: pointer;
    border-radius: 4px;
  }
  .topnav__burger:hover { background: var(--accent-soft); color: var(--accent); }
}

/* =====================================================================
 * CARDS
 * ===================================================================== */
.card {
  background: var(--surface-default);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 28px;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.card--link { color: inherit; text-decoration: none; display: block; }
.card--link:hover {
  border-color: rgba(var(--accent-rgb), 0.35);
  box-shadow: var(--shadow-card);
  color: inherit;
  text-decoration: none;
}
.card--padded { padding: 32px; }
.card--tinted { background: var(--surface-background); border-color: transparent; }

.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

/* =====================================================================
 * FEATURE LIST (icon + title + desc)
 * ===================================================================== */
.feature {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.feature__icon {
  flex: 0 0 36px;
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}
.feature__title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--fg-primary);
}
.feature__desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--fg-secondary);
  margin: 0;
}
.section--navy .feature__title { color: #fff; }
.section--navy .feature__desc { color: #b9c7d1; }
.section--navy .feature__icon {
  background: rgba(255,255,255,0.08);
  color: #7fbed4;
}

/* =====================================================================
 * TAG / PILL
 * ===================================================================== */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}
.tag--neutral {
  background: var(--surface-alt);
  color: var(--fg-secondary);
}
.tag--dot::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 999px;
  background: currentColor;
  display: inline-block;
}

/* =====================================================================
 * FOOTER
 * ===================================================================== */
.footer {
  background: #0a2334;
  color: #b9c7d1;
  padding: 64px 0 32px;
  font-size: 14px;
}
.footer a { color: #d2dce3; text-decoration: none; }
.footer a:hover { color: #ffffff; text-decoration: underline; }
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
@media (max-width: 800px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
.footer__brand { max-width: 320px; }
.footer__brand img { height: 24px; filter: brightness(0) invert(1); opacity: 0.9; margin-bottom: 12px; }
.footer__brand p { font-size: 13px; color: #8ea1ae; line-height: 1.55; margin: 0; }

.footer__col h4 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ffffff;
  margin: 0 0 16px;
}
.footer__col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer__col li a { font-size: 13px; }

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 12px;
  color: #7f94a3;
  flex-wrap: wrap;
  gap: 12px;
}
.footer__legal { display: flex; gap: 20px; }

/* =====================================================================
 * PAGE HERO (non-homepage section pages)
 * ===================================================================== */
.page-hero {
  padding: 80px 0 56px;
  border-bottom: 1px solid var(--border-subtle);
}
.page-hero__crumb {
  font-size: 13px;
  color: var(--fg-secondary);
  margin-bottom: 16px;
}
.page-hero__crumb a { color: var(--fg-secondary); }
.page-hero__crumb a:hover { color: var(--accent); }

/* =====================================================================
 * UI MOCK (shared visual language for product previews)
 * ===================================================================== */
.ui-mock {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  box-shadow: 0 20px 50px -20px rgba(14, 48, 72, 0.25), 0 2px 6px rgba(0,0,0,0.04);
  overflow: hidden;
  font-size: 13px;
  line-height: 1.45;
}
.ui-mock__chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #f5f7f9;
  border-bottom: 1px solid var(--border-subtle);
}
.ui-mock__chrome .dot { width: 10px; height: 10px; border-radius: 50%; background: #d5dde3; }
.ui-mock__chrome .title {
  margin-left: 8px;
  font-size: 12px;
  color: var(--fg-secondary);
  font-weight: 500;
}

/* Section headers */
.sec-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
}
.sec-head__copy { max-width: 640px; }
.sec-head__copy .eyebrow { margin-bottom: 12px; }
.sec-head__copy h2 { margin: 0 0 12px; }
.sec-head__copy p { margin: 0; color: var(--fg-secondary); font-size: 16px; }
.sec-head__link { font-weight: 500; white-space: nowrap; }
@media (max-width: 700px) { .sec-head { flex-direction: column; align-items: flex-start; } }

/* Utility */
.hstack { display: flex; align-items: center; gap: 8px; }
.vstack { display: flex; flex-direction: column; gap: 8px; }
.mt-0 { margin-top: 0; } .mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 8px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; } .mb-8 { margin-bottom: 32px; }
.text-center { text-align: center; }
.max-800 { max-width: 800px; margin-left: auto; margin-right: auto; }

/* =====================================================================
 * INSIGHTS
 * ===================================================================== */
.article-card__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 16px;
}

.article-card__meta {
  font-size: 13px;
  color: var(--fg-muted);
  line-height: 1.4;
}

/* Article body — prose styles for rendered markdown */
.article-body h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 40px 0 16px;
  color: var(--fg-primary);
}
.article-body h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 32px 0 12px;
  color: var(--fg-primary);
}
.article-body p {
  margin: 0 0 16px;
  line-height: 1.65;
  color: var(--fg-secondary);
}
.article-body ul, .article-body ol {
  margin: 0 0 16px;
  padding-left: 24px;
  color: var(--fg-secondary);
  line-height: 1.65;
}
.article-body li + li { margin-top: 6px; }
.article-body blockquote {
  margin: 24px 0;
  padding: 16px 20px;
  border-left: 3px solid var(--accent);
  background: var(--surface-background);
  border-radius: 0 6px 6px 0;
  color: var(--fg-secondary);
  font-style: italic;
}
.article-body blockquote p { margin: 0; }
.article-body code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--surface-alt);
  color: var(--fg-primary);
}
.article-body pre {
  margin: 24px 0;
  padding: 20px;
  border-radius: 8px;
  background: #0a1e2e;
  color: #d0dde5;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.55;
}
.article-body pre code {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
}
.article-body img {
  border-radius: 8px;
  margin: 24px 0;
}
.article-body a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(var(--accent-rgb), 0.3);
  text-underline-offset: 2px;
}
.article-body a:hover {
  text-decoration-color: var(--accent);
}

.article-nav {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}
