/* MDM Security — editorial layout with MDM brand colours */

:root {
  --ink: #0b0e13;
  --carbon: #0d1117;
  --graphite: #12171f;
  --slate: #2a3340;
  --pewter: #6b7382;
  --silver: #9aa3b2;
  --bone: #e6e9ee;
  --paper: #f4f3ef;
  --brass: #d4a537;       /* MDM gold */
  --brass-soft: #e8c878;  /* MDM soft gold */

  --bg: var(--carbon);
  --bg-elev: var(--graphite);
  --hairline: var(--slate);
  --fg: var(--bone);
  --fg-secondary: var(--silver);
  --fg-muted: var(--pewter);
  --form-input-bg: rgba(255, 255, 255, 0.02);

  --font: "Inter", "Helvetica Neue", Arial, sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: clamp(1.35rem, 1.8vw, 1.75rem);
  --text-2xl: clamp(1.85rem, 3vw, 2.6rem);
  --text-3xl: clamp(2.2rem, 4.5vw, 3.6rem);
  --text-hero: clamp(2.3rem, 5.4vw, 4.4rem);

  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.25rem;
  --s-6: 1.5rem;
  --s-8: 2rem;
  --s-10: 2.5rem;
  --s-12: 3rem;
  --s-16: 4rem;
  --s-24: 6rem;
  --max: 1280px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section: clamp(4rem, 8vw, 7rem);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --header-h: 5.5rem;
}

[data-theme="light"] {
  --ink: #ffffff;
  --carbon: #f7f6f2;
  --graphite: #ffffff;
  --slate: #d9d6cf;
  --pewter: #55575b;
  --silver: #6b6e73;
  --bone: #17181a;
  --paper: #efece5;
  --brass: #b8922a;       /* darker gold for light backgrounds */
  --brass-soft: #c9a227;
  --bg: #f7f6f2;
  --bg-elev: #ffffff;
  --hairline: #d9d6cf;
  --fg: #17181a;
  --fg-secondary: #3f4145;
  --fg-muted: #6b6e73;
  --form-input-bg: rgba(0, 0, 0, 0.02);
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: 1.65;
  font-weight: 300;
  letter-spacing: 0.005em;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s var(--ease), opacity 0.3s var(--ease), border-color 0.3s var(--ease);
}

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.12;
  text-transform: uppercase;
  letter-spacing: 0.035em;
  margin: 0;
  color: var(--fg);
}

h1 {
  font-size: var(--text-hero);
  letter-spacing: 0.02em;
}

h2 {
  font-size: var(--text-3xl);
  letter-spacing: 0.03em;
}

h3 {
  font-size: var(--text-xl);
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.25;
}

p {
  margin: 0 0 var(--s-4);
  max-width: 62ch;
  color: var(--fg-secondary);
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.rule {
  height: 1px;
  background: var(--hairline);
  border: 0;
  margin: 0;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: var(--s-4) 0;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.4s var(--ease), backdrop-filter 0.4s var(--ease), padding 0.4s var(--ease), border-color 0.4s var(--ease);
}

.site-header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  padding: var(--s-3) 0;
  border-bottom-color: var(--hairline);
}

.header-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: var(--s-4);
}

.header-row > .site-nav {
  grid-column: 1;
  justify-self: start;
}

.header-row > .brand {
  grid-column: 2;
  justify-self: center;
}

.header-row > .header-tools {
  grid-column: 3;
  justify-self: end;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-image {
  height: 52px;
  width: 52px;
  object-fit: contain;
  transition: height 220ms var(--ease), width 220ms var(--ease);
}

.site-header.is-scrolled .brand-image {
  height: 42px;
  width: 42px;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: var(--s-8);
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  font-size: var(--text-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-secondary);
  padding: var(--s-2) 0;
  position: relative;
}

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

.header-tools {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

.lang {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 3px;
}

.lang a {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-secondary);
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 500;
  transition: all 0.3s var(--ease);
}

.lang a:hover {
  color: var(--fg);
}

.lang a.is-active {
  background: var(--fg);
  color: var(--bg);
}

.theme-toggle {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--fg-secondary);
  border: 1px solid transparent;
  border-radius: 999px;
}

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

.theme-toggle .icon-sun {
  display: none;
}

[data-theme="light"] .theme-toggle .icon-moon {
  display: none;
}

[data-theme="light"] .theme-toggle .icon-sun {
  display: block;
}

.menu-toggle {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
}

.menu-toggle span {
  width: 18px;
  height: 1px;
  background: var(--fg);
  box-shadow: 0 -6px 0 var(--fg), 0 6px 0 var(--fg);
}

.nav-mobile {
  display: none;
  padding: var(--s-4) var(--gutter) var(--s-6);
  border-top: 1px solid var(--hairline);
  background: var(--bg);
}

.nav-mobile.open {
  display: grid;
  gap: var(--s-4);
}

.nav-mobile a {
  font-size: var(--text-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-secondary);
}

.nav-mobile a:hover {
  color: var(--fg);
}

.nav-mobile .lang {
  width: fit-content;
  margin-top: var(--s-2);
}

@media (max-width: 980px) {
  .site-nav {
    display: none;
  }
  .header-row {
    grid-template-columns: auto 1fr auto;
  }
  .header-row > .brand {
    grid-column: 1;
    justify-self: start;
  }
  .header-row > .header-tools {
    grid-column: 3;
  }
  .menu-toggle {
    display: inline-flex;
  }
  .header-tools .lang {
    display: none;
  }
  .nav-mobile .lang {
    display: inline-flex;
  }
}

/* Hero */
.hero {
  min-height: 88vh;
  display: flex;
  align-items: flex-end;
  padding: calc(var(--header-h) + var(--s-16)) 0 var(--s-24);
  border-bottom: 1px solid var(--hairline);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0%, transparent 99%, var(--hairline) 99%),
    linear-gradient(0deg, transparent 0%, transparent 99%, var(--hairline) 99%);
  background-size: 80px 80px;
  opacity: 0.35;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 75% 35%, rgba(212, 165, 55, 0.10), transparent 60%),
    linear-gradient(180deg, transparent 40%, var(--bg) 100%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--s-12);
  width: 100%;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: end;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  margin: 0 0 var(--s-6);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--brass);
}

.hero h1 .accent {
  color: var(--brass);
}

.lede {
  margin: var(--s-6) 0 0;
  max-width: 42rem;
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.55;
  font-weight: 300;
  color: var(--fg-secondary);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-8);
}

.facts {
  list-style: none;
  margin: var(--s-8) 0 0;
  padding: 0;
  display: grid;
  gap: var(--s-3);
}

.facts li {
  font-size: var(--text-sm);
  color: var(--fg-muted);
  letter-spacing: 0.02em;
}

.facts li::before {
  content: "—";
  color: var(--brass);
  margin-right: var(--s-3);
}

.focus-panel {
  border-top: 1px solid var(--hairline);
  padding-top: var(--s-6);
}

.focus-panel h2 {
  font-size: var(--text-sm);
  letter-spacing: 0.22em;
  margin-bottom: var(--s-6);
  color: var(--fg-muted);
}

.focus-panel dl {
  margin: 0;
}

.focus-panel dt {
  margin-top: var(--s-5);
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brass);
}

.focus-panel dt:first-child {
  margin-top: 0;
}

.focus-panel dd {
  margin: var(--s-2) 0 0;
  font-size: var(--text-sm);
  color: var(--fg-secondary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  padding: 14px 26px;
  border: 1px solid var(--hairline);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--fg);
  background: transparent;
  transition: all 0.4s var(--ease);
  cursor: pointer;
}

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

.btn--filled {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.btn--filled:hover {
  background: var(--brass);
  border-color: var(--brass);
  color: #14120a;
}

.btn .arr {
  display: inline-block;
  transition: transform 0.4s var(--ease);
}

.btn:hover .arr {
  transform: translateX(4px);
}

/* Sections */
.section {
  padding: var(--section) 0;
  border-bottom: 1px solid var(--hairline);
}

.section-head {
  margin-bottom: var(--s-12);
  max-width: 48rem;
}

.section-head .eyebrow {
  margin-bottom: var(--s-4);
}

.section-head h2 {
  margin-bottom: var(--s-6);
}

.section-head p {
  margin: 0;
  font-size: var(--text-lg);
  color: var(--fg-secondary);
}

/* Numbered services */
.service-list {
  border-top: 1px solid var(--hairline);
}

.service {
  display: grid;
  gap: var(--s-4);
  padding: var(--s-8) 0;
  border-bottom: 1px solid var(--hairline);
}

@media (min-width: 800px) {
  .service {
    grid-template-columns: 88px 1fr 1.4fr;
    gap: var(--s-8);
    align-items: start;
  }
}

.service .n {
  font-size: var(--text-xs);
  letter-spacing: 0.22em;
  color: var(--brass);
  padding-top: 0.35rem;
}

.service h3 {
  margin: 0 0 var(--s-3);
}

.service > div p {
  margin: 0;
}

.service ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.service li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: var(--s-2);
  font-size: var(--text-sm);
  color: var(--fg-muted);
}

.service li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 6px;
  height: 1px;
  background: var(--brass);
}

/* Profile */
.profile-grid {
  display: grid;
  gap: var(--s-12);
}

@media (min-width: 900px) {
  .profile-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: var(--s-16);
  }
}

.prose p {
  font-size: var(--text-base);
  line-height: 1.75;
}

.principles {
  display: grid;
  gap: var(--s-8);
}

.principle {
  border-top: 1px solid var(--hairline);
  padding-top: var(--s-5);
}

.principle .n {
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  color: var(--brass);
}

.principle h3 {
  font-size: var(--text-sm);
  margin: var(--s-3) 0 var(--s-2);
  letter-spacing: 0.18em;
}

.principle p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--fg-secondary);
}

/* Contact */
.contact-grid {
  display: grid;
  gap: var(--s-12);
}

@media (min-width: 900px) {
  .contact-grid {
    grid-template-columns: 1.25fr 0.75fr;
    gap: var(--s-16);
  }
}

.alert {
  margin: 0 0 var(--s-6);
  padding: var(--s-4) 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  font-size: var(--text-sm);
}

.alert-ok {
  color: #8fb89a;
  border-color: rgba(143, 184, 154, 0.35);
}

.alert-err {
  color: #d4a0a0;
  border-color: rgba(212, 160, 160, 0.35);
}

[data-theme="light"] .alert-ok {
  color: #2f6b45;
}

[data-theme="light"] .alert-err {
  color: #8a3030;
}

.form {
  display: grid;
  gap: var(--s-6);
}

.form-row.two {
  display: grid;
  gap: var(--s-6);
}

@media (min-width: 640px) {
  .form-row.two {
    grid-template-columns: 1fr 1fr;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.field label {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: inherit;
  font-size: var(--text-base);
  font-weight: 300;
  color: var(--fg);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  border-radius: 0;
  padding: var(--s-3) 0;
  outline: none;
  transition: border-color 0.3s var(--ease);
}

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

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-bottom-color: var(--brass);
}

.field select option {
  background: var(--carbon);
  color: var(--fg);
}

.hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  overflow: hidden;
}

.form-note {
  margin: 0;
  padding-top: var(--s-4);
  border-top: 1px solid var(--hairline);
  font-size: var(--text-xs);
  color: var(--fg-muted);
  letter-spacing: 0.04em;
  line-height: 1.7;
}

.contact-info {
  border-top: 1px solid var(--hairline);
  padding-top: var(--s-6);
}

.contact-info + .contact-info {
  margin-top: var(--s-10);
}

.contact-info h3 {
  font-size: var(--text-xs);
  letter-spacing: 0.22em;
  color: var(--fg-muted);
  margin-bottom: var(--s-6);
}

.contact-info dl {
  margin: 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--s-4) var(--s-6);
}

.contact-info dt {
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.contact-info dd {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--fg);
}

.contact-info a:hover {
  color: var(--brass);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding: var(--s-12) 0 var(--s-8);
  background: var(--ink);
}

[data-theme="light"] .site-footer {
  background: #efece5;
}

.footer-inner {
  display: grid;
  gap: var(--s-4);
}

@media (min-width: 800px) {
  .footer-inner {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
}

.legal {
  margin: 0;
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  line-height: 1.7;
  max-width: none;
}

.legal span {
  white-space: nowrap;
}
