/* ===== Carter Loxworth — Shared Design System ===== */

:root {
  --navy: #1F3A5F;
  --navy-deep: #16283F;
  --gold: #B08A3E;
  --gold-light: #D9BC85;
  --cream: #F4F1EB;
  --ink: #23262B;
  --grey: #5A5A5A;
  --line: #E3DFD5;
  --white: #FFFFFF;
  --good: #3E7A4F;
  --alert: #B0473E;

  --font-display: 'Sora', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --radius: 10px;
  --shadow: 0 12px 30px rgba(22, 40, 63, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--navy);
  line-height: 1.15;
  margin: 0;
}

a { color: inherit; }

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

.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
}

.wrap-wide {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Header ---- */
.site-header {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--navy);
  letter-spacing: 0.02em;
  text-decoration: none;
}

.brand span {
  color: var(--gold);
}

/* ---- Hero ---- */
.hero {
  background: var(--cream);
  padding: 72px 0 64px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(32px, 4.4vw, 46px);
  font-weight: 700;
  max-width: 15ch;
}

.hero .sub {
  margin-top: 22px;
  font-size: 19px;
  color: var(--grey);
  max-width: 56ch;
}

.hero-actions {
  margin-top: 34px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 26px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15.5px;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid var(--gold-light); outline-offset: 2px; }

.btn-primary {
  background: var(--navy);
  color: var(--white);
  box-shadow: var(--shadow);
}
.btn-primary:hover { background: var(--navy-deep); }

.btn-secondary {
  background: var(--white);
  color: var(--navy);
  border-color: var(--navy);
}
.btn-secondary:hover { background: var(--cream); }

.btn-gold {
  background: var(--gold);
  color: var(--white);
}
.btn-gold:hover { background: #96742F; }

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.btn-block { width: 100%; justify-content: center; }

/* ---- Gateway fork ---- */
.fork {
  padding: 60px 0 80px;
}

.fork-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 8px;
}

@media (max-width: 700px) {
  .fork-grid { grid-template-columns: 1fr; }
}

.fork-card {
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  display: flex;
  flex-direction: column;
}

.fork-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.fork-card p {
  font-size: 18px;
  color: var(--ink);
  margin: 0 0 22px;
  font-weight: 500;
  flex: 1 0 auto;
}

/* ---- Sections ---- */
section { padding: 64px 0; }
section.alt { background: var(--cream); }

.section-head { max-width: 62ch; margin-bottom: 32px; }
.section-head h2 { font-size: clamp(24px, 3vw, 30px); }
.section-head .kicker {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 10px;
}

.lede {
  font-size: 18px;
  color: var(--grey);
  max-width: 62ch;
}

/* ---- Problem list ---- */
.problem-list {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.problem-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-size: 17px;
  padding: 16px 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.problem-list.has-labels li {
  display: grid;
  grid-template-columns: 28px 150px 1fr;
  column-gap: 12px;
  row-gap: 2px;
  align-items: start;
}

.task-label {
  font-weight: 700;
  color: var(--ink);
}

.task-desc {
  color: var(--ink);
}

@media (max-width: 640px) {
  .problem-list.has-labels li {
    grid-template-columns: 28px 1fr;
  }
  .task-label {
    grid-column: 2;
  }
  .task-desc {
    grid-column: 2;
  }
}

section.alt .problem-list li { background: var(--white); }

.problem-list .mark {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

/* ---- Process steps ---- */
.steps {
  display: grid;
  gap: 20px;
  margin-top: 30px;
}

.step {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 18px;
}

.step .num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: var(--gold);
  border: 1.5px solid var(--gold-light);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step h3 {
  font-size: 18px;
  margin-bottom: 6px;
}

.step p { margin: 0; color: var(--grey); }

/* ---- Guarantee box ---- */
.guarantee {
  margin-top: 36px;
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  padding: 28px 30px;
}

.guarantee .kicker {
  color: var(--gold-light);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 10px;
}

.guarantee p { margin: 0 0 10px; font-size: 16.5px; }
.guarantee p:last-child { margin-bottom: 0; }
.guarantee strong { color: var(--gold-light); }

/* ---- Proof ---- */
.proof-grid {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.proof-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
}

.proof-card .tag {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
  display: block;
}

.proof-card p { margin: 0; color: var(--grey); }

/* ---- Widget (signature element) ---- */
.widget {
  background: var(--white);
  border: 2px solid var(--navy);
  border-radius: 16px;
  padding: 36px;
  margin-top: 30px;
  position: relative;
  overflow: hidden;
}

.widget::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
}

.widget-question {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--navy);
  margin-bottom: 4px;
}

.widget-sub {
  font-size: 14px;
  color: var(--grey);
  margin-bottom: 24px;
  font-style: italic;
}

.check-list {
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.check-item:hover { border-color: var(--gold-light); background: var(--cream); }

.check-item input {
  width: 20px;
  height: 20px;
  accent-color: var(--navy);
  margin-top: 2px;
  flex: none;
}

.check-item label {
  font-size: 16px;
  cursor: pointer;
}

.check-item.checked {
  border-color: var(--navy);
  background: var(--cream);
}

.widget-result {
  border-radius: var(--radius);
  padding: 22px 24px;
  transition: background 0.2s ease, border-color 0.2s ease;
  border: 1.5px dashed var(--line);
  background: var(--cream);
}

.widget-result .count {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--navy);
  display: block;
  margin-bottom: 6px;
}

.widget-result .verdict {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 16px;
}

.widget-result[data-level="0"] .verdict { color: var(--grey); font-weight: 500; }
.widget-result[data-level="4"],
.widget-result[data-level="5"] {
  background: var(--navy);
  border-color: var(--navy);
  border-style: solid;
}
.widget-result[data-level="4"] .verdict,
.widget-result[data-level="5"] .verdict,
.widget-result[data-level="4"] .count,
.widget-result[data-level="5"] .count { color: var(--white); }
.widget-result[data-level="4"] .count,
.widget-result[data-level="5"] .count { color: var(--gold-light); }

/* ---- Final CTA ---- */
.final-cta {
  text-align: center;
  background: var(--navy);
  border-radius: 18px;
  padding: 56px 32px;
  color: var(--white);
}

.final-cta h2 { color: var(--white); font-size: clamp(24px, 3vw, 30px); }
.final-cta p { color: #C9D3E0; margin: 14px auto 28px; max-width: 48ch; }

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
  color: var(--grey);
  font-size: 14px;
}

.note {
  font-size: 13.5px;
  color: var(--grey);
  font-style: italic;
  margin-top: 10px;
}

/* ---- Callout ---- */
.callout {
  margin-top: 28px;
  border-left: 4px solid var(--gold);
  background: var(--cream);
  padding: 20px 24px;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 17px;
  color: var(--ink);
}

section.alt .callout { background: var(--white); }

/* ---- Case study cards ---- */
.case-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 28px;
}

@media (max-width: 760px) {
  .case-grid { grid-template-columns: 1fr; }
}

.case-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  display: flex;
  flex-direction: column;
}

.case-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.case-card .tag {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
  display: block;
}

.case-card h3 {
  font-size: 18px;
  line-height: 1.3;
  min-height: 70px;
  margin-bottom: 8px;
}

.case-card p {
  margin: 0 0 14px;
  color: var(--grey);
  font-size: 15px;
  flex: 1 0 auto;
}

.case-card .read-more {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
}

.case-card .placeholder-flag {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--alert);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---- Modal ---- */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(22, 40, 63, 0.55);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-backdrop.open {
  display: flex;
}

.modal {
  background: var(--white);
  border-radius: 16px;
  max-width: 640px;
  width: 100%;
  max-height: 86vh;
  overflow-y: auto;
  padding: 36px;
  position: relative;
  box-shadow: 0 24px 60px rgba(0,0,0,0.25);
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--white);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: var(--grey);
}

.modal-close:hover { border-color: var(--gold); color: var(--navy); }

.modal .tag {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 10px;
}

.modal h3 {
  font-size: 24px;
  margin-bottom: 14px;
  padding-right: 30px;
}

.modal p { color: var(--ink); margin: 0 0 14px; }
.modal p:last-child { margin-bottom: 0; }

.modal .stat {
  display: inline-block;
  background: var(--cream);
  border: 1px dashed var(--gold-light);
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 16px;
}

.modal .pending {
  background: #FBEFEC;
  border: 1px dashed var(--alert);
  color: var(--alert);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
}

.video-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: var(--navy-deep);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 16px;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---- Booking embed ---- */
.booking-embed {
  margin-top: 30px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--white);
}

.booking-embed iframe {
  width: 100%;
  height: 720px;
  border: 0;
  display: block;
}

.booking-fallback {
  text-align: center;
  margin-top: 14px;
  font-size: 14.5px;
}

.booking-fallback a {
  color: var(--gold-light);
  text-decoration: underline;
  font-weight: 600;
}
