/* =============================================================
   CK Advisory Partners — site styles
   One stylesheet, no build step. Sections:
   1. Fonts
   2. Design tokens (:root)
   3. Base / reset
   4. Layout helpers
   5. Header + navigation
   6. Buttons
   7. Hero
   8. Home: intro, "What You're Navigating", "How We Engage"
   9. Services: service blocks + cards, CTA
   10. Contact: form
   11. Footer
   12. Responsive (<= 1024px, <= 767px)
   ============================================================= */

/* 1. Fonts ---------------------------------------------------- */
@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-italic-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-italic-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* 2. Design tokens ------------------------------------------- */
:root {
  --bg: #edf0f2;
  --surface: #eef1f3;
  --card: #ffffff;
  --text: #1f2933;
  --text-muted: #575760;
  --heading: #114b5f;
  --link: #1a659e;       /* darkened from the original #1e73be to meet WCAG AA on the light header */
  --link-hover: #0d4a7a;
  --border-soft: #dfe4e8;

  --btn-primary-bg: #0a2540;
  --btn-primary-bg-hover: #163a5c;
  --btn-primary-text: #ffffff;
  --btn-secondary-bg: #f4f6f7;
  --btn-secondary-text: #4b6a88;

  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-head: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --maxw: 1200px;
  --pad-x: 20px;
  --section-gap: 5rem;      /* ~80px between major blocks */
  --radius: 8px;
  --radius-lg: 15px;
  --focus: 3px solid #1e73be;
}

/* 3. Base --------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;          /* 16px */
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--heading);
  margin: 0 0 0.75rem;
  line-height: 1.25;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 2.875rem); font-weight: 700; line-height: 1.35; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.3vw, 1.875rem); font-weight: 600; line-height: 1.2; }
h3 { font-size: 1.375rem; font-weight: 600; }

p { margin: 0 0 1.5rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--link-hover); }

img { max-width: 100%; height: auto; display: block; }

:focus-visible { outline: var(--focus); outline-offset: 2px; border-radius: 2px; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--btn-primary-bg);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 100;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* 4. Layout helpers --------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

main section { padding-block: var(--section-gap); }
main section:first-child { padding-top: 3.5rem; }

.section-heading { text-align: center; margin-bottom: 2.5rem; }
.section-heading p { color: var(--text-muted); margin-top: 0.5rem; }

/* 5. Header + navigation ---------------------------------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border-soft);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 84px;
}
.site-logo { display: inline-flex; line-height: 0; }
.site-logo img { width: 200px; height: auto; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--text);
}
.nav-toggle svg { width: 26px; height: 26px; display: block; }

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}
.main-nav a {
  font-family: var(--font-head);
  font-size: 0.9375rem;      /* 15px */
  color: var(--link);
  text-decoration: none;
  padding: 0.5rem 0;
  display: inline-block;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] { color: var(--link-hover); }
.main-nav a[aria-current="page"] { font-weight: 600; }

/* 6. Buttons --------------------------------------------- */
.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.02em;
  padding: 1.125rem 2.5rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.btn--primary { background: var(--btn-primary-bg); color: var(--btn-primary-text); }
.btn--primary:hover { background: var(--btn-primary-bg-hover); color: #fff; }
.btn--secondary {
  background: var(--btn-secondary-bg);
  color: var(--btn-secondary-text);
  border-color: var(--btn-primary-bg);
}
.btn--secondary:hover { background: #fff; color: var(--btn-primary-bg); }

.button-row { display: flex; flex-wrap: wrap; gap: 1rem; }

/* 7. Hero ----------------------------------------------- */
.hero h1 { max-width: 18ch; }
@media (min-width: 768px) {
  .hero h1 { max-width: none; }
}
.hero__sub {
  font-family: var(--font-head);
  font-size: clamp(1.25rem, 1rem + 1vw, 1.875rem);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  max-width: 46ch;
  margin: 0 0 2rem;
}

/* 8. Home ---------------------------------------------- */
.intro .container {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
}
.intro__photo { border-radius: var(--radius-lg); width: 100%; }
.intro__body { max-width: 60ch; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.card-grid--engage { margin-top: 0.5rem; }

.nav-card h3,
.engage-card h3 {
  color: var(--heading);
  font-size: 1.3125rem;
  margin-bottom: 0.75rem;
}
.nav-card p + p { margin-top: 0; }
.nav-card .lead { font-style: italic; color: var(--text); }

.engage-card .label {
  font-weight: 700;
  display: block;
  margin-bottom: 0.25rem;
}

/* 9. Services ----------------------------------------- */
.service {
  max-width: 900px;
  margin-inline: auto;
}
.service + .service { margin-top: 3.5rem; }
.service__focus { color: var(--text-muted); margin-bottom: 1.5rem; }
.service__card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 2rem 2.25rem;
  box-shadow: 0 1px 3px rgba(10, 37, 64, 0.06), 0 8px 24px rgba(10, 37, 64, 0.05);
}
.service__card ul { margin: 0 0 1.5rem; padding-left: 1.25rem; }
.service__card li { margin-bottom: 0.35rem; }

.cta { text-align: center; }
.cta h2 { max-width: 24ch; margin-inline: auto; }
.cta p { color: var(--text-muted); margin-bottom: 2rem; }

/* 10. Contact form ---------------------------------- */
.contact-intro { color: var(--text-muted); margin-bottom: 2.5rem; }

.contact-form { max-width: 620px; }
.contact-form fieldset {
  border: 0;
  margin: 0 0 1.5rem;
  padding: 0;
  min-width: 0;
}
.contact-form legend {
  padding: 0;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.field { margin-bottom: 1.5rem; }
.field--inline { display: block; margin-bottom: 0; }
.field > label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.field .req { color: #c0392b; }
.field .sublabel {
  display: block;
  font-weight: 400;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}
.field input,
.field textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: #f7f8f9;
  border: 1px solid #d7dde2;
  border-radius: var(--radius);
  padding: 0.7rem 0.85rem;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus,
.field textarea:focus {
  outline: var(--focus);
  outline-offset: 0;
  border-color: var(--link);
}
.field--invalid input,
.field--invalid textarea { border-color: #c0392b; }
.field__error {
  color: #c0392b;
  font-size: 0.875rem;
  margin-top: 0.35rem;
  display: none;
}
.field--invalid .field__error { display: block; }

/* honeypot — visually and semantically hidden from humans */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

.form-status {
  margin-bottom: 1.25rem;
  padding: 0;
}
.form-status:not(:empty) {
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius);
}
.form-status--error {
  background: #fdece9;
  color: #8a231b;
  border: 1px solid #f3c7c2;
}
.form-status--success {
  background: #e7f4ec;
  color: #1d5b38;
  border: 1px solid #bfe0cb;
}

.contact-form button[type="submit"] { min-width: 160px; }
.contact-form button[disabled] { opacity: 0.65; cursor: progress; }

/* 11. Footer -------------------------------------- */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border-soft);
  text-align: center;
  padding-block: 1.75rem;
}
.site-footer p {
  margin: 0;
  font-family: var(--font-head);
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* 12. Responsive --------------------------------- */
@media (max-width: 1024px) {
  :root { --section-gap: 3.75rem; }
  .card-grid { gap: 1.5rem; }
}

@media (max-width: 767px) {
  :root { --pad-x: 16px; --section-gap: 3rem; }

  /* Without JS the full nav stays visible. With JS (html.js) it collapses
     behind the toggle button. */
  .js .nav-toggle { display: inline-flex; }
  .main-nav { width: 100%; order: 3; }
  .js .main-nav { display: none; }
  .js .main-nav.is-open { display: block; }
  .main-nav ul {
    flex-direction: column;
    gap: 0;
    padding-bottom: 0.5rem;
  }
  .main-nav li { border-top: 1px solid var(--border-soft); }
  .main-nav a { display: block; padding: 0.85rem 0; }
  .site-header .container { flex-wrap: wrap; min-height: 68px; }

  .intro .container { grid-template-columns: 1fr; gap: 1.75rem; }
  .intro__photo { max-width: 320px; }

  .card-grid { grid-template-columns: 1fr; gap: 2.25rem; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .service__card { padding: 1.5rem 1.35rem; }
  .btn { width: 100%; text-align: center; }
  .button-row .btn { width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
