/* ===== Layout primitives ===== */
.container {
  width: 100%;
  max-width: var(--content-wide);
  margin: 0 auto;
  padding-inline: clamp(var(--space-5), 4vw, var(--space-12));
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}
.eyebrow-dot {
  width: 6px;
  height: 6px;
  background: var(--color-primary);
  border-radius: 50%;
  display: inline-block;
}
.eyebrow--light {
  color: rgba(255, 255, 255, 0.7);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.btn-sm {
  padding: var(--space-3) var(--space-5);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}
.btn-primary:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.btn-ghost {
  color: var(--color-text);
  border-color: var(--color-border);
  background: transparent;
}
.btn-ghost:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.btn-outline {
  color: var(--color-text);
  border-color: var(--color-text);
  background: transparent;
}
.btn-outline:hover {
  background: var(--color-text);
  color: var(--color-bg);
}
.btn-block {
  width: 100%;
}

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition:
    background-color 0.3s ease,
    backdrop-filter 0.3s ease,
    border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: color-mix(in oklab, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--color-border);
}
.header-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  padding: var(--space-4) clamp(var(--space-5), 4vw, var(--space-12));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text);
}
.logo .logo-mark {
  color: var(--color-text);
  flex-shrink: 0;
  display: block;
}
/* Header: square boxed mark + wordmark text */
.site-header .logo .logo-mark {
  width: 48px;
  height: 55px;
}
.logo-wordmark {
  display: inline-flex;
  flex-direction: column;
  line-height: 1;
  gap: 4px;
}
.logo-wordmark-name {
  font-family: 'Bricolage Grotesque', Impact, sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--color-text);
}
.logo-wordmark-tag {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  color: var(--color-text-muted);
  text-transform: uppercase;
}
.site-footer .logo .logo-mark {
  width: 96px;
  height: 110px;
  color: var(--color-text);
}
@media (max-width: 720px) {
  .site-header .logo .logo-mark {
    width: 40px;
    height: 46px;
  }
  .logo-wordmark-name { font-size: 0.95rem; }
  .logo-wordmark-tag { font-size: 0.56rem; letter-spacing: 0.18em; }
}
@media (max-width: 480px) {
  .logo-wordmark-tag { display: none; }
}

.nav-list {
  display: flex;
  gap: var(--space-8);
}
.nav-list a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  position: relative;
}
.nav-list a:hover {
  color: var(--color-text);
}
.nav-list a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -6px;
  height: 2px;
  background: var(--color-primary);
  transition: right 0.3s ease;
}
.nav-list a:hover::after {
  right: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}
.icon-btn:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 32px;
  height: 32px;
  align-items: flex-end;
  justify-content: center;
}
.menu-btn span {
  display: block;
  height: 2px;
  background: var(--color-text);
  transition: 0.3s;
}
.menu-btn span:nth-child(1) {
  width: 22px;
}
.menu-btn span:nth-child(2) {
  width: 16px;
}
.menu-btn span:nth-child(3) {
  width: 22px;
}
.menu-btn[aria-expanded='true'] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  width: 22px;
}
.menu-btn[aria-expanded='true'] span:nth-child(2) {
  opacity: 0;
}
.menu-btn[aria-expanded='true'] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  width: 22px;
}

.mobile-nav {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--space-6);
  display: none;
  flex-direction: column;
  gap: var(--space-4);
}
.mobile-nav[data-open='true'] {
  display: flex;
}
.mobile-nav ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.mobile-nav a {
  display: block;
  padding: var(--space-3) 0;
  font-size: var(--text-base);
  border-bottom: 1px solid var(--color-divider);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  padding-top: 120px;
  padding-bottom: clamp(var(--space-16), 10vh, var(--space-24));
  overflow: hidden;
  isolation: isolate;
}
.hero-image {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(20, 17, 14, 0.55) 0%,
      rgba(20, 17, 14, 0.4) 30%,
      rgba(20, 17, 14, 0.85) 75%,
      rgba(20, 17, 14, 0.98) 100%
    ),
    radial-gradient(
      ellipse at 70% 40%,
      rgba(255, 255, 255, 0.10) 0%,
      transparent 50%
    );
}

.hero-content {
  max-width: var(--content-wide);
  margin: 0 auto;
  padding-inline: clamp(var(--space-5), 4vw, var(--space-12));
  width: 100%;
  color: #fff;
}
.hero-content .eyebrow {
  color: rgba(255, 255, 255, 0.75);
}
.hero-title {
  font-size: var(--text-hero);
  line-height: 0.95;
  font-weight: 700;
  letter-spacing: -0.035em;
  margin-bottom: var(--space-6);
  max-width: 14ch;
}
.hero-title-accent {
  color: var(--color-primary);
  font-style: italic;
  font-weight: 500;
}
.hero-sub {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.82);
  max-width: 56ch;
  margin-bottom: var(--space-8);
  line-height: 1.55;
}
.hero-actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-16);
}
.hero-actions .btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}
.hero-actions .btn-ghost:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-8);
  max-width: 700px;
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}
.stat-num {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.02em;
}
.stat-label {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.65);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: var(--space-1);
}

.hero-scroll {
  position: absolute;
  bottom: var(--space-6);
  right: clamp(var(--space-5), 4vw, var(--space-12));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.55);
  animation: bobble 2.4s ease-in-out infinite;
}
@keyframes bobble {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ===== Trust bar ===== */
.trust-bar {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding-block: var(--space-6);
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-6);
}
.trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.trust-item svg {
  color: var(--color-primary);
  flex-shrink: 0;
}

/* ===== Sections ===== */
.section {
  padding-block: clamp(var(--space-16), 10vw, var(--space-32));
}
.section--alt {
  background: var(--color-surface);
}
.section-head {
  max-width: 720px;
  margin-bottom: clamp(var(--space-12), 6vw, var(--space-20));
}
.section-title {
  font-size: var(--text-2xl);
  font-weight: 600;
  letter-spacing: -0.025em;
  margin-bottom: var(--space-5);
}
.section-lede {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 60ch;
}

/* ===== Services ===== */
.service-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-6);
}
.service-card {
  grid-column: span 2;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-interactive), border-color var(--transition-interactive);
}
.section--alt .service-card {
  background: var(--color-bg);
}
.service-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-4px);
}
.service-card--feature {
  grid-column: span 6;
  flex-direction: row;
  align-items: stretch;
}
.service-card-image {
  overflow: hidden;
  background: var(--color-surface-offset);
  aspect-ratio: 4 / 3;
}
.service-card--feature .service-card-image {
  flex: 1.1;
  aspect-ratio: auto;
  min-height: 360px;
}
.service-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}
.service-card:hover .service-card-image img {
  transform: scale(1.04);
}
.service-card-body {
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.service-card--feature .service-card-body {
  flex: 1;
  justify-content: center;
  padding: clamp(var(--space-8), 5vw, var(--space-16));
}
.service-num {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--color-primary);
}
.service-card-body h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: -0.015em;
}
.service-card--feature h3 {
  font-size: var(--text-xl);
}
.service-card-body p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: 1.65;
}
.service-card--feature p {
  font-size: var(--text-base);
}
.service-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-3);
}
.service-points li {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  padding-left: var(--space-5);
  position: relative;
}
.service-points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 12px;
  height: 1px;
  background: var(--color-primary);
}

/* ===== Image break ===== */
.image-break {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: stretch;
  background: var(--color-surface);
  border-block: 1px solid var(--color-border);
}
.image-break-img {
  position: relative;
  min-height: 480px;
  overflow: hidden;
}
.image-break-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.image-break-content {
  padding: clamp(var(--space-12), 8vw, var(--space-24));
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-5);
}
.image-break-content .section-title {
  margin-bottom: 0;
}

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
}
.about-text > p {
  color: var(--color-text-muted);
  font-size: var(--text-base);
  margin-bottom: var(--space-5);
  max-width: 70ch;
}
.value-grid {
  margin-top: var(--space-12);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-8);
}
.value h4 {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: var(--space-2);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-primary);
  letter-spacing: -0.01em;
}
.value p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: 1.6;
}

/* ===== Process ===== */
.process-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  list-style: none;
}
.process-step {
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
  position: relative;
}
.process-step::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  width: 48px;
  height: 1px;
  background: var(--color-primary);
}
.process-num {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--color-primary);
  margin-bottom: var(--space-5);
}
.process-body h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-3);
}
.process-body p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: 1.65;
}

/* ===== Testimonials ===== */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}
.testimonial {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.stars {
  color: var(--color-primary);
  font-size: var(--text-base);
  letter-spacing: 0.15em;
}
.testimonial p {
  color: var(--color-text);
  font-size: var(--text-base);
  line-height: 1.6;
}
.testimonial footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-divider);
}
.testimonial cite {
  font-style: normal;
  font-weight: 600;
  font-size: var(--text-sm);
}
.testimonial footer span {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ===== CTA / Quote section ===== */
.cta-section {
  background: linear-gradient(135deg, #2a1a0e 0%, #1c1208 100%);
  color: #fff;
  padding-block: clamp(var(--space-16), 10vw, var(--space-32));
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
}
.cta-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(var(--space-10), 6vw, var(--space-20));
  align-items: start;
  position: relative;
}
.cta-title {
  font-size: var(--text-2xl);
  font-weight: 600;
  letter-spacing: -0.025em;
  margin-bottom: var(--space-5);
}
.cta-sub {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: var(--space-8);
  max-width: 50ch;
}
.cta-contact {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.cta-contact li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: rgba(255, 255, 255, 0.85);
  font-size: var(--text-base);
}
.cta-contact li svg {
  color: var(--color-primary);
  flex-shrink: 0;
}
.cta-contact a {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.cta-contact a:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

/* Form */
.quote-form {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-6), 3vw, var(--space-10));
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  backdrop-filter: blur(8px);
}
.quote-form label {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.quote-form label span {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
}
.quote-form input,
.quote-form select,
.quote-form textarea {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  color: #fff;
  font-family: inherit;
  width: 100%;
}
.quote-form input::placeholder,
.quote-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.4);
}
.quote-form input:focus,
.quote-form select:focus,
.quote-form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  background: rgba(255, 255, 255, 0.08);
}
.quote-form textarea {
  resize: vertical;
  font-family: inherit;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
.form-note {
  font-size: var(--text-sm);
  text-align: center;
  margin-top: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-md);
}
.form-note.success {
  background: rgba(76, 175, 80, 0.15);
  color: #a5d6a7;
}
.form-note.error {
  background: rgba(244, 67, 54, 0.15);
  color: #ef9a9a;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-20);
  padding-bottom: var(--space-8);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-12);
  padding-bottom: var(--space-16);
  border-bottom: 1px solid var(--color-border);
}
.footer-brand p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin-top: var(--space-4);
  max-width: 40ch;
}
.footer-col h4 {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}
.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.footer-col a,
.footer-col li {
  font-size: var(--text-sm);
  color: var(--color-text);
}
.footer-col a:hover {
  color: var(--color-primary);
}
.footer-bottom {
  padding-top: var(--space-6);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}
.footer-bottom p {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
}
.footer-meta {
  text-transform: uppercase;
  letter-spacing: 0.18em !important;
}

/* ===== Reveal animations ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .service-card {
    grid-column: span 1;
  }
  .service-card--feature {
    grid-column: span 2;
  }
  .process-list {
    grid-template-columns: repeat(2, 1fr);
  }
  .testimonial-grid {
    grid-template-columns: 1fr;
  }
  .image-break {
    grid-template-columns: 1fr;
  }
  .image-break-img {
    min-height: 320px;
  }
  .value-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .cta-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .nav-list,
  .header-actions .btn {
    display: none;
  }
  .menu-btn {
    display: flex;
  }
  .header-actions {
    gap: var(--space-2);
  }
  .hero {
    min-height: 92dvh;
    padding-top: 100px;
  }
  .hero-stats {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }
  .hero-scroll {
    display: none;
  }
  .trust-grid {
    grid-template-columns: 1fr 1fr;
  }
  .service-card--feature {
    flex-direction: column;
    grid-column: span 2;
  }
  .service-card--feature .service-card-image {
    min-height: 240px;
  }
  .service-grid {
    grid-template-columns: 1fr;
  }
  .service-card,
  .service-card--feature {
    grid-column: span 1;
  }
  .process-list {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ============== Portfolio + Reviews + Slider (added) ============== */

/* Inline section header layout */
.section-head--row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-8);
  text-align: left;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}
.section-head--row .section-title {
  margin-bottom: 0;
}
.section-lede--inline {
  max-width: 420px;
  margin: 0;
}

/* Portfolio grid */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: var(--space-8);
}
.portfolio-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, border-color .25s ease;
}
.portfolio-card:hover {
  transform: translateY(-3px);
  border-color: var(--color-accent);
}
.portfolio-cover {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--color-surface-alt);
}
.portfolio-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.portfolio-cover--placeholder {
  background: linear-gradient(135deg, var(--color-surface-alt), var(--color-surface));
}
.portfolio-body {
  padding: var(--space-6);
}
.portfolio-meta {
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}
.portfolio-title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-2);
  line-height: 1.2;
}
.portfolio-desc {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: 1.5;
}

/* Before/after slider */
.ba-slider {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #000;
  user-select: none;
  cursor: ew-resize;
  touch-action: none;
}
/* The 'after' image fills the slider as the base layer */
.ba-slider > .ba-img--after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
/* The clip wrapper sits on top, its width is updated by JS to reveal the 'before' image
   from the LEFT. Inside, the 'before' image is locked at the slider's full size so dragging
   the divider just reveals more or less of it. */
.ba-clip {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 50%;
  overflow: hidden;
  pointer-events: none;
}
.ba-clip .ba-img--before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100cqw; /* fall back below */
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
/* Container query fallback: explicitly size the inner image to the slider's width */
.ba-slider { container-type: inline-size; }
@supports not (width: 100cqw) {
  .ba-clip .ba-img--before { width: 100vw; }
}
.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background: rgba(255,255,255,0.95);
  transform: translateX(-50%);
  pointer-events: auto;
  cursor: ew-resize;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ba-handle:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
}
.ba-handle-knob {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,.4);
}
.ba-handle-line { display: none; }
.ba-tag {
  position: absolute;
  top: var(--space-3);
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  background: rgba(0,0,0,0.65);
  color: #fff;
  padding: 4px 10px;
  border-radius: 999px;
  pointer-events: none;
  backdrop-filter: blur(4px);
}
.ba-tag--before { left: var(--space-3); }
.ba-tag--after  { right: var(--space-3); }
.ba-slider.is-dragging { cursor: grabbing; }

/* Skeleton states */
.sk {
  background: linear-gradient(90deg, var(--color-surface-alt) 0%, rgba(255,255,255,0.04) 50%, var(--color-surface-alt) 100%);
  background-size: 200% 100%;
  animation: rb-shimmer 1.6s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
.sk-img { aspect-ratio: 4 / 3; width: 100%; border-radius: 0; }
.sk-line { height: 14px; margin: 12px 24px; }
.sk-line--short { width: 50%; }
.portfolio-card--skeleton,
.testimonial--skeleton {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: 0;
}
.testimonial--skeleton {
  padding: var(--space-6);
}
@keyframes rb-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Empty state */
.empty-state {
  text-align: center;
  margin-top: var(--space-8);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
.empty-state a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Review source tag */
.review-source {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
  margin-left: var(--space-2);
}
.stars-empty {
  color: rgba(255,255,255,0.18);
  margin-left: 2px;
}

/* Form note states */
.form-note { font-size: var(--text-sm); margin-top: var(--space-3); }
.form-note[data-kind="success"] { color: #58c97a; }
.form-note[data-kind="error"]   { color: #ff8a73; }

/* Mobile portfolio */
@media (max-width: 720px) {
  .portfolio-grid { grid-template-columns: 1fr; }
  .section-head--row { flex-direction: column; align-items: flex-start; }
  .ba-handle-knob { width: 34px; height: 34px; }
}
