/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-card);
}

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

.btn-outline {
  background: transparent;
  color: var(--brand);
  border: 2px solid var(--brand);
  box-shadow: none;
}

.btn-outline:hover {
  color: #fff;
  background: var(--brand);
}

/* Card surfaces */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-soft);
}

.stat-card h3 {
  font-size: 2.5rem;
  color: var(--brand);
}

/* Client logo tile */
.logo-card {
  background: var(--logo-bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--logo-border);
  padding: 1.25rem;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 150px;
  height: 150px;
  box-shadow: var(--shadow-soft);
}

.logo-card img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Project card layout */
.project-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 620px; /* keep featured cards uniform */
}

/* Inline project slider */
.project-slider {
  position: relative;
  overflow: hidden;
  background: var(--surface-muted);
  aspect-ratio: 4 / 3;
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.project-slider-track {
  display: flex;
  transition: transform 0.6s ease;
  height: 100%;
}

.project-slide {
  min-width: 100%;
  height: 100%;
}

.project-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none;
  border-radius: 0;
}

.project-slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15, 23, 42, 0.55);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
  font-size: 1rem;
}

.project-slider-nav:hover {
  background: rgba(15, 23, 42, 0.85);
}

.project-slider-nav.prev {
  left: 1rem;
}

.project-slider-nav.next {
  right: 1rem;
}

.project-slider-nav span {
  font-size: 1.15rem;
  line-height: 1;
  display: inline-block;
}

.project-slider-dots {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}

.project-slider-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.project-slider-dots button.active {
  background: #fff;
  transform: scale(1.2);
}

.project-card img {
  border-radius: 0;
}

/* Project body copy */
.project-card-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.project-facts {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  font-size: 0.9rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.project-facts li {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.project-facts li span {
  color: var(--text-light);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.project-facts li strong {
  color: var(--text);
}

/* Project CTA area */
.project-actions {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* Project tags */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  background: var(--surface-muted);
  border-radius: 999px;
  padding: 0.2rem 0.9rem;
  font-size: 0.85rem;
}

/* Project filters */
.filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1.5rem;
}

.filters-bar label {
  font-size: 0.9rem;
  color: var(--text-light);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1 1 220px;
}

.filters-bar select,
.filters-bar input[type="search"] {
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--surface-muted);
  border-radius: var(--radius-sm);
  min-width: 0;
  background-color: var(--surface);
  color: var(--text);
  width: 100%;
  max-width: 100%;
  display: block;
  box-sizing: border-box;
}

.filters-bar select {
  appearance: none;
  padding-right: 2.25rem;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text) 50%),
    linear-gradient(135deg, var(--text) 50%, transparent 50%);
  background-position:
    calc(100% - 16px) calc(50% - 3px),
    calc(100% - 10px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.filters-bar select::-ms-expand {
  display: none;
}

.filters-field-search {
  flex: 1 1 100%;
}

.filters-field-control {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.filters-total {
  white-space: nowrap;
  font-weight: 600;
  color: var(--text);
}

@media (max-width: 600px) {
  .filters-bar label,
  .filters-field-search {
    flex: 1 1 100%;
  }
}

/* Projects page CTA */
.projects-actions {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
}

/* Testimonial card */
.testimonial-card {
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.testimonial-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.testimonial-meta img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: var(--surface);
}

/* Generic carousel */
.carousel {
  position: relative;
  overflow: visible;
  padding: 0 2.5rem;
  margin: 0 -2.5rem;
  --carousel-gap: 1rem;
  --carousel-visible: 2;
}

.carousel-viewport {
  overflow: hidden;
  border-radius: var(--radius);
}

.carousel-track {
  display: flex;
  gap: var(--carousel-gap);
  align-items: stretch;
  transition: transform 500ms ease;
}

.carousel-track.no-transition {
  transition: none !important;
}

.carousel-slide {
  flex: 0 0 calc((100% - (var(--carousel-visible) - 1) * var(--carousel-gap)) / var(--carousel-visible));
  display: flex;
}

.carousel-slide > * {
  width: 100%;
  height: 100%;
}

.carousel-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--text);
  color: var(--surface);
  border: 2px solid var(--surface);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 15px 30px rgba(15, 23, 42, 0.15);
  transition: background var(--transition), color var(--transition);
  z-index: 5;
}

.carousel-button:hover {
  background: var(--brand);
  color: #fff;
}

.carousel-button.prev {
  left: 0.75rem;
  transform: translateY(-50%);
}
.carousel-button.next {
  right: 0.75rem;
  transform: translateY(-50%);
}

@media (max-width: 768px) {
  .carousel {
    padding: 0 1rem;
    margin: 0 -1rem;
    --carousel-visible: 1;
  }
  .project-card {
    min-height: auto;
  }
  .carousel-button {
    width: 40px;
    height: 40px;
  }
  .carousel-viewport {
    border-radius: var(--radius-sm);
  }
  .carousel-button.prev { left: 0.25rem; }
  .carousel-button.next { right: 0.25rem; }
}

/* Lightbox */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.85);
  background: color-mix(in srgb, var(--bg-alt) 85%, transparent);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 1rem;
}

.lightbox-overlay.open {
  display: flex;
}

.lightbox-content {
  max-width: 900px;
  width: 100%;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1rem;
  position: relative;
  color: var(--text);
  box-shadow: var(--shadow-card);
}

.lightbox-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  gap: 1rem;
}

.lightbox-title {
  font-size: 1.1rem;
  font-weight: 600;
}

.lightbox-media {
  position: relative;
}

.lightbox-frame img,
.lightbox-frame video {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

.lightbox-frame video {
  max-height: 70vh;
  background: #000;
}

.lightbox-controls {
  margin-top: 0.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--text);
}

.lightbox-counter {
  font-weight: 600;
}

.lightbox-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--surface-muted);
  background: var(--lightbox-close-bg);
  color: var(--lightbox-close-color);
  cursor: pointer;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition);
  z-index: 5;
}

.lightbox-close:hover {
  background: color-mix(in srgb, var(--lightbox-close-bg) 80%, var(--surface));
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--surface-muted);
  background: rgba(15, 23, 42, 0.25);
  background: color-mix(in srgb, var(--surface) 75%, transparent);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.lightbox-nav:hover {
  background: var(--surface-muted);
}

.lightbox-nav.prev {
  left: 0.5rem;
}

.lightbox-nav.next {
  right: 0.5rem;
}

.lightbox-nav span {
  font-size: 1.5rem;
  line-height: 1;
}

/* Contact card */
.contact-card {
  background: var(--surface);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.contact-card > h2 {
  margin-bottom: 1.25rem;
}

.contact-details {
  display: grid;
  gap: 0.75rem;
}

.contact-details p:first-of-type {
  margin-bottom: 0.375rem;
}

.contact-map {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--surface-muted);
  aspect-ratio: 3 / 2;
  min-height: 240px;
  width: 100%;
  max-width: 100%;
}

.contact-map iframe,
.contact-map img {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  min-height: 240px;
}

@media (max-width: 640px) {
  .contact-card {
    padding: 1.5rem;
  }

  .contact-map {
    aspect-ratio: 1 / 1;
    min-height: 200px;
  }

  .contact-map iframe,
  .contact-map img {
    min-height: 200px;
  }
}

/* Contact form */
.contact-form {
  display: grid;
  gap: 1rem;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-weight: 500;
}

.contact-form input,
.contact-form textarea {
  border: 1px solid var(--surface-muted);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
}

.contact-form textarea {
  min-height: 150px;
}

.form-note {
  min-height: 1.5rem;
  font-size: 0.9rem;
}

/* Profile layout */
.profile-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.profile-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--surface-muted) 80%, transparent);
  padding: 2rem;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.profile-card--accent {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--brand) 12%, var(--surface)) 0%,
    var(--surface) 65%
  );
}

.profile-card--wide {
  grid-column: 1 / -1;
}

.profile-card header {
  margin-bottom: 1.25rem;
}

.profile-pill {
  display: inline-flex;
  padding: 0.2rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: color-mix(in srgb, var(--brand) 18%, transparent);
  color: var(--brand);
}

.profile-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin: 0;
  padding: 0;
}

.profile-list li {
  display: flex;
  gap: 0.6rem;
  color: var(--text-light);
}

.profile-list li::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 0.4rem;
  flex-shrink: 0;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent);
}

.profile-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
}

.profile-stat {
  padding: 1rem;
  border-radius: var(--radius-sm);
  border: 1px dashed color-mix(in srgb, var(--surface-muted) 80%, transparent);
  text-align: center;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}

.profile-stat strong {
  font-size: 1.8rem;
  color: var(--brand);
}

.profile-stat span {
  display: block;
  font-size: 0.9rem;
  color: var(--text-light);
}

.profile-note {
  margin-top: 1rem;
  color: var(--text-light);
}

.profile-timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 1.5rem;
  border-left: 2px solid color-mix(in srgb, var(--surface-muted) 80%, transparent);
}

.profile-timeline li {
  position: relative;
  margin-bottom: 1.5rem;
  padding-left: 1rem;
}

.profile-timeline li:last-child {
  margin-bottom: 0;
}

.profile-timeline li::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--brand);
  border: 2px solid var(--surface);
  position: absolute;
  left: -1.55rem;
  top: 0.35rem;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 25%, transparent);
}

.timeline-year {
  display: inline-flex;
  font-weight: 600;
  color: var(--brand);
  margin-bottom: 0.2rem;
}

.timeline-point h4 {
  margin: 0;
}

.timeline-point p {
  margin: 0.35rem 0 0;
  color: var(--text-light);
}

.profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.profile-badge {
  background: color-mix(in srgb, var(--surface-muted) 55%, transparent);
  border-radius: 999px;
  padding: 0.6rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 180px;
  border: 1px solid color-mix(in srgb, var(--surface-muted) 80%, transparent);
}

.profile-badge strong {
  font-size: 0.95rem;
  color: var(--text);
}

.profile-badge small {
  font-size: 0.75rem;
  color: var(--text-light);
}

.btn-small {
  padding: 0.55rem 1.25rem;
  font-size: 0.875rem;
}

.profile-grid .btn {
  align-self: flex-start;
}

@media (min-width: 992px) {
  .profile-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .profile-card--wide {
    grid-column: 1 / -1;
  }
}

/* Floating contact dock */
.contact-dock {
  position: fixed;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem 0.4rem;
  background: color-mix(in srgb, var(--surface-muted) 65%, transparent);
  border-radius: 999px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.2);
  z-index: 50;
  gap: 0.5rem;
}

.contact-dock__items {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  align-items: center;
}

.contact-dock__link {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--brand);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 30px rgba(29, 78, 216, 0.35);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  cursor: pointer;
}

.contact-dock__link:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 35px rgba(29, 78, 216, 0.45);
  background: var(--brand-dark);
}

.contact-dock__icon {
  width: 22px;
  height: 22px;
  display: block;
  fill: currentColor;
}

.contact-dock__top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 44px;
  height: 44px;
  border-radius: 0.5rem;
  background: var(--brand);
  color: #fff;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 30px rgba(29, 78, 216, 0.35);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  cursor: pointer;
  z-index: 50;
}

.contact-dock__top:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 35px rgba(29, 78, 216, 0.45);
  background: var(--brand-dark);
}

@media (max-width: 768px) {
  .contact-dock {
    display: none;
  }
  .contact-dock__top {
    display: none;
  }
}
