/* ==========================================================================
   Dsquare Studio — shared stylesheet
   Tokens pulled directly from the Figma file (Home / BoroMe frames)
   ========================================================================== */

:root {
  --charcoal: #141414;
  --bg: #faf9f6;
  --white: #ffffff;
  --warm-black: #404040;
  --border: #dddad5;
  --red: #e21b23;
  --borome-coral: #f15d61;

  --font-display: "Plus Jakarta Sans", sans-serif;
  --font-body: "Manrope", sans-serif;

  --container: 1440px;
  --gutter: 240px;
  --gutter-tablet: 48px;
  --gutter-mobile: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--charcoal);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

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

/* Accessibility: Global visible focus states (WCAG 2.2 AA) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

/* Skip to main content link */
.skip-link {
  position: fixed;
  top: -80px;
  left: 20px;
  background: var(--charcoal);
  color: var(--white);
  padding: 10px 18px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  z-index: 10000;
  transition: top 0.2s ease;
  text-decoration: none;
}
.skip-link:focus {
  top: 20px;
}

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

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter-tablet);
}

/* type scale ------------------------------------------------------------ */

.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: var(--charcoal);
}

h1.h1,
.h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 60px;
  line-height: 1.05;
  text-transform: uppercase;
  margin: 0;
}

.h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 52px;
  line-height: 1.06;
  margin: 0;
}

.h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 36px;
  line-height: 1.15;
  margin: 0;
}

.h4 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.23;
  margin: 0;
}

.body-lg { font-size: 20px; }
.body-sm { font-size: 16px; }
.text-muted { color: var(--warm-black); }
.text-red { color: var(--red); }

/* buttons ----------------------------------------------------------------*/

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 32px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  white-space: nowrap;
  border-radius: 1px;
  border: 1px solid var(--charcoal);
  background: transparent;
  color: var(--charcoal);
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}

.btn svg { width: 18px; height: 18px; flex: none; }

.btn-primary {
  background: var(--charcoal);
  border-color: var(--charcoal);
  color: var(--white);
}

.btn-primary:hover { background: #2b2b2b; }

.btn-outline:hover { background: var(--charcoal); color: var(--white); }

/* header ------------------------------------------------------------------*/

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--gutter-tablet);
  max-width: var(--container);
  margin: 0 auto;
  transition: padding .3s ease;
}

.site-header.bordered { border-bottom: 1px solid var(--border); max-width: none; }
.site-header.bordered > .wrap-inner { max-width: var(--container); margin: 0 auto; width: 100%; display: flex; align-items: center; justify-content: space-between; }

.logo img { height: 48px; width: auto; display: block; transition: height .3s ease; }

.nav-group { display: flex; align-items: center; gap: 32px; }

.main-nav {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 16px;
  font-weight: 500;
  text-transform: capitalize;
}

.main-nav a {
  position: relative;
  white-space: nowrap;
  color: var(--charcoal);
  transition: color .2s ease;
  padding: 4px 0;
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--red);
}
.main-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--red);
  border-radius: 2px;
}

.desktop-cta .btn-primary {
  height: 42px;
  padding: 0 24px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.6px;
  box-shadow: 0 4px 12px rgba(20, 20, 20, 0.08);
  transition: all .25s ease;
}
.desktop-cta .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(20, 20, 20, 0.16);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 26px;
  height: 2px;
  background: var(--charcoal);
  display: block;
}

.mobile-nav { display: none; }

/* hero ----------------------------------------------------------------- */

.hero {
  padding-bottom: 72px;
}

.hero-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 32px var(--gutter-tablet) 0;
  display: flex;
  flex-direction: column;
  gap: 36px;
  width: 100%;
}

.hero-top {
  display: flex;
  align-items: center;
  gap: 68px;
}

.hero-copy { flex: 1; display: flex; flex-direction: column; gap: 32px; min-width: 0; }

.hero-copy .btn-row { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-text-block { display: flex; flex-direction: column; gap: 22px; }

.hero-media { flex: none; width: 44%; max-width: 580px; min-width: 0; }

.trust {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  width: 100%;
}

.trust-rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
}

.trust-rule span {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  white-space: nowrap;
}

.trust-rule .line { height: 1px; flex: 1; max-width: 150px; background: var(--border); }

/* trust logo row */
.trust-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 56px;
  flex-wrap: wrap;
}

/* Fixed-size container — every logo gets the same footprint */
.trust-logo-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 150px;
  height: 52px;
  flex: none;
  outline: none;
  border-radius: 4px;
}

.trust-logo-link img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: none;
  opacity: 1;
  transition: transform 350ms cubic-bezier(0.16, 1, 0.3, 1);
}

.trust-logo-link:hover img,
.trust-logo-link:focus-visible img {
  transform: scale(1.06);
}

.trust-logo-link:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 4px;
}

/* section shells --------------------------------------------------------*/

.section { padding: 76px 0; }
.section.on-white { background: var(--white); }
.section-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  text-align: center;
  margin: 0 auto 36px;
  max-width: 980px;
}

.section-head.left { align-items: flex-start; text-align: left; margin: 0 0 40px; }

.heading-rule {
  display: block;
  width: 65px;
  height: 2px;
  background: var(--red);
  border: none;
  margin: 6px 0;
}

.section-sub {
  font-size: 18px;
  line-height: 1.5;
  text-align: center;
  max-width: 840px;
  margin: 6px auto 0;
  color: var(--charcoal);
}

/* services grid ----------------------------------------------------------*/

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

.service-card {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.service-icon { width: 60px; height: 60px; }

.service-card h4 { text-transform: capitalize; }

.service-card .desc { margin-top: 14px; }

.tag-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }

.tag {
  border: 1px solid var(--border);
  border-radius: 46px;
  padding: 10px 16px;
  font-size: 15px;
  color: var(--warm-black);
  background: var(--white);
  white-space: nowrap;
}

/* work grid ---------------------------------------------------------------*/

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.work-card {
  display: block;
  aspect-ratio: 474 / 480;
  overflow: hidden;
  position: relative;
  background: var(--white);
}

.work-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.work-card:nth-child(7) { grid-column: 2; }
@media (max-width: 1100px) { .work-card:nth-child(7) { grid-column: auto; } }

.work-card .sr-caption {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* process ------------------------------------------------------------------*/

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.process-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 24px 16px;
  text-align: center;
}

.process-icon-row { display: flex; align-items: center; gap: 20px; width: 100%; justify-content: center; }
.process-icon-row .line { flex: 1; height: 1px; background: var(--border); max-width: 100px; }
.process-icon { width: 44px; height: 44px; flex: none; display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--red); border-radius: 50%; color: var(--red); }

.process-step h4 { font-size: 28px; }
.process-step .desc { max-width: 280px; margin-top: 8px; }

/* testimonials ---------------------------------------------------------- */

/* Carousel viewport */
.testimonial-carousel {
  overflow: hidden;
  position: relative;
}

/* Sliding track — slow, smooth horizontal slide */
.testimonial-track {
  display: flex;
  transition: transform 1s cubic-bezier(.4, 0, .2, 1);
  will-change: transform;
}

/* Each slide is exactly as wide as the viewport */
.testimonial-slide {
  flex: 0 0 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
  align-items: stretch;
}

.testimonial {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 28px;
  display: flex;
  gap: 24px;
  min-height: 180px;
}

.testimonial .quote-mark { width: 36px; height: auto; flex: none; align-self: flex-start; }
.testimonial .h4 { line-height: 1.3; }
.testimonial .author { font-size: 13px; letter-spacing: 3px; text-transform: uppercase; color: var(--warm-black); font-weight: 600; margin-top: 16px; }

/* navigation row: ← dots → */
.carousel-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 32px;
}

/* arrow buttons */
.carousel-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--charcoal);
  cursor: pointer;
  padding: 0;
  transition: background-color .25s ease, border-color .25s ease, color .25s ease, transform .3s cubic-bezier(.16,1,.3,1);
}
.carousel-arrow svg { width: 18px; height: 18px; }
.carousel-arrow:hover {
  background: var(--charcoal);
  border-color: var(--charcoal);
  color: var(--white);
  transform: scale(1.08);
}
.carousel-arrow:active { transform: scale(.96); }
.carousel-arrow:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

/* dots */
.dots { display: flex; gap: 8px; justify-content: center; }
.dots span { height: 5px; width: 25px; border-radius: 5px; border: 1px solid var(--charcoal); cursor: pointer; transition: width .4s cubic-bezier(.16,1,.3,1), background-color .3s ease; }
.dots span.active { width: 50px; background: var(--charcoal); border-color: var(--charcoal); }
.dots span:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* about ------------------------------------------------------------------*/

.about {
  padding: 76px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.about-wrap {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 var(--gutter-tablet);
  display: flex;
  align-items: center;
  gap: 64px;
}

.about-media {
  flex: 0 0 44%;
  width: 44%;
  max-width: 540px;
}

.about-image-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 2px;
  background: #ebe8e2;
}

.about-image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.about-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.about-header .eyebrow {
  margin-bottom: 14px;
  letter-spacing: 0.14em;
}

.about-heading {
  font-size: 44px;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}

.about-desc {
  font-size: 16px;
  line-height: 1.6;
  color: var(--warm-black);
  margin-bottom: 30px;
  max-width: 560px;
}

/* 3-row information card box matching user reference spec */
.about-cards-box {
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--white);
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 580px;
}

.about-card-row {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 22px 28px;
  border-bottom: 1px solid var(--border);
  transition: background-color .2s ease;
}

.about-card-row:last-child {
  border-bottom: none;
}

.about-card-row:hover {
  background: rgba(20, 20, 20, 0.015);
}

.about-card-icon {
  flex: none;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--charcoal);
}

.about-card-icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--charcoal);
}

.about-card-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.about-card-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  color: var(--charcoal);
  margin: 0;
  line-height: 1.25;
}

.about-card-desc {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--warm-black);
  margin: 0;
  line-height: 1.45;
}

@media (prefers-reduced-motion: no-preference) {
  /* image slides in from the left */
  html.js-anim .reveal-from-left {
    opacity: 0;
    transform: translateX(-48px);
    transition: opacity .9s cubic-bezier(.16,1,.3,1), transform .9s cubic-bezier(.16,1,.3,1);
  }
  html.js-anim .reveal-from-left.in-view {
    opacity: 1;
    transform: none;
  }
}


/* footer -------------------------------------------------------------------*/

.footer {
  padding: 76px 0 36px;
  background: var(--bg);
}

.footer-wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--gutter-tablet);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 60px;
}

.footer-cta {
  flex: 0 1 540px;
  display: flex;
  flex-direction: column;
}

.footer-cta .eyebrow {
  margin-bottom: 18px;
  letter-spacing: 0.12em;
}

.footer-heading {
  font-family: var(--font-display);
  font-size: 46px;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  color: var(--charcoal);
}

.footer-desc {
  font-size: 17px;
  line-height: 1.6;
  color: var(--warm-black);
  margin: 0 0 26px;
  max-width: 480px;
}

.footer-email-row {
  font-size: 17px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0;
  color: var(--charcoal);
}

.footer-email-row strong {
  font-weight: 600;
  color: var(--charcoal);
}

.footer-email-row a {
  color: var(--warm-black);
  transition: color .2s ease;
}

.footer-email-row a:hover {
  color: var(--red);
}

/* right-side 3 navigation columns */
.footer-links {
  flex: 1 1 auto;
  max-width: 660px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.footer-col {
  display: flex;
  flex-direction: column;
  padding: 0 32px;
}

.footer-col:first-child {
  padding-left: 0;
}

.footer-col:last-child {
  padding-right: 0;
}

/* subtle 1px vertical divider between columns */
.footer-col + .footer-col {
  border-left: 1px solid rgba(20, 20, 20, 0.08);
}

.footer-col-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  color: var(--charcoal);
  margin: 0 0 20px;
  line-height: 1.2;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-col a {
  color: var(--warm-black);
  font-size: 16px;
  transition: color .2s ease;
  display: inline-block;
}

.footer-col a:hover {
  color: var(--red);
}

/* subtle 1px horizontal divider */
.footer-divider {
  width: 100%;
  height: 1px;
  background: rgba(20, 20, 20, 0.08);
  margin: 52px 0 28px;
}

/* bottom row */
.footer-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-copyright {
  font-size: 14px;
  color: var(--warm-black);
  margin: 0;
}

.footer-tagline {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--warm-black);
  margin: 0;
}

.footer-tagline-dot {
  color: var(--red);
  margin: 0 6px;
  font-weight: 700;
}



/* contact section --------------------------------------------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
}

.contact-tagline {
  color: var(--warm-black);
  margin-top: 24px;
  margin-bottom: 48px;
  line-height: 1.6;
}

.contact-details {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}

.contact-detail-item {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  transition: padding-left .25s ease;
}

.contact-detail-item:hover { padding-left: 6px; }

.contact-detail-icon {
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  color: var(--charcoal);
  transition: background-color .25s ease, border-color .25s ease, color .25s ease;
}

.contact-detail-item:hover .contact-detail-icon {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

.contact-detail-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--warm-black);
  margin-bottom: 3px;
}

.contact-detail-value {
  font-size: 16px;
  font-weight: 500;
  color: var(--charcoal);
  transition: color .2s ease;
}

a.contact-detail-value:hover { color: var(--red); }

/* contact form card */

.contact-form-wrap {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 48px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

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

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-field label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--charcoal);
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--charcoal);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.form-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23141414' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-color: var(--bg);
  padding-right: 44px;
  cursor: pointer;
}

.form-field textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.6;
}

.form-field input::placeholder,
.form-field textarea::placeholder { color: #aaa; }

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--charcoal);
  box-shadow: 0 0 0 3px rgba(20, 20, 20, 0.07);
}

.contact-submit {
  width: 100%;
  height: 56px;
  font-size: 15px;
  letter-spacing: 1.5px;
  margin-top: 4px;
}

/* ---- Contact Modal ---- */

.contact-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9998;
  /* Graceful fallback for browsers without backdrop-filter: slightly deeper contrast */
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  overflow-y: auto;
  transition: opacity .28s ease-out;
}

@supports (backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px)) {
  .contact-modal-overlay {
    background: rgba(0, 0, 0, 0.46);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
}

.contact-modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

/* The modal card — constrained height, natural overflow with hidden scrollbar on desktop */
.contact-modal {
  background: var(--bg);
  width: 100%;
  max-width: 740px;
  max-height: 90vh;
  position: relative;
  padding: 44px 48px 40px;
  margin: auto;
  z-index: 9999;
  overflow-y: auto;
  overflow-x: hidden;
  /* hide scrollbar visually on desktop */
  scrollbar-width: none;
  transform: translateY(10px);
  transition: transform .28s ease-out, max-width .3s cubic-bezier(.16,1,.3,1), min-height .3s cubic-bezier(.16,1,.3,1);
}
.contact-modal::-webkit-scrollbar { display: none; }

.contact-modal-overlay.open .contact-modal {
  transform: translateY(0);
}

/* Success state compact sizing — target 500-560px height with zero desktop scrollbars */
.contact-modal.is-success {
  max-width: 520px;
  min-height: 500px;
  max-height: 560px;
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

/* close button — always pinned top-right of card, neutral default, red on hover */
.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  background: transparent;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--charcoal);
  flex-shrink: 0;
  transition: border-color .18s ease, color .18s ease, background-color .18s ease;
  z-index: 10;
}
.modal-close:hover {
  border-color: var(--red);
  color: var(--red);
  background: rgba(226, 27, 35, 0.05);
}
.modal-close:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

/* modal body — smooth fade/scale transition out when submitted */
.modal-body {
  display: flex;
  flex-direction: column;
  overscroll-behavior: contain;
  transition: opacity .22s ease, transform .22s ease;
}

.modal-body.fading-out {
  opacity: 0;
  transform: scale(0.97);
  pointer-events: none;
}

.modal-body[hidden] {
  display: none !important;
}

.modal-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 34px;
  line-height: 1.1;
  margin: 10px 0 0;
}

.modal-sub {
  font-size: 14px;
  color: var(--warm-black);
  line-height: 1.55;
  margin-top: 10px;
}

.modal-divider {
  height: 1px;
  background: var(--border);
  margin: 22px 0;
  flex-shrink: 0;
}

/* compact form inside modal */
.contact-modal .contact-form {
  gap: 14px;
}

.contact-modal .form-field label {
  font-size: 10px;
  letter-spacing: 2px;
}

.contact-modal .form-field input,
.contact-modal .form-field select,
.contact-modal .form-field textarea {
  padding: 10px 13px;
  font-size: 14px;
}

.contact-modal .form-field textarea {
  min-height: 90px;
  max-height: 110px;
  resize: none;
}

.contact-modal .form-field input:focus,
.contact-modal .form-field select:focus,
.contact-modal .form-field textarea:focus {
  border-color: var(--red);
  box-shadow: none;
}

.contact-modal .contact-submit {
  height: 50px;
  font-size: 13px;
  margin-top: 4px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin .8s linear infinite; display: inline-block; }

/* email footer line */
.modal-email-footer {
  font-size: 12px;
  color: var(--warm-black);
  text-align: center;
  margin-top: 14px;
}
.modal-email-footer a { color: var(--charcoal); font-weight: 600; }
.modal-email-footer a:hover { color: var(--red); }

/* success state — replaces form completely, centered, compact, no vertical stack */
.modal-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  margin: auto 0;
}

.modal-success[hidden] {
  display: none !important;
}

.modal-success.fading-in {
  animation: modalSuccessIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalSuccessIn {
  0% {
    opacity: 0;
    transform: scale(0.96);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-success-icon {
  width: 52px;
  height: 52px;
  border: 1.5px solid var(--red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red);
  margin-bottom: 20px;
  flex-shrink: 0;
}

.modal-success-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--red);
}

.modal-success-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--charcoal);
  margin-bottom: 12px;
}

.modal-success-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 32px;
  line-height: 1.18;
  color: var(--charcoal);
  margin: 0 0 14px;
}

.modal-success-sub {
  font-size: 15px;
  color: var(--warm-black);
  line-height: 1.55;
  max-width: 380px;
  margin: 0 0 32px;
}

.modal-done-btn {
  width: 100%;
  height: 50px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  background: var(--charcoal);
  color: var(--white);
  border: 1px solid var(--charcoal);
  border-radius: 1px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}

.modal-done-btn:hover {
  background: #2b2b2b;
  border-color: #2b2b2b;
}

.modal-done-btn:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .modal-body,
  .modal-body.fading-out,
  .modal-success.fading-in {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }
}





/* utility ------------------------------------------------------------------*/

.center { text-align: center; }

/* ============================ RESPONSIVE ============================== */
@import 'responsive.css';

/* ==========================================================================
   Motion system — scroll reveals, hover micro-interactions, sticky header
   ========================================================================== */

/* Hidden state only applies once html.js-anim is set by an inline script that
   runs before paint. If JS is blocked/disabled, .reveal content is simply
   visible with no animation — it can never get stuck invisible. */
@media (prefers-reduced-motion: no-preference) {
  html.js-anim .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .8s cubic-bezier(.16,1,.3,1), transform .8s cubic-bezier(.16,1,.3,1);
    transition-delay: var(--reveal-delay, 0s);
  }
  html.js-anim .reveal-group > * {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1);
  }
  html.js-anim .reveal-group.in-view > *:nth-child(1) { transition-delay: .05s; }
  html.js-anim .reveal-group.in-view > *:nth-child(2) { transition-delay: .12s; }
  html.js-anim .reveal-group.in-view > *:nth-child(3) { transition-delay: .19s; }
  html.js-anim .reveal-group.in-view > *:nth-child(4) { transition-delay: .26s; }
  html.js-anim .reveal-group.in-view > *:nth-child(5) { transition-delay: .33s; }
  html.js-anim .reveal-group.in-view > *:nth-child(6) { transition-delay: .4s; }
  html.js-anim .reveal-group.in-view > *:nth-child(7) { transition-delay: .47s; }
}
html.js-anim .reveal.in-view { opacity: 1; transform: none; }
html.js-anim .reveal-group.in-view > * { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-group > * { opacity: 1; transform: none; }
}

/* sticky header — seamless logo flow with clean transparent glass */
.site-header-wrap,
.case-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color .3s ease, border-color .3s ease, box-shadow .3s ease, backdrop-filter .3s ease, -webkit-backdrop-filter .3s ease;
}

.case-header {
  border-bottom: 1px solid var(--border);
}

/* Scrolled state: silky translucent frosted glass across the full width, preserving exact grid alignment */
body.scrolled .site-header-wrap {
  background: rgba(250, 249, 246, 0.85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid rgba(20, 20, 20, 0.06);
  box-shadow: 0 4px 20px -4px rgba(20, 20, 20, 0.04);
}

body.scrolled .case-header {
  background: rgba(250, 249, 246, 0.85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid rgba(20, 20, 20, 0.06);
  box-shadow: 0 4px 20px -4px rgba(20, 20, 20, 0.04);
}

/* Subtle compacting on scroll: vertical padding only, horizontal padding stays identical */
body.scrolled .site-header {
  padding-top: 14px;
  padding-bottom: 14px;
}

body.scrolled .logo img {
  height: 44px;
}

body.scrolled .desktop-cta .btn-primary {
  height: 38px;
  padding: 0 20px;
  font-size: 13px;
}

/* smooth anchor scroll offset for sticky header */
[id] {
  scroll-margin-top: 90px;
}

/* nav underline sweep */
.main-nav a, .footer-col a {
  position: relative;
}
.main-nav a::after, .footer-col a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 1.5px;
  background: currentColor;
  transition: width .35s cubic-bezier(.16,1,.3,1);
}
.main-nav a:hover::after, .footer-col a:hover::after { width: 100%; }

/* button micro-interaction */
.btn { transition: background-color .3s ease, color .3s ease, border-color .3s ease, transform .3s cubic-bezier(.16,1,.3,1), box-shadow .3s ease; }
.btn svg { transition: transform .35s cubic-bezier(.16,1,.3,1); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -10px rgba(20,20,20,0.25); }
.btn:hover svg { transform: translate(3px, -3px); }
.btn:active { transform: translateY(0); }

/* image zoom on hover — work grid + case-study frames */
.work-card img, .frame-img img, .about-media img {
  transition: transform .6s cubic-bezier(.16,1,.3,1);
}
.work-card:hover img, .frame-img:hover img { transform: scale(1.045); }
.about-media:hover img { transform: scale(1.03); }
.frame-img, .about-media { overflow: hidden; }

/* card lift — services, testimonials, process */
.service-card, .testimonial {
  transition: transform .4s cubic-bezier(.16,1,.3,1), box-shadow .4s ease, background-color .4s ease;
  position: relative;
  z-index: 1;
}
.service-card:hover, .testimonial:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -24px rgba(20,20,20,0.18);
  background: var(--white);
}

/* about-feature: subtle lift + background tint (accent bar handled separately) */
.about-feature {
  transition: transform .4s cubic-bezier(.16,1,.3,1), box-shadow .4s ease, background-color .35s ease;
  z-index: 1;
}
.about-feature:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px -16px rgba(20,20,20,0.14);
  background: var(--white);
}

.process-icon { transition: transform .4s cubic-bezier(.16,1,.3,1), background-color .3s ease, color .3s ease; }
.process-step:hover .process-icon { transform: scale(1.12); background: var(--red); color: var(--white); border-color: var(--red); }

.tag { transition: transform .3s cubic-bezier(.16,1,.3,1), background-color .3s ease, color .3s ease, border-color .3s ease; }
.tag:hover { transform: translateY(-2px); background: var(--charcoal); color: var(--white); border-color: var(--charcoal); }

/* logo mark subtle hover */
.logo img { transition: transform .4s cubic-bezier(.16,1,.3,1); }
.logo:hover img { transform: rotate(-4deg) scale(1.05); }

/* hero media float */
@media (prefers-reduced-motion: no-preference) {
  .hero-media img { animation: floaty 6s ease-in-out infinite; }
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

/* dots pulse on active testimonial */
.dots span.active { transition: width .4s cubic-bezier(.16,1,.3,1); }

