/* ===========================================
   Peoplestack — Shared Styles
   =========================================== */

:root {
    --primary: #000000;
    --secondary: #FFFFFF;
    --accent: #666666;
    --dark: #000000;
    --light: #FFFFFF;
    --gray: #666666;
    --gray-light: #F5F5F7;
    --border: #D2D2D7;
    /* On-dark text — meets WCAG AA on #000 backgrounds */
    --on-dark-muted: rgba(255,255,255,0.65);
    --on-dark-subtle: rgba(255,255,255,0.55);
    /* Radii */
    --radius-button: 6px;
    --radius-surface: 12px;
    --radius-pill: 100px;
}

/* ── Filter pill buttons (used on /projects and /about) ── */
.filters-row {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.filter-btn {
    padding: 0.45rem 1.1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: white;
    color: var(--dark);
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.filter-btn:hover { border-color: var(--dark); }

.filter-btn.active {
    background: var(--dark);
    color: white;
    border-color: var(--dark);
}

/* ── Icon utility (SVG sprite at /icons.svg) ── */
.ico {
    width: 1em;
    height: 1em;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: -0.15em;
    flex-shrink: 0;
}

/* ── Skip to content (accessibility) ── */
.skip-link {
    position: absolute;
    top: -48px;
    left: 0;
    background: var(--dark);
    color: var(--light);
    padding: 10px 16px;
    z-index: 10001;
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 14px;
    border-radius: 0 0 6px 0;
    transition: top 0.15s ease;
}

.skip-link:focus {
    top: 0;
    outline: 2px solid #fff;
    outline-offset: -4px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: 80px;
}

/* ─── Navigation ─── */

.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: all 0.3s ease;
}

.main-nav.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
}

.nav-logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark);
    text-decoration: none;
    line-height: 1;
    display: inline-block;
}

.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    color: var(--dark);
    text-decoration: none;
    border: 1px solid var(--dark);
    border-radius: 3px;
    padding: 3px 6px;
    background: transparent;
    transition: background-color 0.2s ease;
    transform: translateY(-0.3em);
}

.nav-badge:hover {
    background: rgba(0, 0, 0, 0.06);
}

.nav-badge--toggle {
    border: none;
    background: transparent;
    padding: 0;
    border-radius: 0;
    transform: none;
    overflow: hidden;
    white-space: nowrap;
    align-items: center;
    transition: background-color 0.25s ease, padding 0.25s ease, border-radius 0.25s ease;
}

.nav-badge--toggle .nav-badge__seg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    line-height: 1;
    color: var(--dark);
    text-decoration: none;
    background: transparent;
    border-radius: 999px;
    transition: max-width 0.28s ease, padding 0.25s ease, opacity 0.2s ease, background-color 0.25s ease, color 0.25s ease, font-size 0.25s ease, font-weight 0.25s ease;
}

.nav-badge--toggle .nav-badge__seg.is-active {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    padding: 0;
    transform: translateY(-0.05em);
}

.nav-badge--toggle .nav-badge__seg.is-link {
    max-width: 0;
    padding: 0;
    opacity: 0;
    overflow: hidden;
    font-size: 13px;
    font-weight: 600;
}

.nav-brand:hover .nav-badge--toggle,
.nav-brand:focus-within .nav-badge--toggle {
    background: rgba(0, 0, 0, 0.06);
    border-radius: 999px;
    padding: 2px;
}

.nav-brand:hover .nav-badge--toggle .nav-badge__seg.is-active,
.nav-brand:focus-within .nav-badge--toggle .nav-badge__seg.is-active {
    background: var(--dark);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 3px 10px;
    transform: none;
}

.nav-brand:hover .nav-badge--toggle .nav-badge__seg.is-link,
.nav-brand:focus-within .nav-badge--toggle .nav-badge__seg.is-link {
    max-width: 60px;
    opacity: 1;
    padding: 3px 10px;
    color: rgba(0, 0, 0, 0.55);
}

.nav-brand:hover .nav-badge--toggle .nav-badge__seg.is-link:hover {
    color: var(--dark);
    background: rgba(0, 0, 0, 0.04);
}

.logo-au {
    font-size: 0.6em;
    font-weight: 500;
    letter-spacing: 0.02em;
    vertical-align: baseline;
    position: relative;
    top: -0.05em;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--dark);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: opacity 0.3s ease;
    position: relative;
}

.nav-link:hover {
    opacity: 0.6;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--dark);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link-cta {
    background: var(--dark);
    color: var(--light);
    padding: 0.5rem 1.5rem;
    border-radius: 100px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-link-cta:hover {
    background: #1A1A1A;
    transform: scale(1.05);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--dark);
    transition: all 0.3s ease;
}

/* ─── Section ─── */

.section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 2rem;
}

.section h2 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2rem, 4vw, 3.5rem);
    color: var(--dark);
    margin-bottom: 3rem;
    text-align: center;
}

/* ─── Page Header (inner pages) ─── */

.page-header {
    background: var(--dark);
    color: white;
    padding: 6rem 2rem 4rem;
    text-align: center;
}

.page-header h1 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto;
}

/* ─── Footer ─── */

.site-footer {
    background: var(--dark);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3rem 2rem;
    text-align: center;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.footer-link {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: white;
}

.footer-copy {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.8rem;
    margin: 0;
}

/* ─── Mobile Responsive ─── */

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: var(--light);
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
        border-bottom: 1px solid var(--border);
        display: none;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-link {
        padding: 1rem 2rem;
        width: 100%;
        text-align: center;
    }

    .nav-link::after {
        display: none;
    }

    .nav-link-cta {
        margin: 0.5rem 2rem;
        text-align: center;
        border-radius: 6px;
    }

    .mobile-menu-toggle {
        display: flex;
    }
}

/* ===========================================
   Peoplestack au — Animations & Motion
   =========================================== */

/* ── View Transitions API ── */
/* Smooth crossfade between pages */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fade-out {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-8px); }
}

::view-transition-old(root) {
  animation: 220ms ease fade-out;
}

::view-transition-new(root) {
  animation: 280ms ease fade-in;
}

/* ── Scroll-triggered Fade-up ── */
/* Elements start invisible and slide up when they enter the viewport */
[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

/* ── Hover lifts on cards ── */
.stat-box {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.stat-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* ── Section headings ── */
/* Subtle left-border accent on section h2 within coloured sections */
.section h2 {
  position: relative;
}

/* ── Page header polish ── */
.page-header {
  position: relative;
  overflow: hidden;
}

/* Subtle grain texture overlay */
.page-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.4;
}

/* ── Footer link underline animation ── */
.footer-link {
  position: relative;
}

.footer-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.6);
  transition: width 0.3s ease;
}

.footer-link:hover::after {
  width: 100%;
}

/* ── Smooth section entrance on page load ── */
/* First visible section fades in slightly faster */
.section:first-of-type {
  animation: fade-in 0.5s ease both;
}

/* ── Nav logo subtle hover ── */
.nav-logo {
  transition: opacity 0.2s ease;
}

.nav-logo:hover {
  opacity: 0.7;
}

/* ── CTA button pulse on hover ── */
.nav-link-cta {
  position: relative;
  overflow: hidden;
}

.nav-link-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.nav-link-cta:hover::before {
  transform: translateX(0);
}

/* ── Mobile: reduce motion ── */
@media (prefers-reduced-motion: reduce) {
  [data-animate] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
  }
}

/* ===========================================
   Unified button system
   ===========================================
   Variants:   .btn-dark · .btn-light · .btn-outline · .btn-ghost
   Modifiers:  .btn-pill · .btn-block · .btn-sm · .btn-lg
   Compose:    <a class="btn btn-dark btn-pill">…</a>
*/
.btn {
    display: inline-block;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.005em;
    padding: 13px 26px;
    border-radius: var(--radius-button);
    border: 1px solid transparent;
    background: transparent;
    color: inherit;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    transition: opacity 0.2s ease, background-color 0.2s ease, color 0.2s ease,
                border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover { opacity: 0.85; }
.btn:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

.btn-dark {
    background: var(--dark);
    color: var(--light);
    border-color: var(--dark);
}

.btn-light {
    background: var(--light);
    color: var(--dark);
    border-color: var(--light);
}

.btn-outline {
    background: transparent;
    color: var(--dark);
    border-color: var(--border);
    font-weight: 500;
}
.btn-outline:hover { opacity: 1; border-color: var(--dark); }

.btn-ghost {
    background: transparent;
    color: inherit;
    border-color: transparent;
    padding: 13px 4px;
    font-weight: 500;
}
.btn-ghost:hover { opacity: 1; }

/* Modifiers */
.btn-pill { border-radius: var(--radius-pill); }
.btn-block { display: block; width: 100%; }
.btn-sm { padding: 9px 18px; font-size: 13px; }
.btn-lg { padding: 16px 32px; font-size: 15px; }

/* Subtle scale lift for primary CTAs in pill form */
.btn-dark.btn-pill:hover,
.btn-light.btn-pill:hover { transform: scale(1.02); }

/* Legacy aliases — kept so any unmigrated markup still renders */
.page-cta-btn { /* alias of .btn .btn-dark */
    display: inline-block;
    background: var(--dark);
    color: var(--light);
    padding: 13px 26px;
    border-radius: var(--radius-button);
    border: 1px solid var(--dark);
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s;
}
.page-cta-btn:hover { opacity: 0.85; }

.page-cta-btn-outline { /* alias of .btn .btn-outline */
    display: inline-block;
    background: transparent;
    color: var(--dark);
    padding: 13px 26px;
    border-radius: var(--radius-button);
    border: 1px solid var(--border);
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s;
}
.page-cta-btn-outline:hover { border-color: var(--dark); }

/* ── Page header — left-aligned editorial ── */
.page-header {
    background: var(--dark);
    color: white;
    padding: 72px 48px 48px;
    text-align: left;
    max-width: 100%;
}

.page-header-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.page-header-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
    margin-bottom: 12px;
}

.page-header h1 {
    font-size: clamp(36px, 5vw, 60px);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.0;
    margin-bottom: 12px;
    text-align: left;
}

.page-header p {
    font-size: 15px;
    color: var(--on-dark-muted);
    max-width: 480px;
    margin: 0;
    text-align: left;
}

/* ── Section labels ── */
.section-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 8px;
    display: block;
}

.section-title {
    font-size: clamp(26px, 3.5vw, 40px);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--dark);
    margin-bottom: 8px;
    line-height: 1.1;
}

.section-sub {
    font-size: 15px;
    color: var(--gray);
    line-height: 1.65;
    max-width: 520px;
    margin-bottom: 36px;
}

/* ── Card style ── */
.ps-card {
    border: 0.5px solid var(--border);
    border-radius: 12px;
    padding: 24px 28px;
    background: #fff;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.ps-card:hover {
    border-color: var(--dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0,0,0,0.07);
}

/* ── Grey info strip ── */
.info-strip {
    background: var(--gray-light);
    border-radius: 12px;
    padding: 28px 32px;
}

/* ── Scroll fade-up animations ── */
.fade-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}
.fade-up.visible {
    opacity: 1;
    transform: none;
}
.fade-up-d1 { transition-delay: 80ms; }
.fade-up-d2 { transition-delay: 160ms; }
.fade-up-d3 { transition-delay: 240ms; }

/* ── Section spacing ── */
.section { padding: 64px 48px; }
.section + .section { padding-top: 0; }

@media (max-width: 768px) {
    .page-header { padding: 56px 24px 36px; }
    .section { padding: 48px 24px; }
    .info-strip { padding: 20px; }
    .nav-badge { font-size: 11px; padding: 2px 5px; }
}
