/* ════════════════════════════════════════════════════════════════
   Ohm Security Advisory — shared stylesheet
   Color, type, and component system. All pages link this file.
   ════════════════════════════════════════════════════════════════ */

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

:root {
  --orange:   #C4511E;
  --copper:   #D96A2C;
  --gunmetal: #2B2E31;
  --graphite: #4A4F55;
  --offwhite: #EDEDED;
  --bg:       #1e2124;
  --surface:  #252830;
  --border:   #32363c;
  --muted:    #878C93;   /* was #585d64 — now ~4.78:1, passes WCAG AA */
  --text:     #EDEDED;
  --text-2:   #BCC1C8;   /* paragraph copy — ~8.93:1, passes WCAG AAA */
  --text-3:   #A0A5AC;   /* lead/intro copy — ~6.52:1, passes WCAG AA+ */
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
}

.container-wide {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── Nav ── */
nav {
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(30,33,36,0.97);
  backdrop-filter: blur(8px);
  z-index: 50;
}
nav .container-wide { display: flex; align-items: center; justify-content: space-between; }
.logo {
  font-family: 'DM Mono', monospace;
  font-size: 0.76rem;
  font-weight: 400;
  color: var(--offwhite);
  text-decoration: none;
  letter-spacing: 0.1em;
}
.logo span { color: var(--orange); }

.nav-links { display: flex; gap: 1.4rem; align-items: center; }
.nav-links a {
  font-family: 'DM Mono', monospace;
  font-size: 0.66rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--offwhite); }
.nav-links a.active { color: var(--offwhite); border-bottom: 1px solid var(--orange); padding-bottom: 2px; }
.nav-cta {
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--orange);
  color: var(--orange) !important;
  transition: background 0.2s, color 0.2s !important;
}
.nav-cta:hover { background: var(--orange); color: var(--offwhite) !important; }
.nav-cta.active { border-bottom: 1px solid var(--orange); padding-bottom: 0.4rem; }

/* ── Dropdown ── */
.nav-dropdown { position: relative; display: flex; align-items: center; }
.nav-dropdown-trigger {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  font-family: 'DM Mono', monospace;
  font-size: 0.66rem;
  line-height: 1;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
.nav-dropdown-trigger:hover,
.nav-dropdown-trigger[aria-expanded="true"] { color: var(--offwhite); }
.nav-dropdown-trigger.active { color: var(--offwhite); border-bottom: 1px solid var(--orange); padding-bottom: 2px; }
.nav-dropdown-trigger .caret {
  display: inline-block;
  font-size: 0.55rem;
  margin-top: 1px;
  transition: transform 0.2s;
}
.nav-dropdown-trigger[aria-expanded="true"] .caret { transform: rotate(180deg); }

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 220px;
  background: rgba(30,33,36,0.99);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  padding: 0.5rem 0;
  margin-top: 1.6rem;
  display: none;
  flex-direction: column;
  z-index: 60;
}
/* Invisible bridge so hover doesn't break crossing the gap */
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -1.6rem;
  left: 0;
  right: 0;
  height: 1.6rem;
}
.nav-dropdown-menu a {
  padding: 0.6rem 1.1rem;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  white-space: nowrap;
}
.nav-dropdown-menu a:last-child { border-bottom: none; }
.nav-dropdown-menu a:hover { color: var(--offwhite); background: var(--surface); }
.nav-dropdown-menu a.active { color: var(--orange); border-bottom: 1px solid var(--border); padding-bottom: 0.6rem; }
.nav-dropdown-menu a:last-child.active { border-bottom: none; }

/* Open via hover (desktop) or aria-expanded (mouse-click + keyboard) */
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown-trigger[aria-expanded="true"] + .nav-dropdown-menu { display: flex; }

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
}

/* ── Hero ── */
.hero {
  padding: 5.5rem 0 4.5rem;
  border-bottom: 1px solid var(--border);
}
.hero .container {
  display: grid;
  grid-template-columns: 1fr 190px;
  gap: 2.5rem;
  align-items: start;
}
.hero-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 0.66rem;
  color: var(--orange);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 1.4rem;
  opacity: 0;
  animation: fadeUp 0.5s 0.05s forwards;
}
.hero h1 {
  font-size: clamp(2rem, 4vw, 2.9rem);
  font-weight: 300;
  line-height: 1.18;
  letter-spacing: -0.025em;
  margin-bottom: 1.4rem;
  color: var(--offwhite);
  opacity: 0;
  animation: fadeUp 0.5s 0.12s forwards;
}
.hero h1 em { font-style: italic; color: var(--text-3); }
.hero-sub {
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.8;
  max-width: 460px;
  margin-bottom: 1.75rem;
  opacity: 0;
  animation: fadeUp 0.5s 0.2s forwards;
}
.hero-certs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeUp 0.5s 0.26s forwards;
}
.cert {
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.28rem 0.65rem;
}
.cert-main { border: 1px solid var(--orange); color: var(--orange); }
.cert-sec  { border: 1px solid var(--border);  color: var(--muted); }

.hero-btns {
  display: flex;
  gap: 0.75rem;
  opacity: 0;
  animation: fadeUp 0.5s 0.32s forwards;
  flex-wrap: wrap;
}

.btn {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.6rem 1.2rem;
  transition: all 0.18s;
  display: inline-block;
  cursor: pointer;
  border: none;
}
.btn-solid  { background: var(--orange); color: var(--offwhite); }
.btn-solid:hover { background: var(--copper); }
.btn-outline { border: 1px solid var(--border); color: var(--muted); background: transparent; }
.btn-outline:hover { border-color: var(--graphite); color: var(--offwhite); }

/* Headshot */
.headshot { opacity: 0; animation: fadeIn 0.7s 0.4s forwards; }
.headshot img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  object-position: center 10%;
  display: block;
  border-left: 3px solid var(--orange);
  filter: saturate(0.92);
}
.headshot-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-align: right;
  margin-top: 0.5rem;
}

/* ── Page header (non-home pages) ── */
.page-header {
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
}
.page-header .eyebrow {
  margin-bottom: 1rem;
}
.page-header h1 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 300;
  letter-spacing: -0.022em;
  color: var(--offwhite);
  line-height: 1.2;
  max-width: 680px;
  margin-bottom: 1rem;
}
.page-header p {
  font-size: 0.92rem;
  color: var(--text-2);
  line-height: 1.75;
  max-width: 540px;
}

/* ── Sections ── */
.section { border-top: 1px solid var(--border); }
.section:first-of-type { border-top: none; }
.section-pad { padding: 4rem 0; }
.eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 0.63rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 2rem;
}
h2 {
  font-size: 1.55rem;
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--offwhite);
  margin-bottom: 0.75rem;
}
.lead {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.75;
  max-width: 500px;
  margin-bottom: 2rem;
}

/* ── Service overview grid (home page) ── */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 1rem;
}
.service-card {
  border: 1px solid var(--border);
  padding: 1.6rem 1.6rem 1.4rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  background: transparent;
  transition: background 0.18s, border-color 0.18s, transform 0.18s;
}
.service-card:hover { background: var(--surface); border-color: var(--graphite); transform: translateY(-2px); }
.service-card-id {
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  color: var(--orange);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}
.service-card-title {
  font-size: 1.02rem;
  font-weight: 500;
  color: var(--offwhite);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}
.service-card-desc {
  font-size: 0.82rem;
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: 1.2rem;
  flex-grow: 1;
}
.service-card-arrow {
  font-family: 'DM Mono', monospace;
  font-size: 0.66rem;
  color: var(--orange);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── Tiers ── */
.tiers { border: 1px solid var(--border); display: flex; flex-direction: column; }
.tier {
  padding: 1.6rem 1.75rem;
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.18s;
}
.tier:last-child { border-bottom: none; }
.tier:hover { background: var(--surface); }
.tier-id { font-family: 'DM Mono', monospace; font-size: 0.62rem; color: var(--orange); letter-spacing: 0.08em; padding-top: 3px; }
.tier-name { font-size: 0.92rem; font-weight: 500; color: var(--offwhite); margin-bottom: 0.2rem; }
.tier-eta { font-family: 'DM Mono', monospace; font-size: 0.65rem; color: var(--muted); margin-bottom: 0.55rem; }
.tier-copy { font-size: 0.83rem; color: var(--text-2); line-height: 1.65; max-width: 460px; }
.tier-rate { text-align: right; white-space: nowrap; padding-top: 3px; }
.tier-rate a { font-family: 'DM Mono', monospace; font-size: 0.65rem; letter-spacing: 0.05em; color: var(--orange); text-decoration: none; }
.tier-rate a:hover { color: var(--copper); }

.callout {
  margin-top: 1rem;
  padding: 1.1rem 1.4rem;
  background: var(--surface);
  border-left: 3px solid var(--orange);
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.65;
}
.callout a { color: var(--orange); text-decoration: none; }
.callout a:hover { color: var(--copper); }
.callout strong { color: var(--offwhite); font-weight: 400; }

/* ── About ── */
.about-cols { display: grid; grid-template-columns: 1fr 280px; gap: 3rem; align-items: start; }
.about-copy { font-size: 0.875rem; color: var(--text-2); line-height: 1.85; }
.about-copy p + p { margin-top: 0.9rem; }
.about-copy strong { color: var(--offwhite); font-weight: 400; }
.skills { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1.5rem; }
.skill {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--surface);
}
.timeline { display: flex; flex-direction: column; }
.tl-item { display: grid; grid-template-columns: 10px 1fr; gap: 0.9rem; padding-bottom: 1.25rem; position: relative; }
.tl-item:not(:last-child)::before {
  content: ''; position: absolute; left: 4px; top: 8px; bottom: 0;
  width: 1px; background: var(--border);
}
.tl-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--orange); flex-shrink: 0; margin-top: 3px; }
.tl-co { font-size: 0.85rem; font-weight: 500; color: var(--offwhite); line-height: 1.3; }
.tl-role { font-family: 'DM Mono', monospace; font-size: 0.62rem; color: var(--muted); margin-top: 2px; }
.certs-block { margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.certs-label { font-family: 'DM Mono', monospace; font-size: 0.6rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--orange); margin-bottom: 0.75rem; }
.cert-line { font-size: 0.82rem; color: var(--offwhite); margin-bottom: 0.3rem; }
.cert-line span { color: var(--muted); }

/* ── Testimonials ── */
.testimonial-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1rem;
}
.testimonial {
  border: 1px solid var(--border);
  padding: 1.6rem 1.75rem;
  background: transparent;
  transition: background 0.18s;
  position: relative;
}
.testimonial:hover { background: var(--surface); }
.testimonial-quote {
  font-size: 0.95rem;
  color: var(--offwhite);
  line-height: 1.75;
  font-style: italic;
  margin-bottom: 1.2rem;
}
.testimonial-quote::before {
  content: '"';
  font-family: 'DM Mono', monospace;
  font-style: normal;
  color: var(--orange);
  font-size: 1.2rem;
  margin-right: 0.2rem;
}
.testimonial-quote::after {
  content: '"';
  font-family: 'DM Mono', monospace;
  font-style: normal;
  color: var(--orange);
  font-size: 1.2rem;
  margin-left: 0.1rem;
}
.testimonial-attribution {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  align-items: center;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}
.testimonial-name {
  font-size: 0.85rem;
  color: var(--offwhite);
  font-weight: 500;
}
.testimonial-role {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.05em;
  margin-top: 2px;
}
.testimonial-engagement {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  color: var(--orange);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  padding: 0.25rem 0.6rem;
}
.testimonial-empty {
  border: 1px dashed var(--border);
  padding: 2.5rem 1.75rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.7;
}
.testimonial-empty p { margin-bottom: 0.5rem; }

/* ── Contact ── */
.contact-section { border-top: 1px solid var(--border); }
.contact-pad { padding: 4rem 0 5.5rem; }
.contact-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  margin-top: 2rem;
  align-items: start;
}
.contact-block h3 {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.contact-block p { font-size: 0.83rem; color: var(--muted); line-height: 1.65; margin-bottom: 0.65rem; }
.clink { font-family: 'DM Mono', monospace; font-size: 0.78rem; color: var(--orange); text-decoration: none; }
.clink:hover { color: var(--copper); }

/* ── Contact form ── */
.contact-form { display: flex; flex-direction: column; gap: 0.75rem; }
.contact-form input,
.contact-form textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.83rem;
  font-weight: 300;
  padding: 0.65rem 0.85rem;
  width: 100%;
  outline: none;
  transition: border-color 0.2s;
  resize: vertical;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--muted); }
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--graphite); }
.contact-form textarea { min-height: 110px; }

/* ── Home page section CTAs (preview blocks) ── */
.preview-cta {
  margin-top: 1.5rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange);
  text-decoration: none;
  display: inline-block;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.2s, color 0.2s;
}
.preview-cta:hover { border-color: var(--orange); color: var(--copper); }

/* ── Footer ── */
footer { background: var(--gunmetal); padding: 1.4rem 0; }
footer .container-wide { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.fc { font-family: 'DM Mono', monospace; font-size: 0.62rem; color: var(--muted); letter-spacing: 0.05em; }

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Mobile ── */
@media (max-width: 800px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(30,33,36,0.99);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem 1.5rem;
    gap: 1rem;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 0.4rem 0; }
  .nav-links a.active { border-bottom: none; padding-bottom: 0.4rem; color: var(--orange); }
  .nav-cta { text-align: center; }

  /* Dropdown becomes inline list on mobile */
  .nav-dropdown { width: 100%; }
  .nav-dropdown-trigger { width: 100%; padding: 0.4rem 0; justify-content: space-between; }
  .nav-dropdown-menu {
    position: static;
    display: flex;
    background: transparent;
    backdrop-filter: none;
    border: none;
    border-left: 1px solid var(--border);
    margin-top: 0.5rem;
    margin-left: 0.5rem;
    padding: 0;
    min-width: 0;
  }
  .nav-dropdown-menu::before { display: none; }
  .nav-dropdown-menu a {
    padding: 0.4rem 0 0.4rem 0.85rem;
    border-bottom: none;
    white-space: normal;
  }
  .nav-dropdown-menu a:hover { background: transparent; }
  .nav-dropdown:hover .nav-dropdown-menu { display: flex; }
}

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

@media (max-width: 660px) {
  .hero .container  { grid-template-columns: 1fr; }
  .headshot         { display: none; }
  .about-cols       { grid-template-columns: 1fr; }
  .contact-cols     { grid-template-columns: 1fr; }
  .tier             { grid-template-columns: 60px 1fr; }
  .tier-rate        { grid-column: 2; text-align: left; }
  .testimonial-attribution { grid-template-columns: 1fr; }
  .testimonial-engagement { justify-self: start; }
}
