:root {
  /* Design tokens used across the project. Keeping colours, spacing and typography in variables makes the design easier to update consistently from one place. */

  /* Font families imported from Google Fonts in index.html */
  --font-body: 'Inter', sans-serif;
  --font-heading: 'Playfair Display', serif;

  /* Brand and neutral colours used for backgrounds, text, borders and actions */
  --color-primary: #e94f72;
  --color-primary-dark: #ba3f5b;
  --color-heading: #a11b4d;
  --color-background: #f2f2f2;
  --color-scheme-3-background: #fcedf0;
  --color-surface: #ffffff;
  --color-text: #0a040b;
  --color-muted: #534f54;
  --color-border: #0a040b26;
  --opacity-neutral-darkest-5: rgba(10, 4, 11, 0.05);
  --opacity-neutral-darkest-10: rgba(10, 4, 11, 0.1);
  --opacity-neutral-darkest-15: rgba(10, 4, 11, 0.15);

  /* Shared layout spacing. These values are updated in media queries to scale the layout on larger screens. */
  --container-max-width: 80rem;
  --page-padding: 20px;
  --section-padding: 64px;

  /* Base typography scale for headings and body text */
  --text-base: 16px;
  --heading-1: 40px;
  --heading-2: 36px;
  --heading-3: 20px;
  --heading-4: 18px;
}

/* Basic reset removes browser default spacing and makes sizing predictable. This helps keep the layout consistent across browsers. */

/* ============================================
   RESET & BASE
   ============================================ */

/* Includes padding and border inside an element's declared width and height. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--color-text);
  background-color: var(--color-scheme-3-background);
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-heading);
}

h1 {
  font-size: var(--heading-1);
  letter-spacing: -0.02em;
}

h2 {
  margin-bottom: 20px;
  letter-spacing: 0.01em;
  font-size: var(--heading-2);
}

h3 {
  font-size: var(--heading-3);
}

h4 {
  font-size: var(--heading-4);
}

p {
  color: var(--color-muted);
}

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

/* Accessibility utility. Keeps content available to screen readers while hiding it visually. Used for text such as testimonial rating meaning. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  white-space: nowrap;
  border: 0;
  clip: rect(0, 0, 0, 0);
}

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

button,
input,
textarea,
select {
  font: inherit;
}

/* ============================================
   LAYOUT
   ============================================ */

/* Shared section spacing and scroll offset for anchor navigation. */
section {
  padding-block: var(--section-padding);
  scroll-margin-top: 16px;
}

/* Central page container. The width calculation keeps consistent side padding on small screens. */
.container {
  width: calc(100% - (var(--page-padding) * 2));
  max-width: var(--container-max-width);
  margin-inline: auto;
}

/* Reusable centred heading block used at the top of major sections. */
.section-header {
  max-width: 48rem;
  margin-inline: auto;
  text-align: center;
}

.section-label {
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 600;
  line-height: 150%;
  color: var(--color-text);
}

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

/* Shared button base. clamp() keeps buttons usable on small screens while preventing oversized text on desktop. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(40px, 5vw, 46px);
  padding: 8px clamp(12px, 4vw, 24px);
  border: none;
  border-radius: 12px;
  font-size: clamp(14px, 3.5vw, 16px);
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  cursor: pointer;
}

/* Primary action style used for the most important user actions. */
.button-primary {
  background-color: var(--color-primary);
  border-bottom: 4px solid var(--color-primary-dark);
  color: var(--color-surface);
}

/* Secondary action style used for supporting actions such as filtering or viewing examples. */
.button-secondary {
  background-color: var(--opacity-neutral-darkest-5);
  border-bottom: 4px solid var(--opacity-neutral-darkest-15);
  color: var(--color-text);
}

/* Fixed-width CTA buttons keep the hero actions visually balanced. */
.button-fixed {
  width: 156px;
  max-width: 100%;
}

.button-icon {
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
}

/* ============================================
   HEADER / NAVIGATION
   ============================================ */

/* Fixed header keeps navigation available while users move through the single-page site. */
.nav-layout {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;

  min-height: 72px;
  background-color: var(--color-scheme-3-background);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 24px;
}

.logo img {
  width: 60px;
  height: auto;
}

/* Mobile menu button. JavaScript updates aria-expanded and toggles the navigation visibility. */
.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background-color: var(--color-surface);
  color: var(--color-text);
  font-weight: 600;
  cursor: pointer;
}

/* Mobile-first navigation. Hidden by default on small screens and shown when JavaScript adds .is-open. */
header nav {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  z-index: 999;

  padding: 20px var(--page-padding) 24px;
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 12px 30px var(--opacity-neutral-darkest-15);
}

/* Class added by navigation.js when the mobile menu is opened. */
header nav.is-open {
  display: block;
}

header nav ul {
  display: grid;
  gap: 4px;
}

header nav a {
  display: block;
  padding-block: 12px;
  font-size: 18px;
}

header nav a:hover,
header nav a:focus-visible {
  color: var(--color-primary);
}

/* ============================================
   HERO
   ============================================ */

/* Hero introduces the business and gives users the first main actions. */
#hero {
  display: grid;
  align-items: center;
  padding-top: calc(var(--section-padding) + 24px);
  background-color: var(--color-scheme-3-background);
}

/* Mobile-first stacked layout. It changes to two columns at tablet size. */
.hero-layout {
  display: grid;
  gap: 48px;
  align-items: center;
}

.hero-content {
  display: grid;
  gap: 24px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  max-width: 100%;
}

/* ============================================
   SERVICES
   ============================================ */

#services {
  background-color: var(--color-surface);
}

#services .container {
  display: grid;
  gap: 48px;
}

/* Services carousel uses Swiper. The negative margin lets slides reach the screen edges on mobile while still keeping content aligned with the page container. */
.services-swiper {
  width: calc(100% + (var(--page-padding) * 2));
  margin-inline: calc(var(--page-padding) * -1);
  padding-inline: var(--page-padding);
  padding-bottom: 42px;
}

/* Keeps all Swiper slides the same height so service cards align consistently. */
.services-swiper .swiper-wrapper {
  align-items: stretch;
}

/* Service cards use a background image with text overlaid at the bottom. */
.service-card {
  position: relative;
  display: grid;
  align-content: end;
  height: 100%;
  min-height: 460px;
  padding: 24px;
  overflow: hidden;
  color: var(--color-surface);
  border-radius: 24px;
}

/* Image is positioned absolutely so it can fill the whole card behind the text. */
.service-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Gradient overlay improves text readability over bright images. */
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10, 4, 11, 0), rgba(10, 4, 11, 0.5), rgba(10, 4, 11, 0.2));
  z-index: 1;
}

/* Keeps card text and buttons above the image overlay. */
.service-card h3,
.service-card p,
.service-card .service-card-actions {
  position: relative;
  z-index: 2;
}

.service-card h3 {
  margin-bottom: 12px;
  font-size: 24px;
  color: var(--color-surface);
}

.service-card p {
  margin-bottom: 24px;
  color: var(--color-surface);
}

.service-card-actions {
  display: grid;
  gap: 12px;
}

.service-card .view-portfolio-category,
.service-card .add-to-estimate {
  width: 100%;
  min-height: 48px;
  cursor: pointer;
}

.service-card .view-portfolio-category {
  background-color: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--color-border);
  border-bottom: 4px solid var(--opacity-neutral-darkest-15);
  color: var(--color-primary);
}

.service-card .add-to-estimate {
  justify-content: space-between;
  padding-inline: 24px;
}

/* ============================================
   HOW IT WORKS
   ============================================ */

#how-it-works {
  background-color: var(--color-surface);
}

.how-it-works-layout {
  display: grid;
  gap: 40px;
}

.how-it-works-intro {
  max-width: 520px;
  margin-inline: auto;
}

/* Mobile-first process layout. Steps stack vertically on small screens and become columns at wider breakpoints. */
.process-steps {
  display: grid;
  gap: 44px;
}

.process-step {
  position: relative;
  display: grid;
  gap: 18px;
  justify-items: center;
  text-align: center;
}

/* Decorative connector between process steps. Uses a down arrow on mobile and changes to a horizontal arrow on desktop. */
.process-step:not(:last-child)::after {
  content: '↓';
  position: absolute;
  left: 50%;
  bottom: -34px;
  color: var(--color-primary);
  font-size: 24px;
  line-height: 1;
  transform: translateX(-50%);
}

/* Circular decorative icon holder for each process step. */
.process-step-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background-color: var(--color-scheme-3-background);
  color: var(--color-primary);
}

.process-step-icon img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.process-step-content {
  display: grid;
  gap: 12px;
  justify-items: center;
}

/* Groups the visible step number with the heading. */
.process-step-wrapper {
  display: flex;
  gap: 10px;
  align-items: center;
}

.process-step-number {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--color-primary);
  color: var(--color-surface);
  font-size: 14px;
  font-weight: 700;
}

.process-step h3 {
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
}

.process-step p {
  max-width: 300px;
  font-size: 14px;
}

/* ============================================
   TESTIMONIALS
   ============================================ */

#testimonials {
  background-color: var(--color-scheme-3-background);
}

.testimonials-layout {
  display: grid;
  gap: 40px;
}

.testimonials-intro {
  max-width: 520px;
  margin-inline: auto;
}

.testimonial-grid {
  display: grid;
  gap: 24px;
}

/* Testimonial cards provide social proof before the enquiry form. */
.testimonial-card {
  display: grid;
  gap: 24px;
  align-content: start;
  min-height: 220px;
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--color-border);
  border-radius: 24px;
  background-color: var(--color-surface);
  box-shadow: 0 18px 48px rgba(10, 4, 11, 0.06);
}

.testimonial-header {
  display: flex;
  gap: 16px;
  align-items: center;
}

/* Prevents long usernames from forcing the card wider than its grid column. */
.testimonial-header > div {
  min-width: 0;
}

/* Decorative CSS avatar placeholder. Real profile images are not used for privacy, performance and attribution reasons. */
.testimonial-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;

  width: 56px;
  height: 56px;

  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.9), transparent 35%),
    linear-gradient(135deg, #fcedf0, #e94f72);

  color: var(--color-primary-dark);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.04em;

  box-shadow: 0 10px 30px rgba(233, 79, 114, 0.18);
}

/* Allows long usernames to wrap instead of breaking the card layout. */
.testimonial-author {
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.testimonial-rating {
  margin-top: 4px;
  color: var(--color-primary);
  font-size: 16px;
  letter-spacing: 2px;
}

.testimonial-card blockquote {
  margin: 0;
}

.testimonial-card blockquote p {
  color: var(--color-text);
  font-size: 16px;
  line-height: 1.65;
}

/* ============================================
   PORTFOLIO
   ============================================ */

#portfolio {
  background-color: var(--color-background);
}

#portfolio .container {
  display: grid;
  gap: 24px;
}

/* Horizontal filter controls. overflow-x keeps the filters usable on small screens without squeezing them. */
.portfolio-filters {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.portfolio-filter-button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 8px 18px;
  border: 1px solid var(--color-border);
  border-bottom: 4px solid var(--opacity-neutral-darkest-15);
  border-radius: 999px;
  background-color: var(--color-surface);
  color: var(--color-text);
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  scroll-snap-align: start;
}

.portfolio-filter-button:hover,
.portfolio-filter-button:focus-visible {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

/* Active filter state added by portfolio-filters.js. */
.portfolio-filter-button.is-active {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  border-bottom-color: var(--color-primary-dark);
  color: var(--color-surface);
}

/* Portfolio carousel uses the same mobile edge-to-edge pattern as Services. */
.portfolio-swiper {
  width: calc(100% + (var(--page-padding) * 2));
  margin-inline: calc(var(--page-padding) * -1);
  padding-inline: var(--page-padding);
  padding-bottom: 42px;
}

.portfolio-swiper .swiper-wrapper {
  align-items: stretch;
}

/* Portfolio cards are created dynamically by portfolio-carousel.js. */
.portfolio-card {
  display: grid;
  height: 100%;
  overflow: hidden;
  background-color: var(--color-surface);
  border-radius: 24px;
}

/* The image is wrapped in a button so it can open the modal by mouse or keyboard. */
.portfolio-image-button {
  position: relative;
  display: block;
  align-self: start;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: none;
  border-radius: 24px 24px 0 0;
  background: none;
  cursor: pointer;
}

.portfolio-image-button img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform 0.3s ease;
}

/* Custom focus ring for keyboard users without changing the image layout. */
.portfolio-image-button::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 3px var(--color-primary);
  border-radius: 24px 24px 0 0;
  opacity: 0;
}

.portfolio-image-button:hover img,
.portfolio-image-button:focus-visible img {
  transform: scale(1.04);
}

.portfolio-image-button:focus-visible {
  outline: none;
}

.portfolio-image-button:focus-visible::after {
  opacity: 1;
}

.portfolio-card h3,
.portfolio-card p {
  padding-inline: 18px;
}

.portfolio-card h3 {
  margin-top: 4px;
}

.portfolio-card > p {
  padding-inline: 18px;
  padding-bottom: 20px;
  color: var(--color-muted);
}

/* Keeps price information and Add to estimate button aligned at the bottom of the card. */
.portfolio-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 18px 18px;
  margin-top: auto;
}

.portfolio-price-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.portfolio-price-label {
  color: var(--color-muted);
  font-size: clamp(12px, 3vw, 14px);
  line-height: 1.2;
}

.portfolio-price {
  color: var(--color-primary);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 700;
  line-height: 1.2;
}

.portfolio-card .add-to-estimate {
  flex: 0 0 auto;
  min-width: 82px;
  padding: 8px 10px;
  gap: 6px;
}

.portfolio-card .add-to-estimate .button-label {
  font-size: 0;
}

.portfolio-card .add-to-estimate .button-label::after {
  content: 'Add';
  font-size: 14px;
}

.portfolio-card .add-to-estimate.is-added .button-label::after {
  content: 'Added';
}

/* ============================================
   ADD TO ESTIMATE BUTTON DETAILS
   ============================================ */

/* Shared spacing for Add to estimate buttons used in Services and Portfolio. */
.add-to-estimate {
  gap: 8px;
}

.add-to-estimate.is-added,
.add-to-estimate:disabled {
  background-color: var(--color-primary-dark);
  border-bottom-color: #8f3046;
  color: var(--color-surface);
  opacity: 0.65;
  cursor: not-allowed;
}

/* Creates the circular plus icon used inside Add to estimate buttons. */
.portfolio-card .add-to-estimate .button-icon,
.service-card .add-to-estimate .button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 2px solid currentColor;
  border-radius: 50%;
  padding-bottom: 3px;
  padding-left: 1px;
}

/* Swiper control customisation. These rules override Swiper's default navigation button appearance so the carousel controls match the project design. Swiper itself is external and attributed in README.md. */
/* ============================================
   SWIPER CONTROLS
   ============================================ */

.services-swiper .swiper-button-prev,
.services-swiper .swiper-button-next,
.portfolio-swiper .swiper-button-prev,
.portfolio-swiper .swiper-button-next {
  appearance: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--color-primary);
  cursor: pointer;
}

.services-swiper .swiper-button-prev::after,
.services-swiper .swiper-button-next::after,
.portfolio-swiper .swiper-button-prev::after,
.portfolio-swiper .swiper-button-next::after {
  font-size: 44px;
  font-weight: 400;
}

.services-swiper .swiper-button-prev::after,
.portfolio-swiper .swiper-button-prev::after {
  content: '‹';
}

.services-swiper .swiper-button-next::after,
.portfolio-swiper .swiper-button-next::after {
  content: '›';
}

.services-swiper .swiper-button-prev:focus-visible,
.services-swiper .swiper-button-next:focus-visible,
.portfolio-swiper .swiper-button-prev:focus-visible,
.portfolio-swiper .swiper-button-next:focus-visible {
  outline: 3px solid rgba(233, 79, 114, 0.25);
  outline-offset: 4px;
}

/* Disabled Swiper arrows still need to catch clicks so they do not fall through to cards underneath. */
.services-swiper .swiper-button-disabled,
.portfolio-swiper .swiper-button-disabled {
  cursor: default;
  pointer-events: auto;
}

/* Navigation arrows are hidden on mobile because users can swipe. They are displayed again at the tablet breakpoint. */
.services-swiper .swiper-button-prev,
.services-swiper .swiper-button-next,
.portfolio-swiper .swiper-button-prev,
.portfolio-swiper .swiper-button-next {
  display: none;
}

/* ============================================
   PORTFOLIO MODAL
   ============================================ */

/* Full-screen image modal opened by portfolio-modal.js. */
.portfolio-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 24px;
  background-color: rgba(10, 4, 11, 0.82);
}

/* Native hidden attribute fully removes the modal from layout and view. */
.portfolio-modal[hidden] {
  display: none;
}

/* Keeps enlarged images inside the viewport without distortion. */
.portfolio-modal-image {
  max-width: min(100%, 900px);
  max-height: 80vh;
  object-fit: contain;
  border-radius: 24px;
  box-shadow: 0 24px 80px rgba(10, 4, 11, 0.45);
}

.portfolio-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 14px;
  border: none;
  border-radius: 999px;
  background-color: var(--color-surface);
  color: var(--color-text);
  font-weight: 600;
  cursor: pointer;
}

/* ============================================
   ESTIMATE WIDGET
   ============================================ */

/* Sticky estimate summary controlled by estimate.js. On mobile it appears as a bottom bar; on desktop it becomes a floating card. */
.estimate-widget {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4000;
  padding: 14px var(--page-padding) calc(14px + env(safe-area-inset-bottom));
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -12px 40px rgba(10, 4, 11, 0.16);
}

/* Hidden until the user adds at least one item to the estimate. */
.estimate-widget[hidden] {
  display: none;
}

.estimate-widget-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.estimate-widget-title {
  margin-bottom: 2px;
  color: var(--color-text);
  font-size: 14px;
  font-weight: 700;
}

.estimate-widget-summary {
  color: var(--color-primary);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.1;
}

.estimate-view-button {
  min-width: 156px;
  gap: 10px;
}

/* Visual count badge. The button has an aria-label, so the badge itself is hidden from screen readers in HTML. */
.estimate-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding-top: 1px;
  border-radius: 50%;
  background-color: var(--color-surface);
  color: var(--color-primary);
  font-size: 14px;
  font-weight: 700;
}

/* ============================================
   ESTIMATE PANEL
   ============================================ */

/* Backdrop behind the estimate panel. It visually separates the panel from the page content. */
.estimate-backdrop {
  position: fixed;
  inset: 0;
  z-index: 4990;
  background-color: rgba(10, 4, 11, 0.55);
}

.estimate-backdrop[hidden] {
  display: none;
}

/* Estimate panel uses a mobile-first bottom-sheet layout. At tablet size it becomes a centred dialog. */
.estimate-panel {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 5000;
  display: flex;
  flex-direction: column;
  max-height: calc(90dvh - 24px);
  padding: 20px var(--page-padding) calc(20px + env(safe-area-inset-bottom));
  overflow-y: auto;
  background-color: var(--color-surface);
  border-radius: 24px;
  box-shadow: 0 24px 80px rgba(10, 4, 11, 0.35);
  transform: none;
}

.estimate-panel[hidden] {
  display: none;
}

.estimate-panel-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-border);
}

.estimate-panel-header h2 {
  margin-bottom: 8px;
  font-size: 24px;
}

.estimate-panel-header p {
  font-size: 14px;
}

.estimate-panel-close {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background-color: var(--opacity-neutral-darkest-5);
  color: var(--color-text);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.estimate-list {
  display: grid;
  gap: 16px;
  padding-block: 20px;
}

/* Selected estimate item layout: image on the left, text and remove button on the right. */
.estimate-list-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}

.estimate-list-item-image {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 16px;
}

.estimate-list-item-content {
  display: grid;
  gap: 4px;
  align-content: start;
}

.estimate-list-item-title {
  color: var(--color-text);
  font-weight: 700;
}

.estimate-list-item-price {
  color: var(--color-text);
  font-weight: 700;
}

.estimate-remove-button {
  justify-self: start;
  border: none;
  background: none;
  color: var(--color-primary);
  font-weight: 600;
  cursor: pointer;
}

.estimate-panel-footer {
  display: grid;
  gap: 16px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
}

.estimate-panel-total-label {
  color: var(--color-text);
  font-weight: 700;
}

.estimate-panel-total {
  color: var(--color-primary);
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
}

.estimate-request-button {
  width: 100%;
}

/* ============================================
   BALLOON ANIMATION
   ============================================ */

/* Decorative feedback animation created by estimate.js after a new item is added. pointer-events: none prevents the animation from blocking clicks. */
.balloon-animation {
  position: fixed;
  z-index: 7000;
  width: 140px;
  height: 220px;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.balloon {
  position: absolute;
  bottom: 0;
  width: 28px;
  height: 36px;
  border-radius: 50% 50% 45% 45%;
  animation-name: balloon-float;
  animation-duration: 2.2s;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
}

/* Balloon string. */
.balloon::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 34px;
  width: 1px;
  height: 38px;
  background-color: var(--color-border);
  transform: translateX(-50%);
}

/* Individual balloons use different colours and delays to create a natural floating effect. */
.balloon-one {
  left: 8px;
  background-color: #e94f72;
  animation-delay: 0s;
}

.balloon-two {
  left: 34px;
  background-color: #ffd166;
  animation-delay: 0.14s;
}

.balloon-three {
  left: 60px;
  background-color: #6ecbff;
  animation-delay: 0.28s;
}

.balloon-four {
  left: 86px;
  background-color: #95d67f;
  animation-delay: 0.42s;
}

.balloon-five {
  left: 112px;
  background-color: #b58cff;
  animation-delay: 0.56s;
}

/* Moves balloons upward and fades them out after the add-to-estimate action. */
@keyframes balloon-float {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.75);
  }

  15% {
    opacity: 1;
  }

  70% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateY(-170px) scale(1.05);
  }
}

/* ============================================
   ENQUIRY / REQUEST A QUOTE
   ============================================ */

/* Final conversion section where users review selected estimate items and submit the enquiry form. */
#enquiry {
  padding: var(--section-padding) 0;
  background-color: #fff;
}

.enquiry-layout {
  display: grid;
  gap: 48px;
}

.enquiry-header {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

/* Mobile-first enquiry layout. It becomes a two-column estimate/form layout on desktop. */
.enquiry-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: start;
  max-width: 720px;
  margin: 0 auto;
}

/* Estimate summary card updated by estimate.js. */
.enquiry-estimate-card {
  display: grid;
  min-height: 0;
  padding: 24px;
  border-radius: 12px;
  background: linear-gradient(145deg, #fff7fa 0%, #fff 55%, #fff2f6 100%);
  box-shadow: 0 18px 48px rgba(10, 4, 11, 0.08);
}

.enquiry-estimate-content h3,
.enquiry-message-card h3 {
  margin: 0;
  color: var(--color-text);
  font-size: 1rem;
  font-weight: 700;
}

.enquiry-estimate-list {
  display: grid;
  gap: 20px;
  padding: 28px 0;
  margin: 0;
  list-style: none;
  border-bottom: 1px solid var(--color-border);
}

.enquiry-estimate-total {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-top: 20px;
  color: var(--color-text);
  font-size: 0.95rem;
  font-weight: 700;
}

.enquiry-estimate-total strong {
  color: var(--color-primary);
}

.enquiry-message-card {
  align-self: end;
  display: none;
  gap: 18px;
}

.enquiry-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-top: 60px;
  border-radius: 999px;
  background-color: #fff;
  color: var(--color-primary);
  font-size: 2rem;
}

.enquiry-message-card p {
  margin: 0;
  color: var(--color-muted);
  line-height: 1.8;
}

.enquiry-form {
  display: grid;
  gap: 20px;
}

/* Estimate summary items are injected by estimate.js. */
.enquiry-estimate-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  align-items: center;
}

.enquiry-estimate-item-image {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
}

.enquiry-estimate-item-content {
  display: grid;
  gap: 6px;
}

.enquiry-estimate-item-title {
  color: var(--color-text);
  font-size: 0.95rem;
  font-weight: 600;
}

.enquiry-estimate-item-price {
  color: var(--color-primary);
  font-size: 0.9rem;
  font-weight: 700;
}

.enquiry-estimate-remove-button {
  justify-self: start;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.enquiry-estimate-remove-button:hover,
.enquiry-estimate-remove-button:focus-visible {
  color: var(--color-primary);
}

.enquiry-estimate-remove-button:focus-visible {
  outline: 3px solid rgba(233, 79, 114, 0.18);
  outline-offset: 3px;
}

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

.form-field {
  display: grid;
  gap: 8px;
}

.form-field label {
  color: var(--color-text);
  font-size: 0.9rem;
  font-weight: 600;
}

.form-field label span {
  color: var(--color-primary);
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background-color: #fff;
  color: var(--color-text);
  font: inherit;
}

.form-field textarea {
  min-height: 120px;
  resize: vertical;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: rgba(83, 79, 84, 0.7);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 3px solid rgba(233, 79, 114, 0.18);
  border-color: var(--color-primary);
}

.enquiry-submit-button {
  width: 100%;
  min-height: 56px;
}

.enquiry-privacy-note {
  max-width: 360px;
  margin: 0 auto;
  color: var(--color-muted);
  font-size: 0.82rem;
  line-height: 1.6;
  text-align: center;
}

/* Field-level validation message created by enquiry-form.js. */
.form-error {
  display: block;
  min-height: 20px;
  margin-top: 4px;
  color: var(--color-primary-dark);
  font-size: 14px;
  font-weight: 600;
}

/* Success message shown after the enquiry form passes validation. */
.form-success {
  display: block;
  max-width: 680px;
  margin: 0 auto;
  padding: 28px 20px;
  border-radius: 24px;
  background: linear-gradient(145deg, #fff7fa 0%, #fff 55%, #fff2f6 100%);
  color: var(--color-text);
  box-shadow: 0 18px 48px rgba(10, 4, 11, 0.08);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}

.form-success[hidden] {
  display: none;
}

/* Submitted state added by enquiry-form.js. The form content is hidden so the success message becomes the main focus. */
#enquiry.is-submitted .enquiry-header,
#enquiry.is-submitted .enquiry-estimate-card,
#enquiry.is-submitted .form-row,
#enquiry.is-submitted .form-field,
#enquiry.is-submitted .enquiry-submit-button,
#enquiry.is-submitted .enquiry-privacy-note {
  display: none;
}

#enquiry.is-submitted .enquiry-content {
  display: block;
  max-width: 720px;
  margin: 0 auto;
}

#enquiry.is-submitted .enquiry-form {
  display: block;
  padding: 0;
}

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

.site-footer {
  padding-block: 32px;
  background-color: var(--color-scheme-3-background);
  border-top: 1px solid var(--color-border);
}

.site-footer-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.site-footer p {
  color: var(--color-muted);
  font-size: 14px;
}

.site-footer a {
  color: var(--color-primary);
  font-size: 14px;
  font-weight: 700;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--color-primary-dark);
}

/* ============================================
   404 PAGE
   ============================================ */

/* Custom 404 page styling for wrong or missing GitHub Pages routes. */
.not-found-page {
  min-height: 100vh;
  background-color: var(--color-scheme-3-background);
}

.not-found-section {
  display: grid;
  align-items: center;
  min-height: 100vh;
}

.not-found-layout {
  display: grid;
  gap: 32px;
  justify-items: center;
}

.not-found-logo img {
  width: 88px;
  height: auto;
}

.not-found-card {
  display: grid;
  gap: 24px;
  justify-items: center;
  width: min(100%, 560px);
  padding: 32px;
  text-align: center;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(10, 4, 11, 0.08);
}

.not-found-card h1 {
  font-size: clamp(40px, 8vw, 64px);
}

/* Responsive rules are mobile-first.
   Base styles target small screens, then media queries progressively enhance
   layout for larger screens. */
/* ============================================
   RESPONSIVE LAYOUT
   ============================================ */

/* Extra small screens:  */
@media (min-width: 351px) {
  .portfolio-card .add-to-estimate {
    padding: 8px clamp(12px, 4vw, 24px);
    gap: 8px;
  }

  .portfolio-card .add-to-estimate .button-label,
  .portfolio-card .add-to-estimate.is-added .button-label {
    font-size: inherit;
  }

  .portfolio-card .add-to-estimate .button-label::after,
  .portfolio-card .add-to-estimate.is-added .button-label::after {
    content: none;
  }
}

/* Larger phones: service card buttons can sit next to each other instead of stacking. */
@media (min-width: 415px) {
  .service-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
  }

  .service-card .view-portfolio-category,
  .service-card .add-to-estimate {
    flex: 0 1 204px;
    width: 204px;
    max-width: 100%;
  }
}

/* Large mobile / small tablet: How It Works changes from one column to two columns. h1 font-size increases */
@media (min-width: 560px) {
  :root {
    --heading-1: 56px;
  }

  .process-steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 28px;
  }

  .process-step:not(:last-child)::after {
    content: '';
  }

  .process-step {
    align-content: start;
  }

  .process-step p {
    max-width: 240px;
  }

  .process-step-icon {
    width: 80px;
    height: 80px;
  }

  .process-step-icon img {
    width: 50px;
    height: 50px;
  }
}

/* Tablet and up: navigation becomes horizontal, hero becomes two columns, Swiper arrows appear, and dialogs become more desktop-like. */
@media (min-width: 768px) {
  :root {
    --page-padding: 40px;
    --section-padding: 80px;
  }

  .hero-layout {
    grid-template-columns: 1fr 1fr;
  }

  .services-swiper,
  .portfolio-swiper {
    width: 100%;
    margin-inline: 0;
    padding-inline: 4px;
  }

  .services-swiper .swiper-button-prev,
  .services-swiper .swiper-button-next,
  .portfolio-swiper .swiper-button-prev,
  .portfolio-swiper .swiper-button-next {
    display: flex;
  }

  .portfolio-swiper .swiper-button-prev,
  .portfolio-swiper .swiper-button-next {
    top: 30%;
  }

  .menu-toggle {
    display: none;
  }

  header nav {
    position: static;
    display: block;
    padding: 0;
    border: none;
    box-shadow: none;
    background-color: transparent;
  }

  header nav ul {
    display: flex;
    align-items: center;
    gap: 24px;
  }

  header nav a {
    padding: 0;
  }

  .how-it-works-layout {
    gap: 56px;
  }

  .process-steps {
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    align-items: start;
  }

  .process-step {
    gap: 24px;
  }

  .process-step:not(:last-child)::after {
    content: '›';
    top: 42px;
    right: -22px;
    bottom: auto;
    left: auto;
    font-size: 32px;
    transform: none;
  }

  .process-step-icon {
    width: 112px;
    height: 112px;
  }

  .process-step p {
    max-width: 260px;
  }

  .testimonials-layout {
    gap: 56px;
  }

  .estimate-widget {
    left: auto;
    right: 40px;
    bottom: 40px;
    width: 300px;
    padding: 16px;
    border: 1px solid var(--color-border);
    border-radius: 24px;
  }

  .estimate-widget-content {
    display: grid;
    gap: 12px;
  }

  .estimate-view-button {
    width: 100%;
  }

  .estimate-panel {
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    width: min(560px, calc(100% - 48px));
    max-height: calc(100dvh - 48px);
    border-radius: 24px;
    transform: translate(-50%, -50%);
  }

  .form-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }

  .form-field textarea {
    min-height: 140px;
  }

  .enquiry-form {
    gap: 24px;
    padding: 32px;
  }

  .enquiry-estimate-card {
    padding: 28px;
  }

  .enquiry-submit-button {
    width: fit-content;
    justify-self: start;
  }

  .form-success {
    padding: 32px 24px;
    font-size: 20px;
  }
}

/* Desktop: testimonials become three columns and enquiry becomes a two-column layout. */
@media (min-width: 1025px) {
  .testimonial-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .testimonial-card {
    align-content: start;
  }

  .enquiry-content {
    grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
    max-width: none;
    margin: 0;
    gap: 48px;
  }

  .enquiry-estimate-card {
    min-height: 580px;
    padding: 40px;
  }

  .enquiry-message-card {
    display: grid;
  }
}

/* Large desktop: increases page spacing so the layout does not feel cramped on wide screens. */
@media (min-width: 1200px) {
  :root {
    --page-padding: 80px;
    --section-padding: 112px;
  }

  .services-swiper,
  .portfolio-swiper {
    padding-inline: 0;
  }
}
.footer-contact {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-contact > span {
  color: var(--color-muted);
  font-size: 14px;
  font-weight: 600;
}

.footer-call {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 50px;
  background-color: var(--color-primary);
  color: #fff !important;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.25s ease;
}

.footer-call:hover,
.footer-call:focus-visible {
  color: #fff !important;
  transform: translateY(-2px);
}

.back-to-top {
  margin-left: 4px;
}

/* Mobile */
@media (max-width: 560px) {
  .site-footer-layout {
    justify-content: center;
    text-align: center;
  }

  .footer-contact {
    width: 100%;
    justify-content: center;
  }

  .footer-call {
    padding: 10px 18px;
  }
}
