:root {

  --nav-start: 1s;
  --nav-duration: 5s;
  --slab-start: 4s;
  --slab-duration: 4s;
  --pull-duration: 3s;
  --pulled-duration: var(--slab-duration);
  --drift-duration: 20s;

  /* Soft Neon Gradient
  --bg1: #E7B7F7;
  --bg2: #C1B9F4;
  --bg3: #B8D5FB;
  --bg4: #C1ECE6;
  --bg5: #E8F8E6;*/
  
  --bg1: #000000;
  --bg2: #0A0D10;
	--bg3: #565F64;
  --bg4: #C8CCCE;
  --bg5: #00A19B;

  --font-body: 
    "Plus Jakarta Sans",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;

  --font-display: "Tilt Neon", sans-serif;

  --glass-bg: rgba(249, 253, 254, 0.08);
  --glass-border-top: rgba(255, 255, 255, 0.8);
  --glass-border-btm: rgba(105, 105, 105, 0.2);

  --text-primary: rgba(44, 47, 54, 0.8);
  --text-secondary: rgba(44, 47, 54, 0.6);
  --accent: #6A4C93;
  --radius: 15px;
  --shadow: 0 8px 30px rgba(0,0,0,0.18),
            inset 0 12px 10px rgba(255,255,255,0.4),
            inset 0 -8px 8px rgba(0,0,0,0.12);
}

body {
  margin: 0;
  padding-bottom: 60px;
  box-sizing: border-box;
  color: var(--text-secondary);
  font-family: var(--font-body), sans-serif;
}

.bg-base {
  position: fixed;
  z-index: 1;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden; 
  background: linear-gradient(
    to top,
    rgba(15, 20, 28, 1) 0%,
    rgba(25, 35, 50, 1) 45%,
    rgba(5, 11, 18, 1) 70%,
    rgba(11, 18, 21, 1) 100%
	);
}

.bg-base::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  opacity: 0.03;
  pointer-events: none;
  background-image: url('https://grainy-gradients.vercel.app');
  mix-blend-mode: overlay;
}

.bg-linear {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    to bottom,
    rgba(11, 18, 21, 0.8) 0%
    rgba(28, 169, 201, 0.5) 15%,
    rgba(124, 185, 232, 0.35) 33%,
    rgba(28, 169, 201, 0.15) 66%,
    rgba(15, 20, 28, 0.8) 100% 
  );
  background-size: 100% 200%;
  pointer-events: none;
animation: fallGlow 12s ease-in-out infinite;
}

.bg-ember {
  position: fixed;
  bottom: -10vmin;
  left: -20vmin;
  width: 85vmin;
  height: 85vmin;
  z-index: 3;
  transform: none;
  pointer-events: none;
}

.bg-ember::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 75% 27%,
      rgba(255, 225, 150, 0.85),
      rgba(255, 170, 190, 0.75),
      rgba(210, 90, 120, 0.65),
      rgba(255, 200, 160, 0.55) 80%
    );
  filter: blur(4px);
  animation: spinGlow 20s linear infinite;
}

.bg-ember::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 85%;
  background: radial-gradient(circle at 100% 0%, transparent 37%, rgba(5, 6, 10, 0.9) 70%);
  /*border-radius: 85%;
  background: radial-gradient(circle at 100% 0%, rgba(5, 6, 10, 0.9) 45%, transparent 80%);*/
}

.bg-radial {
  position: fixed;
  width: 110vmin;
  height: 110vmin;
  top: -10vmin;
  right: -10vmin;
  z-index: 5;
  transform: none;
  pointer-events: none;
}

.bg-radial::before {
  content:"";
  position: absolute;
  width: 110vmin;
  height: 110vmin;
  top: -10vmin;
  right: -10vmin;
  transform: translate(-50%, 0%);
  clip-path: circle(40% at 50% 50%);

  background:
    radial-gradient(
      circle at 25% 75%,
      rgba(194, 248, 203, 0.75),
      rgba(159, 226, 191, 0.45),
      rgba(159, 226, 191, 0.15),
      rgba(159, 226, 191, 0) 80%
    );
  filter: blur(4px);
  animation: spinGlow 20s linear infinite;
}

@keyframes fallGlow {
  0%   { background-position: 0% -100%; }
  100% { background-position: 0% 100%; }
}

@keyframes spinGlow { 
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.top-nav {
  position: relative;
  width: 100%;
  padding-inline: clamp(0.5rem, 2vw, 1rem);
  min-height: clamp(30px, 6vh, 60px);
  padding-block: clamp(0.4rem, 1vw, 0.8rem);
  z-index: 20;
  background: var(--glass-bg);
  backdrop-filter: blur(6px);
  border-left: 1px outset rgba(255, 255, 255, 0.4);
  border-right: 1px outset rgba(255, 255, 255, 0.4);
  border-top: 1px hidden transparent;
  border-bottom: 1px outset rgba(194, 248, 203, 0.5);
  box-shadow:
    1px 0 4px rgba(255, 255, 255, 0.2),
    inset 0 4px 2px rgba(105, 105, 105, 0.2),
    inset 0 -4px 2px rgba(105, 105, 105, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: clamp(0.9rem, 1.4vw, 1.3rem);
  white-space: nowrap;
}

.top-nav::before {
  z-index: 21;
  content: "";
  position: absolute;
  top: -1px;
  bottom: -1px;
  left: 0;
  right: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at center, rgba(192, 192, 192, 0.4) 0%, rgba(255, 255, 255, 0.4) 100%),
    radial-gradient(circle at center, rgba(192, 192, 192, 1) 0%, rgba(255, 255, 255, 0.4) 100%);
  background-size: 100% 1px;
  background-position: top center, bottom center;
  background-repeat: no-repeat;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.top-nav::after {
  z-index: 21;
  content: "";
  position: absolute;
  top: 0;
  left: 120%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255, 255, 255, 0.28) 50%,
    transparent 100%
  );
  transform: skewX(-35deg);
  pointer-events: none;

  animation: navShimmer 4s ease-out forwards;
  animation-delay: 1s;
}

@keyframes navShimmer {
  0% { left: 120%; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { left: -120%; opacity: 0; }
}

.top-nav a {
  flex: 1;
  /*color: var(--text-primary)*/
  text-decoration: none;
  font-weight: 400;
  padding-inline: clamp(0.4rem, 1vw, 1rem);
  text-align: center;
}

.top-nav a:hover {
  opacity: 0.7;
}

.top-nav a:visited {
  color: var(--text-primary);
}

.glass-panel {
  z-index: 10;
  background: var(--glass-bg);
  border-radius: 30px;
  backdrop-filter: blur(12px);
  border-left: 2px outset rgba(255, 255, 255, 0.3);
  border-right: 2px outset rgba(255, 255, 255, 0.45);
  border-top: 2px outset rgba(194, 248, 203, 0.5);
  border-bottom: 2px outset rgba(255, 170, 190, 0.5);
  box-shadow:
    0 0 4px 1px rgba(255, 255, 255, 0.2),
    inset 0 8px 8px 2px rgba(105, 105, 105, 0.4),
    inset -4px -4px 8px rgba(194, 248, 203, 0.15),
    inset 0 -8px 4px 2px var(--glass-border-btm);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transition: 0.25s ease;
}

.glass-panel::before {
  content: "";
  position: absolute;
  top: -1px;
  bottom: -1px;
  left: -0;
  right: 0;
  pointer-events: none;
  border-radius: inherit;
  background-image:
    radial-gradient(circle at center, rgba(192, 192, 192, 0.4) 0%, rgba(255, 255, 255, 0.4) 100%),
    radial-gradient(circle at center, rgba(192, 192, 192, 1) 0%, rgba(255, 255, 255, 0.4) 100%);
  background-size: 100% 1px;
  background-position: top center, bottom center;
  background-repeat: no-repeat;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.container {
  width: 90%;
  max-width: 480px;
  padding: 15px;
  margin-top: 50px;
  text-align: center;
  z-index: 10;
  position: relative;
  overflow: hidden;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.container::after {
  z-index: 11;
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 70%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255, 255, 255, 0.45) 50%,
    transparent 100%
  );
  transform: skewX(-20deg);
  pointer-events: none;

  animation: slabFlash 3.5s cubic-bezier(0.25, 0.1, 0.3, 1) forwards;
  animation-delay: 4s; /* midpoint trigger */
}

@keyframes slabFlash {
  0% { left: -120%; opacity: 0; }
  10% { opacity: 1; }
  50% { left: 120%; opacity: 1; }
  100% { left: 120%; opacity: 0; }
}

.reveal-hidden {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.reveal-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.input-field {
  width: 70%;
  max-width: 480px;
  padding: 4px;
  margin-top: 20px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.4);
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  font-size: 1rem;
  color: var(--text-primary);
  transition: 0.3s ease;
}

#roleInput {
  opacity: 0;
  z-index: 8;
  transform: translateY(20px);
  pointer-events: none;
  transition: all 0.35s ease;
}
#companyInput {
  opacity: 0;
  z-index: 8;
  transform: translateY(20px);
  pointer-events: none;
  transition: all 0.35s ease;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
  justify-items: stretch;
}

.theme-grid .glass-btn {
  width: 100%;
  box-sizing: border-box;
  white-space: nowrap;
  margin: 0;
}

.glass-btn {
  z-index: 13;
  display: block;
  padding: 12px 20px;
  border-radius: var(--radius);
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  border-right: 1px solid rgba(255, 255, 255, 0.2);
  border-top: 1px outset rgba(105, 105, 105, 0.1);
  border-bottom: 2px hidden transparent;

  box-shadow:
    0 1px 4px 0 rgba(150, 150, 150, 0.4),
	/*inset 0 6px 6px 2px rgba(0, 0, 0, 0.18),*/
    inset 0 1px 5px 0 rgba(105, 105, 105, 0.2),
    inset 0 -6px 6px 2px rgba(255,255,255,0.2);

  cursor: pointer;
  font-size: clamp(1rem, 1.4vw, 1.4rem);
  transition: 0.25s ease;
  box-sizing: border-box;
  background: var(--glass-bg);
  position: relative;
}

/* Theme previews */
.tiramisu {
  --preview: linear-gradient(45deg, #F2C299 60%, #E49C69 70%, #FFD9A0 80%, #5C3B2E 90%);
  --text-clr: #201A17;
}

.retro_tech {
  --preview: linear-gradient(45deg, #C0C0C0 60%, #B32427 70%, #005540 80%, #062A8F 90%, #FFB227 90%);
  --text-clr: #353837;
}

.vapourware {
  --preview: linear-gradient(45deg, #3A0064 60%, #FF69B4 70%, #0D0D0D 80%, #00FFFF 90%);
  --text-clr: #EDEDED;
}

.light {
  --preview: linear-gradient(45deg, #CED4DA 60%, #4CC9F0 70%, #FFB703 80%, #DEE2E6 90%);
  --text-clr: #161616;
}

.dark {
  --preview: linear-gradient(45deg, #212529 60%, #6C757D 70%, #E30B5D 80%, #2EBB57 90%);
  --text-clr: #EFEFEF;
}

.myView {
  --preview: linear-gradient(45deg, #013220 60%, #FFB703 70%, #2EBB57 80%, #F4C430 90%);
  --text-clr: #F4EAD5;
}

.glass-btn:hover {
  background: var(--preview);
  color: var(--text-clr);
  transform: translateY(-4px);
  opacity: 0.7;
}

.glass-btn.selected {
  background: var(--preview);
  color: var(--text-clr);
  opacity: 0.95;
  transform: translateY(-2px);
}

#companySelect {
  z-index: 13;
  display: block;
  width: 100%;
  padding-left: 12px;
  padding-right: 12px;
  box-sizing: border-box;
  margin-top: 12px;

  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  border-radius: var(--radius);

  border-left: 1px solid rgba(255, 255, 255, 0.9);
  border-right: 1px solid rgba(255, 255, 255, 0.9);
  border-top: 1px solid transparent;
  border-bottom: 1px solid transparent;

  box-shadow:
    0 2px 4px 2px rgba(105,105,105,0.2),
    inset 0 8px 4px 2px rgba(0, 0, 0, 0.2),
    inset 0 -8px 4px 2px rgba(255,255,255,0.2);

  font-size: clamp(1rem, 1.4vw, 1.4rem);

  appearance: none;
  cursor: pointer;
  position: relative;
}

#companySelect::before {
  content: "";
  position: absolute;
  top: -1px;
  bottom: -1px;
  left: 0;
  right: 0;
  pointer-events: none;
  border-radius: inherit;

  background-image:
    radial-gradient(circle at center, rgba(192, 192, 192, 0.4) 0%, rgba(255, 255, 255, 0.4) 100%),
    radial-gradient(circle at center, rgba(192, 192, 192, 1) 0%, rgba(255, 255, 255, 0.4) 100%);
  background-size: 100% 1px;
  background-position: top center, bottom center;
  background-repeat: no-repeat;

  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.glass-pill {
  z-index: 13;
  display: inline-block;
  padding: 6px 14px;

  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  border-radius: var(--radius);

  border-left: 1px solid rgba(255, 255, 255, 0.9);
  border-right: 1px solid rgba(255, 255, 255, 0.9);
  border-top: 1px solid transparent;
  border-bottom: 1px solid transparent;

  box-shadow:
    0 2px 4px 2px rgba(105,105,105,0.2),
    inset 0 8px 4px 2px rgba(0, 0, 0, 0.2),
    inset 0 -8px 4px 2px rgba(255,255,255,0.2);

  font-size: 0.85rem;
  color: var(--text-primary);

  position: relative;
  margin-right: 8px;
  margin-top: 8px;
}

.glass-pill::before {
  content: "";
  position: absolute;
  top: -1px;
  bottom: -1px;
  left: 0;
  right: 0;
  pointer-events: none;
  border-radius: inherit;

  background-image:
    radial-gradient(circle at center, rgba(192, 192, 192, 0.4) 0%, rgba(255, 255, 255, 0.4) 100%),
    radial-gradient(circle at center, rgba(192, 192, 192, 1) 0%, rgba(255, 255, 255, 0.4) 100%);
  background-size: 100% 1px;
  background-position: top center, bottom center;
  background-repeat: no-repeat;

  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.glass-pill.org {
  width: 100%;
  display: block;
  margin: 0;
  box-sizing: border-box;
  padding-left: 0;
  padding-right: 0;
}

.note {
  margin-top: 20px;
  font-size: 0.9rem;
}


#docButtons {
  opacity: 0;
  z-index: 9;
  pointer-events: none;
  transform: translateY(20px);
  transition: all 0.4s ease;
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

/* RSP Glass Effect using Text Shadows*/
.glass-text {
  font-family: var(--font-display);
/*  font-size: clamp(1.2rem, 3vw, 2rem); */
  color: rgba(0, 0, 0, 0.08);
  text-shadow:
    -1px 0 1px rgba(249, 253, 254, 0.28),
    1px 0 1px rgba(105, 105, 105, 0.3),
    -1px 0 0 rgba(105, 105, 105, 0.15),
	1px 0 2px rgba(0, 0, 0, 0.1),
    -1px 0 2px rgba(0, 0, 0, 0.1);
  letter-spacing: 0.5px;
}

/*.top-nav .glass-text {
  text-shadow:
    -1px 0 1px rgba(6, 2, 1, 0.28),
    1px 0 1px rgba(150, 150, 150, 0.3),
    -1px 0 0 rgba(150, 150, 150, 0.15),
	1px 0 2px rgba(0, 0, 0, 0.1),
    -1px 0 2px rgba(0, 0, 0, 0.1);
}
*/
.glass-btn .glass-text {
  text-shadow:
    -1px 0 1px rgba(249, 253, 254, 0.5),
    1px 0 1px rgba(105, 105, 105, 0.6),
    -1px 0 0 rgba(105, 105, 105, 0.3),
	1px 0 2px rgba(255, 255, 255, 0.5),
    -1px 0 2px rgba(255, 255, 255, 0.5);
}
