/* =====================================================================
   EP Dental Laboratory — website
   Palette and type match the printed price list leaflet.
   ===================================================================== */

/* ---------- Tokens ------------------------------------------------- */
:root {
  --blue: #0068c8;
  --blue-word: #1c6cb8;
  --blue-light: #8dbbea;

  --navy: #0a2240;
  --ink: #14202e;
  --muted: #5d6773;
  --ivory: #faf8f4;
  --stone: #f1ede6;
  --white: #ffffff;
  --rule: #e2dcd2;

  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
  --brand: "Montserrat", "Segoe UI", Helvetica, Arial, sans-serif;

  --container: 1180px;
  --gutter: clamp(20px, 4vw, 40px);
  --section-y: clamp(64px, 9vw, 120px);
  --radius: 2px;

  --header-h: 72px;
}

/* ---------- Base --------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
  min-width: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--navy);
  color: var(--white);
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

/* Visible focus for every interactive element */
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

/* ---------- Type --------------------------------------------------- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  font-family: var(--brand);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue);
}

.eyebrow::before {
  content: "";
  width: 28px;
  border-top: 1px solid currentColor;
}

.display {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.01em;
  color: var(--navy);
  text-wrap: balance;
}

.display em {
  font-style: italic;
  color: var(--blue);
}

.display--hero {
  font-size: clamp(2.6rem, 5.4vw, 4.6rem);
}

.display--section {
  font-size: clamp(2.1rem, 3.8vw, 3.1rem);
}

.lead {
  margin-top: 24px;
  max-width: 34em;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--ink);
}

/* ---------- Buttons ----------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 26px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--brand);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn--primary {
  background: var(--blue);
  color: var(--white);
}

.btn--primary:hover {
  background: #0058aa;
}

.btn--ghost {
  border-color: var(--navy);
  color: var(--navy);
  background: transparent;
}

.btn--ghost:hover {
  background: var(--navy);
  color: var(--white);
}

.btn--small {
  min-height: 42px;
  padding: 9px 20px;
}

.btn:disabled {
  opacity: 0.7;
  cursor: progress;
}

/* ---------- Header ------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 248, 244, 0.96);
  border-bottom: 1px solid var(--rule);
  backdrop-filter: blur(6px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: auto;
}

.brand__text {
  font-family: var(--brand);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
  line-height: 1.25;
}

.brand__text span {
  display: block;
  font-weight: 500;
  color: var(--blue-word);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 12px;
  background: none;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  font-family: var(--brand);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
  cursor: pointer;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--navy);
  content: "";
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle__bars {
  position: relative;
}

.nav-toggle__bars::before { position: absolute; top: -6px; left: 0; }
.nav-toggle__bars::after  { position: absolute; top: 6px;  left: 0; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
  transform: translateY(-6px) rotate(-45deg);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-nav__list {
  display: flex;
  gap: 28px;
}

.site-nav__list a {
  font-family: var(--brand);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--navy);
  padding: 6px 0;
  background-image: linear-gradient(var(--blue), var(--blue));
  background-size: 0 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.25s ease;
}

.site-nav__list a:hover {
  background-size: 100% 1px;
}

/* ---------- Hero --------------------------------------------------- */
.hero {
  position: relative;
  padding: clamp(56px, 8vw, 104px) 0 clamp(64px, 8vw, 110px);
  background:
    radial-gradient(circle at 92% 10%, rgba(0, 104, 200, 0.08), transparent 45%),
    var(--ivory);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(40px, 6vw, 88px);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

.hero__visual {
  position: relative;
}

.hero__visual::before {
  content: "";
  position: absolute;
  inset: 22px -22px -22px 22px;
  border: 1px solid var(--rule);
  z-index: -1;
}

/* ---------- Photography -------------------------------------------- */
.hero__photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 40%;
}

/* ---------- Trust strip -------------------------------------------- */
.strip {
  background: var(--navy);
  color: var(--white);
}

.strip__list {
  display: grid;
  grid-template-columns: repeat(5, auto);
  justify-content: space-between;
  gap: 18px 32px;
  padding-block: 22px;
}

.strip__list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--brand);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.strip__num {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--blue-light);
}

/* ---------- Sections ----------------------------------------------- */
.section {
  padding: var(--section-y) 0;
}

.section--tint {
  background: var(--stone);
}

.section-head {
  max-width: 720px;
  margin-bottom: clamp(40px, 5vw, 64px);
}

.section-head__lead {
  margin-top: 18px;
  color: var(--muted);
  max-width: 38em;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}

.prose p + p {
  margin-top: 1.1em;
}

.prose p {
  font-size: 1.05rem;
}

.centered {
  margin-top: 48px;
  text-align: center;
}

/* ---------- Service cards ------------------------------------------ */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--navy);
}

.card {
  padding: 36px 32px 40px 0;
}

.card + .card {
  padding-left: 32px;
  border-left: 1px solid var(--rule);
}

.card__num {
  font-family: var(--serif);
  font-size: 2rem;
  line-height: 1;
  color: var(--blue);
  margin-bottom: 18px;
}

.card__title {
  font-family: var(--serif);
  font-size: 1.9rem;
  font-weight: 400;
  color: var(--navy);
  margin-bottom: 12px;
}

.card > p {
  color: var(--muted);
}

.card__list {
  margin-top: 22px;
  border-top: 1px solid var(--rule);
}

.card__list li {
  position: relative;
  padding: 10px 0 10px 18px;
  border-bottom: 1px solid var(--rule);
  font-size: 0.95rem;
}

.card__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.05em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
}

/* ---------- Gallery ------------------------------------------------ */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.gallery__item {
  margin: 0;
}

.gallery__item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.gallery__item figcaption {
  margin-top: 12px;
  font-family: var(--brand);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Team --------------------------------------------------- */
.team {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(32px, 5vw, 72px);
}

.profile__photo {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  margin-bottom: 24px;
}

.profile__name {
  font-family: var(--serif);
  font-size: 2.2rem;
  font-weight: 400;
  color: var(--navy);
}

.profile__role {
  margin: 4px 0 14px;
  font-family: var(--brand);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
}

.profile > p:last-child {
  max-width: 34em;
  color: var(--ink);
}

/* ---------- Digital workflow -------------------------------------- */
.logo-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
  align-self: center;
}

.logo-row li {
  display: flex;
  align-items: center;
  min-height: 110px;
  border-bottom: 1px solid var(--rule);
  padding: 0 8px;
}

.logo-row__img {
  width: auto;
}

.logo-row__img--itero  { height: 34px; }
.logo-row__img--3shape { height: 30px; }
.logo-row__img--medit  { height: 22px; }

/* ---------- Contact ------------------------------------------------ */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}

.contact-info > p:not(.eyebrow) {
  margin-top: 18px;
  color: var(--muted);
  max-width: 30em;
}

.contact-list {
  margin-top: 36px;
  border-top: 1px solid var(--rule);
}

.contact-list > div {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}

.contact-list dt {
  font-family: var(--brand);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
  padding-top: 4px;
}

.contact-list dd a,
.contact-list dd {
  color: var(--navy);
}

.contact-list dd a {
  display: block;
  text-decoration: none;
  font-family: var(--brand);
  font-weight: 500;
}

.contact-list dd a:hover {
  color: var(--blue);
}

.contact-list__name {
  display: inline-block;
  min-width: 4.5em;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--muted);
}

.form-card {
  padding: clamp(28px, 4vw, 48px);
  background: var(--white);
  border: 1px solid var(--rule);
  box-shadow: 0 1px 0 rgba(10, 34, 64, 0.04), 0 18px 40px -28px rgba(10, 34, 64, 0.35);
}

.form {
  display: grid;
  gap: 22px;
}

.form__hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form__notice {
  padding: 12px 16px;
  background: var(--stone);
  border-left: 3px solid var(--blue);
  font-size: 0.9rem;
  color: var(--ink);
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.field {
  display: grid;
  gap: 8px;
  align-content: start;
}

.field label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--navy);
}

.req {
  color: var(--blue);
}

.optional {
  font-weight: 400;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid #c9d1db;
  border-radius: var(--radius);
  background: var(--white);
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field textarea {
  resize: vertical;
  min-height: 130px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 104, 200, 0.18);
}

.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: #b3261e;
  border-width: 2px;
}

.field__error {
  font-size: 0.86rem;
  font-weight: 500;
  color: #b3261e;
}

.field--check {
  grid-template-columns: 20px 1fr;
  align-items: start;
  gap: 12px;
}

.field--check input {
  width: 20px;
  height: 20px;
  min-height: 0;
  margin-top: 3px;
  accent-color: var(--blue);
}

.field--check label {
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--ink);
}

.field--check label a {
  color: var(--blue);
}

.form__submit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
}

.form__submit .btn {
  min-width: 200px;
}

.form__status {
  font-size: 0.92rem;
  color: var(--muted);
}

.form__status[data-state="error"] {
  color: #b3261e;
  font-weight: 500;
}

/* ---------- Footer ------------------------------------------------- */
.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.82);
  padding-top: clamp(56px, 7vw, 88px);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1.2fr 1fr;
  gap: 40px;
}

.footer-brand img {
  width: 72px;
  height: auto;
  margin-bottom: 20px;
}

.footer-brand p {
  max-width: 24em;
  font-size: 0.92rem;
}

.footer-title {
  margin-bottom: 14px;
  font-family: var(--brand);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue-light);
}

.footer-nav ul {
  display: grid;
  gap: 10px;
}

.footer-nav a,
.footer-contact a,
.footer-base a {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
}

.footer-nav a:hover,
.footer-contact a:hover,
.footer-base a:hover {
  color: var(--white);
  text-decoration: underline;
}

.footer-contact p {
  margin-bottom: 8px;
  font-size: 0.92rem;
}

.footer-reg__text {
  margin-top: 12px;
  font-size: 0.85rem;
  line-height: 1.5;
}

.footer-reg__logo {
  width: 84px;
  height: auto;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: clamp(48px, 6vw, 72px);
  padding-block: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.82rem;
}

/* ---------- Thank-you & privacy pages ----------------------------- */
.page {
  min-height: calc(100vh - var(--header-h));
  padding: clamp(64px, 10vw, 128px) 0;
}

.page__inner {
  max-width: 720px;
}

.page h1 {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 400;
  line-height: 1.05;
  color: var(--navy);
  margin-bottom: 24px;
}

.page h1 em {
  font-style: italic;
  color: var(--blue);
}

.page h2 {
  margin: 40px 0 12px;
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 400;
  color: var(--navy);
}

.page p + p {
  margin-top: 1em;
}

.page .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

/* ---------- Responsive --------------------------------------------- */
@media (max-width: 1080px) {
  .site-nav__list {
    gap: 20px;
  }

  .strip__list {
    grid-template-columns: repeat(3, auto);
    justify-content: start;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  :root {
    --header-h: 64px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    z-index: 60;
    flex-direction: column;
    justify-content: flex-start;
    gap: 36px;
    padding: 40px var(--gutter);
    background: var(--ivory);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.35s ease, visibility 0.35s;
    overflow-y: auto;
  }

  .site-nav.is-open {
    transform: translateX(0);
    visibility: visible;
  }

  .site-nav__list {
    flex-direction: column;
    gap: 0;
    width: 100%;
  }

  .site-nav__list li {
    border-bottom: 1px solid var(--rule);
  }

  .site-nav__list a {
    display: block;
    padding: 18px 0;
    font-family: var(--serif);
    font-size: 1.7rem;
    font-weight: 400;
    letter-spacing: 0;
  }

  .site-nav__cta {
    width: 100%;
  }

  .hero__grid,
  .split,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero__visual {
    max-width: 480px;
    width: 100%;
  }

  .cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .card,
  .card + .card {
    padding: 32px 0;
    border-left: 0;
    border-bottom: 1px solid var(--rule);
  }

  .card:last-child {
    border-bottom: 0;
  }

  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .team {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .strip__list {
    grid-template-columns: 1fr 1fr;
  }

  .form__row {
    grid-template-columns: minmax(0, 1fr);
  }

  .contact-list > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero__actions .btn {
    flex: 1 1 100%;
  }
}

/* ---------- Reduced motion ----------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
