/* =========================================================
   1) Base & Tokens
   ========================================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #1b191f;
  --bg-soft: #222028;
  --text: #e0e0e0;
  --muted: #bdbdbd;
  --brand: #8c001a;
  --brand-700: #720014;
  --stroke: #5a575d;
  --card: #1f1d24;
  --success: #2bb673;
  --danger: #ff4d4f;
  --focus: #b3e5ff;
  --radius: 14px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

html,
body {
  height: 100%;
}

body {
  font-family:
    Arial,
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    Helvetica,
    sans-serif;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(
      1200px 400px at 50% -200px,
      rgba(255, 255, 255, 0.06),
      transparent 60%
    ),
    #bfbfbf;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* =========================================================
   2) Utilities
   ========================================================= */
.icon-white {
  color: #d8dde6 !important;
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* =========================================================
   3) Layout Containers
   ========================================================= */
.container-nav,
.container-body {
  width: min(1120px, 86vw);
  margin: 0 auto;
}
.container-body {
  text-align: left;
  font-size: 0.95rem;
}

/* =========================================================
   4) Components
   ========================================================= */

/* --- Navbar (mobile-first) --- */
.navbar {
  position: static;
  top: 0;
  z-index: 1000;
  background: var(--brand);
  padding: 14px 0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}
.navbar.is-scrolled {
  backdrop-filter: saturate(1.2) blur(6px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.navbar .container-nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.3px;
}

/* Hamburger (mobile) */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 1.5rem;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
}
.navbar .nav-toggle i.fa-bars {
  color: #fff !important;
  font-size: 1.5rem;
  line-height: 1;
}

/* Dropdown menu (mobile) */
.nav-links {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 1001;
  display: none;
  flex-direction: column;
  align-items: flex-end;
  min-width: 60%;
  max-width: calc(100% - 1rem);
  background: var(--brand);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  margin-top: 0.5rem;
  padding: 0.5rem 0;
  list-style: none;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}
.nav-links.show {
  display: flex;
}
.nav-links li {
  width: 100%;
}
.nav-links a {
  display: block;
  width: 100%;
  text-align: right;
  padding: 0.6rem 1rem;
  color: #fff;
  text-decoration: none;
  opacity: 0.95;
  transition:
    opacity 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}
.nav-links a:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.08);
}

/* --- Sections (base) --- */
header.header,
section {
  background: var(--bg);
}
section {
  padding: 48px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
section h2 {
  font-size: clamp(1.4rem, 1.2rem + 1.2vw, 2rem);
  margin-bottom: 14px;
  color: #fff;
  letter-spacing: 0.2px;
}
section p {
  color: var(--text);
}

/* --- Hero --- */
.header.hero {
  padding: clamp(2.5rem, 6vw, 6rem) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: clamp(1rem, 3vw, 3rem);
}
.hero-art {
  order: -1;
} /* image above copy on mobile */

.hero-copy h1 {
  font-size: clamp(1.8rem, 1.3rem + 2.6vw, 3rem);
  line-height: 1.15;
  margin-bottom: 14px;
}
.hero-copy .lead {
  color: var(--muted);
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.15rem);
  margin-bottom: 20px;
}
.accent {
  color: var(--brand);
}

.hero-art img {
  width: 80%;
  height: auto;
  max-height: 360px;
  object-fit: contain;
  display: block;
  margin-inline: auto;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.35));
}

/* --- Badges --- */
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 10px;
}
.badges li {
  list-style: none;
  font-size: 0.95rem;
  color: #fff;
  background: linear-gradient(180deg, #23212a, #1a181f);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 12px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid transparent;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}
.btn.primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 20px rgba(140, 0, 26, 0.4);
}
.btn.primary:hover {
  transform: translateY(-2px);
  background: var(--brand-700);
}
.btn.ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}
.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.06);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 10px 0 6px;
}

/* --- Cards / Grids --- */
.cards.threeup {
  display: grid;
  gap: 18px;
  margin-top: 14px;
  grid-template-columns: 1fr; /* mobile 1-up */
}
.card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  min-height: 180px;
}
.card h3 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.card p {
  color: var(--muted);
}
.card .bullets {
  margin-top: 8px;
  padding-left: 1.1rem;
  list-style: disc;
}
.card .bullets li {
  color: var(--text);
  margin: 6px 0;
}

.card .bullets li::marker {
  color: var(--brand);
}

/* --- Services --- */
.services-list {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}
.service {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 22px;
  text-align: left;
  box-shadow: var(--shadow);
}
.service h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
  color: #fff;
}
.service p {
  font-size: 1rem;
  color: var(--muted);
}

/* Font Awesome icon tone */
.fa-regular,
.fa-solid {
  font-size: 1.25rem;
  margin-right: 0.35rem;
  color: var(--brand);
}

/* --- Capabilities hover --- */
.capabilities .cards .card {
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}
.capabilities .cards .card:hover {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

/* --- Work --- */
.work .container-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
} /* stack on mobile */

.work .meta {
  color: var(--muted);
  margin: 4px 0 8px;
  font-size: 0.95rem;
}

/* If there are only 1–2 cards, keep width tidy */
.work .cards.threeup {
  order: 1;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.work .work-art {
  order: 2;
  max-width: 100%;
  height: auto;
  margin: 0;
  align-self: center; /* center image when stacked */
}

/* --- Tech stack strip --- */
.stack {
  background: var(--bg-soft);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.stack-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: #fff;
}
.stack-row span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: #1e1c23;
}

/* --- Contact --- */
.contact p {
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 12px;
}

/* Contact intro card */
.contact-intro {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-left: 2px solid var(--brand);
  border-radius: var(--radius);
  padding: 20px 20px 18px;
  margin: 16px 0 20px;
}
.contact-intro > * + * {
  margin-top: 14px;
}
.contact-intro p {
  color: var(--muted);
  line-height: 1.65;
  margin: 0 0 14px;
}
.contact-intro p strong,
.contact-intro p em {
  color: #fff;
}
.contact-intro ul {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}
.contact-intro li {
  color: var(--text);
  line-height: 1.6;
  margin: 10px 0;
  padding-left: 1.1rem;
  position: relative;
}
.contact-intro li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 1.5px rgba(140, 0, 26, 0.16);
}

/* Contact CTA */
.contact-cta {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 12px 0 16px;
  padding-top: 1rem;
}
.contact-cta .btn.primary {
  box-shadow:
    0 8px 22px rgba(140, 0, 26, 0.45),
    0 0 12px rgba(140, 0, 26, 0.25);
}
.contact-cta .btn.primary:hover {
  transform: translateY(-2px);
  background: var(--brand-700);
}

/* CTA image chip */
.alt-contact {
  margin-top: 16px;
  opacity: 0.9;
}
.contact-cta .alt-contact {
  margin: 0;
  opacity: 0.95;
}
.contact-cta .alt-contact img {
  height: 44px;
  width: auto;
  display: block;
  padding: 6px;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.28));
}

/* Form controls (kept for future use) */
.form-row {
  display: grid;
  gap: 6px;
}
label {
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
}
input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  background: #141319;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 12px 12px;
  font-size: 1rem;
  outline: none;
}
textarea {
  resize: vertical;
}
input:focus,
textarea:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(179, 229, 255, 0.15);
}

/* --- Footer --- */
.footer {
  background: var(--brand);
  color: #fff;
  text-align: center;
  padding: 18px 0;
}
.footer .container-body {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.footer p {
  font-size: 0.95rem;
}
.footer-links {
  list-style: none;
  display: flex;
  gap: 18px;
}
.footer-links a {
  color: #fff;
  text-decoration: none;
  opacity: 0.95;
}
.footer-links a:hover {
  opacity: 1;
}

/* =========================================================
   5) Motion Preferences
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* =========================================================
   6) Media Queries
   ========================================================= */

/* ≥560px: roomier sections */
@media (min-width: 560px) {
  section {
    padding: 64px 0;
  }
}

/* ≥768px: tablet */
@media (min-width: 768px) {
  .container-body {
    font-size: 1rem;
  }

  /* hero image scales down a bit for balance */
  .hero-art img {
    width: 60%;
  }

  /* classic inline nav */
  .nav-toggle {
    display: none;
  }
  .navbar .container-nav {
    justify-content: space-between;
  }
  .nav-links {
    position: static;
    display: flex !important;
    flex-direction: row;
    align-items: center;
    min-width: unset;
    max-width: unset;
    margin-top: 0;
    padding: 0;
    gap: 22px;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .nav-links a {
    text-align: left;
    padding: 0.5rem 1rem;
  }

  /* 2-up grids */
  .cards.threeup,
  .services-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .work-art {
    width: 60%;
  }

  /* Footer layout spreads */
  .footer .container-body {
    justify-content: space-between;
  }

  /* Contact tweaks */
  .contact-cta {
    gap: 14px;
  }
  .contact-cta .alt-contact img {
    height: 48px;
  }
}

/* ≥1024px: desktop */
@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1.2fr 0.8fr;
  }
  .hero-art {
    order: 0;
  }
  .hero-art img {
    width: 100%;
  }

  .cards.threeup,
  .services-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .work-art {
    width: 100%;
  }

  /* Contact intro two-column list */
  .contact-intro ul {
    columns: 2;
    column-gap: 24px;
  }

  .contact-cta {
    justify-content: left;
  }

  /* Work: side-by-side (cards left, image right) per current design */
  .work .container-body {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 22px;
  }
  .work .container-body > h2 {
    flex: 0 0 100%;
    margin-bottom: 8px;
  }
  .work .cards.threeup {
    order: 1;
    flex: 1 1 0;
    min-width: 300px;
  } /* cards left */
  .work .work-art {
    order: 2;
    flex: 0 0 40%;
    max-width: 520px;
    width: 100%;
  } /* image right */

  /* Tech stack pyramid layout */
  .stack-row {
    display: grid;
    grid-template-columns: repeat(5, max-content);
    column-gap: 10px;
    justify-content: center;
    align-items: center;
  }
  .stack-row span:nth-child(1) {
    grid-column: 2;
    grid-row: 1;
  }
  .stack-row span:nth-child(2) {
    grid-column: 4;
    grid-row: 1;
  }
  .stack-row span:nth-child(3) {
    grid-column: 1;
    grid-row: 2;
  }
  .stack-row span:nth-child(4) {
    grid-column: 3;
    grid-row: 2;
  }
  .stack-row span:nth-child(5) {
    grid-column: 5;
    grid-row: 2;
  }
}
