:root {
  color-scheme: light;
  --brand: #105080;
  --brand-dark: #0a3556;
  --brand-soft: #eaf4fb;
  --ink: #102334;
  --muted: #5d7080;
  --line: #dbe6ed;
  --panel: #ffffff;
  --wash: #f5f9fc;
  --shadow: 0 24px 70px rgba(16, 80, 128, 0.16);
  --radius: 8px;
  --container: min(1120px, calc(100vw - 40px));
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #ffffff;
  color: var(--ink);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@keyframes hero-rise {
  from {
    opacity: 0.88;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-backdrop-in {
  from {
    opacity: 0.96;
    transform: translateX(-50%) scale(1.012);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) scale(1);
  }
}

@keyframes nav-drop {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes soft-float {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(0, -8px, 0);
  }
}

body {
  margin: 0;
  min-width: 320px;
  line-height: 1.5;
  background:
    radial-gradient(circle at top left, rgba(16, 80, 128, 0.09), transparent 28rem),
    linear-gradient(180deg, #ffffff 0%, #f7fbfd 49%, #ffffff 100%);
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  width: var(--container);
  min-height: 72px;
  margin: 0 auto;
  padding: 7px 0;
  transition: padding 180ms ease, background 180ms ease;
}

.site-header::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: 72px;
  z-index: -1;
  background: rgba(255, 255, 255, 0.84);
  border-bottom: 1px solid rgba(219, 230, 237, 0.75);
  backdrop-filter: blur(18px);
}

.site-header::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #0b4f7c 0%, #1c7298 100%);
  transform-origin: left center;
  transform: scaleX(var(--scroll-progress, 0));
  opacity: 0.92;
  pointer-events: none;
}

.brand {
  grid-column: 1;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: clamp(170px, 15vw, 214px);
  height: 56px;
  overflow: hidden;
  transition: transform 180ms ease;
}

.brand:hover,
.brand:focus-visible {
  transform: translateY(-1px);
}

.brand-mark,
.brand-wordmark {
  display: block;
  object-fit: contain;
  object-position: left center;
  flex: 0 0 auto;
}

.brand-mark {
  width: 42px;
  height: 52px;
}

.brand-wordmark {
  width: min(158px, calc(100vw - 150px));
  height: 48px;
}

.site-nav {
  grid-column: 2;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--brand-dark);
  font-size: 0.94rem;
  font-weight: 650;
}

.site-nav a {
  position: relative;
  transition: color 180ms ease, transform 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--brand);
  transform: translateY(-1px);
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -7px;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--brand);
  transition: transform 180ms ease;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  justify-self: end;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--brand);
  transition: border 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(16, 80, 128, 0.32);
  box-shadow: 0 10px 22px rgba(16, 80, 128, 0.12);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

.section-shell {
  width: var(--container);
  margin: 0 auto;
}

main section[id] {
  scroll-margin-top: 96px;
}

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: calc(100svh - 72px);
  padding: clamp(64px, 10vh, 108px) 0;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  pointer-events: none;
}

.hero::before {
  z-index: -2;
  background-image: image-set(
    url("../images/optimized/hero/dental-lab-hero-background-1600.avif") type("image/avif"),
    url("../images/optimized/hero/dental-lab-hero-background-1600.jpg") type("image/jpeg")
  );
  background-position: center right;
  background-size: cover;
  background-repeat: no-repeat;
  animation: hero-backdrop-in 1100ms ease-out both;
}

.hero::after {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.9) 32%, rgba(255, 255, 255, 0.54) 56%, rgba(255, 255, 255, 0.14) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.82) 0%, rgba(255, 255, 255, 0.08) 34%, rgba(245, 249, 252, 0.9) 100%);
}

@media (min-width: 921px) and (prefers-reduced-motion: no-preference) {
  .hero::before {
    background-attachment: fixed;
  }
}

.hero-copy {
  max-width: 680px;
  animation: hero-rise 700ms 120ms ease-out both;
}

.hero-copy .section-label {
  animation: hero-rise 560ms 120ms ease-out both;
}

.hero-copy h1 {
  animation: hero-rise 720ms 180ms ease-out both;
}

.hero-copy > p:not(.section-label) {
  animation: hero-rise 760ms 250ms ease-out both;
}

.hero-actions {
  animation: hero-rise 780ms 320ms ease-out both;
}

.section-label {
  margin: 0 0 14px;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 680px;
  margin: 0;
  color: var(--brand-dark);
  font-size: clamp(3.35rem, 6vw, 5.35rem);
  line-height: 0.96;
  letter-spacing: 0;
  overflow-wrap: normal;
  word-break: normal;
}

h2 {
  margin: 0;
  color: var(--brand-dark);
  font-size: clamp(2rem, 4vw, 3.9rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  color: var(--brand-dark);
  font-size: 1.08rem;
  line-height: 1.25;
}

.hero-copy > p:not(.section-label),
.section-heading > p,
.workflow-inner > div > p,
.about-copy p,
.contact-copy > p {
  max-width: 62ch;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.06rem;
}

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

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

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

.button.primary {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 14px 30px rgba(16, 80, 128, 0.22);
}

.button.primary::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(118deg, rgba(255, 255, 255, 0) 16%, rgba(255, 255, 255, 0.24) 44%, rgba(255, 255, 255, 0) 70%);
  transform: translateX(-125%);
  transition: transform 560ms ease;
}

.button.primary:hover,
.button.primary:focus-visible {
  box-shadow: 0 18px 36px rgba(16, 80, 128, 0.28);
}

.button.primary:hover::after,
.button.primary:focus-visible::after {
  transform: translateX(125%);
}

.button.secondary {
  border-color: rgba(16, 80, 128, 0.22);
  background: #fff;
  color: var(--brand);
}

.button.secondary:hover,
.button.secondary:focus-visible {
  border-color: rgba(16, 80, 128, 0.42);
  box-shadow: 0 14px 30px rgba(16, 80, 128, 0.1);
}

.intro-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  width: var(--container);
  margin: -26px auto 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  box-shadow: 0 14px 45px rgba(16, 80, 128, 0.08);
}

.intro-band div {
  padding: 24px;
  background: #fff;
  transition: background 180ms ease, transform 180ms ease;
}

.intro-band div:hover {
  background: #fbfdff;
  transform: translateY(-1px);
}

.intro-band strong {
  display: block;
  color: var(--brand-dark);
  font-size: 1.1rem;
}

.intro-band span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

.services {
  padding: 112px 0 96px;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(280px, 0.6fr);
  gap: 42px;
  align-items: end;
  margin-bottom: 46px;
}

.section-heading .section-label {
  grid-column: 1 / -1;
  margin-bottom: -20px;
}

.section-heading > p {
  margin-top: 0;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.service-card {
  position: relative;
  overflow: hidden;
  min-height: 430px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 16px 42px rgba(16, 80, 128, 0.06);
  transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}

.service-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(138deg, rgba(255, 255, 255, 0) 25%, rgba(16, 80, 128, 0.09) 62%, rgba(255, 255, 255, 0) 100%);
  opacity: 0;
  transition: opacity 260ms ease;
  pointer-events: none;
}

.service-card:hover,
.service-card:focus-within {
  transform: translateY(-4px);
  border-color: rgba(16, 80, 128, 0.25);
  box-shadow: 0 22px 56px rgba(16, 80, 128, 0.11);
}

.service-card:hover::after,
.service-card:focus-within::after {
  opacity: 1;
}

.service-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--brand-soft);
}

.service-media picture,
.service-media img {
  display: block;
  width: 100%;
  height: 100%;
}

.service-media img {
  object-fit: cover;
  transition: transform 260ms ease;
}

.service-card:hover .service-media img {
  transform: scale(1.04);
}

.service-icon {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 50%;
  color: var(--brand);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 24px rgba(16, 35, 52, 0.13);
  font-size: 0.78rem;
  font-weight: 800;
  backdrop-filter: blur(10px);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.service-card:hover .service-icon,
.service-card:focus-within .service-icon {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(16, 35, 52, 0.18);
}

.service-body {
  padding: 24px;
}

.service-card p,
.workflow-steps span {
  margin: 14px 0 0;
  color: var(--muted);
}

.workflow {
  padding: 88px 0;
  background: linear-gradient(135deg, #0a3556 0%, #105080 58%, #1c7298 100%);
  color: #fff;
}

.workflow-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(320px, 0.86fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.workflow .section-label,
.workflow h2,
.workflow p,
.workflow-steps span {
  color: #fff;
}

.workflow-inner > div > p {
  color: #eaf7ff;
  opacity: 0.96;
}

.workflow-steps span {
  opacity: 0.84;
}

.workflow-steps {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: workflow;
}

.workflow-steps li {
  position: relative;
  padding: 22px 22px 22px 72px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  transition: background 200ms ease, border-color 200ms ease, transform 200ms ease;
}

.workflow-steps li:hover {
  transform: translateX(4px);
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.12);
}

.workflow-steps li::before {
  counter-increment: workflow;
  content: counter(workflow, decimal-leading-zero);
  position: absolute;
  top: 22px;
  left: 22px;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 850;
  transition: color 220ms ease;
}

.workflow-steps strong {
  display: block;
  font-size: 1.08rem;
}

.workflow-steps li:hover::before {
  color: rgba(255, 255, 255, 0.9);
}

.about {
  display: grid;
  grid-template-columns: minmax(280px, 0.76fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  padding: 106px 0;
}

.about-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 20px 52px rgba(16, 80, 128, 0.08);
  transition: box-shadow 220ms ease, transform 220ms ease;
}

.about-mark:hover {
  transform: translateY(-3px);
  box-shadow: 0 26px 62px rgba(16, 80, 128, 0.12);
}

.about-mark img {
  width: min(70%, 390px);
  animation: soft-float 6s ease-in-out infinite;
}

.contact {
  padding: 96px 0;
  background: var(--wash);
}

.contact-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(360px, 0.84fr);
  gap: clamp(32px, 5vw, 72px);
}

.contact-details {
  display: grid;
  gap: 8px;
  margin-top: 30px;
  color: var(--brand-dark);
  font-weight: 720;
}

.contact-details span {
  color: var(--muted);
  font-weight: 600;
}

.contact-form {
  display: grid;
  gap: 16px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 20px 52px rgba(16, 80, 128, 0.09);
  transition: box-shadow 220ms ease, transform 220ms ease;
}

.contact-form:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 26px 62px rgba(16, 80, 128, 0.13);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--brand-dark);
  font-size: 0.88rem;
  font-weight: 760;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: #fbfdff;
  color: var(--ink);
  outline: none;
  transition: border 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(16, 80, 128, 0.72);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(16, 80, 128, 0.12);
}

.honeypot {
  position: absolute;
  left: -9999px;
}

.form-submit {
  width: fit-content;
  min-width: 150px;
}

.turnstile-slot {
  display: none;
  min-height: 66px;
}

.turnstile-slot.is-ready {
  display: block;
}

.form-status {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.form-status[data-state="success"] {
  color: #147450;
}

.form-status[data-state="error"] {
  color: #a33838;
}

.motion-ready .reveal-item {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 560ms ease,
    transform 560ms cubic-bezier(0.2, 0.72, 0.18, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

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

.motion-ready .reveal-item[data-reveal="left"] {
  transform: translateX(-24px);
}

.motion-ready .reveal-item[data-reveal="right"] {
  transform: translateX(24px);
}

.motion-ready .reveal-item[data-reveal="scale"] {
  transform: scale(0.968);
}

.motion-ready .reveal-item[data-reveal="lift"] {
  transform: translateY(24px);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: var(--container);
  margin: 0 auto;
  padding: 32px 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 650;
}

.site-footer img {
  width: 188px;
  height: auto;
}

.site-footer-meta {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  font-weight: 600;
}

.site-footer-links a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer-links a:hover,
.site-footer-links a:focus-visible {
  color: var(--brand);
}

.legal-page {
  width: var(--container);
  margin: 0 auto;
  padding: 80px 0 64px;
}

.legal-card {
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 16px 42px rgba(16, 80, 128, 0.06);
}

.legal-card h1 {
  max-width: 20ch;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.02;
}

.legal-card h2 {
  margin-top: 30px;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.1;
}

.legal-card p,
.legal-card li {
  color: var(--muted);
  font-size: 1.01rem;
}

.legal-card ul {
  margin: 14px 0 0;
  padding-left: 20px;
}

.legal-updated {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

@media (max-width: 920px) {
  :root {
    --container: min(100vw - 28px, 720px);
  }

  .nav-toggle {
    display: inline-block;
    grid-column: 3;
  }

  .site-header {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .site-nav {
    grid-column: 1 / -1;
    position: fixed;
    top: 70px;
    left: 14px;
    right: 14px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
    animation: nav-drop 180ms ease-out both;
  }

  .site-nav a {
    padding: 14px;
  }

  .site-nav a::after {
    display: none;
  }

  .site-nav.legal-nav {
    grid-column: 2;
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-self: end;
    gap: 20px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .site-nav.legal-nav a {
    padding: 0;
  }

  .hero,
  .section-heading,
  .workflow-inner,
  .about,
  .contact-inner {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: calc(100svh - 72px);
    padding-top: 64px;
  }

  .hero::before {
    background-position: 58% center;
  }

  .hero::after {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.86) 48%, rgba(245, 249, 252, 0.94) 100%),
      linear-gradient(90deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.62) 100%);
  }

  h1 {
    max-width: 10ch;
    font-size: clamp(3rem, 12.4vw, 5rem);
  }

  .intro-band,
  .service-grid {
    grid-template-columns: 1fr;
  }

  .section-heading .section-label {
    margin-bottom: -10px;
  }

  .about-mark {
    min-height: 260px;
  }
}

@media (max-width: 620px) {
  .brand {
    gap: 8px;
    width: 184px;
    height: 54px;
  }

  .brand-mark {
    width: 40px;
    height: 50px;
  }

  .brand-wordmark {
    width: 136px;
    height: 46px;
  }

  .hero {
    padding-bottom: 52px;
  }

  .intro-band {
    margin-top: 0;
  }

  .services,
  .about,
  .contact {
    padding: 72px 0;
  }

  .workflow {
    padding: 72px 0;
  }

  .service-card {
    min-height: 0;
  }

  .form-row,
  .site-footer {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }

  .site-footer-meta {
    justify-items: start;
  }

  .site-footer-links {
    justify-content: flex-start;
  }

  .button,
  .form-submit {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .motion-ready .reveal-item {
    opacity: 1;
    transform: none;
  }

  .about-mark img {
    animation: none;
  }
}
