.site-header {
  position: relative;
  z-index: 50;
}
.nav {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.primary-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none !important;
}
.nav-link {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
}
.nav-link:hover,
.nav-link:focus-visible {
  color: var(--color-accent-primary);
  border-color: rgba(38, 58, 139, 0.4);
}
.nav-link:focus-visible {
  outline: 2px solid var(--color-accent-secondary);
  outline-offset: 4px;
}
.nav-cta-group {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-cta-main {
  white-space: nowrap;
}
.nav-cta-secondary {
  white-space: nowrap;
}
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(38, 58, 139, 0.35);
  background-color: rgba(252, 251, 247, 0.96);
  gap: 4px;
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 1.5px;
  border-radius: 999px;
  background-color: var(--color-accent-primary);
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}
.nav-toggle:focus-visible {
  outline: 2px solid var(--color-accent-secondary);
  outline-offset: 3px;
}
.primary-nav.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@media (min-width: 768px) {
  .primary-nav {
    position: relative;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }
  .nav-toggle {
    display: none !important;
  }
}

@media (max-width: 767px) {
  html,
  body {
    overflow-x: hidden;
  }
  body {
    background-attachment: scroll;
  }
  .site-wrapper {
    overflow-x: hidden;
  }
  .container,
  .container-wide {
    padding-inline: 18px;
  }

  /* Ribbon */
  .rt-ribbon {
    min-height: 32px;
    padding: 6px 0;
    font-size: 0.65rem;
    letter-spacing: 0.08em;
  }
  .rt-ribbon-inner {
    justify-content: center;
    text-align: center;
    line-height: 1.35;
    padding: 0 10px;
  }
  .rt-ribbon-inner > span:not(:first-child) {
    display: none;
  }

  /* Nav Header */
  .nav {
    padding: 10px 0;
  }
  .nav-inner {
    min-height: 52px;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 12px;
  }
  .rt-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: calc(100% - 56px);
    min-width: 0;
  }
  .rt-brand-mark {
    width: 40px;
    height: 40px;
    font-size: 0.95rem;
    flex-shrink: 0;
    border-radius: 50%;
  }
  .rt-brand-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
  }
  .rt-brand-name {
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .rt-brand-tagline {
    font-size: 0.68rem;
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--color-text-muted);
  }
  .nav-toggle {
    display: flex;
    flex: 0 0 auto;
    margin-left: auto;
    width: 44px;
    height: 44px;
  }
  .nav-toggle-bar {
    width: 20px;
  }
  .nav[data-nav-open="true"] .nav-toggle-bar:nth-child(1) {
    transform: translateY(5.5px) rotate(40deg);
    transform-origin: center;
  }
  .nav[data-nav-open="true"] .nav-toggle-bar:nth-child(2) {
    opacity: 0;
  }
  .nav[data-nav-open="true"] .nav-toggle-bar:nth-child(3) {
    transform: translateY(-5.5px) rotate(-40deg);
    transform-origin: center;
  }

  /* Mobile Nav Drawer */
  .primary-nav {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    background: rgba(252, 251, 247, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(38, 58, 139, 0.16);
    box-shadow: 0 16px 40px rgba(25, 25, 35, 0.14);
    flex-direction: column;
    align-items: stretch;
    padding: 20px;
    gap: 16px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity var(--transition-base), transform var(--transition-base), visibility var(--transition-base);
    z-index: 99;
  }
  .nav-links {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-top: 1px solid rgba(38, 58, 139, 0.12);
  }
  .nav-link {
    display: block;
    padding: 13px 0;
    border-bottom: 1px solid rgba(38, 58, 139, 0.12);
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    font-weight: 600;
  }
  .nav-cta-group {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-top: 8px;
  }
  .nav-cta-main,
  .nav-cta-secondary {
    width: 100%;
    min-height: 48px;
    white-space: normal;
    justify-content: center;
    text-align: center;
  }

  /* Global Typography & Headings */
  h1,
  .section-title {
    font-size: clamp(1.75rem, 7.2vw, 2.35rem);
    line-height: 1.16;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: auto;
  }
  h2 {
    font-size: clamp(1.5rem, 6.2vw, 1.9rem);
    line-height: 1.2;
    overflow-wrap: break-word;
  }
  h3 {
    font-size: 1.25rem;
    line-height: 1.3;
  }
  p.lead {
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 100%;
  }
  .section {
    padding: 36px 0;
  }
  .section-header {
    margin-bottom: 22px;
  }
  .section-kicker {
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    margin-bottom: 8px;
  }
  .section-subtitle {
    font-size: 0.88rem;
    line-height: 1.55;
  }

  /* Grid Layouts */
  .grid-2,
  .grid-3,
  .layout-split,
  .portfolio-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  /* Home Facts Bar */
  .home-facts {
    padding: 12px 0;
  }
  .home-facts-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px 12px;
  }
  .home-facts-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    white-space: nowrap;
  }
  .home-facts-separator {
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: rgba(38, 58, 139, 0.35);
    margin: 0;
  }
  .home-facts-item:last-child .home-facts-separator {
    display: none;
  }

  /* Hero Section */
  .hero {
    padding: 24px 0 40px;
  }
  .hero-inner {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }
  .hero-left {
    order: 2;
    width: 100%;
  }
  .hero-right {
    order: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
  }
  .hero-labels {
    position: static;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-bottom: 12px;
    width: 100%;
  }
  .hero-label-pill {
    padding: 4px 10px;
    font-size: 0.62rem;
    letter-spacing: 0.12em;
  }
  .hero-image-frame {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    padding: 8px;
    border-radius: 24px;
  }
  .hero-image-frame::before {
    inset: 12px 14px;
    border-radius: 18px;
  }
  .hero-image-frame img {
    aspect-ratio: 4/3.5;
    object-fit: cover;
    border-radius: 18px;
    width: 100%;
  }
  .hero-info-pill {
    position: static;
    width: 100%;
    max-width: 360px;
    margin: 14px auto 0;
    padding: 12px 18px;
    border-radius: 16px;
    background-color: var(--color-accent-primary);
    color: #FCFBF7;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 6px;
    box-shadow: 0 10px 30px rgba(38, 58, 139, 0.35);
  }
  .hero-info-pill span {
    display: block;
    width: 100%;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    font-weight: 600;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
    text-align: center;
  }
  .hero-info-pill span:last-child {
    font-size: 0.68rem;
    font-weight: 400;
    opacity: 0.9;
  }
  .hero-seal {
    display: none;
  }
  .hero-note-line {
    display: none;
  }
  .hero-caption {
    text-align: center;
    max-width: 360px;
    margin: 12px auto 0;
    font-size: 0.7rem;
    line-height: 1.45;
    color: var(--color-text-muted);
    overflow-wrap: break-word;
    word-break: normal;
  }
  .hero-kicker {
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    margin-bottom: 8px;
  }
  .hero-title {
    font-size: clamp(1.8rem, 7.5vw, 2.35rem);
    line-height: 1.16;
    margin-bottom: 14px;
    max-width: 100%;
  }
  .hero-actions {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 10px;
    margin-top: 18px;
  }
  .hero-actions .btn {
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 12px 18px;
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    border-radius: var(--radius-pill);
  }
  .hero-actions .btn-ghost {
    border: 1px solid rgba(38, 58, 139, 0.28);
    background-color: rgba(252, 251, 247, 0.9);
    color: var(--color-accent-primary);
  }
  .hero-actions .btn-ghost:hover {
    background-color: rgba(38, 58, 139, 0.08);
  }
  .hero-meta {
    font-size: 0.72rem;
    line-height: 1.45;
    letter-spacing: 0.04em;
    margin-top: 14px;
  }

  /* Cards & Components */
  .card,
  .blur-panel,
  .blur-panel-plum {
    padding: 20px 18px;
    border-radius: 20px;
  }
  .card-soft {
    padding: 16px;
    border-radius: 18px;
  }
  .service-block,
  .process-step {
    padding: 18px;
    border-radius: 18px;
  }
  .form-actions {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 10px;
    margin-top: 16px;
  }
  .form-actions .btn {
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 12px 18px;
    font-size: 0.78rem;
    letter-spacing: 0.12em;
  }
  .cluster,
  .cluster-between {
    gap: 8px;
  }
  .pill-chip,
  .tag {
    font-size: 0.66rem;
    padding: 4px 10px;
  }
  .home-image-card img {
    border-radius: 18px;
    width: 100%;
    height: auto;
    aspect-ratio: 16/10;
    object-fit: cover;
  }
  .portfolio-thumb-portrait,
  .portfolio-thumb-landscape,
  .portfolio-thumb-rounded,
  .portfolio-thumb-rounded-small,
  .portfolio-thumb-soft {
    max-width: 100%;
    aspect-ratio: 16/10;
  }
}

@media (max-width: 380px) {
  .container,
  .container-wide {
    padding-inline: 14px;
  }
  .rt-brand-name {
    font-size: 0.74rem;
  }
  .section {
    padding: 30px 0;
  }
  .hero-info-pill {
    padding: 10px 14px;
    gap: 4px;
  }
}
