/* ===========================================================================
   ABS Capital — Charcoal Forest
   Typography: Playfair Display (headings) · Inter (body)
   =========================================================================== */

:root {
  --charcoal:   #4B4E54;
  --ink:        #33363B;
  --body:       #6D7278;
  --olive:      #6B8E23;
  --olive-dark: #5A7A1C;
  --sage:       #A3B2A0;
  --grey:       #B0B3B8;
  --near-white: #F0F4F8;
  --hero-bg:    #E9EFE4;
  --mid-bg:     #E2E8EE;
  --chip:       #E4EBD6;
  --white:      #FFFFFF;
  --on-olive:   #F0F4F8;
  --red:        #C62828;
  --red-dark:   #A31F1F;
  --error:      #B3261E;
  --error-bg:   #FBECEB;
  --error-line: #E3B5B2;
  --error-text: #8C1D18;

  color-scheme: light;

  --radius:     8px;
  --radius-lg:  12px;
  --gutter:     clamp(24px, 6vw, 120px);
}

/* Dark mode: follows the device setting until the visitor picks one with the
   header toggle, which sets data-theme on <html>. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --charcoal:   #9AA0A7;
    --ink:        #ECEFF2;
    --body:       #B3B9C0;
    --olive:      #9CC04A;
    --olive-dark: #B0D062;
    --sage:       #7F8F7C;
    --grey:       #3C4046;
    --near-white: #17191C;
    --hero-bg:    #1C2119;
    --mid-bg:     #1F2226;
    --chip:       #2A3320;
    --white:      #25282D;
    --on-olive:   #14170F;
    --red:        #E5383B;
    --red-dark:   #F26466;
    --error:      #F2B8B5;
    --error-bg:   #3A1F1E;
    --error-line: #6E3431;
    --error-text: #F2B8B5;
  
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --charcoal:   #9AA0A7;
  --ink:        #ECEFF2;
  --body:       #B3B9C0;
  --olive:      #9CC04A;
  --olive-dark: #B0D062;
  --sage:       #7F8F7C;
  --grey:       #3C4046;
  --near-white: #17191C;
  --hero-bg:    #1C2119;
  --mid-bg:     #1F2226;
  --chip:       #2A3320;
  --white:      #25282D;
  --on-olive:   #14170F;
  --red:        #E5383B;
  --red-dark:   #F26466;
  --error:      #F2B8B5;
  --error-bg:   #3A1F1E;
  --error-line: #6E3431;
  --error-text: #F2B8B5;

  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--body);
  background: var(--near-white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
  line-height: 1.2;
}

p { margin: 0; }

a { color: inherit; }

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

.container {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

@media (min-width: 1440px) {
  .container { max-width: 1440px; }
}

/* --- Shared pieces ------------------------------------------------------- */

.eyebrow {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--olive);
  margin-bottom: 18px;
}

.section-intro {
  max-width: 62ch;
  margin-top: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 28px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}

.btn-primary {
  background: var(--olive);
  color: var(--on-olive);
}

.btn-primary:hover { background: var(--olive-dark); }

.btn-ghost {
  background: transparent;
  border-color: var(--grey);
  color: var(--ink);
}

.btn-ghost:hover { border-color: var(--charcoal); }

.btn:active { transform: translateY(1px); }

.btn-sm { padding: 12px 22px; font-size: 15px; }

/* --- Header -------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--near-white);
  border-bottom: 1px solid var(--grey);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 80px;
}

.logo {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.logo span { color: var(--olive); }

.logo {
  padding-bottom: 2px;
  border-bottom: 3px solid var(--red);
}

.header-inner > .logo { margin-right: auto; }

.logo-sm { font-size: 14px; border-bottom-width: 2px; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.site-nav a {
  font-size: 15px;
  color: var(--red);
  text-decoration: none;
  transition: color .18s ease;
}

.site-nav a:hover { color: var(--red-dark); }

.site-nav a.btn { color: var(--on-olive); }

.site-nav a.btn:hover { color: var(--on-olive); }

/* Light / dark toggle */
.theme-toggle {
  order: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--grey);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: border-color .18s ease, color .18s ease;
}

.theme-toggle:hover { border-color: var(--olive); color: var(--olive); }

.theme-toggle:focus-visible {
  outline: 2px solid var(--olive);
  outline-offset: 2px;
}

.theme-toggle svg { width: 18px; height: 18px; }

/* Show the moon in light mode (switch to dark), the sun in dark mode. */
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

.site-nav { order: 1; }

/* CSS-only mobile menu */
.nav-toggle,
.nav-toggle-label { display: none; }

/* --- Hero ---------------------------------------------------------------- */

.hero {
  background: var(--hero-bg);
  padding-block: clamp(64px, 10vw, 120px);
}

.hero h1 {
  font-size: clamp(38px, 5.6vw, 64px);
  letter-spacing: -0.5px;
}

.lead {
  max-width: 60ch;
  margin-top: 26px;
  font-size: clamp(16px, 1.4vw, 18px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 40px;
}

/* --- Sections ------------------------------------------------------------ */

.section { padding-block: clamp(64px, 8vw, 100px); }

.section-mid { background: var(--mid-bg); }

.section h2 { font-size: clamp(30px, 3.4vw, 42px); }

/* --- Ethos -------------------------------------------------------------- */

.ethos-text {
  margin-top: 24px;
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.75;
}

/* --- What we do ---------------------------------------------------------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 32px;
  margin-top: 56px;
}

.card {
  background: var(--white);
  border: 1px solid var(--grey);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.card:hover {
  border-color: var(--sage);
  box-shadow: 0 10px 28px rgba(75, 78, 84, .08);
}

.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--chip);
  color: var(--olive);
  margin-bottom: 46px;
}

.card-icon svg { width: 22px; height: 22px; }

.card h3 { font-size: 20px; color: var(--red); }

.card p {
  margin-top: 16px;
  font-size: 15px;
}

/* --- Operational areas --------------------------------------------------- */

.market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0;
  margin-top: 56px;
  border: 1px solid var(--grey);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}

.market {
  padding: 32px 28px 36px;
  border-right: 1px solid var(--grey);
  display: flex;
  flex-direction: column;
  min-height: 240px;
  transition: background-color .18s ease;
}

.market:hover { background: var(--mid-bg); }

.market:last-child { border-right: 0; }

.market-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--grey);
  border-radius: 50%;
  background: var(--near-white);
  color: var(--olive);
  margin-bottom: auto;
}

.market-icon svg { width: 22px; height: 22px; }

.market h3 {
  font-size: 17px;
  margin-top: 28px;
  color: var(--red);
}

.market p {
  margin-top: 6px;
  font-size: 13px;
}

/* --- Contact ------------------------------------------------------------- */

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}

.contact-intro .section-intro { max-width: 34ch; }

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-top: 44px;
  font-size: 17px;
  font-weight: 500;
  color: var(--red);
  text-decoration: none;
  word-break: break-word;
}

.contact-email-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--grey);
  border-radius: 50%;
  color: var(--olive);
}

.contact-email-icon svg { width: 20px; height: 20px; }

.contact-email:hover { color: var(--red-dark); }

.contact-card {
  background: var(--white);
  border: 1px solid var(--grey);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 3.5vw, 40px);
}

.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}

.field { margin-bottom: 24px; }

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--near-white);
  border: 1px solid var(--grey);
  border-radius: var(--radius);
  transition: border-color .18s ease, box-shadow .18s ease;
}

.field textarea {
  min-height: 150px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--olive);
  box-shadow: 0 0 0 3px rgba(107, 142, 35, .15);
}

.field .has-error { border-color: var(--error); }

.field-error {
  margin-top: 6px;
  font-size: 13px;
  color: var(--error);
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.notice {
  margin-bottom: 28px;
  padding: 16px 18px;
  border-radius: var(--radius);
  font-size: 15px;
  border: 1px solid;
}

.notice strong {
  display: block;
  color: var(--ink);
  margin-bottom: 2px;
}

.notice-success {
  background: var(--chip);
  border-color: var(--sage);
}

.notice-error {
  background: var(--error-bg);
  border-color: var(--error-line);
  color: var(--error-text);
}

/* --- Footer -------------------------------------------------------------- */

.site-footer {
  background: var(--near-white);
  border-top: 1px solid var(--grey);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 120px;
}

.site-footer small { font-size: 14px; }

/* --- Responsive ---------------------------------------------------------- */

@media (max-width: 1100px) {
  .contact-layout { grid-template-columns: 1fr; }
  .contact-intro .section-intro { max-width: 60ch; }
}

@media (max-width: 900px) {
  .market {
    border-right: 0;
    border-bottom: 1px solid var(--grey);
    min-height: 0;
  }
  .market:last-child { border-bottom: 0; }
  .market-icon { margin-bottom: 24px; }
}

@media (max-width: 800px) {
  .theme-toggle { order: 1; }

  .nav-toggle-label {
    order: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    cursor: pointer;
  }

  .nav-toggle-label span {
    display: block;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
  }

  .site-nav {
    display: none;
    order: 3;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding-bottom: 28px;
  }

  .nav-toggle:checked ~ .site-nav { display: flex; }

  .header-inner { flex-wrap: wrap; }

  .site-nav a.btn { width: 100%; }
}
