:root {
  /* Post-Apocalyptic Color System - Based on Avatar */

  /* 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 - Fire orange and rust */
  --accent: #d4863a;
  --accent-2: #c9a961;
  --accent-rust: #b8670f;
  --accent-warm: #8b5a2b;

  /* Borders & Structure */
  --border: #4a3f2e;
  --border-light: #6b5d4f;

  /* Status Colors */
  --success: #8b9456;
  --warning: #d4863a;
  --error: #a64b2a;

  /* Effects */
  --shadow: 0px 25px 70px rgba(0, 0, 0, 0.8);
  --shadow-medium: 0px 12px 32px rgba(0, 0, 0, 0.6);
  --shadow-small: 0px 4px 12px rgba(0, 0, 0, 0.5);
  --glow-orange: 0 0 20px rgba(212, 134, 58, 0.3);
  --radius: 12px;
  --gutter: min(5vw, 56px);

  /* Typography */
  font-family: 'Inter', system-ui, sans-serif;

  /* Texture overlays */
  --metal-texture:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.1) 2px,
      rgba(0, 0, 0, 0.1) 3px
    );

  --noise-overlay:
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 4px,
      rgba(212, 134, 58, 0.02) 4px,
      rgba(212, 134, 58, 0.02) 5px
    );

  --rust-gradient: linear-gradient(
    135deg,
    rgba(184, 103, 15, 0.2) 0%,
    rgba(212, 134, 58, 0.1) 50%,
    rgba(139, 90, 43, 0.15) 100%
  );
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--text);
  background:
    /* Fiery glow in top right - like avatar sky */
    radial-gradient(circle at 85% 15%, rgba(212, 134, 58, 0.25), transparent 35%),
    /* Warm ambient glow */
    radial-gradient(circle at 20% 80%, rgba(184, 103, 15, 0.15), transparent 40%),
    /* Smoky gradient */
    radial-gradient(ellipse at 50% 20%, rgba(61, 48, 32, 0.4), transparent 50%),
    /* Base dark brown */
    linear-gradient(180deg, #0f0c09 0%, var(--bg) 100%);
  min-height: 100vh;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    /* Noise texture */
    var(--noise-overlay),
    /* Subtle scratches/wear */
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 15px,
      rgba(0, 0, 0, 0.03) 15px,
      rgba(0, 0, 0, 0.03) 16px
    );
  pointer-events: none;
  z-index: 0;
  opacity: 0.7;
}

body > * {
  position: relative;
  z-index: 1;
}

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),
    inset 0 2px 4px rgba(212, 134, 58, 0.1),
    inset 0 -2px 4px rgba(0, 0, 0, 0.6);
  border-radius: calc(var(--radius) * 1.2);
  position: relative;
}

.brand::after {
  content: '';
  position: absolute;
  inset: -5px;
  border: 2px solid var(--accent-warm);
  border-radius: calc(var(--radius) * 1.3);
  pointer-events: none;
  opacity: 0.3;
}

.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),
    inset 0 2px 4px rgba(212, 134, 58, 0.08),
    inset 0 -2px 4px rgba(0, 0, 0, 0.5);
  position: relative;
}

.hero-panel::before {
  content: '';
  position: absolute;
  inset: -4px;
  border: 2px solid var(--accent-warm);
  border-radius: calc(var(--radius) * 1.2);
  pointer-events: none;
  opacity: 0.2;
}

.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(212, 134, 58, 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(212, 134, 58, 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),
    inset 0 2px 4px rgba(212, 134, 58, 0.08),
    inset 0 -2px 4px rgba(0, 0, 0, 0.6);
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow:
    var(--shadow),
    var(--glow-orange),
    inset 0 2px 4px rgba(212, 134, 58, 0.12);
}

.card::before {
  content: '';
  position: absolute;
  inset: -4px;
  border: 2px solid var(--accent-warm);
  border-radius: calc(var(--radius) + 2px);
  pointer-events: none;
  opacity: 0.2;
}

.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(212, 134, 58, 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: 3px solid var(--border-light);
  box-shadow:
    /* Outer frame shadow */
    0 8px 24px rgba(0, 0, 0, 0.6),
    /* Inner screen glow */
    inset 0 0 30px rgba(0, 0, 0, 0.4),
    /* Highlight on top edge */
    inset 0 2px 4px rgba(212, 134, 58, 0.1),
    /* Metal frame effect */
    0 0 0 1px var(--accent-warm);
  filter: sepia(0.15) contrast(1.05) brightness(1.02);
  position: relative;
  background: var(--panel);
  transition: all 0.3s ease;
}

.card:hover .card-image {
  border-color: var(--accent-warm);
  box-shadow:
    /* Enhanced glow on hover */
    0 12px 32px rgba(0, 0, 0, 0.7),
    var(--glow-orange),
    inset 0 0 30px rgba(0, 0, 0, 0.3),
    inset 0 2px 6px rgba(212, 134, 58, 0.15),
    0 0 0 2px var(--accent);
  filter: sepia(0.1) contrast(1.08) brightness(1.05);
  transform: translateY(-1px);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  background:
    linear-gradient(135deg, rgba(212, 134, 58, 0.2), rgba(184, 103, 15, 0.15)),
    var(--metal-texture);
  border: 2px solid var(--accent-warm);
  padding: 6px 12px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  box-shadow:
    inset 0 1px 2px rgba(212, 134, 58, 0.3),
    0 2px 4px rgba(0, 0, 0, 0.4);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.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:
    var(--metal-texture),
    linear-gradient(180deg, var(--accent) 0%, var(--accent-rust) 100%);
  color: var(--bg);
  border-color: var(--accent-warm);
  box-shadow:
    var(--shadow-medium),
    var(--glow-orange),
    inset 0 2px 4px rgba(201, 169, 97, 0.4),
    inset 0 -2px 4px rgba(0, 0, 0, 0.7);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.button.ghost {
  background:
    linear-gradient(180deg, rgba(184, 103, 15, 0.3), rgba(139, 90, 43, 0.4)),
    var(--metal-texture);
  border-color: var(--border-light);
  color: var(--text);
  box-shadow:
    var(--shadow-small),
    inset 0 1px 3px rgba(212, 134, 58, 0.15);
}

.button:hover {
  transform: translateY(-2px);
  box-shadow:
    var(--shadow),
    var(--glow-orange),
    inset 0 3px 6px rgba(201, 169, 97, 0.5);
}

.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-small),
    inset 0 2px 4px rgba(212, 134, 58, 0.08),
    inset 0 -2px 4px rgba(0, 0, 0, 0.5);
}

.timeline-step::before {
  content: '';
  position: absolute;
  inset: -4px;
  border: 2px solid var(--accent-warm);
  border-radius: calc(var(--radius) + 2px);
  pointer-events: none;
  opacity: 0.2;
}
.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-rust));
  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),
    var(--glow-orange),
    inset 0 3px 6px rgba(212, 134, 58, 0.12),
    inset 0 -3px 6px rgba(0, 0, 0, 0.7);
  flex-wrap: wrap;
  position: relative;
}

.cta-card::after {
  content: '';
  position: absolute;
  inset: -6px;
  border: 2px solid var(--accent);
  border-radius: calc(var(--radius) * 1.4);
  pointer-events: none;
  opacity: 0.3;
}

.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(212, 134, 58, 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; }
}
