:root {
  --page-padding-mobile: 20px;
  --page-padding-tablet: 40px;
  --page-padding-desktop: 64px;
  --page-padding-wide: 80px;
  --container-width: min(1200px, calc(100% - 2rem));
  --section-padding: clamp(4.5rem, 8vw, 7.5rem);
  --hero-padding: clamp(4rem, 8vw, 6.25rem);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-size: clamp(1rem, 1.15vw, 1.125rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

p {
  max-width: 42rem;
}

section {
  padding-block: var(--section-padding);
}

#testimonials {
  padding-block: var(--section-padding);
}

header,
.hero-section {
  padding-block: var(--hero-padding);
}

.max-w-container-max {
  width: var(--container-width);
  max-width: 1200px;
  margin-inline: auto;
}

.px-margin-mobile {
  padding-left: var(--page-padding-mobile);
  padding-right: var(--page-padding-mobile);
}

/* Hide scrollbar for sliders while keeping functionality */
.demo-slider-track,
.testimonial-slider-track {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.demo-slider-track::-webkit-scrollbar,
.testimonial-slider-track::-webkit-scrollbar {
  display: none;
}

.px-margin-desktop {
  padding-left: var(--page-padding-desktop);
  padding-right: var(--page-padding-desktop);
}

h1 {
  font-size: clamp(2.025rem, 4.5vw, 4rem);
  line-height: 1.1;
}

/* Hero heading size override */
.hero-title {
  font-size: 40px !important;
  line-height: 1.15 !important;
}

h2 {
  font-size: clamp(1.6875rem, 3.6vw, 3rem);
  line-height: 1.2;
}

h3 {
  font-size: clamp(1.35rem, 2.52vw, 2.25rem);
  line-height: 1.25;
}

h4 {
  font-size: clamp(1.125rem, 1.98vw, 1.75rem);
  line-height: 1.3;
}

/* Active navigation link (top nav & mobile menu) */
.nav-active {
  position: relative;
  color: #02241d !important;
  font-weight: 600;
}

.nav-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  border-radius: 2px;
  background-color: #775a19;
}

.dark .nav-active {
  color: #ffdea5 !important;
}

.dark .nav-active::after {
  background-color: #ffdea5;
}

@media (max-width: 767px) {
  body {
    font-size: 15px;
    line-height: 1.6;
  }

  h1 {
    font-size: 50px !important;
    line-height: 1.1 !important;
  }

  p {
    font-size: 15px !important;
    line-height: 1.6 !important;
  }

  /* Explore Demos: two independently scrollable slider rows on mobile */
  .demos-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  .demo-row {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
  }

  .demo-row > article {
    flex: 0 0 85%;
    scroll-snap-align: start;
  }

  /* "Studio Quality Guaranteed" sized down on mobile */
  .studio-quality {
    font-size: 32px !important;
    line-height: 1.2 !important;
  }
}

/* Explore Demos: desktop/tablet grid (row wrappers collapse via display:contents) */
@media (min-width: 768px) {
  .demos-wrapper {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
  }
  .demo-row {
    display: contents;
  }
}

@media (min-width: 1024px) {
  .demos-wrapper {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  :root {
    --page-padding-mobile: 24px;
    --page-padding-tablet: 40px;
  }

  .px-margin-mobile {
    padding-left: var(--page-padding-tablet);
    padding-right: var(--page-padding-tablet);
  }

  .max-w-container-max {
    max-width: 960px;
  }
}

@media (min-width: 1024px) {
  :root {
    --page-padding-desktop: 64px;
  }

  .max-w-container-max {
    max-width: 1200px;
  }
}

@media (min-width: 1280px) {
  .max-w-container-max {
    max-width: 1320px;
  }

  .px-margin-desktop {
    padding-left: var(--page-padding-wide);
    padding-right: var(--page-padding-wide);
  }
}

/* Cookie Consent Banner */
.cookie-consent {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background: #02241d;
  color: #fff;
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 25px 50px -12px rgba(2, 36, 29, 0.25);
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 90vw;
  width: auto;
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

.cookie-consent.hidden {
  display: none;
}

.cookie-consent p {
  margin: 0;
  color: #fff;
}

.cookie-consent a {
  color: #ffdea5;
  text-decoration: underline;
}

.cookie-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.cookie-btn {
  padding: 8px 20px;
  border-radius: 9999px;
  border: none;
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.cookie-btn.accept {
  background: #ffdea5;
  color: #02241d;
}

.cookie-btn.accept:hover {
  background: #e9c176;
}

.cookie-btn.decline {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
}

.cookie-btn.decline:hover {
  background: rgba(255,255,255,0.1);
}

@media (max-width: 640px) {
  .cookie-consent {
    flex-direction: column;
    text-align: center;
    bottom: 10px;
    padding: 16px;
    gap: 12px;
  }

  .cookie-actions {
    width: 100%;
    justify-content: center;
  }

  .cookie-btn {
    flex: 1;
    text-align: center;
  }
}

.project-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(2, 36, 29, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.project-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.project-modal {
  background: #fcf9f8;
  border-radius: 0.75rem;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
  box-shadow: 0 25px 50px -12px rgba(2, 36, 29, 0.25);
}

.project-modal-overlay.active .project-modal {
  transform: translateY(0);
}

.project-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #e4e2e1;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

.project-modal-close:hover {
  background: #f0eded;
  border-color: #c1c8c4;
}

.project-modal h3 {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 600;
  color: #02241d;
  margin-bottom: 4px;
}

.project-modal .subtitle {
  color: #414846;
  font-size: 14px;
  margin-bottom: 24px;
}

/* Progress Bar */
.onboarding-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
}

.onboarding-progress .step-dot {
  width: 32px;
  height: 4px;
  border-radius: 2px;
  background: #e4e2e1;
  transition: all 0.3s ease;
}

.onboarding-progress .step-dot.active {
  background: #775a19;
  width: 40px;
}

.onboarding-progress .step-dot.completed {
  background: #02241d;
}

/* Step Panels */
.onboarding-step {
  display: none;
}

.onboarding-step.active {
  display: block;
  animation: fadeInUp 0.35s ease;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.onboarding-step h4 {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 600;
  color: #02241d;
  margin-bottom: 6px;
}

.onboarding-step .step-desc {
  font-size: 14px;
  color: #414846;
  margin-bottom: 20px;
  line-height: 1.5;
}

/* Service Selection Cards */
.service-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 8px;
}

.service-card {
  border: 1.5px solid #e4e2e1;
  border-radius: 0.5rem;
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.service-card:hover {
  border-color: #c1c8c4;
  transform: translateY(-1px);
}

.service-card.selected {
  border-color: #02241d;
  background: #f6f3f2;
}

.service-card .service-icon {
  width: 36px;
  height: 36px;
  border-radius: 0.5rem;
  background: #fed488;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.service-card .service-icon .material-symbols-outlined {
  color: #775a19;
  font-size: 20px;
}

.service-card .service-label {
  font-size: 13px;
  font-weight: 600;
  color: #1b1c1c;
  line-height: 1.3;
}

/* Form Fields */
.project-modal label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #02241d;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.project-modal input,
.project-modal select,
.project-modal textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e4e2e1;
  border-radius: 0.5rem;
  font-size: 15px;
  font-family: 'Manrope', sans-serif;
  background: #fff;
  color: #1b1c1c;
  margin-bottom: 18px;
  transition: border-color 0.2s ease;
}

.project-modal input:focus,
.project-modal select:focus,
.project-modal textarea:focus {
  outline: none;
  border-color: #775a19;
}

.project-modal textarea {
  resize: vertical;
  min-height: 100px;
}

.project-modal .field-error {
  border-color: #ba1a1a !important;
}

.project-modal .error-msg {
  color: #ba1a1a;
  font-size: 12px;
  margin-top: -14px;
  margin-bottom: 14px;
  display: none;
}

/* Step Navigation */
.step-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.step-actions .btn-back {
  padding: 12px 20px;
  border: 1px solid #e4e2e1;
  border-radius: 9999px;
  background: #fff;
  color: #02241d;
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.step-actions .btn-back:hover {
  background: #f0eded;
}

.step-actions .btn-next,
.step-actions .btn-submit {
  padding: 12px 28px;
  background: #02241d;
  color: #fff;
  border: none;
  border-radius: 9999px;
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.step-actions .btn-next:hover,
.step-actions .btn-submit:hover {
  background: #1a3a32;
  transform: translateY(-1px);
}

.step-actions .btn-next:disabled,
.step-actions .btn-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Review Step */
.review-block {
  background: #f6f3f2;
  border-radius: 0.5rem;
  padding: 16px;
  margin-bottom: 12px;
}

.review-block strong {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #775a19;
  margin-bottom: 4px;
}

.review-block p {
  font-size: 15px;
  color: #1b1c1c;
  margin: 0;
  line-height: 1.5;
}

/* Success State */
.onboarding-success {
  display: none;
  text-align: center;
  padding: 20px 0;
}

.onboarding-success.active {
  display: block;
  animation: fadeInUp 0.4s ease;
}

.onboarding-success .success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #02241d;
  color: #ffdea5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.onboarding-success h4 {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  color: #02241d;
  margin-bottom: 8px;
}

.onboarding-success p {
  font-size: 14px;
  color: #414846;
  line-height: 1.6;
}

/* Custom scrollbar - hidden by default, shown on scroll */
html {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar {
  display: none;
}

body {
  overflow-x: hidden;
}

.custom-scrollbar {
  position: fixed;
  top: 0;
  right: 0;
  width: 6px;
  height: 100vh;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.custom-scrollbar.visible {
  opacity: 1;
  pointer-events: auto;
}

.custom-scrollbar-thumb {
  width: 100%;
  background: #02241d;
  border-radius: 3px;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.custom-scrollbar:hover .custom-scrollbar-thumb {
  opacity: 1;
}
