/* ============================================================================
   Edge of Defense: Theme
   Dark professional theme. Framework-agnostic CSS custom properties + components.

   Palette direction: "Patina."
   Cool blue-slate ground (weathered stone) + argent (silver) type + verdigris
   accent (oxidized bronze). No color in this file is sampled from the existing
   services flier. The palette is built fresh.

   Load this once, globally. Component classes are all `eod-` prefixed so they
   will not collide with a framework's utility classes.
   ========================================================================== */

/* ---------------------------------------------------------------------------
   1. TOKENS
   ------------------------------------------------------------------------ */

:root {
  /* -- Ground: cool blue-slate, darkest to lightest ---------------------- */
  --eod-ground:        #0B0F12;  /* page background                         */
  --eod-surface:       #111619;  /* cards, panels, plates                   */
  --eod-surface-raise: #182025;  /* hover state, nested panels, inputs      */
  --eod-line:          #24313A;  /* hairline borders, dividers              */
  --eod-line-strong:   #506C7C;  /* control borders, must clear 3:1       */

  /* -- Accent: verdigris / oxidized bronze ------------------------------- */
  --eod-accent:        #5FA292;  /* primary accent: links, rules, CTA fill */
  --eod-accent-bright: #8CC9B8;  /* hover, focus, active                    */
  --eod-accent-deep:   #2E5A50;  /* tint fills, quiet backgrounds           */
  --eod-accent-wash:   rgba(95, 162, 146, 0.10); /* translucent tint        */

  /* Channel triplets, for places that need the palette at partial alpha,
     scrims over imagery, tinted overlays. Keep in sync with the hex tokens
     above; these exist so no file has to write a colour out longhand. */
  --eod-ground-rgb:    11, 15, 18;
  --eod-alert-rgb:     194, 91, 78;
  --eod-shadow-rgb:    0, 0, 0;

  /* -- Type: argent (silver) -------------------------------------------- */
  --eod-text:          #E8EDEF;  /* headings + body                         */
  --eod-text-dim:      #9AA7AD;  /* secondary copy, descriptions            */
  --eod-text-mute:     #7C8990;  /* captions, footer, metadata              */

  /* -- Semantic (used sparingly; never decorative) ----------------------- */
  --eod-alert:         #C25B4E;  /* form errors, destructive confirmation   */
  --eod-alert-wash:    rgba(194, 91, 78, 0.12);

  /* -- Typography -------------------------------------------------------- */
  --eod-font-display: "Cinzel", "Trajan Pro", Georgia, serif;
  --eod-font-body:    "Public Sans", -apple-system, BlinkMacSystemFont,
                      "Segoe UI", Roboto, sans-serif;

  --eod-size-hero:  clamp(2.5rem, 5.5vw, 4.25rem);
  --eod-size-h1:    clamp(2rem, 4vw, 3rem);
  --eod-size-h2:    clamp(1.5rem, 2.6vw, 2.125rem);
  --eod-size-h3:    1.25rem;
  --eod-size-body:  1.0625rem;   /* 17px, dark grounds need a bit more     */
  --eod-size-small: 0.9375rem;
  --eod-size-label: 0.75rem;

  --eod-leading-tight: 1.15;
  --eod-leading-body:  1.65;

  --eod-tracking-display: 0.02em;
  --eod-tracking-label:   0.18em;

  /* -- Space (8px base) --------------------------------------------------- */
  --eod-s1: 0.5rem;
  --eod-s2: 1rem;
  --eod-s3: 1.5rem;
  --eod-s4: 2rem;
  --eod-s5: 3rem;
  --eod-s6: 4rem;
  --eod-s7: 6rem;
  --eod-s8: 8rem;

  /* -- Structure ---------------------------------------------------------- */
  --eod-measure:   68ch;    /* max line length for body copy                */
  --eod-container: 1180px;
  --eod-radius:    2px;     /* near-square: this brand is not soft          */
  --eod-notch:     14px;    /* shield point depth on service plates         */

  --eod-ease: cubic-bezier(0.2, 0.6, 0.2, 1);
  --eod-dur:  260ms;
}

/* ---------------------------------------------------------------------------
   2. BASE
   ------------------------------------------------------------------------ */

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

html {
  color-scheme: dark;                 /* native form controls go dark too   */
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--eod-ground);
  color: var(--eod-text);
  font-family: var(--eod-font-body);
  font-size: var(--eod-size-body);
  line-height: var(--eod-leading-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--eod-font-display);
  font-weight: 600;
  line-height: var(--eod-leading-tight);
  letter-spacing: var(--eod-tracking-display);
  margin: 0 0 var(--eod-s2);
  text-wrap: balance;
}

h1 { font-size: var(--eod-size-h1); }
h2 { font-size: var(--eod-size-h2); }
h3 { font-size: var(--eod-size-h3); font-weight: 500; }

p { margin: 0 0 var(--eod-s2); max-width: var(--eod-measure); }

a {
  color: var(--eod-accent);
  text-decoration-color: var(--eod-accent-deep);
  text-underline-offset: 0.2em;
  transition: color var(--eod-dur) var(--eod-ease);
}
a:hover { color: var(--eod-accent-bright); text-decoration-color: currentColor; }

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

/* Keyboard focus: visible on every interactive element, no exceptions. */
:focus-visible {
  outline: 2px solid var(--eod-accent-bright);
  outline-offset: 3px;
  border-radius: var(--eod-radius);
}

::selection { background: var(--eod-accent-deep); color: var(--eod-text); }

/* ---------------------------------------------------------------------------
   3. LAYOUT
   ------------------------------------------------------------------------ */

.eod-container {
  width: 100%;
  max-width: var(--eod-container);
  margin-inline: auto;
  padding-inline: var(--eod-s3);
}

.eod-section        { padding-block: var(--eod-s7); }
.eod-section--tight { padding-block: var(--eod-s5); }

/* Alternating band. Use to separate sections without adding a border. */
.eod-band { background: var(--eod-surface); }

/* ---------------------------------------------------------------------------
   4. SIGNATURE: heraldic hatch + blind-embossed crest

   In heraldry, when arms are printed without color, each tincture is coded by
   a hatch pattern. Vert (green) is diagonal lines running upper-left to
   lower-right. The hero field carries that hatch, so the background literally
   spells the brand's tincture. Keep it faint, because it should read as texture, not
   pattern.
   ------------------------------------------------------------------------ */

.eod-hatch {
  position: relative;
  isolation: isolate;
  background-color: var(--eod-ground);
  background-image: repeating-linear-gradient(
    135deg,
    var(--eod-line) 0px,
    var(--eod-line) 1px,
    transparent 1px,
    transparent 9px
  );
}

/* Fade the hatch out toward the bottom so it does not fight the content. */
.eod-hatch::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    var(--eod-ground) 92%
  );
  pointer-events: none;
}

/* Blind-embossed crest. Drop the mark SVG inside this, bleeding off the right
   edge of the hero. It should be felt more than seen, like a seal pressed
   into stationery. */
.eod-emboss {
  position: absolute;
  right: -6%;
  top: 50%;
  transform: translateY(-50%);
  width: min(46vw, 560px);
  color: var(--eod-surface-raise);
  opacity: 0.55;
  z-index: -1;
  pointer-events: none;
  filter: drop-shadow(0 1px 0 rgba(232, 237, 239, 0.05));
}

@media (max-width: 860px) {
  .eod-emboss { right: -22%; width: 70vw; opacity: 0.32; }
}

/* ---------------------------------------------------------------------------
   5. TYPE UTILITIES
   ------------------------------------------------------------------------ */

.eod-hero-title {
  font-family: var(--eod-font-display);
  font-size: var(--eod-size-hero);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: 0.01em;
  margin: 0 0 var(--eod-s3);
  max-width: 16ch;
}

/* Letterspaced caps label. Replaces a second display face, because the tracking does
   the work. Use for eyebrows, section kickers, track names. */
.eod-eyebrow {
  display: inline-block;
  font-family: var(--eod-font-body);
  font-size: var(--eod-size-label);
  font-weight: 600;
  letter-spacing: var(--eod-tracking-label);
  text-transform: uppercase;
  color: var(--eod-accent);
  margin: 0 0 var(--eod-s2);
}

.eod-lead {
  font-size: 1.1875rem;
  line-height: 1.6;
  color: var(--eod-text-dim);
  max-width: 56ch;
}

.eod-dim  { color: var(--eod-text-dim); }
.eod-mute { color: var(--eod-text-mute); font-size: var(--eod-size-small); }

/* ---------------------------------------------------------------------------
   6. RULE: the section divider. Draws in on scroll.
   ------------------------------------------------------------------------ */

.eod-rule {
  height: 1px;
  border: 0;
  margin: 0 0 var(--eod-s3);
  background: linear-gradient(
    to right,
    var(--eod-accent) 0%,
    var(--eod-accent) 12%,
    var(--eod-line) 12%,
    var(--eod-line) 100%
  );
  transform-origin: left;
}

/* Add `.is-revealed` via IntersectionObserver to animate. */
.eod-rule--draw { transform: scaleX(0); transition: transform 700ms var(--eod-ease); }
.eod-rule--draw.is-revealed { transform: scaleX(1); }

/* ---------------------------------------------------------------------------
   7. BUTTONS
   ------------------------------------------------------------------------ */

.eod-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--eod-s1);
  padding: 0.8125rem var(--eod-s3);
  font-family: var(--eod-font-body);
  font-size: var(--eod-size-small);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--eod-radius);
  cursor: pointer;
  transition: background var(--eod-dur) var(--eod-ease),
              border-color var(--eod-dur) var(--eod-ease),
              color var(--eod-dur) var(--eod-ease);
}

.eod-btn--primary {
  background: var(--eod-accent);
  color: var(--eod-ground);
  border-color: var(--eod-accent);
}
.eod-btn--primary:hover {
  background: var(--eod-accent-bright);
  border-color: var(--eod-accent-bright);
  color: var(--eod-ground);
}

.eod-btn--ghost {
  background: transparent;
  color: var(--eod-text);
  border-color: var(--eod-line-strong);
}
.eod-btn--ghost:hover {
  border-color: var(--eod-accent);
  color: var(--eod-accent-bright);
  background: var(--eod-accent-wash);
}

.eod-btn--quiet {
  padding-inline: 0;
  background: none;
  border: 0;
  color: var(--eod-accent);
}
.eod-btn--quiet:hover { color: var(--eod-accent-bright); }

/* ---------------------------------------------------------------------------
   8. HEADER / NAV
   ------------------------------------------------------------------------ */

.eod-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 15, 18, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--eod-line);
}

.eod-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--eod-s3);
  min-height: 72px;
}

/* Wordmark SVG lives here. It inherits color, so it silvers automatically. */
.eod-header__mark {
  display: block;
  width: 210px;
  color: var(--eod-text);
  transition: color var(--eod-dur) var(--eod-ease);
}
.eod-header__mark:hover { color: var(--eod-accent-bright); }

.eod-nav {
  display: flex;
  align-items: center;
  gap: var(--eod-s3);
}

.eod-nav__link {
  font-size: var(--eod-size-small);
  font-weight: 500;
  color: var(--eod-text-dim);
  text-decoration: none;
  padding-block: var(--eod-s1);
  border-bottom: 1px solid transparent;
}
.eod-nav__link:hover,
.eod-nav__link[aria-current="page"] {
  color: var(--eod-text);
  border-bottom-color: var(--eod-accent);
}

@media (max-width: 780px) {
  .eod-nav__link { display: none; }   /* replace with a disclosure menu     */
  .eod-header__mark { width: 160px; }
}

/* ---------------------------------------------------------------------------
   9. SERVICE PLATE: the card.

   Bottom edge is clipped to a shallow shield point, echoing the heater shield
   in the mark. Clipped edges cannot carry a border, so the plate is a solid
   fill with a straight top rule only. Do not add side/bottom borders, because they
   will be cut off mid-stroke.
   ------------------------------------------------------------------------ */

.eod-plate {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--eod-s3) var(--eod-s3) calc(var(--eod-s3) + var(--eod-notch));
  background: var(--eod-surface);
  border-top: 2px solid var(--eod-line-strong);
  clip-path: polygon(
    0 0,
    100% 0,
    100% calc(100% - var(--eod-notch)),
    50% 100%,
    0 calc(100% - var(--eod-notch))
  );
  transition: background var(--eod-dur) var(--eod-ease),
              border-color var(--eod-dur) var(--eod-ease),
              transform var(--eod-dur) var(--eod-ease);
}

.eod-plate:hover,
.eod-plate:focus-within {
  background: var(--eod-surface-raise);
  border-top-color: var(--eod-accent);
  transform: translateY(-3px);
}

.eod-plate__title {
  font-family: var(--eod-font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 var(--eod-s1);
  color: var(--eod-text);
}

.eod-plate__desc {
  font-size: var(--eod-size-small);
  color: var(--eod-text-dim);
  margin: 0 0 var(--eod-s3);
  flex: 1;
}

.eod-plate__price {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: 0.01em;
  color: var(--eod-accent);
}
.eod-plate__price small {
  font-size: var(--eod-size-label);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--eod-text-mute);
}

.eod-plate-grid {
  display: grid;
  gap: var(--eod-s3);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* ---------------------------------------------------------------------------
   10. PROCESS STEPS

   Numbered because engagement genuinely runs in order, and the number carries
   information the reader needs. Do not reuse this numbering pattern on
   non-sequential content.
   ------------------------------------------------------------------------ */

.eod-steps {
  list-style: none;
  counter-reset: eod-step;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--eod-s4);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.eod-step { counter-increment: eod-step; padding-top: var(--eod-s3); border-top: 1px solid var(--eod-line); }

.eod-step::before {
  content: counter(eod-step, decimal-leading-zero);
  display: block;
  font-family: var(--eod-font-display);
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  color: var(--eod-accent);
  margin-bottom: var(--eod-s1);
}

.eod-step h3 { margin-bottom: var(--eod-s1); }
.eod-step p  { font-size: var(--eod-size-small); color: var(--eod-text-dim); margin: 0; }

/* ---------------------------------------------------------------------------
   11. FORMS
   ------------------------------------------------------------------------ */

.eod-field { display: block; margin-bottom: var(--eod-s3); }

.eod-label {
  display: block;
  font-size: var(--eod-size-label);
  font-weight: 600;
  letter-spacing: var(--eod-tracking-label);
  text-transform: uppercase;
  color: var(--eod-text-dim);
  margin-bottom: var(--eod-s1);
}

.eod-input,
.eod-textarea,
.eod-select {
  width: 100%;
  padding: 0.75rem var(--eod-s2);
  font-family: inherit;
  font-size: var(--eod-size-body);
  color: var(--eod-text);
  background: var(--eod-surface-raise);
  border: 1px solid var(--eod-line);
  border-radius: var(--eod-radius);
  transition: border-color var(--eod-dur) var(--eod-ease);
}

.eod-input::placeholder,
.eod-textarea::placeholder { color: var(--eod-text-mute); }

.eod-input:focus,
.eod-textarea:focus,
.eod-select:focus {
  border-color: var(--eod-accent);
  outline: 2px solid var(--eod-accent-bright);
  outline-offset: 1px;
}

.eod-textarea { min-height: 8rem; resize: vertical; }

.eod-hint  { display: block; margin-top: var(--eod-s1); font-size: var(--eod-size-small); color: var(--eod-text-mute); }

/* Errors state what went wrong and how to fix it. No apologies, no vagueness. */
.eod-error {
  display: block;
  margin-top: var(--eod-s1);
  font-size: var(--eod-size-small);
  color: var(--eod-alert);
}
.eod-input[aria-invalid="true"],
.eod-textarea[aria-invalid="true"] {
  border-color: var(--eod-alert);
  background: var(--eod-alert-wash);
}

/* ---------------------------------------------------------------------------
   12. FOOTER
   ------------------------------------------------------------------------ */

.eod-footer {
  border-top: 1px solid var(--eod-line);
  padding-block: var(--eod-s5) var(--eod-s4);
  color: var(--eod-text-mute);
  font-size: var(--eod-size-small);
}

.eod-footer a { color: var(--eod-text-dim); text-decoration: none; }
.eod-footer a:hover { color: var(--eod-accent-bright); }

.eod-footer__grid {
  display: grid;
  gap: var(--eod-s4);
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-bottom: var(--eod-s4);
}

/* ---------------------------------------------------------------------------
   13. MOTION

   One orchestrated idea: content rises into place once, on entry. Nothing
   loops, nothing pulses. A security consultancy sells composure.
   ------------------------------------------------------------------------ */

.eod-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 600ms var(--eod-ease), transform 600ms var(--eod-ease);
}
.eod-reveal.is-revealed { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .eod-reveal { opacity: 1; transform: none; }
  .eod-rule--draw { transform: scaleX(1); }
}

/* ---------------------------------------------------------------------------
   14. UTILITIES
   ------------------------------------------------------------------------ */

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

.eod-skip-link {
  position: absolute;
  left: var(--eod-s2);
  top: -100px;
  z-index: 100;
  padding: var(--eod-s1) var(--eod-s2);
  background: var(--eod-accent);
  color: var(--eod-ground);
  font-weight: 600;
  border-radius: var(--eod-radius);
}
.eod-skip-link:focus { top: var(--eod-s2); }

@media print {
  .eod-hatch, .eod-emboss { background: none; display: none; }
  body { background: #fff; color: #000; }
}
