/* ---- Fonts ---- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/InterVariable.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/InterVariable-Italic.woff2') format('woff2');
}

/* ---- Reset ---- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-bg: #ffffff;
  --color-text: #111111;
  --color-text-secondary: #555555;
  --color-cta: #7f1d1d;
  --color-cta-hover: #991b1b;
  --color-cta-text: #ffffff;
  --header-height: 3.5rem;
}

html {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  color: var(--color-text);
  background: var(--color-bg);
}

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ---- Header ---- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
  animation: slide-down 0.5s ease-out both;
}

.site-header.scrolled {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

.header-wordmark {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--color-text);
}

.header-wordmark img {
  width: 1.75rem;
  height: 1.75rem;
}

.header-wordmark span {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.header-nav a {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.header-nav a:hover {
  color: var(--color-text);
}

.header-nav a.header-cta {
  color: var(--color-cta-text);
}

.header-nav a.header-cta:hover {
  color: var(--color-cta-text);
}

.header-cta {
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-cta-text);
  background: var(--color-cta);
  padding: 0.4375rem 1rem;
  border-radius: 0.375rem;
  text-decoration: none;
  transition: background 0.2s ease;
}

.header-cta:hover {
  background: var(--color-cta-hover);
}

/* ---- Hero ---- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 44rem;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  min-height: 100dvh;
}

.logo {
  width: clamp(7rem, 20vw, 10rem);
  height: auto;
  margin-bottom: 2.5rem;
  animation: fade-in 0.6s ease-out both;
}

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

.hero h1 {
  font-size: clamp(2rem, 6vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 1rem;
  animation: fade-in 0.7s ease-out 0.15s both;
}

.tagline {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 400;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-bottom: 2.5rem;
  animation: fade-in 0.7s ease-out 0.3s both;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2.25rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-cta-text);
  background: var(--color-cta);
  border: none;
  border-radius: 0.5rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
  animation: fade-in 0.7s ease-out 0.45s both;
}

.cta:hover {
  background: var(--color-cta-hover);
  transform: translateY(-1px);
}

.cta:active {
  transform: translateY(0);
}

/* ---- Sections ---- */
.section[id] {
  scroll-margin-top: var(--header-height);
}

.section {
  padding: 5rem 1.5rem;
  max-width: 64rem;
  margin: 0 auto;
  width: 100%;
}

.section-title {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 2.5rem;
  text-align: center;
}

/* ---- Services Grid ---- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

@media (max-width: 640px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

.service-card {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.75rem;
  padding: 2rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover {
  border-color: rgba(0, 0, 0, 0.15);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.service-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}

.service-card .service-subtitle {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.service-card .learn-more {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-cta);
  text-decoration: none;
  transition: color 0.2s ease;
}

.service-card .learn-more:hover {
  color: var(--color-cta-hover);
}

/* ---- Team Section ---- */
.team-section {
  text-align: center;
}

.team-section p {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--color-text-secondary);
  max-width: 38rem;
  margin: 0 auto 1.5rem;
}

.team-section a {
  color: var(--color-cta);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.team-section a:hover {
  color: var(--color-cta-hover);
}

/* ---- Page Content (subpages) ---- */
.page-content {
  flex: 1;
  max-width: 48rem;
  margin: 0 auto;
  padding: calc(var(--header-height) + 3rem) 1.5rem 4rem;
  width: 100%;
}

.page-content h1 {
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 0.75rem;
  animation: none;
}

.page-content .page-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.1875rem);
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-bottom: 2.5rem;
}

.page-content p {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--color-text-secondary);
  margin-bottom: 1.25rem;
}

.page-content .back-link {
  display: inline-block;
  margin-top: 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.page-content .back-link:hover {
  color: var(--color-text);
}

/* ---- Case Study List ---- */
.case-study-list {
  list-style: none;
}

.case-study-list li {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.75rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.case-study-list li:hover {
  border-color: rgba(0, 0, 0, 0.15);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.case-study-list a {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem 2rem;
  text-decoration: none;
  color: var(--color-text);
}

.case-study-logo {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.375rem;
  flex-shrink: 0;
}

.case-study-list h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.case-study-list .case-study-desc {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
}

/* ---- Build List ---- */
.build-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.build-list li {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--color-text-secondary);
  padding-left: 1.25rem;
  position: relative;
}

.build-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: var(--color-cta);
}

/* ---- Process List ---- */
.process-list {
  list-style: none;
  counter-reset: process;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.process-list li {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--color-text-secondary);
  padding-left: 2rem;
  position: relative;
  counter-increment: process;
}

.process-list li::before {
  content: counter(process);
  position: absolute;
  left: 0;
  top: 0.1em;
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 50%;
  background: var(--color-cta);
  color: var(--color-cta-text);
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- Page CTA Group ---- */
.page-cta-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 2.5rem;
}

.page-cta-group .cta {
  animation: none;
  padding: 0.625rem 1.5rem;
  font-size: 0.875rem;
}

.page-cta-or {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
}

/* ---- Case Study Figures ---- */
.case-study-figure {
  margin: 2rem 0;
}

.case-study-figure img {
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.case-study-figure figcaption {
  margin-top: 0.625rem;
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  text-align: center;
}

/* ---- Legal Page ---- */
.page-content h2 {
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.page-content h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.page-content a {
  color: var(--color-cta);
  text-decoration: none;
  transition: color 0.2s ease;
}

.page-content a:hover {
  color: var(--color-cta-hover);
}

.page-content a.cta {
  color: var(--color-cta-text);
}

.page-content a.cta:hover {
  color: var(--color-cta-text);
}

/* ---- Footer ---- */
.site-footer {
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  animation: fade-in 0.5s ease-out both;
}

.site-footer a {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: var(--color-text);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.footer-sep {
  color: rgba(0, 0, 0, 0.15);
}

/* ---- Animations ---- */
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-down {
  from {
    opacity: 0;
    transform: translateY(-100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
