:root {
  --navy-950: #050816;
  --navy-900: #0a1024;
  --navy-800: #121a33;
  --navy-700: #1c2744;
  --violet: #8b5cff;
  --violet-bright: #a78bfa;
  --cyan: #22d3ee;
  --cyan-soft: #67e8f9;
  --text: #e8eefc;
  --text-muted: #9aa8c7;
  --surface: rgba(18, 26, 51, 0.72);
  --border: rgba(139, 92, 255, 0.28);
  --radius: 18px;
  --shadow: 0 24px 60px rgba(2, 6, 23, 0.45);
  --font-sans: "Outfit", system-ui, sans-serif;
  --font-serif: "Source Serif 4", Georgia, serif;
  --max: 1120px;
  --focus: 0 0 0 3px rgba(34, 211, 238, 0.55);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(139, 92, 255, 0.28), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(34, 211, 238, 0.18), transparent 50%),
    linear-gradient(180deg, var(--navy-950), var(--navy-900) 40%, #070b18);
  line-height: 1.6;
}

img { max-width: 100%; display: block; height: auto; }
a { color: var(--cyan-soft); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: #fff; }

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: 6px;
}

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

.skip-link {
  position: absolute;
  left: 1rem; top: -3rem;
  background: var(--cyan);
  color: #041018;
  padding: 0.6rem 1rem;
  z-index: 100;
  border-radius: 8px;
  font-weight: 600;
}
.skip-link:focus { top: 1rem; }

.container { width: min(100% - 2rem, var(--max)); margin-inline: auto; }
.narrow { width: min(100% - 2rem, 680px); }
.muted { color: var(--text-muted); }
.req { color: var(--cyan); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(5, 8, 22, 0.72);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.25rem;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-photo {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 2px solid rgba(34, 211, 238, 0.55);
  box-shadow: 0 0 0 3px rgba(139, 92, 255, 0.18);
  flex-shrink: 0;
}

.brand-name {
  background: linear-gradient(120deg, #fff, var(--cyan-soft));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-nav {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}
.site-nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}
.site-nav a[aria-current="page"],
.site-nav a:hover { color: var(--cyan); }

.nav-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  padding: 0.65rem;
  flex-direction: column;
  justify-content: space-between;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

.preview-banner {
  background: linear-gradient(90deg, var(--violet), var(--cyan));
  color: #061018;
  text-align: center;
  font-weight: 600;
  padding: 0.55rem 1rem;
}

.hero {
  position: relative;
  /* Full first viewport under the sticky header */
  min-height: calc(100svh - 4.25rem);
  min-height: calc(100vh - 4.25rem);
  padding: clamp(3.5rem, 8vw, 6rem) 0;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  align-items: center;
}

.hero-atmosphere {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-banner {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 70% center;
  display: block;
  filter: saturate(1.1) contrast(1.05);
}

.hero-atmosphere::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  /* Soft fade: readable copy on the left, clear photo on the right */
  background: linear-gradient(
    90deg,
    #050816 0%,
    rgba(5, 8, 22, 0.96) 30%,
    rgba(5, 8, 22, 0.72) 42%,
    rgba(5, 8, 22, 0.28) 56%,
    rgba(5, 8, 22, 0.06) 70%,
    transparent 100%
  );
}

.hero-atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(5, 8, 22, 0.18) 0%, transparent 24%, rgba(5, 8, 22, 0.28) 100%),
    radial-gradient(640px 320px at 18% 35%, rgba(139, 92, 255, 0.12), transparent 70%);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  width: 100%;
}

.hero-copy {
  max-width: min(36rem, 48%);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--violet-bright);
  margin: 0 0 0.75rem;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5.5vw, 3.75rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-optical-sizing: none;
  font-variation-settings: "opsz" 60;
  font-stretch: normal;
  transform: none;
  margin: 0 0 0.75rem;
  color: #fff;
}

.hero-headline {
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  font-weight: 600;
  margin: 0 0 0.85rem;
  color: var(--cyan-soft);
}

.hero-sub {
  margin: 0 0 1.75rem;
  max-width: 38rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; }

.capabilities-section {
  padding-top: clamp(1rem, 3vw, 2rem);
  padding-bottom: clamp(3rem, 6vw, 4.5rem);
}

.capabilities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(1rem, 2.2vw, 1.6rem);
}

.capability-card {
  margin: 0;
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--navy-800);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  min-height: clamp(220px, 28vw, 340px);
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.capability-card:hover,
.capability-card:focus-visible {
  border-color: rgba(34, 211, 238, 0.45);
  transform: translateY(-4px);
}

.capability-card img {
  width: 100%;
  height: 100%;
  min-height: clamp(220px, 28vw, 340px);
  aspect-ratio: 16 / 11;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.capability-card:hover img,
.capability-card:focus-visible img {
  transform: scale(1.04);
}

.capability-caption {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(5, 8, 22, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.75rem 1.25rem;
  font: inherit;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(120deg, var(--violet), #6d28d9 40%, var(--cyan));
  color: #061018;
}
.btn-secondary {
  background: rgba(139, 92, 255, 0.16);
  border-color: var(--border);
  color: #fff;
}
.btn-ghost {
  background: transparent;
  border-color: rgba(255,255,255,0.16);
  color: var(--text);
}
.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.45);
  color: #fecaca;
}

.section { padding: clamp(3.5rem, 7vw, 5.5rem) 0; }
.section-head { margin-bottom: 2rem; }
.section h2, .page-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-optical-sizing: none;
  font-variation-settings: "opsz" 36;
  margin: 0 0 0.5rem;
}
.section-lead { color: var(--text-muted); margin: 0; max-width: 40rem; }

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.project-card {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, transform 0.25s ease;
}
.project-card:hover {
  border-color: rgba(34, 211, 238, 0.35);
  transform: translateY(-4px);
}
.project-card-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--navy-800); }
.project-card-media img { width: 100%; height: 100%; object-fit: cover; }
.project-card-placeholder {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  background:
    linear-gradient(135deg, rgba(139,92,255,0.35), rgba(34,211,238,0.15)),
    var(--navy-800);
  font-weight: 600;
  color: #fff;
}
.project-card-body { padding: 1.25rem 1.3rem 1.5rem; display: grid; gap: 0.55rem; }
.project-card h3 { margin: 0; font-size: 1.25rem; }
.project-card h3 a { color: #fff; text-decoration: none; }
.project-card .summary { margin: 0; color: var(--text-muted); }
.text-link { font-weight: 600; color: var(--cyan); text-decoration: none; }

.about-grid, .contact-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 2rem;
}
.about-copy p { font-size: 1.1rem; color: var(--text); margin-top: 0; }
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}
.contact-links a:not(.btn) {
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  text-decoration: none;
  color: var(--text);
}

.feedback-grid {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}
.feedback-item {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.feedback-item blockquote { margin: 0; }
.feedback-item footer { margin-top: 0.85rem; color: var(--violet-bright); font-weight: 600; }

.page-hero { padding: 3rem 0 1rem; }
.filters {
  display: grid;
  grid-template-columns: 1.4fr 1fr auto;
  gap: 1rem;
  margin-bottom: 2rem;
  align-items: end;
}
.field { display: grid; gap: 0.4rem; margin-bottom: 1rem; }
.field label { font-weight: 600; }
.field-help { margin: 0; color: var(--text-muted); font-size: 0.9rem; }
.field-error { margin: 0; color: #fca5a5; font-size: 0.9rem; }
input, textarea, select {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(5, 8, 22, 0.55);
  color: var(--text);
  padding: 0.75rem 0.9rem;
  font: inherit;
}
input:focus-visible, textarea:focus-visible, select:focus-visible {
  border-color: var(--cyan);
}

.empty-state {
  border: 1px dashed rgba(255,255,255,0.18);
  border-radius: var(--radius);
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
}
.empty-state h3 { color: #fff; margin-top: 0; }

.sitemap-list {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}
.sitemap-list a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}
.sitemap-list a:hover { color: var(--cyan); }

.page-project {
  width: 100%;
}

.project-hero {
  position: relative;
  margin-bottom: 0;
  width: 100%;
}

.project-hero-media {
  width: 100%;
  background: #f8fafc;
  line-height: 0;
}

.project-hero-media img {
  width: 100%;
  height: auto;
  max-width: none;
  object-fit: contain;
  object-position: center top;
  display: block;
}

.project-hero-fallback {
  min-height: clamp(240px, 40vw, 520px);
  background:
    linear-gradient(135deg, rgba(139,92,255,0.45), rgba(34,211,238,0.2)),
    var(--navy-800);
}

.project-hero-copy {
  position: relative;
  width: 100%;
  margin: 0;
  background: rgba(10, 16, 36, 0.96);
  border: none;
  border-top: 1px solid rgba(255,255,255,0.08);
  border-radius: 0;
  padding: clamp(1.5rem, 3.5vw, 2.75rem) clamp(1.25rem, 4vw, 3.5rem);
  box-shadow: none;
}

.project-hero-copy h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin: 0 0 0.75rem;
}

.project-summary {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 56rem;
}

.project-meta { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin: 1rem 0; color: var(--text-muted); }
.tag-list { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; margin: 0; }
.tag-list li {
  border: 1px solid rgba(139,92,255,0.35);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  font-size: 0.85rem;
}
.project-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }

.project-layout {
  width: 100%;
  display: grid;
  grid-template-columns: 1.5fr 0.8fr;
  gap: 2rem;
  padding: 2rem clamp(1.25rem, 4vw, 3.5rem) 3rem;
  box-sizing: border-box;
}

.prose h1, .prose h2, .prose h3 { font-family: var(--font-serif); line-height: 1.25; }
.prose h2 { margin-top: 2rem; }
.prose pre, .prose code {
  background: rgba(0,0,0,0.35);
  border-radius: 8px;
}
.prose pre { padding: 1rem; overflow: auto; }
.prose code { padding: 0.1rem 0.35rem; }
.prose table { width: 100%; border-collapse: collapse; }
.prose th, .prose td { border: 1px solid rgba(255,255,255,0.12); padding: 0.55rem 0.7rem; }
.prose img { border-radius: 12px; margin: 1rem 0; }

.gallery-list, .download-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.gallery-list figcaption, .download-list .muted { color: var(--text-muted); font-size: 0.9rem; }

.stacked-form { margin-top: 1rem; }
.consent-fieldset {
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 1rem;
  margin: 0 0 1.25rem;
}
.checkbox { display: flex; gap: 0.7rem; align-items: flex-start; margin: 0.6rem 0; }
.checkbox input { width: auto; margin-top: 0.25rem; }
.hp-field { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.flash {
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
}
.flash-success { background: rgba(34, 197, 94, 0.15); border: 1px solid rgba(34,197,94,0.35); }
.flash-error { background: rgba(239, 68, 68, 0.15); border: 1px solid rgba(239,68,68,0.35); }
.flash-info { background: rgba(34, 211, 238, 0.12); border: 1px solid rgba(34,211,238,0.3); }

.site-footer {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 2rem 0 2.5rem;
  margin-top: 2rem;
  color: var(--text-muted);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-links { display: flex; gap: 1rem; margin: 0; }

.reveal { animation: rise 0.8s ease both; }
.hero-visual.reveal { animation-delay: 0.12s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 860px) {
  .hero-grid, .about-grid, .contact-grid, .project-layout, .filters, .capabilities-grid {
    grid-template-columns: 1fr;
  }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute;
    inset: 4.25rem 1rem auto;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    background: rgba(10, 16, 36, 0.98);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
  }
  .site-nav.is-open { display: flex; }
  .hero {
    min-height: calc(100svh - 4.25rem);
    min-height: calc(100vh - 4.25rem);
    align-items: flex-end;
    padding: 0 0 3rem;
  }
  .hero-banner {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 28%;
  }
  .hero-atmosphere::before {
    background: linear-gradient(
      180deg,
      rgba(5, 8, 22, 0.2) 0%,
      rgba(5, 8, 22, 0.42) 40%,
      rgba(5, 8, 22, 0.88) 68%,
      #050816 100%
    );
  }
  .hero-copy {
    max-width: 100%;
    padding-top: 42vh;
  }
  .capabilities-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 861px) and (max-width: 1100px) {
  .capabilities-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .btn:hover, .project-card:hover, .capability-card:hover,
  .capability-card:hover img, .capability-card:focus-visible img { transform: none; }
}
