/* ============================================================
   Senthu Velnayagam — dark emerald, gold accent
   Aesthetic: nocturnal jewel-box, editorial, 3D + parallax
   ============================================================ */

:root {
  --bg:        #041a13;   /* deepest emerald-black */
  --bg-2:      #062a1f;   /* panel emerald */
  --bg-3:      #08382a;   /* raised emerald */
  --ivory:     #f3efe2;   /* warm off-white text */
  --muted:     #9fbcae;   /* desaturated emerald-grey */
  --muted-2:   #6f9485;
  --gold:      #d8b15a;   /* signal accent */
  --gold-soft: #e7cd92;
  --emerald:   #2fcf95;   /* vivid edge accent */
  --line:      rgba(216,177,90,.16);
  --line-soft: rgba(159,188,174,.14);
  --glass:     rgba(8, 48, 36, .55);
  --max: 1180px;
  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
}

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

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

body {
  background: var(--bg);
  color: var(--ivory);
  font-family: 'Instrument Sans', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
}

a { color: inherit; text-decoration: none; }
img { display: block; }
::selection { background: var(--gold); color: #04130d; }

/* ---------- ATMOSPHERE LAYERS ---------- */
#scene {
  position: fixed; inset: 0; z-index: 0;
  width: 100vw; height: 100vh; pointer-events: none;
}
.atmos { position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden; }
.atmos__glow {
  position: absolute; border-radius: 50%;
  filter: blur(90px); opacity: .28; will-change: transform;
}
.atmos__glow--1 {
  width: 60vw; height: 60vw; top: -20vw; left: -10vw;
  background: radial-gradient(circle at 40% 40%, rgba(47,207,149,.35), transparent 70%);
  animation: float1 24s ease-in-out infinite;
}
.atmos__glow--2 {
  width: 50vw; height: 50vw; bottom: -15vw; right: -10vw;
  background: radial-gradient(circle at 50% 50%, rgba(216,177,90,.28), transparent 70%);
  animation: float2 30s ease-in-out infinite;
}
@keyframes float1 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(6vw,8vh)} }
@keyframes float2 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(-7vw,-6vh)} }

.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
.vignette {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 25%, transparent 45%, rgba(2,12,8,.7) 100%),
    linear-gradient(to bottom, transparent 0%, rgba(3,16,11,.35) 60%, rgba(3,16,11,.55) 100%);
}

/* ---------- CUSTOM CURSOR ---------- */
.cursor { position: fixed; inset: 0; z-index: 9999; pointer-events: none; display: none; }
.has-cursor .cursor { display: block; }
.has-cursor, .has-cursor a, .has-cursor button { cursor: none; }
.cursor__dot, .cursor__ring {
  position: absolute; top: 0; left: 0; border-radius: 50%;
  transform: translate(-50%, -50%); will-change: transform;
}
.cursor__dot { width: 6px; height: 6px; background: var(--gold); margin: -3px 0 0 -3px; }
.cursor__ring {
  width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border: 1px solid rgba(216,177,90,.5);
  transition: width .25s var(--ease), height .25s var(--ease), background .25s, border-color .25s;
}
.cursor.is-hover .cursor__ring {
  width: 58px; height: 58px; margin: -29px 0 0 -29px;
  background: rgba(216,177,90,.08); border-color: var(--gold);
}

/* ---------- SCROLL PROGRESS ---------- */
.scrollbar { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 200; background: rgba(255,255,255,.04); }
.scrollbar__fill {
  height: 100%; width: 100%; transform: scaleX(0); transform-origin: left;
  background: linear-gradient(90deg, var(--emerald), var(--gold));
}

/* ---------- LOADER ---------- */
.loader {
  position: fixed; inset: 0; z-index: 500;
  display: grid; place-content: center; gap: 22px; justify-items: center;
  background: var(--bg);
  transition: opacity .7s var(--ease), visibility .7s;
}
.loader.is-done { opacity: 0; visibility: hidden; }
.loader__mark {
  font-family: 'Playfair Display', serif; font-size: 40px; font-weight: 500;
  color: var(--gold); letter-spacing: .04em;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:.5} 50%{opacity:1} }
.loader__bar { width: 120px; height: 2px; background: rgba(216,177,90,.18); overflow: hidden; }
.loader__bar-fill { display: block; height: 100%; width: 40%; background: var(--gold); animation: load 1.1s var(--ease) infinite; }
@keyframes load { 0%{transform:translateX(-120%)} 100%{transform:translateX(320%)} }

/* ---------- NAV ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px clamp(20px, 5vw, 56px);
  transition: padding .4s var(--ease), background .4s;
}
.nav.is-scrolled {
  padding-top: 16px; padding-bottom: 16px;
  background: linear-gradient(to bottom, rgba(4,20,15,.85), rgba(4,20,15,0));
  backdrop-filter: blur(10px);
}
.nav__brand-mark {
  font-family: 'Playfair Display', serif; font-weight: 600; font-size: 22px;
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%; color: var(--gold);
  transition: background .3s var(--ease), color .3s, border-color .3s;
}
.nav__brand:hover .nav__brand-mark { background: var(--gold); color: #04130d; border-color: var(--gold); }
.nav__links { display: flex; align-items: center; gap: clamp(18px, 3vw, 38px); font-size: 15px; font-weight: 500; }
.nav__links a:not(.nav__cta) { color: var(--muted); position: relative; padding: 4px 0; transition: color .25s; }
.nav__links a:not(.nav__cta)::after {
  content: ''; position: absolute; left: 0; bottom: -2px; width: 0; height: 1.5px;
  background: var(--gold); transition: width .3s var(--ease);
}
.nav__links a:not(.nav__cta):hover, .nav__links a.is-active { color: var(--ivory); }
.nav__links a.is-active::after { width: 100%; }
.nav__cta {
  padding: 10px 20px; border-radius: 99px; font-weight: 600;
  border: 1px solid var(--gold); color: var(--gold);
  transition: background .3s var(--ease), color .3s, transform .15s;
  will-change: transform;
}
.nav__cta:hover { background: var(--gold); color: #04130d; }

/* ---------- REVEAL ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- LAYOUT ---------- */
.hero, .block { position: relative; z-index: 2; }
.block { max-width: var(--max); margin: 0 auto; padding: clamp(70px, 12vh, 130px) clamp(20px, 5vw, 56px); }

/* ---------- HERO ---------- */
.hero {
  min-height: 100svh; display: flex; flex-direction: column; justify-content: center;
  max-width: var(--max); margin: 0 auto; padding: 0 clamp(20px, 5vw, 56px);
}
.hero__inner { max-width: 920px; position: relative; }
.hero__inner > * { position: relative; z-index: 1; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-size: 13px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 30px;
}
.hero__eyebrow-line { width: 46px; height: 1px; background: var(--gold); display: inline-block; }
.hero__name {
  font-family: 'Playfair Display', serif; font-weight: 400;
  font-size: clamp(54px, 12vw, 150px); line-height: .92; letter-spacing: -.025em;
}
.hero__word { display: block; }
.hero__word--accent { color: var(--gold); font-style: italic; font-weight: 500; }
.hero__intro {
  margin-top: 34px; max-width: 600px; font-size: clamp(17px, 2vw, 21px);
  line-height: 1.6; color: var(--muted);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 42px; }

.hero__meta {
  display: flex; flex-wrap: wrap; gap: clamp(30px, 6vw, 70px);
  margin-top: clamp(50px, 8vh, 90px); padding-top: 32px; border-top: 1px solid var(--line-soft);
}
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat__num { font-family: 'Playfair Display', serif; font-size: clamp(34px, 5vw, 52px); font-weight: 500; color: var(--ivory); line-height: 1; font-variant-numeric: tabular-nums; }
.stat__label { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); }

.hero__scroll {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 11px; letter-spacing: .25em; text-transform: uppercase; color: var(--muted-2);
}
.hero__scroll-line { width: 1px; height: 46px; background: linear-gradient(var(--gold), transparent); position: relative; overflow: hidden; }
.hero__scroll-line::after {
  content: ''; position: absolute; top: -50%; left: 0; width: 100%; height: 50%;
  background: var(--gold); animation: scrolldot 2s var(--ease) infinite;
}
@keyframes scrolldot { 0%{top:-50%} 100%{top:100%} }

/* ---------- BTN ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 28px; border-radius: 99px; font-weight: 600; font-size: 15px;
  transition: background .3s var(--ease), color .3s, box-shadow .3s, transform .15s;
  will-change: transform;
}
.btn__arrow { transition: transform .3s var(--ease); }
.btn:hover .btn__arrow { transform: translate(3px, -3px); }
.btn--gold {
  background: var(--gold); color: #04130d;
  box-shadow: 0 8px 30px rgba(216,177,90,.25);
}
.btn--gold:hover { background: var(--gold-soft); box-shadow: 0 12px 44px rgba(216,177,90,.4); }
.btn--ghost { border: 1px solid var(--line); color: var(--ivory); }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn--lg { padding: 19px 38px; font-size: 17px; }

/* ---------- BLOCK HEAD ---------- */
.block__head { display: flex; align-items: baseline; gap: 18px; margin-bottom: 30px; }
.block__index { font-family: 'Playfair Display', serif; font-size: 16px; font-weight: 600; color: var(--gold); }
.block__title { font-family: 'Playfair Display', serif; font-weight: 400; font-size: clamp(34px, 6vw, 64px); letter-spacing: -.02em; }
.block__sub { color: var(--muted); margin: -14px 0 40px; font-size: clamp(15px, 1.8vw, 18px); max-width: 560px; }

/* ---------- ABOUT ---------- */
.about .prose { max-width: 760px; }
.prose p { color: var(--muted); margin-bottom: 24px; font-size: clamp(17px, 2vw, 22px); line-height: 1.7; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--ivory); font-weight: 600; }

/* ---------- GRID + CARDS ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid--two { grid-template-columns: repeat(2, 1fr); }
.card {
  position: relative; overflow: hidden;
  background: var(--glass);
  border: 1px solid var(--line-soft); border-radius: 18px;
  padding: 30px; backdrop-filter: blur(14px);
  transition: transform .35s var(--ease-out), border-color .35s, box-shadow .35s;
  transform-style: preserve-3d; will-change: transform;
}
.card::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(150deg, rgba(216,177,90,.06), transparent 40%);
}
.card:hover { border-color: var(--line); box-shadow: 0 24px 60px rgba(0,0,0,.45); }
.card__sheen {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  opacity: 0; transition: opacity .3s; z-index: 1;
}
/* clean monochrome ivory logos — no plate, sit straight on the glass */
.card__logo {
  position: relative; z-index: 2;
  height: 26px; width: auto; max-width: 160px;
  margin-bottom: 20px; object-fit: contain; object-position: left center;
  filter: brightness(0) invert(1);
  opacity: .9;
  transition: opacity .3s var(--ease);
}
.card:hover .card__logo { opacity: 1; }
.card--feature .card__logo { height: 30px; }
/* full-colour logo shown as-is (no white tint), reads on dark glass */
.card__logo--raw { filter: none; opacity: 1; }
/* text wordmark for logos that don't render as clean monochrome */
.card__wordmark {
  position: relative; z-index: 2; display: block;
  font-family: 'Playfair Display', serif; font-weight: 600;
  font-size: 26px; line-height: 26px; color: var(--ivory);
  height: 26px; margin-bottom: 20px; letter-spacing: -.01em;
  opacity: .92; transition: opacity .3s var(--ease);
}
.card:hover .card__wordmark { opacity: 1; }
.card--feature .card__wordmark { font-size: 30px; line-height: 30px; height: 30px; }
.card__tag {
  position: relative; z-index: 2; display: inline-block;
  font-size: 12px; font-weight: 600; letter-spacing: .04em;
  color: var(--gold); padding: 4px 12px; border-radius: 99px;
  background: rgba(216,177,90,.1); border: 1px solid rgba(216,177,90,.2);
}
.card__desc { position: relative; z-index: 2; margin-top: 16px; font-size: 15px; line-height: 1.6; color: var(--muted); }
.card--feature { padding: 36px; }
.card__link {
  position: relative; z-index: 2; display: inline-block; margin-top: 20px;
  font-size: 14.5px; font-weight: 600; color: var(--ivory);
  border-bottom: 1px solid var(--gold); padding-bottom: 2px;
  transition: color .25s, border-color .25s;
}
.card__link:hover { color: var(--gold); }

/* ---------- CONTACT ---------- */
.contact { text-align: left; }
.contact__lead {
  font-family: 'Playfair Display', serif; font-weight: 400;
  font-size: clamp(24px, 4vw, 44px); line-height: 1.3; max-width: 760px; color: var(--ivory);
}
.contact__accent { color: var(--gold); font-style: italic; }
.contact__actions { margin-top: 42px; }

/* ---------- FOOTER ---------- */
.footer {
  position: relative; z-index: 2;
  max-width: var(--max); margin: 0 auto;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  padding: 40px clamp(20px, 5vw, 56px) 60px;
  border-top: 1px solid var(--line-soft); margin-top: 20px;
  font-size: 14px; color: var(--muted-2);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 920px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .nav { padding: 18px; }
  .nav__links { gap: 16px; font-size: 14px; }
  .nav__links a[href="#invested"] { display: none; }
  .grid, .grid--two { grid-template-columns: 1fr; }
  .hero__meta { gap: 28px; }
  .hero__scroll { display: none; }
  .has-cursor, .has-cursor a, .has-cursor button { cursor: auto; }
  .cursor { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; }
  #scene { display: none; }
}
