/* ==========================================================================
   PAce Intellekt LLP — Editorial Legal & Development Consulting Design System
   Modern CSS Layers · Fluid Typography · Architectural Precision
   ========================================================================== */

@layer reset, tokens, base, layout, components, utilities;

@layer reset {
  *, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-rendering: optimizeLegibility;
  }

  body {
    min-height: 100dvh;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  img, picture, svg, video {
    display: block;
    max-width: 100%;
  }

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

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

  ul, ol {
    list-style: none;
  }
}

@layer tokens {
  :root {
    /* Surfaces — Harmonized with PAce Intellekt Logo Palette */
    --bg-canvas: #f5f9fc;
    --bg-surface: #ffffff;
    --bg-subtle: #e9f1f7;
    --bg-dark: #0d263e;
    --bg-dark-elevated: #143656;
    --bg-dark-card: rgba(255, 255, 255, 0.055);

    /* Typography Ink */
    --ink-primary: #102a43;
    --ink-secondary: #3e566e;
    --ink-muted: #627b91;
    --ink-on-dark: #f4f8fb;
    --ink-on-dark-muted: rgba(244, 248, 251, 0.76);

    /* Brand & Practice Accents (Sampled from PAce Intellekt Logo) */
    --brand-navy: #1e4d72;
    --brand-cerulean: #2f799c;
    --brand-sky: #74bdd9;
    --brand-cerulean-soft: rgba(47, 121, 156, 0.11);

    /* Semantic Aliases */
    --gold: var(--brand-cerulean);
    --gold-light: var(--brand-sky);
    --gold-soft: var(--brand-cerulean-soft);
    --ipr-accent: #1e4d72;
    --ipr-soft: rgba(30, 77, 114, 0.09);
    --dev-accent: #1c6b74;
    --dev-soft: rgba(28, 107, 116, 0.1);

    /* Borders & Shadows */
    --border-light: rgba(16, 42, 67, 0.1);
    --border-medium: rgba(16, 42, 67, 0.18);
    --border-dark: rgba(244, 248, 251, 0.15);
    --shadow-sm: 0 2px 10px rgba(13, 38, 62, 0.05);
    --shadow-md: 0 12px 32px rgba(13, 38, 62, 0.08);
    --shadow-lg: 0 24px 60px rgba(13, 38, 62, 0.14);

    /* Typography */
    --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

    /* Fluid Type Scale */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-md: 1.0625rem;
    --text-lg: clamp(1.125rem, 1.05rem + 0.35vw, 1.25rem);
    --text-xl: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
    --text-2xl: clamp(1.85rem, 1.45rem + 1.7vw, 2.75rem);
    --text-3xl: clamp(2.35rem, 1.75rem + 2.6vw, 3.65rem);
    --text-hero: clamp(2.75rem, 1.9rem + 3.6vw, 4.75rem);

    /* Layout & Radii */
    --container: 1240px;
    --container-narrow: 920px;
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-pill: 999px;

    /* Motion */
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --duration: 320ms;
    --header-height: 84px;
  }
}

@layer base {
  body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    color: var(--ink-primary);
    background-color: var(--bg-canvas);
    overflow-x: clip;
  }

  h1, h2, h3, .font-serif {
    font-family: var(--font-serif);
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.12;
  }

  h4, h5, h6 {
    font-family: var(--font-sans);
    font-weight: 600;
    line-height: 1.3;
  }

  p {
    color: var(--ink-secondary);
  }

  :focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
  }
}

@layer layout {
  .container {
    width: min(100% - 2.5rem, var(--container));
    margin-inline: auto;
  }

  .container-narrow {
    width: min(100% - 2.5rem, var(--container-narrow));
    margin-inline: auto;
  }

  .section {
    padding-block: clamp(4.25rem, 7vw, 7rem);
  }

  .section-sm {
    padding-block: clamp(2.75rem, 4.5vw, 4.5rem);
  }

  .section-dark {
    background-color: var(--bg-dark);
    color: var(--ink-on-dark);
  }

  .section-dark p {
    color: var(--ink-on-dark-muted);
  }

  .section-subtle {
    background-color: var(--bg-subtle);
  }

  .section-white {
    background-color: var(--bg-surface);
  }

  .grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1.5rem, 3vw, 2.5rem);
  }

  .grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1.25rem, 2.5vw, 2rem);
  }

  .grid-4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(1rem, 2vw, 1.5rem);
  }
}

@layer components {
  /* ---- Top Utility Bar ---- */
  .utility-bar {
    background: var(--bg-dark);
    color: var(--ink-on-dark-muted);
    font-size: var(--text-xs);
    border-bottom: 1px solid var(--border-dark);
  }

  .utility-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-block: 0.55rem;
    flex-wrap: wrap;
  }

  .utility-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
  }

  .utility-links a,
  .utility-links span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: color var(--duration) var(--ease);
  }

  .utility-links a:hover {
    color: var(--gold-light);
  }

  .utility-badge {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    color: var(--brand-sky);
    background: rgba(116, 189, 217, 0.13);
    border: 1px solid rgba(116, 189, 217, 0.32);
    padding: 0.18rem 0.55rem;
    border-radius: var(--radius-pill);
  }

  /* ---- Header & Navigation ---- */
  .site-header {
    position: sticky;
    top: 0;
    z-index: 90;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-top: 2px solid var(--brand-cerulean);
    border-bottom: 1px solid var(--border-light);
    transition: box-shadow var(--duration) var(--ease), background-color var(--duration) var(--ease);
  }

  .site-header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 8px 30px rgba(13, 38, 62, 0.08);
  }

  .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    gap: 1.5rem;
  }

  .brand {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    flex-shrink: 0;
  }

  .brand-logo-img {
    height: 60px;
    width: auto;
    object-fit: contain;
    display: block;
    transition: transform 220ms var(--ease);
  }

  .brand:hover .brand-logo-img {
    transform: translateY(-1px);
  }

  .brand-logo-footer {
    height: 68px;
    width: auto;
    object-fit: contain;
    display: block;
  }

  .brand-logo-mobile {
    height: 50px;
    width: auto;
    object-fit: contain;
    display: block;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
  }

  .brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.08;
  }

  .brand-name {
    font-family: var(--font-serif);
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--ink-primary);
    letter-spacing: -0.01em;
  }

  .brand-name span {
    color: var(--gold);
  }

  .brand-tagline {
    font-size: 0.67rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-top: 2px;
  }

  .nav-desktop {
    display: flex;
    align-items: center;
    gap: 0.25rem;
  }

  .nav-link {
    position: relative;
    padding: 0.55rem 0.9rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ink-secondary);
    border-radius: var(--radius-sm);
    transition: color var(--duration) var(--ease), background-color var(--duration) var(--ease);
  }

  .nav-link:hover,
  .nav-link.active {
    color: var(--ink-primary);
  }

  .nav-link.active::after {
    content: '';
    position: absolute;
    left: 0.9rem;
    right: 0.9rem;
    bottom: 0.22rem;
    height: 2px;
    background: var(--gold);
    border-radius: 2px;
  }

  .header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }

  .mobile-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: transparent;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--ink-primary);
  }

  /* Mobile Drawer */
  .mobile-drawer {
    position: fixed;
    inset: 0;
    z-index: 120;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--duration) var(--ease);
  }

  .mobile-drawer.open {
    pointer-events: auto;
    opacity: 1;
  }

  .mobile-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(14, 27, 42, 0.55);
    backdrop-filter: blur(4px);
  }

  .mobile-drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(86vw, 360px);
    background: var(--bg-surface);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transform: translateX(100%);
    transition: transform var(--duration) var(--ease);
    overflow-y: auto;
  }

  .mobile-drawer.open .mobile-drawer-panel {
    transform: translateX(0);
  }

  .mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
  }

  .mobile-nav-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
  }

  .mobile-nav-list a {
    padding: 0.8rem 0.9rem;
    font-size: 1.02rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    color: var(--ink-primary);
  }

  .mobile-nav-list a.active,
  .mobile-nav-list a:hover {
    background: var(--bg-subtle);
    color: var(--gold);
  }

  /* ---- Buttons ---- */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.82rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 220ms var(--ease), background-color 220ms var(--ease), border-color 220ms var(--ease), color 220ms var(--ease), box-shadow 220ms var(--ease);
    white-space: nowrap;
  }

  .btn:hover {
    transform: translateY(-1px);
  }

  .btn-primary {
    background: var(--brand-navy);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(30, 77, 114, 0.22);
  }

  .btn-primary:hover {
    background: #143855;
    box-shadow: 0 8px 22px rgba(30, 77, 114, 0.28);
  }

  .btn-gold {
    background: var(--brand-cerulean);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(47, 121, 156, 0.32);
  }

  .btn-gold:hover {
    background: #236180;
  }

  .btn-outline {
    background: transparent;
    border-color: rgba(30, 77, 114, 0.28);
    color: var(--brand-navy);
  }

  .btn-outline:hover {
    border-color: var(--brand-navy);
    background: rgba(30, 77, 114, 0.06);
  }

  .btn-outline-light {
    background: transparent;
    border-color: rgba(244, 248, 251, 0.34);
    color: var(--ink-on-dark);
  }

  .btn-outline-light:hover {
    border-color: var(--brand-sky);
    color: var(--brand-sky);
    background: rgba(116, 189, 217, 0.08);
  }

  .btn-sm {
    padding: 0.6rem 1.15rem;
    font-size: 0.84rem;
  }

  /* ---- Eyebrows & Section Headings ---- */
  .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 0.9rem;
  }

  .eyebrow::before {
    content: '';
    width: 24px;
    height: 1.5px;
    background: var(--gold);
  }

  .section-header {
    max-width: 760px;
    margin-bottom: clamp(2.25rem, 4vw, 3.5rem);
  }

  .section-header.centered {
    margin-inline: auto;
    text-align: center;
  }

  .section-header.centered .eyebrow {
    justify-content: center;
  }

  .section-header.centered .eyebrow::after {
    content: '';
    width: 24px;
    height: 1.5px;
    background: var(--gold);
  }

  .section-title {
    font-size: var(--text-2xl);
    margin-bottom: 1rem;
  }

  .section-lead {
    font-size: var(--text-lg);
    line-height: 1.65;
  }

  .italic-accent {
    font-style: italic;
    font-weight: 500;
    color: var(--gold);
  }

  /* ---- Hero Section ---- */
  .hero {
    position: relative;
    padding-block: clamp(3.5rem, 6vw, 5.75rem) clamp(4rem, 6.5vw, 6rem);
    background:
      radial-gradient(circle at 88% 12%, rgba(47, 121, 156, 0.12), transparent 44%),
      radial-gradient(circle at 8% 85%, rgba(30, 77, 114, 0.08), transparent 46%),
      var(--bg-canvas);
    border-bottom: 1px solid var(--border-light);
    overflow: hidden;
  }

  .hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
    gap: clamp(2.25rem, 4.5vw, 4.5rem);
    align-items: center;
  }

  .hero-title {
    font-size: var(--text-hero);
    line-height: 1.04;
    margin-bottom: 1.35rem;
    color: var(--ink-primary);
  }

  .hero-lead {
    font-size: var(--text-lg);
    max-width: 60ch;
    margin-bottom: 2rem;
    color: var(--ink-secondary);
  }

  .hero-ctas {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
  }

  .hero-practice-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--border-light);
  }

  .hero-practice-pill {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 0.95rem 1.05rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    transition: border-color var(--duration) var(--ease), transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
  }

  .hero-practice-pill:hover {
    border-color: var(--gold);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
  }

  .pill-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 0.42rem;
    flex-shrink: 0;
  }

  .pill-dot.ipr { background: var(--ipr-accent); }
  .pill-dot.dev { background: var(--dev-accent); }

  .hero-practice-pill strong {
    display: block;
    font-size: 0.92rem;
    color: var(--ink-primary);
    margin-bottom: 0.15rem;
  }

  .hero-practice-pill span {
    font-size: 0.8rem;
    color: var(--ink-muted);
    line-height: 1.45;
    display: block;
  }

  .hero-visual-wrap {
    position: relative;
  }

  .hero-frame {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-dark);
    box-shadow: var(--shadow-lg);
    aspect-ratio: 4 / 4.2;
  }

  .hero-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 900ms var(--ease);
  }

  .hero-frame:hover img {
    transform: scale(1.03);
  }

  .hero-frame::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(13, 38, 62, 0.04) 40%, rgba(13, 38, 62, 0.72) 100%);
    pointer-events: none;
  }

  .hero-floating-card {
    position: absolute;
    left: 1.25rem;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 2;
    background: rgba(13, 38, 62, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(116, 189, 217, 0.28);
    border-radius: var(--radius-md);
    padding: 1.15rem 1.3rem;
    color: var(--ink-on-dark);
  }

  .hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
  }

  .hero-metric {
    border-right: 1px solid rgba(255, 255, 255, 0.14);
    padding-right: 0.75rem;
  }

  .hero-metric:last-child {
    border-right: none;
    padding-right: 0;
  }

  .hero-metric-val {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--gold-light);
    line-height: 1;
    margin-bottom: 0.25rem;
  }

  .hero-metric-label {
    font-size: 0.72rem;
    color: var(--ink-on-dark-muted);
    line-height: 1.3;
  }

  /* ---- Page Hero (Inner Pages) ---- */
  .page-hero {
    background: var(--bg-dark);
    color: var(--ink-on-dark);
    padding-block: clamp(3.5rem, 6vw, 5.5rem);
    position: relative;
    overflow: hidden;
  }

  .page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
      radial-gradient(circle at 85% 20%, rgba(47, 121, 156, 0.28), transparent 46%),
      radial-gradient(circle at 12% 90%, rgba(28, 107, 116, 0.24), transparent 48%);
    pointer-events: none;
  }

  .page-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 820px;
  }

  .breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--ink-on-dark-muted);
    margin-bottom: 1.25rem;
  }

  .breadcrumb a:hover {
    color: var(--gold-light);
  }

  .page-hero h1 {
    font-size: var(--text-3xl);
    color: var(--ink-on-dark);
    margin-bottom: 1rem;
  }

  .page-hero p {
    font-size: var(--text-lg);
    color: var(--ink-on-dark-muted);
    max-width: 66ch;
  }

  /* ---- Dual Practice Pillar Cards ---- */
  .pillar-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease), border-color var(--duration) var(--ease);
  }

  .pillar-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(47, 121, 156, 0.48);
  }

  .pillar-media {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--bg-dark);
  }

  .pillar-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 700ms var(--ease);
  }

  .pillar-card:hover .pillar-media img {
    transform: scale(1.04);
  }

  .pillar-tag {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.35rem 0.8rem;
    border-radius: var(--radius-pill);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
    color: #fff;
  }

  .pillar-tag.ipr { background: rgba(30, 77, 114, 0.9); }
  .pillar-tag.dev { background: rgba(28, 107, 116, 0.9); }

  .pillar-body {
    padding: clamp(1.5rem, 2.5vw, 2.25rem);
    display: flex;
    flex-direction: column;
    flex: 1;
  }

  .pillar-subtitle {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 0.5rem;
  }

  .pillar-body h3 {
    font-size: var(--text-xl);
    margin-bottom: 0.85rem;
    color: var(--ink-primary);
  }

  .pillar-body p {
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
  }

  .pillar-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1.6rem;
  }

  .chip {
    font-size: 0.78rem;
    font-weight: 500;
    padding: 0.32rem 0.72rem;
    border-radius: var(--radius-pill);
    background: var(--bg-subtle);
    color: var(--ink-secondary);
    border: 1px solid var(--border-light);
  }

  .chip-dark {
    background: rgba(255, 255, 255, 0.07);
    color: var(--ink-on-dark);
    border-color: var(--border-dark);
  }

  .pillar-footer {
    margin-top: auto;
    padding-top: 1.1rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ink-primary);
    transition: color 200ms var(--ease), gap 200ms var(--ease);
  }

  .link-arrow:hover {
    color: var(--gold);
    gap: 0.7rem;
  }

  /* ---- Interactive Tabs & Service Cards ---- */
  .tabs-bar {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem;
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    margin-bottom: 2.25rem;
    flex-wrap: wrap;
  }

  .tab-btn {
    padding: 0.68rem 1.35rem;
    border: none;
    background: transparent;
    border-radius: calc(var(--radius-md) - 4px);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ink-secondary);
    cursor: pointer;
    transition: background-color 220ms var(--ease), color 220ms var(--ease), box-shadow 220ms var(--ease);
  }

  .tab-btn.active {
    background: var(--bg-surface);
    color: var(--ink-primary);
    box-shadow: var(--shadow-sm);
  }

  .tab-panel {
    display: none;
    animation: fadeUp 380ms var(--ease);
  }

  .tab-panel.active {
    display: block;
  }

  .service-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: border-color var(--duration) var(--ease), transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
  }

  .service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 1.75rem;
    right: 1.75rem;
    height: 2px;
    background: transparent;
    transition: background-color var(--duration) var(--ease);
  }

  .service-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-medium);
    box-shadow: var(--shadow-md);
  }

  .service-card:hover::before {
    background: var(--gold);
  }

  .service-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.15rem;
    background: var(--ipr-soft);
    color: var(--ipr-accent);
  }

  .service-icon.dev {
    background: var(--dev-soft);
    color: var(--dev-accent);
  }

  .service-icon.gold {
    background: var(--gold-soft);
    color: var(--gold);
  }

  .service-card h3 {
    font-family: var(--font-serif);
    font-size: 1.45rem;
    margin-bottom: 0.65rem;
    color: var(--ink-primary);
  }

  .service-card p {
    font-size: 0.92rem;
    line-height: 1.6;
    margin-bottom: 1.1rem;
  }

  .bullet-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: auto;
  }

  .bullet-list li {
    position: relative;
    padding-left: 1.15rem;
    font-size: 0.87rem;
    color: var(--ink-secondary);
    line-height: 1.5;
  }

  .bullet-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.52rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold);
  }

  /* ---- Detailed Practice Sections (Inner Pages) ---- */
  .practice-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: clamp(2rem, 4vw, 3.5rem);
    align-items: start;
  }

  .practice-sidebar {
    position: sticky;
    top: calc(var(--header-height) + 1.5rem);
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.35rem;
  }

  .sidebar-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 0.9rem;
  }

  .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }

  .sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.58rem 0.75rem;
    font-size: 0.86rem;
    font-weight: 500;
    color: var(--ink-secondary);
    border-radius: var(--radius-xs);
    transition: background-color 200ms var(--ease), color 200ms var(--ease);
  }

  .sidebar-nav a:hover,
  .sidebar-nav a.active {
    background: var(--bg-subtle);
    color: var(--ink-primary);
  }

  .sidebar-index {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--gold);
  }

  .search-filter-box {
    margin-bottom: 1.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    padding: 0.75rem 1.1rem;
    box-shadow: var(--shadow-sm);
  }

  .search-filter-box input {
    border: none;
    outline: none;
    width: 100%;
    background: transparent;
    font-size: 0.94rem;
  }

  .practice-block {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: clamp(1.6rem, 3vw, 2.5rem);
    margin-bottom: 1.75rem;
    scroll-margin-top: calc(var(--header-height) + 1.5rem);
    box-shadow: var(--shadow-sm);
  }

  .practice-block-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1.25rem;
    margin-bottom: 1.35rem;
    border-bottom: 1px solid var(--border-light);
  }

  .practice-code {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gold);
    background: var(--gold-soft);
    padding: 0.3rem 0.65rem;
    border-radius: var(--radius-xs);
    flex-shrink: 0;
  }

  .practice-block h2 {
    font-size: clamp(1.55rem, 1.3rem + 1vw, 2.05rem);
    margin-bottom: 0.45rem;
  }

  .service-checklist {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem 1.75rem;
  }

  .service-checklist li {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    font-size: 0.92rem;
    color: var(--ink-secondary);
    line-height: 1.55;
  }

  .check-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 0.2rem;
    color: var(--gold);
  }

  /* ---- 5-Step Approach Stepper ---- */
  .steps-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1.15rem;
  }

  .step-card {
    background: var(--bg-dark-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-md);
    padding: 1.5rem 1.35rem;
    display: flex;
    flex-direction: column;
    transition: border-color var(--duration) var(--ease), background-color var(--duration) var(--ease), transform var(--duration) var(--ease);
  }

  .step-card:hover {
    border-color: rgba(116, 189, 217, 0.58);
    background: rgba(255, 255, 255, 0.085);
    transform: translateY(-3px);
  }

  .step-num {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--brand-sky);
    margin-bottom: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
  }

  .step-num::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(116, 189, 217, 0.32);
  }

  .step-card h4 {
    font-family: var(--font-serif);
    font-size: 1.28rem;
    font-weight: 600;
    color: var(--ink-on-dark);
    margin-bottom: 0.65rem;
    line-height: 1.2;
  }

  .step-card p {
    font-size: 0.86rem;
    line-height: 1.6;
    color: var(--ink-on-dark-muted);
  }

  /* Light Steps (Approach Page) */
  .step-timeline {
    display: grid;
    gap: 1.25rem;
  }

  .step-row {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.65rem;
    box-shadow: var(--shadow-sm);
  }

  .step-badge-lg {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 700;
    background: var(--brand-navy);
    color: var(--brand-sky);
    border: 1px solid rgba(116, 189, 217, 0.35);
  }

  /* ---- Partner Cards ---- */
  .partner-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: clamp(1.75rem, 3vw, 2.5rem);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 1.35rem;
  }

  .partner-header {
    display: flex;
    align-items: center;
    gap: 1.35rem;
    padding-bottom: 1.35rem;
    border-bottom: 1px solid var(--border-light);
  }

  .partner-monogram {
    width: 82px;
    height: 82px;
    border-radius: 16px;
    background: linear-gradient(135deg, #0d263e 0%, #1e4d72 100%);
    border: 1px solid rgba(116, 189, 217, 0.45);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--brand-sky);
    position: relative;
    overflow: hidden;
  }

  .partner-monogram.dev {
    background: linear-gradient(135deg, #10323a 0%, #1c6b74 100%);
  }

  .partner-monogram span {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1;
  }

  .partner-monogram small {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.8;
    margin-top: 4px;
  }

  .partner-role {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 0.25rem;
  }

  .partner-name {
    font-family: var(--font-serif);
    font-size: 1.85rem;
    color: var(--ink-primary);
    margin-bottom: 0.35rem;
  }

  .partner-creds {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .cred-pill {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    padding: 0.22rem 0.55rem;
    border-radius: var(--radius-xs);
    background: var(--bg-subtle);
    color: var(--ink-primary);
    border: 1px solid var(--border-light);
  }

  /* ---- Institutions / Logo Strip ---- */
  .institutions-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .inst-pill {
    padding: 0.62rem 1.05rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--ink-primary);
    box-shadow: var(--shadow-sm);
  }

  .section-dark .inst-pill {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-dark);
    color: var(--ink-on-dark);
    box-shadow: none;
  }

  /* ---- Callout Banner ---- */
  .cta-banner {
    background: linear-gradient(130deg, #0d263e 0%, #1e4d72 58%, #1c6b74 100%);
    color: var(--ink-on-dark);
    border-radius: var(--radius-lg);
    padding: clamp(2.5rem, 5vw, 4rem);
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) auto;
    gap: 2rem;
    align-items: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
  }

  .cta-banner::after {
    content: '';
    position: absolute;
    right: -60px;
    top: -60px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    border: 1px solid rgba(116, 189, 217, 0.28);
    pointer-events: none;
  }

  .cta-banner h2 {
    font-size: var(--text-2xl);
    color: var(--ink-on-dark);
    margin-bottom: 0.75rem;
  }

  .cta-banner p {
    color: var(--ink-on-dark-muted);
    max-width: 58ch;
  }

  /* ---- Contact Form & Office Cards ---- */
  .form-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: clamp(1.75rem, 3vw, 2.75rem);
    box-shadow: var(--shadow-md);
  }

  .form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.15rem;
  }

  .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
  }

  .form-group.full {
    grid-column: 1 / -1;
  }

  .form-group label {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--ink-primary);
  }

  .form-control {
    padding: 0.78rem 0.95rem;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    background: var(--bg-canvas);
    font-size: 0.94rem;
    color: var(--ink-primary);
    transition: border-color 200ms var(--ease), background-color 200ms var(--ease);
  }

  .form-control:focus {
    outline: none;
    border-color: var(--gold);
    background: var(--bg-surface);
  }

  textarea.form-control {
    min-height: 130px;
    resize: vertical;
  }

  .form-toast {
    display: none;
    margin-top: 1.25rem;
    padding: 1.1rem 1.25rem;
    border-radius: var(--radius-sm);
    background: rgba(24, 76, 69, 0.1);
    border: 1px solid rgba(24, 76, 69, 0.35);
    color: #103832;
    font-size: 0.92rem;
  }

  .form-toast.visible {
    display: block;
    animation: fadeUp 300ms var(--ease);
  }

  .office-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.15rem;
    box-shadow: var(--shadow-sm);
  }

  .office-card h3 {
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
  }

  /* ---- Footer ---- */
  .site-footer {
    background: #081a2c;
    color: var(--ink-on-dark-muted);
    padding-top: 4.5rem;
    border-top: 1px solid var(--border-dark);
  }

  .footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.25fr;
    gap: clamp(2rem, 3.5vw, 3rem);
    padding-bottom: 3.5rem;
    border-bottom: 1px solid var(--border-dark);
  }

  .footer-heading {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold-light);
    margin-bottom: 1.15rem;
  }

  .footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.62rem;
    font-size: 0.9rem;
  }

  .footer-links a {
    transition: color 200ms var(--ease);
  }

  .footer-links a:hover {
    color: #ffffff;
  }

  .footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    font-size: 0.88rem;
    margin-bottom: 0.85rem;
    line-height: 1.55;
  }

  .footer-bottom {
    padding-block: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: rgba(244, 248, 251, 0.58);
  }

  .disclaimer-note {
    font-size: 0.76rem;
    line-height: 1.55;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-sm);
    margin-top: 2rem;
    color: rgba(244, 248, 251, 0.62);
  }

  /* ---- Reveal Animation ---- */
  [data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 650ms var(--ease), transform 650ms var(--ease);
  }

  [data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ---- Responsive Breakpoints ---- */
@media (max-width: 1100px) {
  .steps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .practice-layout {
    grid-template-columns: 1fr;
  }
  .practice-sidebar {
    position: static;
  }
}

@media (max-width: 960px) {
  .nav-desktop,
  .header-actions .btn-primary {
    display: none;
  }
  .mobile-menu-btn {
    display: inline-flex;
  }
  .hero-grid,
  .grid-2,
  .cta-banner {
    grid-template-columns: 1fr;
  }
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero-frame {
    aspect-ratio: 16 / 11;
  }
}

@media (max-width: 640px) {
  .utility-bar {
    display: none;
  }
  .grid-3,
  .grid-4,
  .steps-grid,
  .hero-practice-strip,
  .service-checklist,
  .form-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .hero-metrics {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }
  .hero-metric {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    padding-right: 0;
    padding-bottom: 0.6rem;
  }
  .hero-metric:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }
  .step-row {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }
  .partner-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

