/* ============================================
   REVENUE AUTHORITY PARTNERS — v2
   Premium Institutional Rebuild
   ============================================ */

/* ---- TOKENS ---- */
:root {
  --navy:         #0A1A2F;
  --navy-deep:    #071422;
  --white:        #FFFFFF;
  --off-white:    #F0EEE9;
  --steel:        #5A646E;
  --steel-mid:    #7A8690;
  --steel-light:  #9AABB5;
  --rule:         rgba(255,255,255,0.08);
  --rule-mid:     rgba(255,255,255,0.13);

  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-body:    'Inter', -apple-system, sans-serif;

  --text-xs:   clamp(0.6875rem, 0.65rem + 0.2vw, 0.75rem);
  --text-sm:   clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-base: clamp(0.9375rem, 0.88rem + 0.3vw, 1.0625rem);
  --text-lg:   clamp(1.125rem, 1rem + 0.6vw, 1.5rem);
  --text-xl:   clamp(1.75rem, 1rem + 2.5vw, 3rem);
  --text-2xl:  clamp(2.5rem, 1rem + 5vw, 5.5rem);

  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  --content-narrow: 680px;
  --content-mid:    900px;
  --content-wide:   1160px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:  cubic-bezier(0.4, 0, 1, 1);
  --t-fast:   180ms;
  --t-mid:    350ms;
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-padding-top: var(--space-16);
}

body {
  min-height: 100dvh;
  background-color: var(--navy);
  color: var(--white);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  overflow-x: hidden;
  cursor: none;
}

a { color: inherit; text-decoration: none; cursor: none; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { text-wrap: balance; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   NOISE TEXTURE
   ============================================ */
.noise {
  position: fixed;
  inset: -200%;
  width: 400%;
  height: 400%;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.032;
  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)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  animation: noise-shift 8s steps(2) infinite;
}

@keyframes noise-shift {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-2%, -1%); }
  50%  { transform: translate(-1%, 2%); }
  75%  { transform: translate(2%, -1%); }
  100% { transform: translate(0, 0); }
}

/* ============================================
   CUSTOM CURSOR
   ============================================ */
.cursor {
  position: fixed;
  top: -18px;   /* offset half of 36px height so GSAP x/y centers on mouse */
  left: -18px;  /* offset half of 36px width */
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: width 0.3s var(--ease-out),
              height 0.3s var(--ease-out),
              border-color 0.3s var(--ease-out);
  will-change: transform, opacity;
}

.cursor-dot {
  position: fixed;
  top: -2px;   /* offset half of 4px height */
  left: -2px;  /* offset half of 4px width */
  width: 4px;
  height: 4px;
  background: var(--white);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  opacity: 0;
  will-change: transform, opacity;
}

.cursor.is-hovering {
  width: 56px;
  height: 56px;
  border-color: rgba(255,255,255,0.6);
}

/* ============================================
   WATERMARK
   ============================================ */
.watermark {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
  width: min(55vw, 480px);
  opacity: 0.022;
  user-select: none;
  color: var(--white);
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  padding: var(--space-6) var(--space-8);
  border-bottom: 1px solid transparent;
  transition: background var(--t-mid) var(--ease-out),
              border-color var(--t-mid) var(--ease-out);
}

.nav.scrolled {
  background: rgba(10, 26, 47, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--rule);
}

.nav__inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.nav__left { display: flex; gap: var(--space-8); }
.nav__right { display: flex; justify-content: flex-end; }

.nav__link {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel-mid);
  transition: color var(--t-fast) var(--ease-out);
}
.nav__link:hover { color: var(--white); }

.wordmark-text {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--white);
  white-space: nowrap;
  display: block;
  text-align: center;
}

.nav__cta {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.22);
  padding: var(--space-2) var(--space-4);
  transition: border-color var(--t-fast) var(--ease-out),
              background var(--t-fast) var(--ease-out);
}
.nav__cta:hover {
  border-color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.04);
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-24) var(--space-8) var(--space-16);
  text-align: center;
  overflow: hidden;
}

.hero__inner {
  max-width: var(--content-mid);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-8);
}

.hero__eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--steel-mid);
}

.hero__headline {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.08em;
}

.hero__line {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 1rem + 5.5vw, 5.75rem);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.015em;
  color: var(--white);
}

.hero__line--sub {
  font-weight: 400;
  color: rgba(255,255,255,0.55);
  font-style: italic;
}

.hero__cta-wrap { margin-top: var(--space-4); }

.hero__scroll-hint {
  position: absolute;
  bottom: var(--space-10);
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
}

.scroll-line {
  display: block;
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.5), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.1); }
}

/* ============================================
   PRIMARY BUTTON
   ============================================ */
.btn-primary {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--navy);
  background: var(--white);
  padding: calc(var(--space-3) + 2px) var(--space-10);
  transition: background var(--t-fast) var(--ease-out),
              color var(--t-fast) var(--ease-out),
              transform var(--t-fast) var(--ease-out);
}
.btn-primary:hover {
  background: var(--off-white);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

/* ============================================
   MARQUEE
   ============================================ */
.marquee-wrap {
  position: relative;
  z-index: 1;
  overflow: hidden;
  padding: var(--space-6) 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.marquee-track {
  display: flex;
  gap: var(--space-6);
  white-space: nowrap;
  width: max-content;
  animation: marquee-scroll 28s linear infinite;
}

.marquee-wrap--reverse .marquee-track--reverse {
  animation: marquee-scroll-reverse 32s linear infinite;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@keyframes marquee-scroll-reverse {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}

.marquee-item {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--steel);
}

.marquee-sep {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: rgba(90, 100, 110, 0.35);
  letter-spacing: 0;
}

/* ============================================
   RULE LINES
   ============================================ */
.rule-line {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--content-wide);
  margin: 0 auto;
  height: 1px;
  background: var(--rule-mid);
  opacity: 0;
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
  position: relative;
  z-index: 1;
  padding: clamp(var(--space-16), 10vw, var(--space-24)) var(--space-8);
}

.section--narrow .section__inner,
.section--logic .section__inner,
.section--close .section__inner {
  max-width: var(--content-narrow);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.section--cases .section__inner {
  max-width: var(--content-mid);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
}

/* ============================================
   STAGGER LINES (GSAP targets)
   ============================================ */
[data-stagger-block] [data-line],
[data-stagger-block] span[data-line] {
  display: block;
  opacity: 0;
  transform: translateY(8px);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
.body-large {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--white);
}

.body-large--dim { color: var(--steel-light); font-weight: 400; }

.body-statement {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 300;
  line-height: 1.85;
  color: var(--steel-mid);
  max-width: 60ch;
}

.body-statement--indent {
  padding-left: var(--space-6);
  border-left: 1px solid var(--rule-mid);
}

.body-statement--white { color: rgba(255,255,255,0.88); font-weight: 400; }
.body-statement--sm { font-size: var(--text-sm); }
.body-statement--spaced { margin-top: var(--space-4); }

/* Triad stack */
.triad-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--rule);
}

.triad-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: var(--space-8);
  align-items: baseline;
  padding: var(--space-6) 0;
  border-bottom: 1px solid var(--rule);
}

.triad-label {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--white);
  white-space: nowrap;
}

.triad-desc {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 300;
  line-height: 1.8;
  color: var(--steel-mid);
}

@media (max-width: 560px) {
  .triad-item {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }
}

/* Logic block */
.logic-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.logic-line {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--white);
}

.logic-line--dim { color: var(--steel); font-weight: 400; }

/* Label */
.label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--steel);
  opacity: 0;
}

/* ============================================
   CASE STUDIES
   ============================================ */
.cases { display: flex; flex-direction: column; }

.case {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
  padding: var(--space-12) 0;
  opacity: 0;
}

.case-divider {
  width: 100%;
  height: 1px;
  background: var(--rule);
  opacity: 0;
}

.case__numbers {
  display: flex;
  align-items: baseline;
  gap: var(--space-4);
}

.case__from {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 300;
  color: var(--steel);
  letter-spacing: -0.02em;
}

.case__arrow {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: rgba(90,100,110,0.4);
}

.case__to {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 500;
  color: var(--white);
  letter-spacing: -0.02em;
}

.case__detail {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 300;
  line-height: 1.85;
  color: var(--steel-mid);
  max-width: 38ch;
}

/* ============================================
   CLOSING CTA
   ============================================ */
.close-cta { margin-top: var(--space-8); opacity: 0; }

/* ============================================
   FOOTER
   ============================================ */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--rule);
  padding: var(--space-10) var(--space-8);
}

.footer__inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.footer__left { display: flex; align-items: center; }

.footer__monogram {
  width: 28px;
  height: 28px;
  color: var(--steel);
  opacity: 0.4;
}

.footer__center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.footer__name {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--steel-mid);
}

.footer__domain {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--steel);
  opacity: 0.6;
}

.footer__right { display: flex; justify-content: flex-end; }

.footer__copy {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 300;
  color: var(--steel);
  opacity: 0.35;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  body { cursor: auto; }
  .cursor, .cursor-dot { display: none; }

  .nav__inner {
    grid-template-columns: 1fr auto 1fr;
    grid-template-rows: auto auto;
    row-gap: var(--space-3);
  }
  .nav__logo {
    display: flex;
    grid-column: 1 / -1;
    grid-row: 1;
    justify-content: center;
  }
  .nav__left {
    grid-column: 1;
    grid-row: 2;
    gap: var(--space-4);
    align-items: center;
  }
  .nav__right {
    grid-column: 3;
    grid-row: 2;
    align-items: center;
  }

  .nav__cta {
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    padding: var(--space-2) var(--space-3);
    white-space: nowrap;
  }

  .nav__link {
    font-size: 0.6rem;
    letter-spacing: 0.1em;
  }

  .case { grid-template-columns: 1fr; gap: var(--space-4); }

  .triad {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }

  .footer__inner {
    grid-template-columns: 1fr;
    gap: var(--space-6);
    text-align: center;
  }
  .footer__left, .footer__right { justify-content: center; }
}

@media (max-width: 480px) {
  .nav { padding: var(--space-4) var(--space-6); }
  .section { padding: clamp(var(--space-12), 8vw, var(--space-20)) var(--space-6); }
}
