/*
 * Kosmos brand tokens + landing page styles.
 * Source of truth: KosmosLabs Brand Guidelines (April 2026), see brand/BRAND.md.
 */
:root {
  /* Primary */
  --cosmic-violet: #8b59c7;     /* AI intelligence */
  --stellar-blue: #7c9cbf;      /* Action */
  /* Supporting */
  --space-gray: #9cb4d8;        /* Structural layer */
  --titanium-silver: #a8b5d1;   /* Metallic accent */
  /* Text + foundations */
  --control-white: #e2e4e9;     /* Primary text */
  --void-black: #0b0f1a;        /* Background */
  --alt-void: #1a1f2e;          /* Alt background, cards */

  --brand-bg: var(--void-black);
  --brand-surface: var(--alt-void);
  --brand-text: var(--control-white);
  --brand-muted: var(--titanium-silver);        /* secondary text */
  --brand-border: rgba(156, 180, 216, 0.16);    /* Space Gray, low opacity */
  --brand-gradient: linear-gradient(135deg, var(--cosmic-violet), var(--stellar-blue));  /* Primary Gradient */

  --font-display: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 12px;
  --max-w: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* Body: Inter Regular 16 / 150% */
body {
  margin: 0;
  background: var(--brand-bg);
  color: var(--brand-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; display: block; }

/* Type scale (guidelines p.19). Headings: Inter Tight Medium. */
h1, h2, h3, h4, h5 { font-family: var(--font-display); font-weight: 500; margin: 0; }
.h1 { font-size: clamp(40px, 6vw, 64px); line-height: 1.1; letter-spacing: -0.01em; }
.h2 { font-size: clamp(32px, 4.5vw, 48px); line-height: 1.1; letter-spacing: -0.01em; }
.h3 { font-size: clamp(26px, 3vw, 32px); line-height: 1.2; letter-spacing: -0.005em; }
.h4 { font-size: 24px; line-height: 1.2; letter-spacing: 0; }
.h5 { font-size: 18px; line-height: 1.3; letter-spacing: 0; }
/* Overline / caption: Inter Medium 13 / 150% / +2% */
.overline { font-family: var(--font-body); font-size: 13px; font-weight: 500; line-height: 1.5; letter-spacing: 0.02em; }

.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }

/* Header. Logo: full logo min width 120px, clear space 2x core diameter. */
.site-header { padding: 24px 0 0; }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 20px; border-bottom: 1px solid var(--brand-border);
}
.logo { display: inline-block; text-decoration: none; }
.logo img { height: 26px; width: auto; min-width: 120px; }

/* Hero, with a subtle ambient gradient (violet → stellar blue, soft, blurred, behind no text block) */
.hero { position: relative; overflow: hidden; padding: 88px 0 104px; }
.hero::before {
  content: ""; position: absolute; z-index: 0; pointer-events: none;
  width: 900px; height: 900px; right: -320px; top: -260px; border-radius: 50%;
  background:
    radial-gradient(closest-side, transparent 72%, rgba(139, 89, 199, 0.75) 84%, transparent 100%),
    radial-gradient(closest-side at 70% 20%, rgba(124, 156, 191, 0.55), transparent 70%);
  filter: blur(36px);
}
.hero .wrap { position: relative; z-index: 1; }
.eyebrow { display: inline-block; color: var(--stellar-blue); text-transform: uppercase; margin-bottom: 16px; }
.hero h1 { margin: 0 0 20px; max-width: 18ch; }
.hero p.sub { font-size: 18px; line-height: 1.5; color: var(--brand-muted); max-width: 52ch; margin: 0 0 32px; }

/* Primary CTA: Primary Gradient (Cosmic Violet → Stellar Blue) */
.btn {
  display: inline-block;
  background: var(--brand-gradient); color: #fff;
  font-family: var(--font-body); font-size: 16px; font-weight: 500; text-decoration: none;
  padding: 14px 24px; border-radius: var(--radius);
  transition: transform .15s ease, filter .15s ease;
}
.btn:hover, .btn:focus-visible { filter: brightness(1.08); transform: translateY(-1px); }

/* Sections */
.section { padding: 80px 0; border-top: 1px solid var(--brand-border); }
.section h2 { margin: 0 0 32px; }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  background: var(--brand-surface); border: 1px solid var(--brand-border);
  border-radius: var(--radius); padding: 24px;
}
.card h3 { margin: 0 0 8px; }
.card p { margin: 0; color: var(--brand-muted); }

/* Proof */
.proof blockquote {
  margin: 0; padding: 32px; border-left: 3px solid; border-image: var(--brand-gradient) 1;
  background: var(--brand-surface);
}
.proof blockquote p { margin: 0; }
.proof cite { display: block; margin-top: 16px; font-style: normal; color: var(--brand-muted); }

/* Form */
.form-section .form-layout { display: grid; gap: 40px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .form-section .form-layout { grid-template-columns: 1fr 1.1fr; align-items: start; } }
.form-section p { color: var(--brand-muted); margin: 16px 0 0; }
.form-embed {
  background: var(--brand-surface); border: 1px solid var(--brand-border);
  border-radius: var(--radius); padding: 24px; min-height: 320px;
}
.form-embed iframe { width: 100%; border: 0; min-height: 480px; }
.form-placeholder {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 272px; border: 2px dashed var(--brand-border); border-radius: 8px;
  color: var(--brand-muted); padding: 16px;
}

/* Footer */
.site-footer { padding: 40px 0; border-top: 1px solid var(--brand-border); color: var(--brand-muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }

/* ------------------------------------------------------------------
 * Layout: hero-form (templates/landing-hero-form.html)
 * Lead form sits in the hero beside the headline. Same tokens as above.
 * ------------------------------------------------------------------ */
.hero-form { padding: 72px 0 88px; }
.hero-grid { display: grid; gap: 40px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 48px; } }
.hero-form .hero-copy { padding-top: 8px; }
.hero-form h1 { max-width: 14ch; }
.hero-panel {
  background: var(--brand-surface); border: 1px solid var(--brand-border);
  border-radius: var(--radius); padding: 24px;
}
.hero-panel h2 { margin: 0; }
.hero-panel .panel-body { margin: 8px 0 20px; color: var(--brand-muted); }
.hero-panel .form-embed { background: transparent; border: 0; padding: 0; min-height: 360px; }

.section-intro { margin: -12px 0 32px; max-width: 64ch; color: var(--brand-muted); }

/* Two-column section: heading + text beside a card */
.split { display: grid; gap: 32px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1fr; } }
.split .h2 { margin: 0 0 16px; }
.split .section-intro { margin: 0; }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.check-list li { position: relative; padding-left: 28px; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 0.5em; width: 10px; height: 10px; border-radius: 50%;
  background: var(--cosmic-violet); box-shadow: 0 0 12px rgba(139, 89, 199, 0.6);
}
.proof-line { margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--brand-border); color: var(--brand-muted); }

/* Audit dimensions */
.audit-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.audit-list li {
  display: flex; flex-direction: column; gap: 8px; padding: 20px;
  background: var(--brand-surface); border: 1px solid var(--brand-border); border-radius: var(--radius);
}
.audit-list .step { color: var(--stellar-blue); }

/* FAQ */
.narrow { max-width: 760px; }
.faq .h2 { margin: 0 0 16px; }
.faq-item { border-bottom: 1px solid var(--brand-border); }
.faq-item summary { cursor: pointer; list-style: none; padding: 20px 0; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; float: right; color: var(--stellar-blue); }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { margin: 0 0 20px; color: var(--brand-muted); max-width: 64ch; }

/* Closing CTA */
.closing-panel {
  text-align: center; padding: 56px 24px; border-radius: var(--radius);
  border: 1px solid var(--brand-border); background: var(--brand-surface);
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.closing-panel .h2 { margin: 0; }
.closing-panel p { margin: 0; color: var(--brand-muted); max-width: 52ch; }

.btn:focus-visible, .faq-item summary:focus-visible { outline: 2px solid #c9b3e8; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }

/* ------------------------------------------------------------------
 * Layout: event (templates/landing-event.html)
 * Skyline hero (subtle ambient mode), event details beside the form, trust strip.
 * ------------------------------------------------------------------ */
.header-note { color: var(--brand-muted); text-transform: uppercase; }
.site-header .wrap { flex-wrap: wrap; gap: 12px; }

.hero-event {
  position: relative; overflow: hidden;
  background:
    radial-gradient(60% 70% at 62% 100%, rgba(139, 89, 199, 0.42), rgba(139, 89, 199, 0) 70%),
    radial-gradient(45% 55% at 88% 92%, rgba(124, 156, 191, 0.30), rgba(124, 156, 191, 0) 70%),
    var(--brand-bg);
}
.hero-event-copy { position: relative; z-index: 1; padding-top: 88px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 20px; }
.hero-event .eyebrow { margin: 0; }
.hero-event h1 { max-width: 16ch; }
.hero-event p.sub { margin: 0; font-size: 18px; line-height: 1.5; color: var(--brand-muted); max-width: 52ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; padding-top: 8px; }
.cta-note { color: var(--brand-muted); }
.skyline { position: relative; display: block; width: 100%; height: clamp(180px, 25vw, 360px); }
.skyline-orb { filter: drop-shadow(0 0 6px rgba(139, 89, 199, 0.9)); }

/* Event hero with a background photo (hero.photo). The copy sits on a frosted dark panel so it stays readable. */
.hero-event.has-photo {
  background:
    linear-gradient(0deg, var(--brand-bg) 0%, rgba(11, 15, 26, 0) 25%),
    linear-gradient(rgba(11, 15, 26, 0.25), rgba(11, 15, 26, 0.25)),
    var(--hero-photo) 50% 30% / cover no-repeat,
    var(--brand-bg);
}
.hero-event.has-photo .hero-event-copy { padding-bottom: 160px; isolation: isolate; }
.hero-event.has-photo .hero-event-copy::before {
  content: ""; position: absolute; z-index: -1;
  top: 52px; bottom: 124px; left: -16px; width: min(760px, calc(100% + 32px));
  background: rgba(11, 15, 26, 0.62);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid rgba(168, 181, 209, 0.18); border-radius: 16px;
}
@media (max-width: 720px) {
  .hero-event.has-photo {
    background:
      linear-gradient(0deg, var(--brand-bg) 0%, rgba(11, 15, 26, 0) 30%),
      var(--hero-photo-sm) 38% 100% / cover no-repeat,
      var(--brand-bg);
  }
  .hero-event.has-photo .hero-event-copy { padding: 88px 32px 96px; }
  .hero-event.has-photo .hero-event-copy::before { top: 60px; bottom: 64px; left: 8px; right: 8px; width: auto; }
}

.meet-grid { display: grid; gap: 40px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 860px) { .meet-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); } }
.meet-copy { display: flex; flex-direction: column; gap: 24px; }
.meet-copy .h2, .meet-copy p { margin: 0; }
.meet-copy p { color: var(--brand-muted); max-width: 46ch; }
.event-details {
  margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 14px 24px; padding: 24px;
  border-radius: var(--radius); border: 1px solid var(--brand-border); background: var(--brand-surface);
}
.event-details dt { color: var(--stellar-blue); text-transform: uppercase; }
.event-details dd { margin: 0; }
.form-panel { display: flex; flex-direction: column; gap: 8px; }
.form-panel h3 { margin: 0; }
.form-panel p { margin: 0 0 12px; color: var(--brand-muted); }
.form-panel .form-embed { background: transparent; border: 0; padding: 0; min-height: 300px; }

.heading-narrow { max-width: 20ch; }

.trust-strip { padding: 64px 0; }
.trust-row { display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: center; justify-content: space-between; }
.trust-copy { flex: 1 1 360px; display: flex; flex-direction: column; gap: 8px; }
.trust-copy .h3, .trust-copy p { margin: 0; }
.trust-copy p { color: var(--brand-muted); }
.trust-row .check-list { flex: 1 1 360px; }

/* ------------------------------------------------------------------
 * Layout: audit (templates/landing-audit.html)
 * Offer page: hero + sample report, icon cards, why band, numbered steps,
 * comparison cards, booking form. Palette and type as above.
 * ------------------------------------------------------------------ */
.layout-audit { --max-w: 1200px; }  /* the mockup's width: room for the sample report */
.layout-audit .site-header .wrap { flex-wrap: wrap; gap: 12px; }
.layout-audit .audit-hero h1 { font-size: clamp(40px, 5vw, 56px); line-height: 1.08; }
.btn-outline {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; box-sizing: border-box;
  border: 1px solid var(--stellar-blue); border-radius: var(--radius); color: #b8cddf;
  font-size: 14px; font-weight: 500; text-decoration: none;
}
.btn-outline:hover { background: rgba(124, 156, 191, 0.12); }
.btn-outline:focus-visible { outline: 2px solid #c9b3e8; outline-offset: 2px; }
.btn-icon { display: inline-flex; align-items: center; gap: 8px; }

.band-gradient { background: linear-gradient(180deg, var(--void-black) 0%, var(--alt-void) 50%, #2e294c 100%); }
.band { background: rgba(26, 31, 46, 0.55); }
.card-raised { box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 2px 4px rgba(0, 0, 0, 0.3); }
.pill { font-size: 12px; padding: 2px 10px; border-radius: 999px; background: rgba(124, 156, 191, 0.16); color: #b8cddf; white-space: nowrap; }

.audit-hero { padding: 88px 0 104px; }
.audit-hero-grid { display: grid; gap: 48px; grid-template-columns: minmax(0, 1fr); align-items: center; }
/* Two columns only once the report column can hold the full table (560px) without scrolling. */
@media (min-width: 1120px) { .audit-hero-grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); } }
.audit-hero-copy { display: flex; flex-direction: column; gap: 20px; }
.audit-hero-copy .eyebrow, .audit-hero-copy h1, .audit-hero-copy .sub { margin: 0; }
.audit-hero h1 .accent { color: #b8cddf; }
.audit-hero .sub { font-size: 18px; line-height: 1.5; color: var(--brand-muted); max-width: 46ch; }

.report { background: var(--brand-surface); border: 1px solid var(--brand-border); border-radius: var(--radius); overflow: hidden; min-width: 0; }
.report-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--brand-border); }
.report-top .overline { color: var(--space-gray); text-transform: uppercase; }
.report-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--brand-border); }
@media (max-width: 520px) { .report-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.report-stat { background: var(--brand-surface); padding: 16px 20px; }
.report-num { font-family: var(--font-display); font-weight: 500; font-size: 28px; line-height: 1.2; color: #97b7d0; font-variant-numeric: tabular-nums; }
.report-label { font-size: 13px; color: var(--space-gray); }
.report-table { overflow-x: auto; }
.report-grid { min-width: 560px; }
.report-row {
  display: grid; grid-template-columns: 1.6fr 0.8fr 0.6fr 1.6fr 1.1fr; gap: 12px; align-items: center;
  padding: 12px 20px; font-size: 13px; color: var(--brand-muted); border-bottom: 1px solid var(--brand-border);
}
.report-row:last-child { border-bottom: 0; }
.report-head { font-size: 12px; text-transform: uppercase; color: var(--space-gray); }
.report-error { color: var(--control-white); font-weight: 500; }
.report-count { color: #b8cddf; font-variant-numeric: tabular-nums; }
.report-tag {
  white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 6px; font-size: 12px;
  border: 1px solid rgba(139, 89, 199, 0.30); background: rgba(139, 89, 199, 0.15); color: #c9b3e8;
}
/* Phones: each error becomes a stacked row instead of a table that scrolls sideways. */
@media (max-width: 640px) {
  .report-grid { min-width: 0; }
  .report-head { display: none; }
  .report-row {
    grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px;
    grid-template-areas: "error count" "source source" "behind behind" "cause cause";
  }
  .report-row > :nth-child(1) { grid-area: error; }
  .report-row > :nth-child(2) { grid-area: source; }
  .report-row > :nth-child(3) { grid-area: count; }
  .report-row > :nth-child(3)::after { content: " errors"; color: var(--space-gray); }
  .report-row > :nth-child(4) { grid-area: behind; }
  .report-row > :nth-child(5) { grid-area: cause; margin-top: 6px; }
}
.report-foot { padding: 12px 20px; font-size: 12px; color: var(--space-gray); border-top: 1px solid var(--brand-border); }

.section-head { display: flex; flex-direction: column; gap: 12px; max-width: 720px; margin-bottom: 40px; }
.section-head .eyebrow, .section-head .h2 { margin: 0; }
.layout-audit .section-head .h2, .layout-audit .meet-copy .h2 { color: #b8cddf; }

.icon-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.icon-card { display: flex; flex-direction: column; gap: 12px; }
.icon-card .icon { color: var(--stellar-blue); }
.icon-card h3, .icon-card p { margin: 0; }
.icon-card p { font-size: 15px; }

.why-grid { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.why-item { display: flex; flex-direction: column; gap: 10px; padding-top: 20px; border-top: 1px solid rgba(168, 181, 209, 0.24); }
.why-item h3, .why-item p { margin: 0; }
.why-item p { color: var(--brand-muted); }

.step-grid { margin: 0; padding: 0; list-style: none; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.step-card { display: flex; flex-direction: column; gap: 12px; padding: 28px; }
.step-card h3, .step-card p { margin: 0; }
.step-card p { font-size: 15px; }
.step-num { font-family: var(--font-display); font-weight: 500; font-size: 32px; line-height: 1; color: #97b7d0; }

.compare-row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.compare-card { display: flex; flex-direction: column; gap: 16px; padding: 32px; }
.compare-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.compare-top h3 { margin: 0; }
.compare-card.featured {
  background: linear-gradient(135deg, rgba(139, 89, 199, 0.18), rgba(124, 156, 191, 0.18)), var(--brand-surface);
  border-color: rgba(139, 89, 199, 0.30);
}
.compare-card.featured .pill { background: rgba(139, 89, 199, 0.15); color: #c9b3e8; }
.tick-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; font-size: 15px; color: var(--brand-muted); }
.tick-list li { display: flex; gap: 10px; align-items: flex-start; }
.tick-list svg { flex: none; margin-top: 3px; color: var(--stellar-blue); }
.compare-card.featured .tick-list svg { color: #ad8fdc; }

.point-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; font-size: 15px; }
.point-list li { display: flex; gap: 12px; align-items: center; }
.point-list svg { flex: none; color: var(--stellar-blue); }
.layout-audit .meet-copy .form-note { margin: 0; font-size: 14px; color: var(--space-gray); }
.layout-audit .site-footer .wrap { align-items: center; }
