/* SNA Investment Intelligence — the glass material system.
 *
 * WHY NOT JUST backdrop-filter
 * ----------------------------
 * A blurred translucent rectangle is a frosted panel, not glass. Real glass reads because of four
 * things happening at once, and each is built here as its own layer:
 *
 *   1. BODY        the backdrop, blurred and slightly brightened — what you see *through* it
 *   2. BEVEL       a bright rim along the lit edge and a darker one opposite, which is what
 *                  gives a pane apparent thickness
 *   3. SPECULAR    one directional sweep where the light source catches the surface
 *   4. DISPERSION  a hair of cyan on one edge and champagne on the other. Selective, ~6% alpha.
 *                  This is the single detail that separates glass from plastic, and the single
 *                  easiest thing to overdo.
 *
 * Light in this scene comes from the upper left, consistently, on every surface. Shadows fall
 * lower-right. That consistency is most of what makes a composition read as physical.
 *
 * PALETTE. The art-direction references lean heavily lavender; that is deliberately not followed.
 * SNA blue leads, over a pearl base, with ice-blue light. Violet and champagne appear only in
 * dispersion edges and never as fills.
 */

:root {
  /* Brand */
  --sna:        #2456c0;
  --sna-700:    #1c45a0;
  --sna-900:    #132f70;
  --navy:       #0b1a33;     /* typography and contrast */
  --navy-2:     #3b4a63;
  --navy-3:     #76829a;

  /* Base: pearl, faintly warm, never grey */
  --pearl:      #f2f4f8;
  --pearl-2:    #e9edf4;
  --ice:        #dce6f6;

  /* Accents, used sparingly and never as fills */
  --cyan:       #6fd0e2;
  --champagne:  #e7cfa0;
  --violet:     #7d7ae0;
  --amber-ink:  #8a6a1f;
  --clay:       #a8574e;
  --sage:       #2f7d6e;

  /* Glass bodies */
  --g-low:   rgba(255,255,255,.44);
  --g-mid:   rgba(255,255,255,.58);
  --g-high:  rgba(255,255,255,.72);
  --g-solid: rgba(252,253,255,.93);

  --blur-low:  blur(16px) saturate(165%) brightness(1.04);
  --blur-mid:  blur(26px) saturate(175%) brightness(1.05);
  --blur-high: blur(36px) saturate(185%) brightness(1.06);

  /* Bevel: lit edge top-left, shaded edge bottom-right, plus a hairline containment ring */
  --bevel: inset 0 1.5px 0 rgba(255,255,255,.92),
           inset 1.5px 0 0 rgba(255,255,255,.55),
           inset 0 -1px 0 rgba(11,26,51,.07),
           inset -1px 0 0 rgba(11,26,51,.04),
           inset 0 0 0 1px rgba(255,255,255,.3);

  /* Dispersion: cyan where light enters, champagne where it leaves. 6% alpha. */
  --disperse: inset 2px 2px 0 -1px rgba(111,208,226,.3),
              inset -2px -2px 0 -1px rgba(231,207,160,.28);

  /* Elevation. Contact shadow + ambient shadow, both tinted navy, never black. */
  --lift-1: 0 1px 2px rgba(11,26,51,.05), 0 4px 14px rgba(11,26,51,.05);
  --lift-2: 0 2px 5px rgba(11,26,51,.06), 0 14px 38px rgba(11,26,51,.09);
  --lift-3: 0 4px 10px rgba(11,26,51,.07), 0 30px 70px rgba(11,26,51,.13);
  --lift-4: 0 10px 26px rgba(11,26,51,.1), 0 64px 140px rgba(11,26,51,.22);
  --lift-sel: 0 6px 16px rgba(11,26,51,.09), 0 30px 70px rgba(36,86,192,.22);

  --ui: 'Geist', Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Instrument Serif', 'Times New Roman', serif;
  --data: 'JetBrains Mono', ui-monospace, 'DejaVu Sans Mono', monospace;

  --t1: .16s; --t2: .32s; --t3: .5s;
  --ease: cubic-bezier(.2,.7,.3,1);
  --out: cubic-bezier(.16,1,.3,1);
  --shell: 1400px;
}

/* ── The glass surface ─────────────────────────────────────────────────────
   One class, three elevations. The ::before carries the specular sweep so content never sits
   under it; the ::after carries dispersion so it can be tuned independently. */

.glass {
  position: relative; isolation: isolate;
  background: var(--g-mid);
  -webkit-backdrop-filter: var(--blur-mid); backdrop-filter: var(--blur-mid);
  box-shadow: var(--lift-2), var(--bevel), var(--disperse);
  border-radius: 20px;
}
.glass > * { position: relative; z-index: 2; }
.glass::before {
  content: ''; position: absolute; inset: 0; z-index: 1; border-radius: inherit; pointer-events: none;
  background:
    linear-gradient(142deg, rgba(255,255,255,.72) 0%, rgba(255,255,255,.18) 18%, rgba(255,255,255,0) 40%),
    radial-gradient(120% 90% at 6% 0%, rgba(220,230,246,.5), transparent 58%);
}
.glass-low  { background: var(--g-low);  -webkit-backdrop-filter: var(--blur-low);  backdrop-filter: var(--blur-low);  box-shadow: var(--lift-1), var(--bevel); }
.glass-high { background: var(--g-high); -webkit-backdrop-filter: var(--blur-high); backdrop-filter: var(--blur-high); box-shadow: var(--lift-3), var(--bevel), var(--disperse); }
.glass-solid{ background: var(--g-solid);-webkit-backdrop-filter: var(--blur-high); backdrop-filter: var(--blur-high); box-shadow: var(--lift-4), var(--bevel); }

/* Hover is a lighting change, not a colour change: the specular sweep brightens and travels. */
.glass-int { transition: box-shadow var(--t2) var(--ease), background var(--t2) var(--ease); }
.glass-int::before { transition: opacity var(--t2) var(--ease), background-position var(--t3) var(--ease); }
/* Hover must not move a card. Translating it on hover made the research cards jump, and a card
   that jumps under the cursor is hard to aim at and reads as cheap. The lighting changes
   instead: the pane brightens, its bevel sharpens, its dispersion strengthens and its shadow
   deepens — which is what actually happens when glass catches more light. Geometry is fixed. */
.glass-int:hover, .glass-int:focus-visible {
  background: var(--g-high);
  box-shadow: var(--lift-3),
              inset 0 2px 0 rgba(255,255,255,.98),
              inset 2px 0 0 rgba(255,255,255,.7),
              inset 0 -1px 0 rgba(11,26,51,.09),
              inset -1px 0 0 rgba(11,26,51,.06),
              inset 0 0 0 1px rgba(255,255,255,.45),
              inset 3px 3px 0 -1px rgba(111,208,226,.42),
              inset -3px -3px 0 -1px rgba(231,207,160,.38);
  outline: none;
}
.glass-int:hover::before { opacity: 1; background-position: 14% 0, 0 0; }
.glass-int:focus-visible { box-shadow: var(--lift-3), var(--bevel), 0 0 0 3px rgba(36,86,192,.3); }

/* Fallback: no backdrop-filter means no glass, so make it an honest opaque card instead of an
   unreadable wash. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass, .glass-low { background: rgba(255,255,255,.95); }
  .glass-high, .glass-solid { background: #fff; }
}

/* ── The scene light ───────────────────────────────────────────────────────
   Three fields only. Ice-blue key from the upper left, a cool fill from the right, and a single
   champagne bounce low. No waves, no banding, nothing animated faster than a minute. */
.scene { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(1200px 760px at 14% -8%, rgba(220,230,246,.95), transparent 62%),
    radial-gradient(900px 620px at 92% 10%, rgba(36,86,192,.1), transparent 64%),
    radial-gradient(760px 520px at 70% 104%, rgba(231,207,160,.14), transparent 66%),
    var(--pearl);
}
.scene i { position: absolute; display: block; border-radius: 50%; filter: blur(78px); opacity: .5; }
.scene .k1 { width: 46vw; height: 34vw; left: -6vw; top: -10vw;
  background: radial-gradient(circle, rgba(36,86,192,.3), transparent 68%);
  animation: fl1 96s ease-in-out infinite; }
.scene .k2 { width: 36vw; height: 28vw; right: -4vw; bottom: 4vh;
  background: radial-gradient(circle, rgba(111,208,226,.2), transparent 68%);
  animation: fl2 124s ease-in-out infinite; }
@keyframes fl1 { 50% { transform: translate3d(3vw,2vw,0) scale(1.07); } }
@keyframes fl2 { 50% { transform: translate3d(-3vw,-2vw,0) scale(1.06); } }

/* Grain, so large soft fields never band. */
.grain { position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .34;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.05'/%3E%3C/svg%3E"); }

@media (prefers-reduced-motion: reduce) {
  .scene i { animation: none !important; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
