/* ==========================================================================
   PHdigital.org
   ========================================================================== */

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

:root {
  --navy: #1f3a5f;
  --orange: #f59e0b;
  --offwhite: #fafaf8;
  --grey: #d1d5db;
}

html,
body {
  width: 100%;
  height: 100%;
  font-family: "Inter", sans-serif;
  overflow: hidden;
  background: var(--offwhite);
}

/* ==========================================================================
   INTRO OVERLAY (logo spin, plays on every page load)
   ========================================================================== */

#intro {
  position: fixed;
  inset: 0;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  pointer-events: none;
  transition: opacity 0.4s ease-in;
}

.scene {
  perspective: 800px;
}

#logo-spin {
  display: block;
  width: clamp(140px, 22vw, 220px);
  animation: coinSpin 2s ease-in-out forwards;
}

@keyframes coinSpin {
  0% {
    transform: rotateY(0deg);
    opacity: 1;
  }
  25% {
    transform: rotateY(90deg);
    opacity: 0.7;
  }
  50% {
    transform: rotateY(180deg);
    opacity: 0.4;
  }
  75% {
    transform: rotateY(270deg);
    opacity: 0.1;
  }
  100% {
    transform: rotateY(360deg);
    opacity: 0.1;
  }
}

/* Persistent centered watermark logo, revealed after intro */
#logo-bg {
  position: fixed;
  top: 50%;
  left: 50%;
  width: clamp(140px, 22vw, 220px);
  transform: translate(-50%, -50%);
  opacity: 0;
  z-index: 1;
  pointer-events: none;
  transition: opacity 0.6s ease-out;
}

/* ==========================================================================
   PAGE LAYOUT - header and footer stay fixed in place; the content
   between them (.main-scroll) scrolls. Same model at every screen size.
   ========================================================================== */

.wrapper {
  position: fixed;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  transition: transform 0.7s cubic-bezier(0.6, 0, 0.85, 0.35);
}

/* Exit-transition state: whole page slides right before navigating away */
.wrapper.exit {
  transform: translateX(100vw);
}

header,
footer {
  flex-shrink: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.85);
}

/* Scrollable region between the fixed header and footer */
.main-scroll {
  flex: 1;
  min-height: 0;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.85);
}

.row1,
.row2 {
  width: 100%;
  flex-shrink: 0;
  min-height: 420px;
}

.single-block {
  width: 100%;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 4rem;
  transform: translateY(-300px);
  transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.wrapper.animate .single-block {
  transform: translateY(0);
}

.single-block h1 {
  color: var(--navy);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin-bottom: 1rem;
}

.single-block p {
  color: var(--navy);
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 60ch;
  margin-bottom: 0.8rem;
}

/* ==========================================================================
   HEADER / NAV
   ========================================================================== */

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 2rem;
  transform: translateY(-200px);
  transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
  background: transparent;
  overflow: visible;
  position: relative;
  z-index: 5;
}

.header-spacer {
  width: 190px;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 190px;
  background: var(--orange);
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.2s;
}

.header-cta:hover {
  background: #e08c00;
  animation: shake 0.35s ease;
}

.cta-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--orange);
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.6rem 1.6rem;
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.2s;
  border: none;
  cursor: pointer;
}

.cta-pill:hover {
  background: #e08c00;
  animation: shake 0.35s ease;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(250, 250, 248, 0.4);
  border: 1px solid rgba(31, 58, 95, 0.1);
  color: var(--orange);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.6rem 1.6rem;
  border-radius: 999px;
  white-space: nowrap;
  transition:
    background 0.2s,
    border-color 0.2s;
  backdrop-filter: blur(6px);
}

.btn-secondary:hover {
  background: rgba(250, 250, 248, 0.7);
  border-color: rgba(31, 58, 95, 0.2);
  animation: shake 0.35s ease;
}

.nav-pill {
  display: flex;
  align-items: center;
  gap: 2.8rem;
  background: var(--offwhite);
  border-radius: 999px;
  padding: 0.35rem 2.2rem;
  box-shadow: 0 2px 14px rgba(31, 58, 95, 0.12);
  height: 46px;
}

.nav-group {
  display: flex;
  align-items: center;
  gap: 2.8rem;
  width: 190px;
}

.nav-group.nav-left {
  justify-content: flex-end;
}
.nav-group.nav-right {
  justify-content: flex-start;
}

header a {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--navy);
  transition: color 0.2s;
  white-space: nowrap;
}

header a:hover {
  color: var(--orange);
}

header img {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

header a.nav-logo-link {
  display: flex;
  background: var(--offwhite);
  border-radius: 50%;
  padding: 4px;
  box-shadow: 0 2px 10px rgba(31, 58, 95, 0.15);
  position: relative;
  top: 20px;
  z-index: 6;
}

/* ==========================================================================
   ROWS
   ========================================================================== */

.row1 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  transform: translateX(-100vw);
  transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 0;
  min-height: 0;
}

/* Modifier: single full-width block instead of two columns */
.row1.full {
  grid-template-columns: 1fr;
  min-height: 450px;
  overflow: hidden;
}

.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  transform: translateX(100vw);
  transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 0;
  min-height: 0;
  color: var(--navy);
}

/* Modifier: 2 blocks instead of 3 in a row */
.row2.cols-2 {
  grid-template-columns: 1fr 1fr;
}

/* Modifier: 4 blocks instead of 3 in the bottom row */
.row2.cols-4 {
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
  padding: 1.2rem 1.6rem;
}

.service-card {
  background: rgba(250, 250, 248, 0.4);
  border: 1px solid rgba(31, 58, 95, 0.1);
  border-radius: 28px;
  padding: 1.6rem 1.4rem;
  box-shadow: 0 2px 14px rgba(31, 58, 95, 0.06);
  backdrop-filter: blur(6px);
  overflow: visible;
}

.row2 .col.service-card {
  padding: 1.6rem 1.4rem;
  overflow-y: visible;
}

.row2.cols-4 .service-card h2 {
  font-size: 1.05rem;
  white-space: normal;
}

.wrapper.animate header {
  transform: translateY(0);
}
.wrapper.animate .row1 {
  transform: translateX(0);
}
.wrapper.animate .row2 {
  transform: translateX(0);
}
.wrapper.animate footer {
  transform: translateY(0);
}

.col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.4rem 2rem;
  text-align: center;
  color: var(--navy);
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
}

.col h2,
.col h3 {
  color: var(--navy);
  margin-bottom: 0.6rem;
  white-space: nowrap;
}
/* Allow the contact form heading to wrap (some are longer, e.g. "Tell Me About Your Project") */
.contact-form-col h3 {
  white-space: normal;
  text-align: center;
}

.row2 .col {
  justify-content: flex-start;
  padding-top: 2.2rem;
}

.col p {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--navy);
  max-width: 32ch;
}

.col.text-dense {
  text-align: left;
  align-items: flex-start;
  justify-content: flex-start;
}

.col.text-dense p,
.col.text-dense ul {
  max-width: none;
  width: 100%;
}

.col.text-dense p {
  font-size: 0.85rem;
  line-height: 1.55;
  margin-bottom: 0.6rem;
}

.col.text-dense h2 {
  align-self: flex-start;
}

.col.text-dense h3 {
  align-self: flex-start;
  margin-top: 0.4rem;
}

.about-bio {
  display: block;
  overflow-y: auto;
}

.about-bio::after {
  content: "";
  display: table;
  clear: both;
}

.hero-block {
  align-items: flex-start;
  text-align: left;
  width: 100%;
}

.hero-block p {
  width: 100%;
}

.hero-h1 {
  display: flex;
  flex-direction: column;
  width: 100%;
  font-size: clamp(2.4rem, 4.4vw, 3.8rem);
  color: var(--navy);
  line-height: 1.15;
  margin-bottom: 1.6rem;
}

.hero-h1-left {
  text-align: left;
}

.hero-h1-right {
  text-align: right;
}

.hero-block .hero-sub {
  text-align: center;
  width: 100%;
  max-width: none;
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
}
.hero-copy {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2.2rem;
}
.hero-price {
  text-align: center;
  width: 100%;
  font-size: 1.1rem;
  font-weight: 600;
  white-space: nowrap;
}

.price {
  display: inline;
  white-space: nowrap;
}

.hero-cta {
  align-self: flex-end;
}

.sitemap-field {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: 100%;
  max-width: 420px;
  background: rgba(250, 250, 248, 0.4);
  border: 1px solid rgba(31, 58, 95, 0.1);
  border-radius: 22px;
  padding: 1.4rem 1.8rem;
  box-shadow: 0 2px 14px rgba(31, 58, 95, 0.06);
  backdrop-filter: blur(6px);
  margin-top: 1rem;
}

.sitemap-field a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
  transition: color 0.2s;
}

.sitemap-field a:hover {
  color: var(--orange);
}

.about-portrait {
  float: right;
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 0 1rem 1.4rem;
  box-shadow: 0 2px 14px rgba(31, 58, 95, 0.15);
}

.index-block3 {
  position: relative;
  padding-bottom: 3.5rem;
}

.index-block3 p {
  max-width: none;
  width: 100%;
}

.index-block3-cta {
  position: absolute;
  bottom: 1.4rem;
  right: 1.6rem;
}

.services-hero {
  align-items: flex-start;
  text-align: left;
  width: 100%;
}

.services-hero h1 {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  align-self: flex-start;
}

.services-hero p {
  width: 100%;
  max-width: none;
}

.process-list {
  padding-left: 1.2rem;
  width: 100%;
}

.process-list li {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--navy);
  margin-bottom: 0.6rem;
}

.process-list strong {
  color: var(--navy);
}

.certs-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.6rem;
  width: 100%;
}

.certs-group ul {
  list-style: none;
  padding: 0;
  margin-bottom: 0.8rem;
}

.certs-heading {
  font-weight: 600;
  margin-bottom: 0.3rem;
}

/* ==========================================================================
   CONTACT FORM
   ========================================================================== */

.contact-form-col {
  padding: 1.4rem 2rem;
  justify-content: center;
  align-items: center;
}

.contact-form-col p.contact-form-fallback {
  align-self: center;
  width: 600px;
  max-width: 600px;
  box-sizing: border-box;
  padding: 0;
  text-align: center;
}

.contact-form-fallback {
  margin-top: 0.7rem;
  font-size: 0.78rem;
  color: var(--navy);
  opacity: 0.75;
}

.contact-form {
  width: 600px;
  max-width: 600px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  background: rgba(250, 250, 248, 0.4);
  border: 1px solid rgba(31, 58, 95, 0.1);
  border-radius: 28px;
  padding: 1.8rem 1.8rem 2rem;
  box-shadow: 0 2px 14px rgba(31, 58, 95, 0.06);
  backdrop-filter: blur(6px);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  font-family: inherit;
  font-size: 0.88rem;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(31, 58, 95, 0.18);
  border-radius: 999px;
  padding: 0.7rem 1.1rem;
  text-align: left;
  transition:
    border-color 0.2s,
    background 0.2s;
}

.contact-form textarea {
  border-radius: 18px;
  resize: none;
  flex: 1;
  min-height: 90px;
  line-height: 1.5;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--orange);
  background: rgba(255, 255, 255, 0.85);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(31, 41, 51, 0.45);
}

.contact-form button {
  align-self: center;
  margin-top: 0.2rem;
}

.contact-form-fallback a {
  color: var(--orange);
  text-decoration: none;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 2rem;
  font-size: 0.8rem;
  color: var(--navy);
  transform: translateY(200px);
  transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
  background: transparent;
}

.footer-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.footer-copyright {
  font-size: 0.72rem;
  color: var(--navy);
  opacity: 0.65;
  letter-spacing: 0.02em;
}

.footer-currency {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.78rem;
  width: 190px;
}

.footer-pill {
  display: flex;
  align-items: center;
  gap: 2.2rem;
  background: var(--offwhite);
  border-radius: 999px;
  padding: 0.5rem 2.2rem;
  box-shadow: 0 2px 14px rgba(31, 58, 95, 0.12);
}

.footer-pill a {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--navy);
  transition: color 0.2s;
  white-space: nowrap;
}

.footer-pill a:hover {
  color: var(--orange);
}

.footer-group {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  width: 280px;
}

.footer-group.footer-left {
  justify-content: flex-end;
}
.footer-group.footer-right {
  justify-content: flex-start;
}

.footer-logo-link {
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-logo-link img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 50%;
}

.footer-social {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  width: 190px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--offwhite);
  box-shadow: 0 2px 10px rgba(31, 58, 95, 0.12);
  color: var(--navy);
  transition:
    color 0.2s,
    transform 0.2s;
}

.footer-social a:hover {
  color: var(--orange);
  transform: translateY(-2px);
}

.footer-social svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

#currency-indicator {
  font-weight: bold;
  color: var(--navy);
}

.override-btn {
  background: none;
  border: 1px solid #999;
  border-radius: 3px;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  cursor: pointer;
  color: #555;
  transition:
    border-color 0.2s,
    color 0.2s;
}

.override-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
}
.override-btn.active {
  border-color: var(--navy);
  color: var(--navy);
  font-weight: bold;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
  display: inline-block;
  background: var(--orange);
  color: var(--navy);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.8rem 2rem;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.btn:hover {
  background: #e08c00;
  animation: shake 0.35s ease;
}

@keyframes shake {
  0% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-4px) rotate(-1deg);
  }
  40% {
    transform: translateX(4px) rotate(1deg);
  }
  60% {
    transform: translateX(-3px) rotate(-0.5deg);
  }
  80% {
    transform: translateX(3px) rotate(0.5deg);
  }
  100% {
    transform: translateX(0);
  }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1100px) {
  .row2.cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .row1,
  .row2,
  .row2.cols-2,
  .row2.cols-4 {
    grid-template-columns: 1fr;
  }

  .row2.cols-4 {
    padding: 0.8rem;
  }

  .service-card {
    padding: 1.2rem 1rem;
  }

  footer {
    flex-direction: column;
    gap: 0.8rem;
  }

  .footer-pill {
    gap: 1.4rem;
    padding: 0.5rem 1.4rem;
  }
  .footer-currency {
    justify-content: center;
  }
  .footer-social {
    justify-content: center;
  }

  header {
    gap: 1.2rem;
    flex-wrap: wrap;
  }
}

/* ===========================
   Small Gallery
=========================== */

.small-gallery {
  position: relative;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 16 / 9;
  height: auto;
  overflow: hidden;
  border-radius: var(--radius);
}

.small-gallery .gallery-slide {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  top: 0;
  aspect-ratio: auto;
}

.small-gallery .gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}

.gallery-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  width: 100%;
  height: 100%;
}

.gallery-block-cta {
  align-self: flex-end;
}

.gallery-slide:hover .gallery-overlay,
.gallery-slide:focus .gallery-overlay {
  opacity: 1;
}

.gallery-name-bar {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  padding: 0.9rem 1.2rem;
  color: #fff;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.78),
    rgba(0, 0, 0, 0.05)
  );
}

.gallery-name-bar h3 {
  margin: 0;
  font-size: 1.3rem;
}

.gallery-desc-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1rem 1.2rem;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.05));
  backdrop-filter: blur(3px);
}

.gallery-desc-bar p {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.gallery-desc-bar .view-link {
  display: block;
  color: var(--orange);
  text-align: right;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.2s;
}

.gallery-desc-bar .view-link:hover,
.gallery-desc-bar .view-link:focus-visible {
  color: #fff;
}

.resource-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.resource-list li + li {
  margin-top: 0.7rem;
}

.resource-list a {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;

  width: 100%;

  color: inherit;
  text-decoration: none;

  padding: 0.35rem 0;
}

.resource-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
.resource-title {
  flex: 1;
}

.resource-type {
  flex-shrink: 0;
  margin-left: 1rem;
}
.resource-desc {
  font-size: 0.78rem;
  line-height: 1.5;
  opacity: 0.75;
}
.resources-block {
  width: 100%;
  max-width: 100%;
  padding-inline: 1.5rem;
  text-align: left;
  box-sizing: border-box;
  height: 100%;
  overflow-y: auto;
}

.resources-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
  margin: 1.5rem 0;
}

.section-intro {
  max-width: 60ch;
  margin-bottom: 1.5rem;
}
.substack-cta {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
}
.experience-tagline {
  margin-top: auto;
  color: var(--accent);
  font-size: 1.05rem;
}
.gallery-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  width: 100%;
  max-width: 360px;
}

.gallery-controls .gallery-arrow {
  position: static;
  transform: none;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.25s;
}

.gallery-controls .gallery-arrow:hover {
  background: rgba(0, 0, 0, 0.7);
}

.gallery-controls .gallery-dots {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.gallery-controls .gallery-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: background 0.25s;
  background: rgba(
    31,
    58,
    95,
    0.25
  ); /* navy at low opacity, reads on light bg */
}

.gallery-controls .gallery-dot.active {
  background: var(--navy);
}
/* ==========================================================
   BIG GALLERY
   ========================================================== */

.big-gallery {
  position: relative;
  width: 100%;
  height: 450px;
  overflow: hidden;

  display: flex;
  flex-direction: column;

  padding: 1rem;
  box-sizing: border-box;
}

.big-gallery-track {
  position: relative;
  flex: 1;

  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-stage {
  position: relative;

  width: 100%;
  height: 100%;

  overflow: hidden;
}

/* ---------- Slides ---------- */

.gallery-slide {
  position: absolute;
  top: 50%;
  aspect-ratio: 16 / 9;

  border-radius: var(--radius);

  overflow: hidden;

  cursor: pointer;

  transition:
    transform 0.55s ease,
    width 0.55s ease,
    opacity 0.55s ease,
    filter 0.55s ease;
}

/* centre */

.gallery-current {
  left: 50%;

  width: 62%;
  transform: translate(-50%, -50%);

  z-index: 3;
  max-width: 800px;
}

/* previews */

.gallery-left,
.gallery-right {
  width: 24%;

  opacity: 0.75;

  filter: brightness(0.85);

  z-index: 2;
}

.gallery-left {
  left: -4%;
  transform: translateY(-50%);
}

.gallery-right {
  right: -4%;
  transform: translateY(-50%);
}

/* ---------- image ---------- */

.gallery-slide img {
  width: 100%;
  height: 100%;

  display: block;

  object-fit: cover;
}

/* ---------- overlay ---------- */

.gallery-overlay {
  position: absolute;

  left: 0;
  right: 0;
  bottom: 0;

  padding: 1rem 1.2rem;

  color: #fff;

  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.05));

  backdrop-filter: blur(3px);
}

.gallery-overlay h3 {
  margin: 0 0 0.35rem;

  font-size: 1.3rem;
}

.gallery-overlay p {
  margin: 0;

  font-size: 0.95rem;
}

/* ---------- arrows ---------- */

.gallery-arrow {
  position: absolute;

  top: 50%;

  transform: translateY(-50%);

  width: 46px;
  height: 46px;

  border: none;

  border-radius: 50%;

  background: rgba(0, 0, 0, 0.55);

  color: #fff;

  cursor: pointer;

  transition:
    background 0.25s,
    transform 0.25s;

  z-index: 20;
}
.gallery-prev {
  left: calc(19% - 23px);
}

.gallery-next {
  right: calc(19% - 23px);
}

.gallery-current {
  cursor: zoom-in;
}

.gallery-arrow:hover,
.gallery-arrow:focus-visible {
  background: var(--accent);

  transform: translateY(-50%) scale(1.08);
}

/* ---------- hover ---------- */

.gallery-slide:hover {
  filter: brightness(1);
}

/* ---------- mobile ---------- */

@media (max-width: 900px) {
  /* the row's fixed 450px min-height was stretching the gallery box */
  .row1.full {
    min-height: 0;
  }

  .big-gallery {
    height: auto;
    align-self: start;
    padding: 0.75rem;
  }

  .big-gallery-track {
    display: block;
    aspect-ratio: auto;
    height: auto;
  }

  .gallery-stage {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .gallery-left,
  .gallery-right {
    display: none;
  }

  .gallery-current {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    aspect-ratio: auto;
    transform: none;
  }

  /* --- captions: real elements rendered by big-gallery.js --- */

  /* title strip at the top, compact */
  .gallery-current .gallery-name-bar {
    padding: 0.45rem 0.7rem 0.9rem;
  }

  .gallery-current .gallery-name-bar h3 {
    font-size: 0.95rem;
    line-height: 1.25;
  }

  /* description strip pinned to the bottom, never more than ~40% tall */
  .gallery-current .gallery-desc-bar {
    padding: 0.5rem 0.7rem 0.45rem;
    max-height: 40%;
    overflow: hidden;
    background: linear-gradient(
      to top,
      rgba(0, 0, 0, 0.9) 0%,
      rgba(0, 0, 0, 0.75) 60%,
      rgba(0, 0, 0, 0) 100%
    );
  }

  .gallery-current .gallery-desc-bar p {
    margin: 0 0 0.3rem;
    font-size: 0.72rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .gallery-current .gallery-desc-bar .view-link {
    font-size: 0.68rem;
  }

  .gallery-overlay {
    padding: 0.55rem 0.7rem;
    max-height: 45%;
    overflow: hidden;
  }

  .gallery-overlay h3 {
    margin: 0 0 0.15rem;
    font-size: 1rem;
    line-height: 1.2;
  }

  .gallery-overlay p {
    font-size: 0.78rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .gallery-arrow {
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    font-size: 0.95rem;
  }

  .gallery-prev {
    left: 0.5rem;
  }

  .gallery-next {
    right: 0.5rem;
  }

  .gallery-arrow:hover,
  .gallery-arrow:focus-visible {
    transform: translateY(-50%) scale(1.08);
  }
}

@media (max-width: 480px) {
  .gallery-current .gallery-desc-bar p {
    -webkit-line-clamp: 2;
    font-size: 0.68rem;
  }

  .gallery-current .gallery-desc-bar {
    max-height: 38%;
  }

  .gallery-current .gallery-name-bar h3 {
    font-size: 0.85rem;
  }

  .gallery-overlay p {
    -webkit-line-clamp: 1;
  }
}

.content-block {
  width: 100%;
  max-width: 72ch;

  margin: 0 auto;
  padding: 0 1rem;

  box-sizing: border-box;

  text-align: left;

  color: var(--navy);
  height: 100%;
  overflow-y: auto;
}

.content-block h2,
.content-block h3 {
  text-align: left;
}

.content-block p {
  margin-bottom: 1rem;
  line-height: 1.65;
}

.content-block .section-intro {
  max-width: none;
  margin-bottom: 1.5rem;
}
.promo-package {
  position: relative;
  height: 100%;
  padding: 2rem;
}

.promo-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  width: 100%;
  gap: 1rem;
}

.promo-header h2 {
  margin-bottom: 0;
}

.promo-price {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.promo-columns {
  display: grid;

  grid-template-columns: 1fr 1fr;

  gap: 2.5rem;

  width: 100%;

  margin: 1rem 0 0;
}

.promo-columns ul {
  margin: 0;

  padding-left: 1.2rem;
}

.promo-columns .process-list {
  margin: 0;
}

.promo-suited {
  margin-top: 1rem;
  font-size: 0.85rem;
  font-style: italic;
  opacity: 0.85;
}
/* ==========================================================
   LIGHTBOX
   ========================================================== */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-image {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius);
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
  background: rgba(255, 255, 255, 0.24);
}

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  transition: background 0.2s;
}

.lightbox-arrow:hover,
.lightbox-arrow:focus-visible {
  background: rgba(255, 255, 255, 0.24);
}

.lightbox-prev {
  left: 2rem;
}

.lightbox-next {
  right: 2rem;
}

@media (max-width: 640px) {
  .lightbox-arrow {
    width: 42px;
    height: 42px;
  }
  .lightbox-prev {
    left: 0.75rem;
  }
  .lightbox-next {
    right: 0.75rem;
  }
  .lightbox-close {
    top: 0.75rem;
    right: 0.75rem;
  }
}

/* --- No horizontal bleed anywhere --- */
html,
body {
  overflow-x: hidden;
}

/* --- Blocks must never own a scrollbar: the page scrolls, not the block --- */
.col,
.about-bio,
.main-scroll > * {
  overflow: visible;
}

.main-scroll {
  overflow-y: auto;
  overflow-x: hidden;
}

/* --- Fluid fixed-width slots (header/footer) --- */
.header-spacer,
.header-cta,
.nav-group,
.footer-currency,
.footer-group,
.footer-social {
  min-width: 0;
}

header,
footer {
  max-width: 100%;
}

.nav-pill,
.footer-pill {
  min-width: 0;
  max-width: 100%;
}

/* ==========================================================================
   SERVICES BOTTOM ROW - boxed blocks
   ========================================================================== */

.row2.cols-4 {
  gap: 1.2rem;
  padding: 1.6rem 1.6rem 2rem;
}

.row2.cols-4 > .col {
  background: rgba(250, 250, 248, 0.4);
  border: 1px solid rgba(31, 58, 95, 0.1);
  border-radius: 28px;
  box-shadow: 0 2px 14px rgba(31, 58, 95, 0.06);
  backdrop-filter: blur(6px);
  padding: 1.6rem 1.4rem;
}

.row2.cols-4 > .col h2 {
  white-space: normal;
  text-wrap: balance;
}

.row2.cols-4 > .col p {
  max-width: none;
}

/* ==========================================================================
   TABLET AND BELOW
   ========================================================================== */

@media (max-width: 1024px) {
  header {
    padding: 0.5rem 1rem;
    gap: 0.8rem;
  }

  .header-spacer {
    display: none;
  }

  .header-cta {
    width: auto;
    padding: 0.55rem 1rem;
  }

  .nav-pill {
    flex: 1;
    gap: 1rem;
    padding: 0.3rem 1rem;
    justify-content: space-between;
  }

  .nav-group {
    width: auto;
    flex: 1;
    gap: 1rem;
  }

  footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .footer-group {
    width: auto;
    gap: 1rem;
  }

  .footer-currency,
  .footer-social {
    width: auto;
  }

  .footer-pill {
    gap: 1rem;
    padding: 0.45rem 1.2rem;
  }

  .row2.cols-4 {
    grid-template-columns: 1fr 1fr;
  }
}

/* ==========================================================================
   MOBILE
   ========================================================================== */

@media (max-width: 720px) {
  /* Header: everything fits the screen width, nothing clipped */
  header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
    padding: 0.6rem 0.75rem 0.4rem;
  }

  .nav-pill {
    width: 100%;
    gap: 0.4rem;
    padding: 0.3rem 0.6rem;
    height: auto;
    justify-content: space-between;
  }

  .nav-group {
    gap: 0.6rem;
    flex: 1;
    justify-content: space-evenly;
  }

  header a {
    font-size: 0.66rem;
    letter-spacing: 0.03em;
  }

  header img {
    width: 44px;
    height: 44px;
  }

  header a.nav-logo-link {
    top: 8px;
    padding: 3px;
    flex-shrink: 0;
  }

  .header-cta {
    width: 100%;
  }

  /* Content blocks stack, size to their content, never scroll internally */
  .row1,
  .row2,
  .row2.cols-2,
  .row2.cols-4 {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .row2.cols-4 {
    padding: 1rem 0.9rem 1.6rem;
    gap: 1rem;
  }

  .col {
    padding: 1.6rem 1.1rem;
  }

  .col h2,
  .col h3 {
    white-space: normal;
    text-wrap: balance;
  }

  .col p {
    max-width: none;
  }

  .single-block {
    padding: 2rem 1.1rem;
  }

  .hero-h1-left,
  .hero-h1-right {
    text-align: center;
  }

  .hero-cta {
    align-self: center;
  }

  .index-block3 {
    padding-bottom: 2.4rem;
  }

  .index-block3-cta {
    position: static;
    margin-top: 1.2rem;
    align-self: flex-end;
  }

  /* Forms and boxed fields shrink with the screen */
  .contact-form,
  .contact-form-col p.contact-form-fallback,
  .sitemap-field {
    width: 100%;
    max-width: 100%;
  }

  .contact-form-col {
    padding: 1.2rem 1.1rem;
  }
  .about-bio {
    display: flex;
    flex-direction: column;
  }
  .about-portrait {
    float: none;
    display: block;
    margin: 0 auto 1rem;
    width: 130px;
    height: 130px;
    order: 99;
  }

  .certs-columns,
  .resources-grid,
  .promo-columns {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .promo-package {
    padding: 1.4rem;
  }

  .promo-price {
    position: static;
    font-size: 2rem;
    margin-bottom: 0.8rem;
  }

  /* Footer: stacks, stays inside the viewport */
  footer {
    flex-direction: column;
    gap: 0.6rem;
    padding: 0.6rem 0.75rem 0.8rem;
  }

  .footer-center {
    width: 100%;
  }

  .footer-pill {
    width: 100%;
    gap: 0.4rem;
    padding: 0.45rem 0.7rem;
    justify-content: space-between;
  }

  .footer-group {
    flex: 1;
    gap: 0.5rem;
    justify-content: space-evenly;
  }

  .footer-pill a {
    font-size: 0.62rem;
    letter-spacing: 0.02em;
  }

  .footer-logo-link img {
    width: 26px;
    height: 26px;
  }

  .footer-currency {
    justify-content: center;
    gap: 0.5rem;
  }

  .footer-social {
    justify-content: center;
  }

  #logo-bg {
    width: clamp(120px, 40vw, 180px);
  }
}

@media (max-width: 380px) {
  header a,
  .footer-pill a {
    font-size: 0.58rem;
  }
}

@media (max-width: 1024px) {
  .contact-form,
  .contact-form-col p.contact-form-fallback,
  .sitemap-field {
    width: 100%;
    max-width: 100%;
  }

  .col h2,
  .col h3 {
    white-space: normal;
    text-wrap: balance;
  }

  .col p {
    max-width: none;
  }
}

@media (max-width: 720px) {
  .footer-pill {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem 0.5rem;
    padding: 0.4rem 0.5rem;
  }

  .footer-group {
    width: auto;
    min-width: 0;
    gap: 0.45rem;
  }

  .footer-pill a {
    white-space: normal;
    text-align: center;
  }
}

.certs-group ul {
  list-style: none;
  padding: 0;
  margin-bottom: 0.8rem;
}

.certs-group li {
  margin-bottom: 0.6rem;
}

.cert-name {
  display: block;
  font-size: 0.85rem;
  line-height: 1.5;
}

.cert-desc {
  display: block;
  font-size: 0.78rem;
  line-height: 1.5;
  opacity: 0.75;
}

.certs-heading {
  font-weight: 600;
  margin-bottom: 0.3rem;
}
/* FAQ section (contact page) */
.row2.faq-row {
  grid-template-columns: 1fr;
}

.faq-box {
  width: 100%;
  box-sizing: border-box;
  background: rgba(250, 250, 248, 0.4);
  border: 1px solid rgba(31, 58, 95, 0.1);
  border-radius: 28px;
  box-shadow: 0 2px 14px rgba(31, 58, 95, 0.06);
  backdrop-filter: blur(6px);
  padding: 1.8rem 2rem;
  margin-top: 1rem;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.6rem 2.4rem;
}

.faq-item h3 {
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
  white-space: normal;
}

.faq-item p {
  font-size: 0.85rem;
  line-height: 1.55;
  max-width: none;
  margin-bottom: 0;
}

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

  .faq-box {
    padding: 1.4rem 1.2rem;
  }
}
/* Visually-hidden but screen-reader-accessible labels */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Hide the header CTA on the page it points to (contact.html) */
.wrapper[data-page="contact"] .header-cta {
  visibility: hidden;
  pointer-events: none;
}
.contact-hero {
  align-items: flex-start;
  text-align: left;
  width: 100%;
}
.contact-hero a.cta-pill {
  align-self: flex-end;
}

.contact-hero p {
  width: 100%;
  max-width: none;
}
.currency-select {
  background: none;
  border: 1px solid #999;
  border-radius: 3px;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  color: #555;
  cursor: pointer;
  font-family: inherit;
  transition:
    border-color 0.2s,
    color 0.2s;
}

.currency-select:hover,
.currency-select:focus {
  border-color: var(--orange);
  color: var(--orange);
  outline: none;
}
.services-image {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: var(--radius);
  -webkit-mask-image: radial-gradient(
    ellipse at center,
    black 65%,
    transparent 100%
  );
  mask-image: radial-gradient(ellipse at center, black 65%, transparent 100%);
}
.about-image {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: var(--radius);
  -webkit-mask-image: radial-gradient(
    ellipse at center,
    black 65%,
    transparent 100%
  );
  mask-image: radial-gradient(ellipse at center, black 65%, transparent 100%);
}
.resource-list a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;

  color: inherit;
  text-decoration: none;

  padding: 0.5rem 0;
}

.resource-desc {
  font-size: 0.78rem;
  color: var(--navy);
  opacity: 0.65;
  line-height: 1.4;
}
