:root {
  --ink: #09111f;
  --panel: #101a2f;
  --muted: #637083;
  --line: rgba(10, 17, 31, 0.13);
  --soft: #f4f0e8;
  --paper: #fbfaf7;
  --gold: #c99842;
  --teal: #1b8a8f;
  --coral: #d25f4f;
  --white: #ffffff;
  --shadow: 0 24px 70px rgba(9, 17, 31, 0.16);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}

img {
  display: block;
  width: 100%;
  height: auto;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  transform: translateY(-140%);
  background: var(--ink);
  color: var(--white);
  padding: 10px 14px;
  border-radius: var(--radius);
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  width: min(1140px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 250, 247, 0.84);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.site-header.is-scrolled {
  border-color: var(--line);
  box-shadow: 0 12px 30px rgba(9, 17, 31, 0.08);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--gold);
  font-family: "Playfair Display", Georgia, serif;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  object-fit: contain;
  display: block;
}

.site-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-menu a {
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  color: #263247;
  padding: 10px 14px;
  border-radius: var(--radius);
}

.site-menu a:hover,
.site-menu a[aria-current="page"] {
  background: rgba(27, 138, 143, 0.11);
  color: var(--teal);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 10px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--ink);
}

.hero-section {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
}

.page-hero {
  position: relative;
  min-height: 52vh;
  display: flex;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
}

.hero-media,
.hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-hero .hero-media,
.page-hero .hero-media img {
  z-index: -3;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(9, 17, 31, 0.78) 0%, rgba(9, 17, 31, 0.5) 48%, rgba(9, 17, 31, 0.18) 100%);
}

.page-hero .hero-overlay {
  background: linear-gradient(90deg, rgba(9,17,31,0.6) 0%, rgba(9,17,31,0.36) 48%, rgba(9,17,31,0.12) 100%);
  z-index: -2;
}

.hero-content {
  color: var(--white);
  padding: clamp(72px, 12vw, 150px) 0 clamp(38px, 8vw, 92px);
}

.eyebrow {
  margin: 0 0 14px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
  line-height: 1.03;
}

h1 {
  max-width: 890px;
  font-size: clamp(3.2rem, 8vw, 7.4rem);
  font-family: "Playfair Display", Georgia, serif;
}

h2 {
  font-size: clamp(2rem, 4vw, 4rem);
}

h3 {
  margin: 0;
  line-height: 1.15;
}

.hero-tagline {
  max-width: 670px;
  margin: 22px 0 34px;
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  color: rgba(255, 255, 255, 0.86);
}

.hero-actions,
.footer-grid,
.split-cta,
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  color: var(--ink);
  background: var(--gold);
  box-shadow: 0 12px 30px rgba(201, 152, 66, 0.28);
}

.button.ghost {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.08);
}

.button.full {
  width: 100%;
}

.section {
  padding: 92px 0;
}

.intro-band,
.metric-band {
  background: var(--soft);
}

.intro-grid,
.about-layout,
.viewer-grid,
.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
  align-items: start;
}

/* Hero sections use a single-column layout so headings don't wrap
   unexpectedly and content isn't split into two grid columns. */
.page-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: end;
}

.section-copy h2,
.section-heading h2,
.split-cta h2 {
  max-width: 760px;
}

.capability-list {
  display: grid;
  gap: 18px;
}

.capability-list article,
.contact-panel,
.viewer-panel,
.contact-form {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 14px 36px rgba(9, 17, 31, 0.07);
}

.capability-list article {
  padding: 26px;
}

.capability-list span,
.timeline span {
  color: var(--teal);
  font-weight: 800;
}

.capability-list p,
.lead,
.timeline p,
.section-copy p,
.contact-panel p,
.project-card span {
  color: var(--muted);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 34px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 34px;
}

.work-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 18px 45px rgba(9, 17, 31, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.detail-item {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 14px 36px rgba(9, 17, 31, 0.07);
  scroll-margin-top: 96px;
}

.detail-item span {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.detail-item p {
  color: var(--muted);
}

.detail-item a {
  color: var(--teal);
  font-weight: 800;
  text-decoration: none;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.project-card img {
  aspect-ratio: 16 / 11;
  object-fit: cover;
}

.project-card div {
  padding: 22px;
}

.project-card p {
  margin: 0 0 8px;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.project-card h2,
.project-card h3 {
  font-size: 1.28rem;
}

.project-card a,
.text-link,
.contact-panel a {
  display: inline-flex;
  margin-top: 16px;
  color: var(--teal);
  font-weight: 800;
  text-decoration: none;
}

.cta-band {
  background: var(--ink);
  color: var(--white);
}

.page-hero {
  padding: 150px 0 76px;
  background: linear-gradient(135deg, var(--ink), #182941);
  color: var(--white);
}

.work-hero {
  background: linear-gradient(135deg, var(--ink), #173f42);
}

.page-hero h1 {
  font-size: clamp(2.7rem, 6vw, 5.6rem);
}

/* Prevent overly long headings from wrapping awkwardly; give them
   a comfortable measure while allowing responsiveness. */
.page-hero h1 {
  max-width: 950px;
  word-break: normal;
  hyphens: auto;
}

.lead {
  margin: 0;
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.78);
}

.portrait-panel {
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.portrait-panel img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.timeline {
  display: grid;
  gap: 28px;
}

.timeline article {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.metrics div {
  min-height: 132px;
  padding: 24px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.metrics strong {
  display: block;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--teal);
}

.metrics span {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-weight: 700;
}

.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-bar button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 16px;
  background: var(--white);
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.filter-bar button.is-active {
  background: var(--ink);
  color: var(--white);
}

.viewer-section {
  background: var(--soft);
}

.viewer-panel {
  padding: 0;
  overflow: hidden;
}

model-viewer {
  display: block;
  width: 100%;
  height: min(560px, 70vh);
  min-height: 390px;
  background: radial-gradient(circle at 30% 20%, rgba(201, 152, 66, 0.25), transparent 36%), #edf2ef;
}

.viewer-fallback {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--ink);
  font-weight: 800;
}

.contact-form,
.contact-panel {
  padding: 30px;
}

label {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  color: #263247;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 48px;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  background: #fffdf9;
}

textarea {
  resize: vertical;
}

.contact-panel a {
  display: flex;
  margin: 18px 0;
}

.popup-backdrop {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(9, 17, 31, 0.64);
}

.popup-backdrop.is-visible {
  display: flex;
}

.signup-popup {
  position: relative;
  width: min(480px, 100%);
  max-height: calc(100vh - 44px);
  overflow: auto;
  padding: 30px;
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.signup-popup h2 {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  margin-bottom: 18px;
}

.popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  font-size: 1.4rem;
  cursor: pointer;
}

.site-footer {
  padding: 34px 0;
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 0;
  color: var(--muted);
}

.site-footer a {
  margin-left: 18px;
  text-decoration: none;
  font-weight: 800;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms ease, transform 600ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 900px) {
  .nav-toggle {
    display: block;
  }

  .site-menu {
    position: absolute;
    top: 76px;
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
  }

  .site-menu.is-open {
    display: flex;
  }

  .site-menu a {
    padding: 13px 14px;
  }

  .hero-section {
    min-height: 82vh;
  }

  .hero-overlay {
    background: rgba(9, 17, 31, 0.78);
  }

  .intro-grid,
  .page-hero-grid,
  .about-layout,
  .viewer-grid,
  .contact-grid,
  .detail-grid,
  .work-grid,
  .work-grid.compact {
    grid-template-columns: 1fr;
  }

  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 28px, 1140px);
  }

  .brand span:last-child {
    max-width: 168px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero-content {
    padding: 120px 0 66px;
  }

  .section {
    padding: 64px 0;
  }

  .page-hero {
    padding: 124px 0 58px;
  }

  .metrics {
    grid-template-columns: 1fr;
  }

  .hero-actions .button,
  .split-cta .button {
    width: 100%;
  }

  .site-footer a {
    margin: 12px 16px 0 0;
  }
}
