:root {
  --bg: #f5f0e9;
  --bg-deep: #efe7dc;
  --paper: #f8f4ee;
  --white: #ffffff;
  --ink: #202428;
  --ink-soft: #4a4540;
  --muted: #6f6860;
  --line: #e4d9cc;
  --accent: #9a7257;
  --rose: #c98a78;
  --taupe: #c4b09a;
  --taupe-deep: #b59d84;
  --button: #2c2620;
  --button-hover: #1a1714;
  --sage: #6d735c;
  --header-h: 82px;
  --max: 1180px;
  --wide: 1280px;
  --font-serif: "Playfair Display", "Times New Roman", serif;
  --font-sans: "DM Sans", "Helvetica Neue", sans-serif;
  --font-script: "Great Vibes", cursive;
  --ease: 0.28s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body.nav-open {
  overflow: hidden;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4,
p,
figure {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--ink);
  color: var(--bg);
}

.skip-link:focus {
  top: 12px;
}

.container {
  width: min(calc(100% - 48px), var(--max));
  margin-inline: auto;
}

.container-wide {
  width: min(calc(100% - 48px), var(--wide));
  margin-inline: auto;
}

.kicker {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--ease), background var(--ease), color var(--ease), border-color var(--ease);
  white-space: nowrap;
  font-size: 0.92rem;
}

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

.btn-primary {
  background: var(--button);
  color: var(--bg);
  border-color: var(--button);
}

.btn-primary:hover {
  background: var(--button-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: #cfc4b6;
}

.btn-ghost:hover {
  border-color: var(--ink);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
}

.text-link:hover {
  gap: 12px;
}

.icon-arrow {
  width: 14px;
  height: 14px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 240, 233, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: var(--header-h);
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 28px;
  height: 28px;
  color: var(--ink);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-text strong {
  font-family: var(--font-serif);
  font-size: 1.48rem;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.brand-text span {
  margin-top: 5px;
  font-size: 0.6rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
}

#about,
#services,
#process,
#lab,
#portfolio,
#contact {
  scroll-margin-top: calc(var(--header-h) + 12px);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-list a {
  font-size: 0.9rem;
  color: var(--ink-soft);
  position: relative;
}

.nav-list a:hover,
.nav-list a.is-active {
  color: var(--ink);
}

.nav-list a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 1px;
  background: var(--ink);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}

.header-motto {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: var(--font-script);
  font-size: 1.02rem;
  color: var(--sage);
  line-height: 1.15;
}

.header-motto small {
  font-family: var(--font-sans);
  font-size: 0.56rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--ink);
  position: relative;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle span::before {
  top: -6px;
}

.nav-toggle span::after {
  top: 6px;
}

/* Hero */
.hero {
  background: linear-gradient(180deg, var(--bg) 0%, #f3ece3 100%);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.4fr) 0.6fr;
  min-height: calc(100vh - var(--header-h));
  min-height: 700px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px 0 72px;
  padding-right: 20px;
}

.hero-copy h1 {
  margin-top: 10px;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(3.6rem, 6.8vw, 6.2rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
}

.hero-services {
  margin-top: 26px;
  max-width: 36ch;
  color: var(--ink-soft);
  font-size: 1.02rem;
}

.hero-copy .kicker {
  margin-top: 26px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero-visual {
  position: relative;
  min-height: 640px;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 42%;
}

.hero-script {
  position: absolute;
  top: 8%;
  right: 10%;
  font-family: var(--font-script);
  font-size: clamp(1.7rem, 2.5vw, 2.45rem);
  line-height: 1.12;
  color: #6e675c;
  text-align: right;
}

.hero-quote {
  position: absolute;
  right: 28px;
  bottom: 28px;
  max-width: 18ch;
  text-align: right;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
  color: #f7f1e8;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

/* Services */
.service-strip {
  background: var(--white);
  border-top: 1px solid #f0e8dc;
  border-bottom: 1px solid #f0e8dc;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
  padding: 42px 0 38px;
}

.service-item {
  text-align: center;
  padding: 8px 6px 0;
}

.service-item svg {
  width: 28px;
  height: 28px;
  margin: 0 auto 16px;
  stroke: var(--ink);
  fill: none;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-item h3 {
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.35;
}

.service-item p {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
}

/* About + Lab */
.purpose {
  padding: 28px 0 8px;
}

.purpose-grid {
  display: grid;
  grid-template-columns: 0.78fr 0.92fr 1.1fr;
  gap: 16px;
  align-items: stretch;
}

.purpose-panel {
  background: linear-gradient(180deg, #cbb7a3 0%, #c3ad96 100%);
  color: #f7f1ea;
  padding: 48px 38px;
  min-height: 520px;
  display: flex;
  flex-direction: column;
}

.purpose-panel h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2.2rem, 3.2vw, 3.2rem);
  line-height: 1.08;
}

.purpose-panel .lede {
  margin-top: 18px;
  color: #f4ebe1;
  font-size: 0.95rem;
  max-width: none;
}

.purpose-list {
  margin-top: 28px;
  font-size: 0.95rem;
  line-height: 1.7;
  color: #f4ebe1;
}

.purpose-panel .text-link {
  margin-top: auto;
  padding-top: 28px;
  color: #f7f1ea;
}

.purpose-photo,
.lab-photo {
  overflow: hidden;
}

.purpose-photo img,
.lab-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 520px;
}

.lab-card {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  background: var(--white);
  min-height: 520px;
}

.lab-copy {
  padding: 48px 34px 36px;
  display: flex;
  flex-direction: column;
}

.lab-copy h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 2.4vw, 2.45rem);
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.1;
}

.lab-copy .eyebrow {
  font-size: 0.95rem;
  margin: 20px 0 12px;
}

.lab-copy p {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.lab-copy .text-link {
  margin-top: auto;
  padding-top: 24px;
}

.lab-side {
  display: grid;
  grid-template-rows: 1fr auto;
}

.lab-side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 240px;
}

.lab-points {
  padding: 20px 22px 24px;
  background: var(--white);
}

.lab-points li {
  font-size: 0.92rem;
  padding: 4px 0;
  color: var(--ink-soft);
}

/* Featured */
.featured {
  padding: 64px 0 24px;
}

.featured-head,
.process-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.featured-head h2,
.process-head h2 {
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-soft);
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

.work-card {
  overflow: hidden;
}

.work-card img {
  width: 100%;
  aspect-ratio: 3 / 4.05;
  object-fit: cover;
  background: var(--bg-deep);
  transition: transform 0.6s ease;
}

.work-card:hover img {
  transform: scale(1.03);
}

.work-card h3 {
  margin-top: 14px;
  font-size: 0.98rem;
  font-weight: 500;
}

.work-card p {
  margin-top: 4px;
  font-size: 0.82rem;
  color: var(--muted);
}

/* Process */
.process {
  padding: 56px 0 64px;
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
  position: relative;
  margin-top: 8px;
}

.process-steps::before {
  content: "";
  position: absolute;
  top: 17px;
  left: 7%;
  right: 7%;
  height: 1px;
  background: #ded3c6;
}

.process-step {
  text-align: center;
  position: relative;
}

.step-index {
  width: 34px;
  height: 34px;
  margin: 0 auto 16px;
  border: 1px solid #d7ccbf;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--paper);
  font-size: 0.85rem;
  position: relative;
  z-index: 1;
}

.process-step h3 {
  font-size: 1.05rem;
  font-weight: 500;
  margin-bottom: 6px;
}

.process-step p {
  font-size: 0.84rem;
  color: var(--muted);
  max-width: 18ch;
  margin: 0 auto;
}

/* Contact */
.contact {
  padding: 24px 0 72px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 48px;
  align-items: start;
}

.contact-intro h2 {
  font-family: var(--font-serif);
  font-size: clamp(2.1rem, 3.4vw, 2.8rem);
  font-weight: 500;
  line-height: 1.12;
  margin: 10px 0 14px;
}

.contact-intro p,
.contact-intro address {
  font-style: normal;
  color: var(--ink-soft);
  margin-bottom: 16px;
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

label {
  display: grid;
  gap: 8px;
  font-size: 0.86rem;
  color: var(--ink-soft);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #ddd2c5;
  background: var(--white);
  min-height: 48px;
  padding: 12px 14px;
  outline: none;
  border-radius: 0;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--ink);
}

.is-invalid {
  border-color: #a65b46 !important;
}

.form-status {
  padding: 12px 14px;
  font-size: 0.92rem;
}

.form-status[data-state="success"] {
  background: #e8f0e4;
  color: #35553a;
}

.form-status[data-state="error"] {
  background: #f7e8e3;
  color: #7a3b2e;
}

/* Footer */
.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--line);
}

.footer-cta {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr 0.9fr;
  gap: 32px;
  padding: 54px 0 42px;
  align-items: start;
}

.footer-cta h2 {
  font-family: var(--font-serif);
  font-size: clamp(2.1rem, 3.4vw, 2.8rem);
  font-weight: 500;
  line-height: 1.12;
  margin-bottom: 10px;
}

.footer-cta p {
  color: var(--ink-soft);
  margin-bottom: 22px;
  max-width: 42ch;
}

.footer-meta {
  display: flex;
  gap: 12px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.footer-meta svg {
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 4px;
}

.footer-mark {
  justify-self: end;
  text-align: right;
}

.footer-mark .script {
  font-family: var(--font-script);
  font-size: 2rem;
  color: var(--sage);
  line-height: 1.1;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px 0 22px;
  border-top: 1px solid #eadfd3;
  color: var(--muted);
  font-size: 0.82rem;
}

.footer-links,
.social-links {
  display: flex;
  gap: 18px;
  align-items: center;
}

.social-links svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
}

.social-links a:hover,
.footer-links a:hover {
  color: var(--ink);
}

/* Inner legal pages */
.page-hero {
  background: var(--bg);
  padding: 72px 0 48px;
}

.page-hero h1 {
  margin-top: 12px;
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 5vw, 4.2rem);
  font-weight: 500;
  line-height: 0.95;
}

.page-section {
  padding: 56px 0 80px;
}

.prose {
  max-width: 68ch;
  color: var(--ink-soft);
}

.prose h2 {
  font-family: var(--font-serif);
  color: var(--ink);
  font-size: 1.8rem;
  font-weight: 500;
  margin: 28px 0 10px;
}

.prose p + p,
.prose ul {
  margin-top: 14px;
}

.prose ul {
  padding-left: 18px;
  list-style: disc;
}

.sitemap-list {
  display: grid;
  gap: 10px;
  font-size: 1.05rem;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 1366px) {
  .hero-copy h1 {
    font-size: clamp(3.2rem, 5.6vw, 5.2rem);
  }

  .nav-list {
    gap: 14px;
  }
}

@media (max-width: 1200px) {
  .header-motto {
    display: none;
  }
}

@media (max-width: 1024px) {
  .header-inner {
    grid-template-columns: 1fr auto;
  }

  .nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--bg);
    padding: 16px 24px 24px;
    border-bottom: 1px solid var(--line);
  }

  .nav.is-open {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .nav-toggle {
    display: grid;
    place-items: center;
  }

  .hero-grid,
  .purpose-grid,
  .lab-card,
  .contact-grid,
  .footer-cta {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    min-height: 0;
  }

  .hero-visual {
    min-height: 460px;
  }

  .hero-copy {
    padding: 36px 0 48px;
  }

  .hero-script {
    font-size: 1.6rem;
    right: 6%;
  }

  .service-grid,
  .process-steps {
    grid-template-columns: repeat(3, 1fr);
  }

  .process-steps::before {
    display: none;
  }

  .featured-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-mark {
    justify-self: start;
    text-align: left;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .purpose-panel,
  .purpose-photo img,
  .lab-photo img {
    min-height: 420px;
  }
}

@media (max-width: 767px) {
  .container,
  .container-wide {
    width: min(calc(100% - 32px), var(--max));
  }

  .header-actions .btn {
    display: none;
  }

  .hero-copy h1 {
    font-size: clamp(3.2rem, 14vw, 4.4rem);
  }

  .hero-quote {
    font-size: 0.95rem;
    right: 16px;
    bottom: 16px;
  }

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

  .process-steps {
    grid-template-columns: 1fr;
    gap: 0;
    border-left: 1px solid #ded3c6;
    margin-left: 16px;
    padding-left: 22px;
  }

  .process-step {
    text-align: left;
    padding: 0 0 28px;
  }

  .process-step p {
    margin: 0;
    max-width: none;
  }

  .step-index {
    margin: 0 0 12px;
  }

  .purpose-panel,
  .lab-copy {
    padding: 32px 24px;
    min-height: 0;
  }

  .purpose-photo img,
  .lab-photo img,
  .lab-side img {
    min-height: 320px;
    height: 360px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .work-card:hover img {
    transform: none;
  }
}
