@import url('https://fonts.googleapis.com/css2?family=Newsreader:opsz,wght@6..72,300;6..72,400;6..72,500&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  color-scheme: light;
  --ink: #0E1217;
  --slate: #1D2833;
  --cloud: #F6F4EF;
  --fog: #E9EDF1;
  --teal: #3C8C8F;
  --seafoam: #A9C9C7;
  --sand: #D6BE8A;
  --brass: #B59063;
  --max-width: 1120px;
  --grid-gap: 24px;
  --section-pad: 96px;
  --section-pad-mobile: 64px;
  --radius-lg: 28px;
  --radius-md: 18px;
  --shadow-soft: 0 30px 70px rgba(14, 18, 23, 0.08);
  --shadow-card: 0 18px 40px rgba(14, 18, 23, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Newsreader', Georgia, serif;
  color: var(--ink);
  background: var(--cloud);
  min-height: 100vh;
  line-height: 1.6;
}

body.modal-open {
  overflow: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url('assets/patterns.svg');
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0.22;
  pointer-events: none;
  z-index: -1;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 244, 239, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(14, 18, 23, 0.08);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-logo img {
  height: 46px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  letter-spacing: 0.2px;
}

.nav-links a {
  position: relative;
  padding: 6px 0;
}

.nav-links a.active::after,
.nav-links a:hover::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: var(--teal);
}

.nav-cta {
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--teal);
  color: white;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  letter-spacing: 0.4px;
  border: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--ink);
}

.hero {
  padding: 120px 0 80px;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--grid-gap);
  align-items: center;
}

.hero-copy {
  grid-column: span 7;
}

.hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.05;
  margin: 0 0 20px;
  letter-spacing: -0.5px;
}

.hero-subhead {
  font-size: 20px;
  max-width: 520px;
  color: var(--slate);
}


.hero-card {
  grid-column: span 5;
  background: white;
  padding: 28px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(14, 18, 23, 0.08);
}

.hero-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  margin: 0 0 8px;
}

.hero-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  background: var(--teal);
  color: white;
  box-shadow: var(--shadow-card);
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: rgba(14, 18, 23, 0.2);
}

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

section {
  padding: var(--section-pad) 0;
}

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(28px, 3vw, 40px);
  margin-bottom: 12px;
}

.section-subhead {
  color: var(--slate);
  max-width: 700px;
}

.contact-note {
  margin-top: 20px;
}

.cards {
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.card {
  background: white;
  border-radius: var(--radius-md);
  padding: 24px;
  border: 1px solid rgba(14, 18, 23, 0.08);
  box-shadow: var(--shadow-card);
}

.card h4 {
  font-family: 'Space Grotesk', sans-serif;
  margin-top: 0;
}

.card ul {
  padding-left: 18px;
  margin: 12px 0 0;
}

.card li {
  margin-bottom: 6px;
}

.case-study-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transform-origin: center;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.32s ease, border-color 0.32s ease;
}

.case-study-card:hover,
.case-study-card:focus-visible {
  transform: translateY(-14px) scale(1.02) rotate(-0.4deg);
  box-shadow: 0 34px 72px rgba(14, 18, 23, 0.22);
  border-color: rgba(60, 140, 143, 0.4);
}

.case-study-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
}

.case-study-modal[hidden] {
  display: none;
}

.case-study-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 18, 23, 0.72);
}

.case-study-modal-panel {
  position: relative;
  width: min(980px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: white;
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(14, 18, 23, 0.12);
}

.case-study-modal-close {
  position: sticky;
  top: 0;
  margin-left: auto;
  display: block;
  border: 1px solid rgba(14, 18, 23, 0.2);
  background: white;
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 14px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  cursor: pointer;
}

.case-study-modal-panel h3 {
  margin-top: 8px;
  font-family: 'Space Grotesk', sans-serif;
}

.case-study-modal-content {
  margin-top: 8px;
}

.case-study-modal-content ul {
  padding-left: 20px;
}

.step-grid {
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.step {
  background: var(--fog);
  border-radius: var(--radius-md);
  padding: 20px;
  border: 1px solid rgba(14, 18, 23, 0.08);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 28px;
}

.metric {
  padding: 20px;
  border-radius: var(--radius-md);
  background: white;
  border: 1px dashed rgba(14, 18, 23, 0.2);
  font-family: 'Space Grotesk', sans-serif;
}

.split {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--grid-gap);
  align-items: center;
}

.split-media {
  grid-column: span 5;
  background: linear-gradient(135deg, rgba(60, 140, 143, 0.2), rgba(214, 190, 138, 0.2));
  border-radius: var(--radius-lg);
  padding: 16px;
  min-height: 0;
  position: relative;
  overflow: hidden;
}

.split-media img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius-lg) - 6px);
}

.split-copy {
  grid-column: span 7;
}

.banner {
  background: var(--ink);
  color: white;
  border-radius: var(--radius-lg);
  padding: 36px;
  display: grid;
  gap: 16px;
  align-items: center;
}

.banner p {
  margin: 0;
}

.footer {
  padding: 48px 0 64px;
  border-top: 1px solid rgba(14, 18, 23, 0.08);
  background: rgba(246, 244, 239, 0.9);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.footer h4 {
  font-family: 'Space Grotesk', sans-serif;
  margin-bottom: 12px;
}

.footer a {
  color: var(--slate);
}

.form {
  display: grid;
  gap: 16px;
}

input,
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(14, 18, 23, 0.2);
  font-family: inherit;
  background: white;
}

label {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  letter-spacing: 0.3px;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.form button {
  justify-self: start;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.reveal-after-scroll.is-visible {
  opacity: 0;
  transform: translateY(16px);
}

body.has-scrolled .reveal-after-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.float-dots {
  position: absolute;
  right: 12%;
  top: 18%;
  display: grid;
  gap: 10px;
}

.float-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--sand);
  opacity: 0.7;
  animation: float 6s ease-in-out infinite;
}

.float-dots span:nth-child(2) { background: var(--seafoam); animation-delay: 0.4s; }
.float-dots span:nth-child(3) { background: var(--teal); animation-delay: 0.8s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.mobile-panel {
  display: none;
  flex-direction: column;
  gap: 18px;
  padding: 20px 0 28px;
}

.mobile-panel a {
  font-family: 'Space Grotesk', sans-serif;
}

@media (max-width: 960px) {
  .hero-grid,
  .split {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .hero-card,
  .split-copy,
  .split-media {
    grid-column: span 1;
  }

  .float-dots {
    position: static;
    justify-self: start;
    margin-top: 24px;
  }
}

@media (max-width: 820px) {
  .nav-links,
  .nav-cta {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .mobile-panel {
    display: none;
  }

  .mobile-panel.open {
    display: flex;
  }
}

@media (max-width: 640px) {
  section {
    padding: var(--section-pad-mobile) 0;
  }

  .hero {
    padding: 90px 0 60px;
  }

  .hero-subhead {
    font-size: 18px;
  }

  .case-study-modal {
    padding: 12px;
  }

  .case-study-modal-panel {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    padding: 20px;
  }
}
