/* ================================================================
   ETF AUSTRALIA — DESIGN TOKENS
   Perspective design system on dark surfaces: high-contrast,
   spatial depth. Legacy variable names kept so component CSS
   stays stable:
     --ink-*   = surface scale (black → gray)
     --ivory-* = text scale (near-white → gray)
     --volt    = primary #00BD7D
     --volt-deep = accent for text/details on dark (brighter)
   ================================================================ */

:root {
  /* ---- Surface scale ---- */
  --ink-000: #050608;        /* deepest section bg */
  --ink-050: #0A0B0D;        /* page base */
  --ink-100: #111317;        /* card / panel */
  --ink-200: #1A1D22;        /* elevated */
  --ink-300: #24282F;        /* hairline on dark */
  --ink-400: #3A3F48;
  --ink-500: #5A616C;
  --ink-600: #8A909B;

  /* ---- Text scale ---- */
  --ivory-900: #F4F6F8;      /* primary text */
  --ivory-700: #C3C9D1;
  --ivory-500: #8A919C;
  --ivory-300: #626973;

  /* ---- Signature accent: perspective green ---- */
  --volt: #00BD7D;
  --volt-deep: #00D68F;      /* text-accent on dark needs the brighter cut */
  --volt-glow: rgba(0, 189, 125, 0.22);

  /* ---- Semantic status ---- */
  --success: #16A34A;
  --warning: #D97706;
  --danger: #DC2626;
  --copper: #D97706;
  --copper-dim: #B45309;

  /* ---- Semantic ---- */
  --bg: var(--ink-050);
  --bg-elev: var(--ink-100);
  --fg: var(--ivory-900);
  --fg-dim: var(--ivory-500);
  --hair: rgba(244, 246, 248, 0.08);
  --hair-strong: rgba(244, 246, 248, 0.16);
  --accent: var(--volt);

  /* ---- Type ---- */
  --font-display: 'Oswald', 'Arial Narrow', sans-serif;
  --font-ui: 'Poppins', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;

  /* ---- Scale (12 / 14 / 16 / 20 / 24 / 32 + display steps) ---- */
  --step-0: 0.75rem;       /* 12 */
  --step-1: 0.875rem;      /* 14 */
  --step-2: 1rem;          /* 16 */
  --step-3: 1.25rem;       /* 20 */
  --step-4: 1.5rem;        /* 24 */
  --step-5: 2rem;          /* 32 */
  --step-6: 2.75rem;       /* 44 */
  --step-7: 4rem;          /* 64 */
  --step-8: 6rem;          /* 96 */
  --step-9: 9rem;          /* 144 */
  --step-10: 13rem;        /* 208 */

  /* ---- Spacing (4 / 8 / 12 / 16 / 24 / 32) ---- */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;

  /* ---- Layout ---- */
  --max: 1440px;
  --gutter: clamp(20px, 3vw, 48px);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;

  /* ---- Depth: layered elevation ---- */
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-2: 0 2px 4px rgba(0, 0, 0, 0.35), 0 12px 32px rgba(0, 0, 0, 0.45);
  --shadow-3: 0 4px 8px rgba(0, 0, 0, 0.4), 0 24px 64px rgba(0, 0, 0, 0.55);
  --shadow-accent: 0 8px 24px rgba(0, 189, 125, 0.28);

  /* ---- Motion ---- */
  --ease-cine: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);
  --dur-1: 220ms;
  --dur-2: 480ms;
  --dur-3: 900ms;
  --dur-4: 1400ms;
}

/* ================================================================
   RESET / BASE
   ================================================================ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip; }
body {
  font-family: var(--font-ui);
  font-size: var(--step-2);
  line-height: 1.5;
  color: var(--fg);
  background: var(--bg);
  overflow-x: clip;
  min-height: 100vh;
  cursor: auto;
  font-weight: 400;
}
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
a { color: inherit; text-decoration: none; cursor: pointer; }
h1, h2, h3, h4, h5, h6, p { margin: 0; }

/* Keyboard-first: visible focus everywhere */
:focus-visible {
  outline: 2px solid var(--volt);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Selection */
::selection { background: var(--volt); color: #052E1F; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink-050); }
::-webkit-scrollbar-thumb { background: var(--ink-300); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-400); }

/* ================================================================
   TYPE UTILS
   ================================================================ */
.display {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 0.96;
  font-style: normal;
}
.display-italic { font-style: normal; font-weight: 600; }

.overline {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-dim);
  font-weight: 500;
}
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.dim { color: var(--fg-dim); }

/* Headline accents: color + weight, never italic */
h1 em, h2 em, h3 em, .subhero h1 em {
  font-style: normal;
  font-weight: 600;
  color: var(--volt-deep);
}

/* ================================================================
   SHARED ELEMENTS
   ================================================================ */
.hair { height: 1px; background: var(--hair); width: 100%; border: 0; }
.hair-strong { background: var(--hair-strong); }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--sp-5);
}

/* ---- Depth primitives (perspective system) ---- */
.layer-card {
  background: var(--ink-100);
  border: 1px solid var(--hair);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-1);
  transition: transform var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out);
}
.layer-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-2);
}

/* Vanishing-point floor grid — apply to a positioned container */
.grid-floor::before {
  content: '';
  position: absolute; left: -20%; right: -20%; bottom: 0; height: 62%;
  background-image:
    linear-gradient(var(--hair-strong) 1px, transparent 1px),
    linear-gradient(90deg, var(--hair-strong) 1px, transparent 1px);
  background-size: 48px 48px;
  transform: perspective(600px) rotateX(58deg);
  transform-origin: center bottom;
  mask-image: linear-gradient(180deg, transparent 0%, black 55%, black 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, black 55%, black 100%);
  opacity: 0.5;
  pointer-events: none;
}



/* ---- Nav ---- */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 80;
  padding: 22px var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-5);
  mix-blend-mode: difference;
  color: #FFFFFF;
  transition: transform 480ms var(--ease-out), background 320ms var(--ease-out), padding 320ms var(--ease-out);
}
.nav.scrolled {
  mix-blend-mode: normal;
  background: rgba(10, 11, 13, 0.72);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--hair);
  padding-top: 14px; padding-bottom: 14px;
}
.nav.nav-hidden { transform: translateY(-100%); }
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-size: 22px; letter-spacing: 0.02em;
  font-weight: 500; text-transform: uppercase;
}
/* Monochrome mark: stays legible under difference blending */
.nav-brand .brand-mark {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid currentColor;
  display: inline-block;
  position: relative;
}
.nav-brand .brand-mark::before {
  content: ''; position: absolute; left: 50%; top: 50%;
  width: 10px; height: 2px; background: currentColor;
  transform: translate(-50%, -50%) rotate(45deg);
}
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-link {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  position: relative;
  padding: 6px 0;
}
.nav-link::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  height: 2px; width: 0; background: currentColor;
  transition: width 300ms var(--ease-out);
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-cta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 10px 18px;
  border: 1px solid currentColor;
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: background 260ms var(--ease-out), color 260ms var(--ease-out);
}
.nav-cta:hover { background: #FFFFFF; color: #000000; }

/* ---- Footer ---- */
.foot {
  border-top: 1px solid var(--hair);
  padding: 72px var(--gutter) 40px;
  margin-top: 120px;
  background: var(--ink-100);
}
.foot-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px; max-width: var(--max); margin: 0 auto;
}
.foot h4 {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--fg-dim);
  margin-bottom: 18px; font-weight: 500;
}
.foot ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.foot-bottom {
  max-width: var(--max); margin: 56px auto 0;
  display: flex; justify-content: space-between; align-items: baseline;
  padding-top: 28px; border-top: 1px solid var(--hair);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--fg-dim);
}
/* Extruded wordmark: layered shadows recede toward a vanishing point */
.foot-wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(80px, 18vw, 260px);
  line-height: 0.9;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--ink-200);
  text-shadow:
    1px 1px 0 var(--ink-300),
    2px 2px 0 var(--ink-300),
    3px 3px 0 var(--ink-400),
    6px 6px 16px rgba(17, 24, 39, 0.12);
  margin: 48px 0 24px;
  max-width: var(--max); padding: 0 var(--gutter);
  margin-left: auto; margin-right: auto;
  user-select: none;
}
.wm-dot {
  display: inline-block; width: 0.14em; height: 0.14em; border-radius: 50%;
  background: var(--volt); vertical-align: middle; margin: 0 0.08em;
  transform: translateY(-0.05em);
  text-shadow: none;
}



/* ---- Pill / tag ---- */
.pill {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase;
  padding: 7px 14px; border: 1px solid var(--hair-strong);
  border-radius: 999px; color: var(--fg-dim);
  background: var(--ink-100);
  box-shadow: var(--shadow-1);
}
.pill .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--volt);
  box-shadow: 0 0 12px var(--volt-glow);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ---- Button ---- */
.btn {
  display: inline-flex; align-items: center; gap: var(--sp-3);
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.16em; text-transform: uppercase;
  padding: 16px 26px;
  border: 1px solid var(--fg);
  border-radius: var(--radius-md);
  color: var(--fg);
  background: transparent;
  font-weight: 500;
  box-shadow: var(--shadow-1);
  transition: background 320ms var(--ease-out), color 320ms var(--ease-out),
              border-color 320ms var(--ease-out), transform 320ms var(--ease-out),
              box-shadow 320ms var(--ease-out);
  position: relative;
}
.btn:hover {
  background: var(--fg); color: var(--ink-050);
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}
.btn-primary {
  background: var(--volt); color: #052E1F; border-color: var(--volt);
  box-shadow: var(--shadow-accent);
}
.btn-primary:hover {
  background: var(--ivory-900); border-color: var(--ivory-900); color: var(--ink-050);
}
.btn .arrow {
  display: inline-block; width: 14px; height: 10px;
  transition: transform 320ms var(--ease-out);
}
.btn:hover .arrow { transform: translateX(4px); }

/* ---- Section header ---- */
.section-head {
  padding: 180px var(--gutter) 48px;
  max-width: var(--max); margin: 0 auto;
}
.section-head h2 {
  font-family: var(--font-display); font-size: clamp(40px, 5vw, 76px);
  line-height: 1.05; letter-spacing: 0.01em; font-weight: 500;
  text-transform: uppercase;
}
.section-head h2 em { font-style: normal; color: var(--volt-deep); font-weight: 600; }


/* ================================================================
   RESPONSIVE
   ================================================================ */
/* ---- Mobile menu ---- */
.nav-burger {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 10px;
  border-radius: var(--radius-sm);
}
.nav-burger span {
  display: block; height: 2px; width: 100%;
  background: currentColor; border-radius: 2px;
  transition: transform 280ms var(--ease-out), opacity 200ms var(--ease-out);
}
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 75;
  background: rgba(5, 6, 8, 0.97);
  display: flex; flex-direction: column; justify-content: center;
  gap: var(--sp-4);
  padding: 96px var(--gutter) 48px;
  opacity: 0; pointer-events: none;
  visibility: hidden;
  transition: opacity 320ms var(--ease-out), visibility 0s linear 320ms;
}
.mobile-menu.open { opacity: 1; pointer-events: auto; visibility: visible; transition-delay: 0s; }
.mobile-menu a {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(32px, 9vw, 44px); text-transform: uppercase;
  letter-spacing: 0.015em; color: var(--fg);
  padding: var(--sp-2) 0;
}
.mobile-menu a.active { color: var(--volt-deep); }
.mobile-menu .btn { font-family: var(--font-mono); font-size: 12px; margin-top: var(--sp-5); align-self: flex-start; text-transform: uppercase; }
html.menu-lock, html.menu-lock body { overflow: hidden; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .nav.scrolled { padding-top: 14px; padding-bottom: 14px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}

/* ---- Small screens: nothing clips, everything wraps ---- */
@media (max-width: 600px) {
  .foot-grid { grid-template-columns: 1fr; }
  .foot-bottom { flex-direction: column; gap: 10px; align-items: flex-start; }
}

/* Reduced motion: kill animation AND land every scroll-driven element on its end state */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .tl-event .year { color: var(--fg) !important; }
  .timeline-line { width: 100% !important; }
  .process-rail-fill { transform: scaleX(1) !important; }
}
