:root {
  color-scheme: light;
  --bg: #100c0a;
  --bg-soft: #1b1410;
  --bg-cream: #e8dfd6;
  --text: #f6efe8;
  --text-muted: rgba(246, 239, 232, 0.7);
  --ink: #2c221b;
  --accent: #d69a6c;
  --accent-dark: #b47b52;
  --line: rgba(255, 255, 255, 0.08);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  --radius: 24px;
  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-body: "Sora", "Trebuchet MS", sans-serif;
  --success: #4caf50;
  --error: #f44336;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

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

.page {
  overflow-x: hidden;
}

.hero {
  position: relative;
  min-height: 100vh;
  padding: 40px 7vw 80px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  isolation: isolate;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background: url("assets/hero/hero_bg.jpg") center/cover no-repeat;
  z-index: -2;
  filter: brightness(0.35) saturate(1.2);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 4, 3, 0.6) 0%, rgba(5, 4, 3, 0.9) 60%, rgba(8, 6, 5, 1) 100%);
  z-index: -1;
}

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

.nav__logo {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 600;
}

.nav__mark {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  letter-spacing: 2px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.nav__mark img {
  width: 70%;
  height: 70%;
  object-fit: contain;
}
.nav__brand {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 1px;
}

.nav__links {
  display: flex;
  gap: 24px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav__links a {
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.nav__links a:hover {
  color: var(--accent);
}

.hero__content {
  max-width: 680px;
  margin-top: 0;
  align-self: center;
  text-align: left;
  position: absolute;
  left: 20%;
  top: 32%;
  transform: translate(-50%, -50%);
  animation: heroIn 1.2s ease both;
}

.hero__eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 13px;
  margin-bottom: 12px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  margin: 0 0 16px;
}

@media (min-width: 1100px) {
  .hero h1 {
    white-space: nowrap;
    letter-spacing: -0.5px;
  }
}

.hero__lead {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 520px;
}

.hero__actions {
  display: flex;
  gap: 16px;
  margin-top: 32px;
  flex-wrap: wrap;
}


.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: transform 0.2s ease, background 0.2s ease, border 0.2s ease;
}

.btn--solid {
  background: var(--accent);
  color: #1c140f;
}

.btn--solid:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
}

.btn--ghost {
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--text);
  background: rgba(0, 0, 0, 0.3);
}

.btn--ghost:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  color: var(--accent);
}

.hero__side {
  position: absolute;
  left: -60px;
  bottom: 120px;
  transform: rotate(-90deg);
  display: flex;
  gap: 12px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.5);
}

.hero__side-accent {
  color: var(--text);
}

/* Certification Badge Styling */
.cert-badge img {
  width: 100px;
  height: 100px;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,0.4));
}

/* Desktop Floating Badge */
#certification-badge-floating {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
  animation: badgeFadeIn 1s ease 0.5s both;
}

#certification-badge-floating:hover {
  transform: scale(1.1) translateY(-5px);
}

/* Hide floating badge on mobile */
@media (max-width: 900px) {
  #certification-badge-floating {
    display: none;
  }
}

/* Hero Badge (Mobile only) */
#certification-badge-hero {
  display: none;
  margin-top: 48px; /* Added more space here */
  animation: heroIn 1.2s ease 0.3s both;
}

#certification-badge-hero .cert-badge img {
  width: 90px;
  height: 90px;
}

@media (max-width: 900px) {
  #certification-badge-hero {
    display: block;
  }
}

/* Adjust floating badge position when privacy popup is active */
body:has(.privacy-popup:not([hidden])) #certification-badge-floating {
  transform: translateY(-100px);
}

@keyframes badgeFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.section {
  padding: 90px 7vw;
}

.section__header {
  max-width: 700px;
  margin-bottom: 48px;
}

.section__kicker {
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 12px;
}

.section__header h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0 0 12px;
}

.section__sub {
  color: var(--text-muted);
}

.services {
  background: var(--bg-cream);
  color: var(--ink);
}

.services .section__kicker {
  color: #915a35;
}

.services .section__sub {
  color: rgba(44, 34, 27, 0.8);
}

.services__slider {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
}

.services__viewport {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 16px 24px 24px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.services__track {
  display: flex;
  flex-wrap: nowrap;
  gap: clamp(12px, 2vw, 18px);
  width: max-content;
  padding: 6px;
  align-items: stretch;
}

.services__viewport::-webkit-scrollbar {
  display: none;
}

.service-card {
  flex: 0 0 clamp(240px, 40vw, 320px);
  max-width: 340px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(44, 34, 27, 0.1);
  padding: 26px;
  border-radius: 28px;
  box-shadow: 0 18px 40px rgba(50, 32, 22, 0.12);
  transition: transform 0.2s ease;
  scroll-snap-align: center;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 220px;
}

.service-card:hover {
  transform: translateY(-6px);
}

.service-card__icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(201, 143, 98, 0.18);
  color: var(--accent-dark);
  margin-bottom: 16px;
}

.service-card__icon svg {
  width: 30px;
  height: 30px;
}

.service-card h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 22px;
  color: #2f221a;
}

.service-card p {
  color: #6b5b4f;
  margin: 0;
}

.services__nav {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(44, 34, 27, 0.2);
  background: rgba(255, 255, 255, 0.6);
  color: var(--accent-dark);
  font-size: 26px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.services__nav:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.9);
}


.gallery {
  background: radial-gradient(circle at top, rgba(201, 143, 98, 0.08), transparent 50%), var(--bg);
}

.gallery__controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.chip {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-muted);
  padding: 8px 18px;
  border-radius: 999px;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 1.5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip.is-active {
  background: var(--accent);
  color: #1b120d;
  border-color: transparent;
}

.gallery__slider {
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  padding: 28px;
  background: rgba(12, 9, 7, 0.7);
  box-shadow: var(--shadow);
}

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 180px;
  gap: 16px;
  transition: opacity 0.4s ease;
}

.gallery__grid.is-exiting .tile {
  animation: tileOut 0.6s ease forwards;
}

.gallery__grid.is-entering .tile {
  animation: tileIn 0.7s ease forwards;
}

.tile {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0d0b09;
}

.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tile--mini img {
  object-position: center bottom;
}

.tile--hero {
  grid-column: 1 / 3;
  grid-row: 1 / 3;
}

.tile--wide {
  grid-column: 3 / 5;
  grid-row: 1 / 2;
}

.tile--stack {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 16px;
  background: transparent;
  border: none;
  grid-column: 3 / 4;
  grid-row: 2 / 4;
}

.tile--stack img {
  border-radius: 20px;
  height: 100%;
}

.tile--caption {
  grid-column: 1 / 3;
  grid-row: 3 / 4;
  background: linear-gradient(160deg, rgba(201, 143, 98, 0.2), rgba(12, 9, 7, 0.95));
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.tile--caption h3 {
  font-family: var(--font-display);
  font-size: 26px;
  margin: 0 0 12px;
}

.tile--mini {
  grid-column: 4 / 5;
  grid-row: 2 / 4;
}

.tile__overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 20px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.7), transparent);
}

.tile__overlay p {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 20px;
}

.tile__overlay span {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
}

.gallery__nav {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
}

.about {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
  align-items: center;
  background: var(--bg-cream);
  color: var(--ink);
}

.about h2 {
  font-family: var(--font-display);
}

.about__image img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.map {
  padding: 0;
}

.map__frame {
  position: relative;
  width: 100%;
  height: 420px;
  overflow: hidden;
}

.map__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(232, 223, 214, 0.14) 0%, rgba(16, 12, 10, 0.08) 100%),
    linear-gradient(135deg, rgba(214, 154, 108, 0.16) 0%, rgba(43, 29, 20, 0.12) 100%);
}

.map__frame iframe {
  border: 0;
  width: 100%;
  height: 100%;
  filter: grayscale(0.45) sepia(0.18) saturate(0.85) contrast(1.05) brightness(0.96);
}

.contact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
  background: var(--bg-soft);
}

.contact__info a {
  color: var(--accent);
}

.contact__note {
  color: rgba(255, 255, 255, 0.6);
  margin-top: 16px;
}

.contact__form {
  display: grid;
  gap: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  padding: 28px;
  border-radius: var(--radius);
}

.captcha {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-size: 14px;
}

.captcha__label {
  color: rgba(255, 255, 255, 0.8);
}

.captcha__hint {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

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

input,
textarea {
  width: 100%;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  color: var(--text);
  font-family: var(--font-body);
}

input:focus,
textarea:focus {
  outline: 2px solid rgba(201, 143, 98, 0.5);
}

.form__status {
  padding: 12px;
  border-radius: 12px;
  font-size: 14px;
  text-align: center;
}

.form__status--success {
  background: rgba(76, 175, 80, 0.1);
  color: var(--success);
  border: 1px solid rgba(76, 175, 80, 0.3);
}

.form__status--error {
  background: rgba(244, 67, 54, 0.1);
  color: var(--error);
  border: 1px solid rgba(244, 67, 54, 0.3);
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 30px 7vw 40px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--text-muted);
}

/* Privacy Popup */
.privacy-popup {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: 400px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px 24px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 20px;
  z-index: 1000;
  animation: popupIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.privacy-popup[hidden] {
  display: none;
}

.privacy-popup.is-hiding {
  animation: popupOut 0.5s cubic-bezier(0.7, 0, 0.84, 0) forwards;
}

.privacy-popup__content h3 {
  font-family: var(--font-display);
  font-size: 18px;
  margin: 0 0 4px;
  color: var(--accent);
}

.privacy-popup__content p {
  font-size: 13px;
  margin: 0;
  color: var(--text-muted);
  line-height: 1.4;
}

.btn--small {
  padding: 8px 20px;
  font-size: 12px;
  flex-shrink: 0;
}

@keyframes popupIn {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes popupOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(20px) scale(0.95); }
}

@keyframes heroIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes tileIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes tileOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
  }
}

@media (max-width: 1100px) {
  .gallery__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 200px;
  }

  .tile--hero,
  .tile--wide,
  .tile--caption,
  .tile--mini,
  .tile--stack {
    grid-column: span 2;
    grid-row: auto;
  }
}

@media (max-width: 900px) {
  .nav__links {
    display: none;
  }

  .hero {
    min-height: 100svh;
    padding: 30px 6vw 56px;
    justify-content: flex-start;
  }

  .hero__side {
    display: none;
  }

  .hero__content {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    margin-top: clamp(52px, 9vh, 100px);
    max-width: min(92vw, 560px);
    align-self: flex-start;
  }

  .hero__lead {
    max-width: 100%;
  }

  #certification-badge-hero {
    margin-top: 28px;
  }

  .about,
  .contact {
    grid-template-columns: 1fr;
  }

  .services__slider {
    grid-template-columns: 1fr;
  }

  .services__nav {
    display: none;
  }

  .services__viewport {
    padding: 12px 12px 20px;
    scroll-padding-inline: 12px;
  }
}

@media (max-width: 700px) {
  .service-card {
    max-width: none;
    padding: 20px;
    min-height: 200px;
  }

  .gallery__grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 220px;
  }

  .tile--hero,
  .tile--wide,
  .tile--caption,
  .tile--mini,
  .tile--stack {
    grid-column: span 1;
    grid-row: auto;
  }

  .form__row {
    grid-template-columns: 1fr;
  }

  .footer {
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 600px) {
  .privacy-popup {
    left: 16px;
    right: 16px;
    bottom: 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .privacy-popup .btn {
    align-self: flex-end;
  }
}
