/* ─── Canela fonts (self-hosted) ─────────────────────────── */
@font-face {
  font-family: 'Canela Deck Trial';
  src: url('assets/fonts/CanelaDeck-Bold-Trial.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Canela Text Trial';
  src: url('assets/fonts/CanelaText-Bold-Trial.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Canela Text Trial';
  src: url('assets/fonts/CanelaText-LightItalic-Trial.otf') format('opentype');
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}

/* ─── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: #fff;
  color: #000;
  font-family: 'Public Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Tokens ─────────────────────────────────────────────── */
:root {
  --serif-deck: 'Canela Deck Trial', Georgia, serif;
  --serif-text: 'Canela Text Trial', Georgia, serif;
  --sans:    'Public Sans', system-ui, sans-serif;
  --ui:      'Inter', system-ui, sans-serif;

  --black:   #000;
  --body:    #333;
  --muted:   #8D8D8D;
  --rule:    #F2F2F2;
  --red:     #ED3C56;

  --tag-1:   #EDEDF0;
  --tag-2:   #F5F5F5;

  --max:     1400px;
  --px:      clamp(20px, 3.43vw, 48px);
}

/* ─── Page shell ─────────────────────────────────────────── */
.page {
  max-width: calc(var(--max) + var(--px) * 2);
  margin: 0 auto;
  padding: 0 var(--px);
}

/* ─── Navigation ─────────────────────────────────────────── */
.cs-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 0;
  border-bottom: 2px solid var(--rule);
  margin-bottom: 64px;
}

.cs-nav-identity {
  font-family: var(--sans);
  font-size: clamp(15px, 1.67vw, 24px);
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
}

.cs-nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.cs-nav-link {
  font-family: var(--sans);
  font-size: clamp(15px, 1.67vw, 24px);
  font-weight: 500;
  color: var(--black);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}
.cs-nav-link:hover { color: #444444; }

/* ─── Hero ───────────────────────────────────────────────── */
.cs-hero {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.cs-hero-heading {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.cs-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--ui);
  font-size: 14px;
  line-height: 21px;
  font-weight: 400;
  color: var(--muted);
}

.cs-eyebrow-rule {
  display: block;
  width: 16px;
  height: 1px;
  background: var(--muted);
  flex-shrink: 0;
}

.cs-title {
  font-family: var(--serif-deck);
  font-size: clamp(36px, 4.57vw, 64px);
  line-height: 1.25;
  font-weight: 700;
  color: var(--black);
}

.cs-hero-sub {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cs-subtitle {
  font-family: var(--sans);
  font-size: clamp(18px, 1.71vw, 24px);
  line-height: 36px;
  font-weight: 500;
  color: var(--body);
  max-width: 940px;
}

/* ─── Tags ───────────────────────────────────────────────── */
.cs-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  list-style: none;
}

.tag {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 28px;
  background-image: url('assets/tag-light.svg');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  font-family: var(--ui);
  font-size: 14px;
  line-height: 21px;
  font-weight: 400;
  color: var(--body);
  white-space: nowrap;
}

.tag--primary {
  background-image: url('assets/tag-dark.svg');
}

/* ─── Hero image ─────────────────────────────────────────── */
.cs-hero-img img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1400 / 768;
  object-fit: cover;
  border-radius: 30px;
}

/* ─── Section shell ──────────────────────────────────────── */
.cs-section {
  max-width: var(--max);
  margin-top: 64px;
}

/* ─── H2 section heading ──────────────────────────────────── */
.cs-h2 {
  font-family: var(--serif-text);
  font-size: clamp(28px, 2.86vw, 40px);
  line-height: 1.35;
  font-weight: 700;
  color: var(--black);
  max-width: 940px;
}

/* ─── Body text ───────────────────────────────────────────── */
.cs-body {
  font-family: var(--ui);
  font-size: 18px;
  line-height: 30px;
  font-weight: 500;
  color: var(--body);
  max-width: 940px;
}

.cs-list {
  font-family: var(--ui);
  font-size: 18px;
  line-height: 30px;
  font-weight: 500;
  color: var(--body);
  max-width: 927px;
  padding-left: 24px;
}

.cs-list li + li { margin-top: 10px; }

/* ─── Full-width image ────────────────────────────────────── */
.cs-full-img {
  width: 100%;
  overflow: hidden;
}

.cs-full-img img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 30px;
}

/* ─── Problem section ─────────────────────────────────────── */
.cs-problem {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 24px;
  padding-bottom: 64px;
}

.cs-problem-text {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cs-body-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ─── Objective ───────────────────────────────────────────── */
.cs-objective {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 32px 0;
  margin-top: 72px;
}

.cs-h3-center {
  font-family: var(--sans);
  font-size: 18px;
  line-height: 30px;
  font-weight: 700;
  color: var(--black);
  text-align: center;
}

.cs-body-center {
  font-family: var(--ui);
  font-size: 18px;
  line-height: 30px;
  font-weight: 500;
  color: var(--body);
  max-width: 728px;
  text-align: center;
  margin: 0 auto;
}

.cs-caption-center {
  font-family: var(--ui);
  font-size: 14px;
  line-height: 21px;
  font-weight: 400;
  color: var(--body);
  max-width: 728px;
  text-align: center;
  margin: 0 auto;
}

/* ─── User account section ────────────────────────────────── */
.cs-account {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 96px;
  padding-bottom: 96px;
}

/* ─── Mobile + process sections (baked-in radius, no outer round) ── */
.cs-mobile .cs-full-img img,
.cs-process-img .cs-full-img img { border-radius: 0; }

/* ─── Churchill outro ─────────────────────────────────────── */
.cs-churchill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 96px;
  padding: 120px 0;
}

.cs-churchill-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 64px;
  width: 100%;
}

.cs-churchill-logo {
  display: block;
  width: 150px;
  height: auto;
}

.cs-churchill-screenshot {
  display: block;
  width: 817px;
  max-width: 100%;
  height: auto;
  border: 1px solid #E3E3E3;
  border-radius: 10px;
}

/* ─── Thank you ───────────────────────────────────────────── */
.cs-thanks {
  font-family: var(--serif-text);
  font-size: 40px;
  line-height: 54px;
  font-weight: 700;
  color: var(--black);
  text-align: center;
  margin-top: 64px;
  padding-bottom: 96px;
}

/* ─── Footer ─────────────────────────────────────────────── */
.cs-footer {
  max-width: var(--max);
  padding: 64px 0 48px;
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cs-footer-line {
  font-family: var(--ui);
  font-size: 16px;
  line-height: 26px;
  font-weight: 400;
  color: var(--body);
}

.cs-footer-line a {
  color: var(--black);
  font-weight: 400;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.cs-footer-credit {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 48px;
}

.cs-footer-credit-info {
  font-family: var(--ui);
  font-size: 14px;
  line-height: 21px;
  font-weight: 400;
  color: var(--black);
}

.cs-footer-credit-info p + p { margin-top: 8px; }

.cs-footer-credit-info a {
  color: inherit;
  text-decoration: none;
}

/* ─── Meta block ─────────────────────────────────────────── */
.cs-meta {
  font-family: var(--ui);
  font-size: 14px;
  line-height: 21px;
  font-weight: 400;
  color: var(--body);
  max-width: 562px;
}

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 720px) {
  .cs-title { font-size: 34px; line-height: 48px; }

  .cs-tags { gap: 10px; }
  .tag {
    background-image: none;
    background-color: #F5F5F5;
    border-radius: 0 4px 0 4px;
    padding: 0 10px;
  }
  .tag--primary {
    background-image: none;
    background-color: #EDEDF0;
  }

  .cs-nav { flex-wrap: wrap; gap: 16px; }
  .cs-churchill-screenshot { width: 100%; }

  /* ── consistent 64px mobile spacing ── */
  .cs-section        { margin-top: 64px; }
  .cs-problem        { padding-bottom: 64px; }
  .cs-objective      { margin-top: 64px; padding: 24px 0; }
  .cs-account        { gap: 64px; padding-bottom: 64px; }
  .cs-churchill      { gap: 64px; padding: 80px 0; }
  .cs-thanks         { margin-top: 64px; padding-bottom: 64px; }
  .cs-footer         { margin-top: 40px; padding: 48px 0 32px; }
}

@media (max-width: 480px) {
  .cs-hero { gap: 24px; }
  .cs-churchill-intro { gap: 40px; }
}

/* ─── Sticky scroll bar ──────────────────────────────────── */
.sticky-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.sticky-bar--visible {
  opacity: 1;
  pointer-events: auto;
}
.sticky-bar-inner {
  max-width: calc(1400px + clamp(20px, 3.33vw, 48px) * 2);
  margin: 0 auto;
  padding: 0 clamp(20px, 3.33vw, 48px);
  height: 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sticky-bar-name {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 21px;
  color: #8D8D8D;
  text-decoration: none;
}
.sticky-bar-links {
  display: flex;
  align-items: center;
  gap: 24px;
}
.sticky-bar-link {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 21px;
  color: #000;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}
.sticky-bar-link:hover { color: #444; }

/* ─── Let's Talk popup ───────────────────────────────────── */
.popup-backdrop {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.popup-backdrop--visible {
  opacity: 1;
  pointer-events: auto;
}
.popup {
  background: #fff;
  box-shadow: 0px 4px 80px 0px rgba(0, 0, 0, 0.16);
  border-radius: 10px;
  padding: 24px 32px 32px;
  width: 440px;
  max-width: calc(100vw - 32px);
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.popup-hgroup {
  display: flex;
  flex-direction: column;
}
.popup-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0 0 8px 0;
}
.popup-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: none;
  border: none;
  border-radius: 96px;
  padding: 0;
  cursor: pointer;
  color: #8D8D8D;
  transition: color 0.15s ease;
}
.popup-close:hover { color: #000; }
.popup-top {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.popup-title {
  font-family: 'Canela Text Trial', Georgia, serif;
  font-size: 40px;
  font-weight: 700;
  line-height: 54px;
  color: #000;
  margin: 0;
}
.popup-body-text {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 21px;
  color: #333;
  margin: 0;
}
.popup-bottom {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.popup-fields {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.popup-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.popup-label {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 30px;
  color: #333;
}
.popup-input {
  width: 100%;
  height: 40px;
  border: 1px solid #EDEDF0;
  background: #fff;
  padding: 0 16px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 24px;
  color: #333;
  outline: none;
  transition: border-color 0.15s ease;
}
.popup-input::placeholder { color: #8D8D8D; }
.popup-input:focus { border-color: #8D8D8D; }
.popup-input--error { border-color: #ED3C56; }
.popup-input--error:focus { border-color: #ED3C56; }
.popup-textarea {
  width: 100%;
  height: 100px;
  border: 1px solid #EDEDF0;
  background: #fff;
  padding: 16px;
  resize: none;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 24px;
  color: #333;
  outline: none;
  transition: border-color 0.15s ease;
}
.popup-textarea::placeholder { color: #8D8D8D; }
.popup-textarea:focus { border-color: #8D8D8D; }
.popup-textarea--error { border-color: #ED3C56; }
.popup-textarea--error:focus { border-color: #ED3C56; }
.popup-send {
  align-self: flex-start;
  background: #000;
  color: #fff;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 30px;
  padding: 8px 16px;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: background 0.15s ease;
}
.popup-send:hover { background: #444; }

@media (max-width: 600px) {
  .popup-backdrop {
    align-items: flex-start;
    padding: 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .popup {
    width: 100%;
    max-height: none;
    padding: 16px 20px 24px;
  }
  .popup-send {
    width: 100%;
    text-align: center;
  }
}
