:root {
  /* Refined Forge Color System */

  /* Backgrounds - Dark weathered browns */
  --bg: #0a0907;
  --panel: #1a1510;
  --muted: #2d2418;
  --panel-light: #3d3020;

  /* Text Colors - Warm tans and ambers */
  --text: #d4b896;
  --muted-text: #9d8b73;
  --text-dark: #6b5d4f;

  /* Accent Colors - Refined Forge gold */
  --accent: #e0a85a;
  --accent-2: #c9a961;
  --accent-rust: #c98a3f;   /* DEPRECATED alias — use var(--accent-deep) */
  --accent-deep: #c98a3f;
  --accent-warm: #8b5a2b;   /* retained: warm brown for functional borders */

  /* Borders & Structure */
  --border: #4a3f2e;
  --border-light: #6b5d4f;

  /* Status Colors */
  --success: #8b9456;
  --warning: #d4a24a;
  --error: #a64b2a;

  /* Effects */
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  --shadow-medium: 0 6px 18px rgba(0, 0, 0, 0.45);
  --shadow-small: 0 2px 8px rgba(0, 0, 0, 0.4);
  --glow-orange: 0 0 18px rgba(224, 168, 90, 0.25);  /* legacy name, now gold */
  --radius: 12px;
  --gutter: min(5vw, 56px);

  /* Typography */
  font-family: 'Inter', system-ui, sans-serif;

  /* Texture overlays removed for Refined Forge — kept as tokens so every
     var(--metal-texture) / var(--noise-overlay) / var(--rust-gradient)
     reference across all stylesheets goes inert from one place. */
  --metal-texture: none;
  --noise-overlay: none;
  --rust-gradient: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 85% 15%, rgba(224, 168, 90, 0.14), transparent 38%),
    radial-gradient(circle at 20% 80%, rgba(201, 137, 63, 0.08), transparent 42%),
    radial-gradient(ellipse at 50% 20%, rgba(61, 48, 32, 0.25), transparent 50%),
    linear-gradient(180deg, #0f0c09 0%, var(--bg) 100%);
  min-height: 100vh;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: none;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
}

body > * {
  position: relative;
  z-index: 1;
}

/* ─── Site Navigation ─── */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  padding: 0 var(--gutter);
  background:
    var(--metal-texture),
    linear-gradient(135deg, var(--panel) 0%, var(--panel-light) 100%);
  border-bottom: 3px solid var(--border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 14px 0;
  position: relative;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.nav-brand:hover {
  color: var(--accent);
  background: rgba(224, 168, 90, 0.1);
}

.nav-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 6px;
}

.back-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.back-link:hover {
  color: var(--accent);
  background: rgba(224, 168, 90, 0.1);
}

.nav-links {
  display: flex;
  gap: 4px;
  align-items: center;
}

.nav-links a {
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  padding: 8px 16px;
  border-radius: 6px;
  transition: all 0.2s ease;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  background: rgba(224, 168, 90, 0.15);
}

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--border-light);
  color: var(--text);
  font-size: 22px;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-toggle:hover {
  color: var(--accent);
  border-color: var(--accent-warm);
  background: rgba(224, 168, 90, 0.1);
}

/* ─── Page header (2.0 canonical — shared so every page renders it) ─── */

.page-header {
  padding: 20px var(--gutter);
  background:
    var(--metal-texture),
    linear-gradient(135deg, var(--panel) 0%, var(--panel-light) 100%);
  border-bottom: 3px solid var(--border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  position: sticky;
  top: 0;
  z-index: 200;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  position: relative; /* anchors the mobile nav-links dropdown */
}

.nav-links .nav-cta {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: var(--bg);
  font-weight: 800;
  border-radius: 6px;
}

.nav-links .nav-cta:hover {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: var(--bg);
  filter: brightness(1.05);
}

@media (max-width: 720px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background:
      var(--metal-texture),
      linear-gradient(180deg, var(--panel-light) 0%, var(--panel) 100%);
    border-bottom: 3px solid var(--border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    padding: 8px 0;
    z-index: 200;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 12px var(--gutter);
    border-radius: 0;
    width: 100%;
  }

  .site-nav {
    position: sticky;
  }
}

p { margin: 0; color: var(--muted-text); line-height: 1.7; }
h1, h2, h3, h4 { margin: 0; color: var(--text); letter-spacing: -0.02em; }

a { color: inherit; text-decoration: none; }

.site-header {
  padding: var(--gutter);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  align-items: center;
}

.brand {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  padding: 28px;
  background:
    /* Rust gradient overlay */
    var(--rust-gradient),
    /* Weathered metal texture */
    var(--metal-texture),
    /* Base dark panel */
    linear-gradient(135deg, var(--panel) 0%, var(--panel-light) 100%);
  border: 3px solid var(--border);
  box-shadow: var(--shadow-medium);
  border-radius: calc(var(--radius) * 1.2);
  position: relative;
}

.logo {
  width: clamp(52px, 6vw, 72px);
  height: clamp(52px, 6vw, 72px);
  display: grid;
  place-items: center;
  background: transparent;
  border: none;
}

.logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  padding: 0;
}

.brand-mark {
  width: clamp(72px, 10vw, 96px);
  height: clamp(72px, 10vw, 96px);
  object-fit: contain;
  display: block;
  margin: 0 auto 1.25rem;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.35));
}

.eyebrow { font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }
.headline { font-size: clamp(32px, 5vw, 48px); margin: 8px 0; }
.lede { margin-top: 10px; max-width: 38ch; }

.metadata { margin-top: 16px; font-size: 14px; color: var(--accent); }

.hero-panel {
  background:
    var(--rust-gradient),
    var(--metal-texture),
    var(--panel);
  border: 3px solid var(--border);
  border-radius: calc(var(--radius) * 1.1);
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  box-shadow: var(--shadow-medium);
  position: relative;
}

.hero-panel h2 { font-size: clamp(24px, 4vw, 36px); margin-bottom: 8px; }
.hero-panel p { max-width: 50ch; }

.hero-card {
  background:
    linear-gradient(145deg, rgba(224, 168, 90, 0.15), rgba(10, 9, 7, 0.9)),
    var(--metal-texture);
  border: 2px solid var(--border-light);
  border-radius: calc(var(--radius) * 1.1);
  padding: 18px;
  box-shadow:
    var(--shadow-small),
    inset 0 1px 3px rgba(224, 168, 90, 0.1);
}

.hero-list { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 8px; }
.hero-list li { display: flex; align-items: center; gap: 8px; }
.hero-list .dot {
  width: 9px;
  height: 9px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: var(--glow-orange);
}

.tag-grid { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.tag {
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--text);
  font-size: 14px;
}

.section {
  padding: calc(var(--gutter) * 0.8) var(--gutter);
}

.section.muted { background: var(--muted); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-heading { max-width: 620px; margin-bottom: 24px; }
.section-heading h3 { font-size: clamp(24px, 3vw, 32px); margin: 6px 0; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}

.card {
  background:
    var(--rust-gradient),
    var(--metal-texture),
    var(--panel);
  border: 3px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: grid;
  align-content: start;
  gap: 12px;
  box-shadow: var(--shadow-medium);
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

.card .pill { width: fit-content; }
.card h4 { font-size: 18px; }
.card .meta { font-size: 14px; color: var(--muted-text); margin-bottom: 12px; }

.service-items {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.service-items li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 14px;
  color: var(--muted-text);
  line-height: 1.6;
}

.service-items li::before {
  content: '';
  width: 6px;
  height: 6px;
  min-width: 6px;
  background: var(--accent);
  border-radius: 50%;
  margin-top: 8px;
  box-shadow: 0 0 8px rgba(224, 168, 90, 0.3);
}

.card .project-link {
  font-size: 14px;
  padding: 10px 18px;
  width: 100%;
  justify-content: center;
  margin-top: 8px;
}

.card-image {
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius) - 4px);
  margin-bottom: 8px;
  object-fit: cover;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-small);
  filter: none;
  background: var(--panel);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover .card-image {
  border-color: var(--accent);
  box-shadow: var(--shadow-medium);
  transform: translateY(-1px);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(224, 168, 90, 0.12);
  border: 1px solid var(--accent-deep);
  padding: 6px 12px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  box-shadow: none;
  text-shadow: none;
}

.pill.ghost {
  color: var(--text);
  background: rgba(61, 48, 32, 0.3);
  border-color: var(--border);
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: all 0.2s ease;
  border: 3px solid transparent;
  cursor: pointer;
  position: relative;
}

.button.primary {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: var(--bg);
  border-color: var(--accent-deep);
  box-shadow: var(--shadow-small);
  text-shadow: none;
}

.button.ghost {
  background: rgba(224, 168, 90, 0.10);
  border-color: var(--border-light);
  color: var(--text);
  box-shadow: none;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.button:active {
  transform: translateY(1px);
  box-shadow:
    var(--shadow-small),
    inset 0 4px 8px rgba(0, 0, 0, 0.7);
}

/* Vintage button styling - now matches post-apocalyptic theme */
.vintage-button {
  /* Inherits from .button.primary styles */
}

.vintage-button-secondary {
  /* Inherits from .button.ghost styles */
}

.cta-group { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0 6px; }

.timeline { display: grid; gap: 14px; }
.timeline-step {
  background:
    var(--rust-gradient),
    var(--metal-texture),
    var(--panel);
  border: 3px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: grid;
  gap: 6px;
  position: relative;
  box-shadow: var(--shadow-medium);
}

.timeline-step header { display: flex; align-items: center; gap: 10px; }
.timeline-step .step-index {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background:
    var(--metal-texture),
    linear-gradient(135deg, var(--accent), var(--accent-deep));
  border: 2px solid var(--accent-warm);
  color: var(--bg);
  font-weight: 900;
  box-shadow:
    var(--shadow-small),
    inset 0 1px 2px rgba(201, 169, 97, 0.3);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.timeline-step .meta { font-size: 13px; color: var(--accent); }

.cta-card {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  background:
    var(--rust-gradient),
    var(--metal-texture),
    linear-gradient(135deg, var(--panel) 0%, var(--panel-light) 100%);
  border-radius: calc(var(--radius) * 1.3);
  padding: 24px 28px;
  border: 4px solid var(--border);
  box-shadow: var(--shadow);
  flex-wrap: wrap;
  position: relative;
}

.site-footer {
  padding: 24px var(--gutter) 36px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: var(--muted-text);
  font-size: 14px;
  border-top: 3px solid var(--border);
  background:
    linear-gradient(180deg, transparent 0%, rgba(26, 21, 16, 0.5) 100%),
    var(--metal-texture);
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.5);
}

.footer-links { display: flex; gap: 14px; }
.footer-links a {
  color: var(--text);
  font-weight: 700;
  transition: all 0.2s ease;
  padding: 6px 12px;
  border-radius: 6px;
}
.footer-links a:hover {
  color: var(--accent);
  background: rgba(224, 168, 90, 0.15);
  text-shadow: var(--glow-orange);
}

@media (max-width: 720px) {
  .brand { grid-template-columns: 1fr; }
  .site-footer { flex-direction: column; align-items: flex-start; }
}

/* Interim Ironwright wordmark — hide the legacy logo image until the new logo ships.
   Remove this block when assets/Images/logo.png is replaced with the real mark. */
.nav-logo { display: none !important; }
.nav-brand span,
.page-header .back-link span {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}
