/* ==========================================================
   NOUS LLC — the executive suite
   Inside, high up, looking out through floor-to-ceiling
   glass at a clear blue sky. Three wide panes in a heavy
   aluminum frame, sun lying on the glass, a cloud deck far
   below. Full-height glass — you are at the window.
   ========================================================== */

:root {
  --ink: #f8f6f0;
  --ink-dim: #dce6f2;
  --serif: "EB Garamond", "Garamond", "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html, body { height: 100%; }

body {
  background: #2b62a5;
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* faint grain over everything — film, not screen */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.02 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- the sky ---------- */

.sky {
  position: fixed;
  inset: -18px; /* overscan: the layer travels with the pointer */
  z-index: 0;
  background: linear-gradient(
    180deg,
    #123e78 0%,
    #1d5296 26%,
    #2e6cb4 52%,
    #5b95d3 76%,
    #9dc4e8 92%,
    #c8e0f2 100%
  );
}

/* a slight deepening behind the name so it owns the frame */
.sky::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 72% 44% at 50% 46%, rgba(8, 28, 58, 0.2), transparent 72%);
}

/* the cloud deck far below */
.clouds {
  position: absolute;
  left: -25%;
  right: -25%;
  bottom: -14%;
  height: 30%;
  filter: blur(26px);
  background:
    radial-gradient(ellipse 34% 52% at 12% 78%, rgba(255, 255, 255, 0.85), transparent 70%),
    radial-gradient(ellipse 40% 48% at 38% 88%, rgba(255, 255, 255, 0.7), transparent 70%),
    radial-gradient(ellipse 30% 42% at 60% 76%, rgba(255, 255, 255, 0.8), transparent 70%),
    radial-gradient(ellipse 44% 55% at 84% 90%, rgba(255, 255, 255, 0.75), transparent 70%),
    radial-gradient(ellipse 60% 36% at 50% 100%, rgba(255, 255, 255, 0.55), transparent 75%);
  animation: drift 240s linear infinite alternate;
}

@keyframes drift {
  from { transform: translateX(-2.5%); }
  to   { transform: translateX(2.5%); }
}

/* sun catching the top corner of the glass */
.sunglare {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle 340px at 87% -8%, rgba(255, 244, 216, 0.45), transparent 70%),
    radial-gradient(circle 720px at 91% -12%, rgba(255, 247, 226, 0.18), transparent 70%);
}

/* ---------- the glass ---------- */

.glass {
  position: fixed;
  inset: -18px; /* overscan: the layer travels with the pointer */
  z-index: 1;
  pointer-events: none;
}

/* glass has a body: the faintest cool tint */
.tint {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 40, 70, 0.1), rgba(25, 50, 80, 0.05) 50%, rgba(30, 55, 85, 0.12));
}

/* three lites, two vertical members, nothing else.
   The light is directional — sun high right — so each member has
   a soft shadow cast onto the glass at its left, a dark outline,
   a body shading toward the light, a bright sunlit metal edge,
   then the glow and green hairline of the glass edge itself. */
.mullions {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0,
    transparent calc(33.333% - 16px),
    rgba(8, 14, 24, 0.22) calc(33.333% - 1px),
    rgba(5, 8, 12, 0.92) calc(33.333% - 1px),
    rgba(5, 8, 12, 0.92) 33.333%,
    rgba(10, 14, 20, 0.95) 33.333%,
    rgba(46, 60, 78, 0.95) calc(33.333% + 9px),
    rgba(148, 168, 194, 0.85) calc(33.333% + 9px),
    rgba(148, 168, 194, 0.85) calc(33.333% + 10px),
    rgba(255, 255, 255, 0.32) calc(33.333% + 10px),
    rgba(255, 255, 255, 0.32) calc(33.333% + 11px),
    rgba(215, 232, 248, 0.12) calc(33.333% + 11px),
    transparent calc(33.333% + 16px),
    rgba(150, 225, 200, 0.15) calc(33.333% + 16px),
    rgba(150, 225, 200, 0.15) calc(33.333% + 17px),
    transparent calc(33.333% + 17px),
    transparent calc(66.666% - 16px),
    rgba(8, 14, 24, 0.22) calc(66.666% - 1px),
    rgba(5, 8, 12, 0.92) calc(66.666% - 1px),
    rgba(5, 8, 12, 0.92) 66.666%,
    rgba(10, 14, 20, 0.95) 66.666%,
    rgba(46, 60, 78, 0.95) calc(66.666% + 9px),
    rgba(148, 168, 194, 0.85) calc(66.666% + 9px),
    rgba(148, 168, 194, 0.85) calc(66.666% + 10px),
    rgba(255, 255, 255, 0.32) calc(66.666% + 10px),
    rgba(255, 255, 255, 0.32) calc(66.666% + 11px),
    rgba(215, 232, 248, 0.12) calc(66.666% + 11px),
    transparent calc(66.666% + 16px),
    rgba(150, 225, 200, 0.15) calc(66.666% + 16px),
    rgba(150, 225, 200, 0.15) calc(66.666% + 17px),
    transparent calc(66.666% + 17px)
  );
}

/* each lite of glass carries its own cast — no two panes read identical */
.mullions::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(190, 215, 240, 0.045) 0%,
    rgba(190, 215, 240, 0.045) 33.333%,
    rgba(8, 24, 48, 0.05) 33.333%,
    rgba(8, 24, 48, 0.05) 66.666%,
    rgba(255, 255, 255, 0.028) 66.666%,
    rgba(255, 255, 255, 0.028) 100%
  );
}

/* long reflections lying on the panes — the sun drifts, so do they */
.reflection {
  position: absolute;
  inset: -22%;
  background:
    linear-gradient(
      108deg,
      transparent 30%,
      rgba(255, 255, 255, 0.06) 37%,
      rgba(255, 255, 255, 0.13) 41%,
      rgba(255, 255, 255, 0.06) 45%,
      transparent 52%
    ),
    linear-gradient(
      108deg,
      transparent 58%,
      rgba(255, 255, 255, 0.05) 64%,
      rgba(255, 255, 255, 0.1) 67%,
      rgba(255, 255, 255, 0.05) 70%,
      transparent 76%
    );
  animation: glareDrift 90s ease-in-out infinite alternate;
}

@keyframes glareDrift {
  from { transform: translateX(-1.8%); }
  to   { transform: translateX(1.8%); }
}

/* ---------- center ---------- */

.center {
  position: relative;
  z-index: 3;
  height: 100vh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 24px 4vh; /* optical center sits slightly high */
  text-align: center;
}

.mark-wrap { position: relative; }

/* white-gold sheen — light crossing the lettering, then stillness */
.name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.6rem, 9vw, 19rem);
  line-height: 1;
  letter-spacing: 0.09em;
  text-indent: 0.09em; /* optically recenters the tracking */
  white-space: nowrap;
  background: linear-gradient(
    105deg,
    var(--ink) 0%,
    var(--ink) 38%,
    #ffffff 50%,
    var(--ink) 62%,
    var(--ink) 100%
  );
  background-size: 300% 100%;
  background-position: 115% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 1px 2px rgba(8, 28, 58, 0.3)) drop-shadow(0 6px 40px rgba(8, 28, 58, 0.28));
  animation: sheen 11s ease-in-out infinite;
  animation-delay: 2.2s;
}

@keyframes sheen {
  0%   { background-position: 115% 0; }
  26%  { background-position: -15% 0; }
  100% { background-position: -15% 0; }
}

/* ---------- glints — tiny four-point stars ---------- */

.glint {
  position: absolute;
  width: 11px;
  height: 11px;
  background: radial-gradient(circle, #ffffff 0%, rgba(255, 255, 255, 0.55) 30%, transparent 70%);
  clip-path: polygon(50% 0%, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0% 50%, 39% 39%);
  opacity: 0;
  animation: twinkle 9s ease-in-out infinite;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.9));
}

@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(0.2) rotate(0deg); }
  3%       { opacity: 1; transform: scale(1) rotate(24deg); }
  7%       { opacity: 0; transform: scale(0.2) rotate(45deg); }
}

.g1 { top: 6%;   left: 4%;   animation-delay: 2.6s; }
.g2 { top: -8%;  left: 55%;  animation-delay: 4.9s;  width: 8px; height: 8px; }
.g3 { top: 68%;  left: 88%;  animation-delay: 7.4s; }
.g4 { top: 88%;  left: 26%;  animation-delay: 10.2s; width: 7px; height: 7px; }
.g5 { top: 22%;  left: 97%;  animation-delay: 13.1s; width: 9px; height: 9px; }

/* ---------- the country line ---------- */

.place {
  position: fixed;
  left: 0;
  right: 0;
  bottom: clamp(26px, 4.5vh, 48px);
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  text-transform: uppercase;
  color: var(--ink-dim);
  text-shadow: 0 1px 14px rgba(8, 28, 58, 0.5);
  white-space: nowrap;
}

.flag {
  width: 23px;
  height: 12px;
  border-radius: 1.5px;
  flex-shrink: 0;
  opacity: 0.95;
  box-shadow: 0 1px 8px rgba(8, 28, 58, 0.35);
}

/* ---------- entrance ---------- */

.enter {
  opacity: 0;
  animation: enter 2.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
/* the stagger lives inside the keyframes — no animation-delay */
.enter.e1 {
  animation-name: enterHeld;
  animation-duration: 2.7s;
}

@keyframes enter {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

@keyframes enterHeld {
  0%, 19% { opacity: 0; transform: translateY(10px); }
  100%    { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .enter, .enter.e1 { animation: none; opacity: 1; }
  .name { animation: none; }
  .glint { animation: none; opacity: 0; }
  .clouds { animation: none; }
  .reflection { animation: none; }
}

/* ---------- small screens ---------- */

/* on a phone you're close up on the glass: two lites, one member */
@media (max-width: 700px) {
  .mullions {
    background: linear-gradient(
      90deg,
      transparent 0,
      transparent calc(50% - 16px),
      rgba(8, 14, 24, 0.22) calc(50% - 1px),
      rgba(5, 8, 12, 0.92) calc(50% - 1px),
      rgba(5, 8, 12, 0.92) 50%,
      rgba(10, 14, 20, 0.95) 50%,
      rgba(46, 60, 78, 0.95) calc(50% + 9px),
      rgba(148, 168, 194, 0.85) calc(50% + 9px),
      rgba(148, 168, 194, 0.85) calc(50% + 10px),
      rgba(255, 255, 255, 0.32) calc(50% + 10px),
      rgba(255, 255, 255, 0.32) calc(50% + 11px),
      rgba(215, 232, 248, 0.12) calc(50% + 11px),
      transparent calc(50% + 16px),
      rgba(150, 225, 200, 0.15) calc(50% + 16px),
      rgba(150, 225, 200, 0.15) calc(50% + 17px),
      transparent calc(50% + 17px)
    );
  }

  /* the per-pane tint must match the two-pane frame above, not the
     desktop three-pane split — otherwise ghost seams show mid-glass */
  .mullions::before {
    background: linear-gradient(
      90deg,
      rgba(190, 215, 240, 0.045) 0%,
      rgba(190, 215, 240, 0.045) 50%,
      rgba(255, 255, 255, 0.028) 50%,
      rgba(255, 255, 255, 0.028) 100%
    );
  }
}

/* the wordmark and country line need their own scale on phones —
   the desktop clamp floor doesn't shrink enough to avoid overflow */
@media (max-width: 560px) {
  .name {
    font-size: clamp(1.9rem, 12vw, 3.4rem);
    letter-spacing: 0.05em;
    text-indent: 0.05em;
  }
  .place {
    font-size: 0.56rem;
    letter-spacing: 0.2em;
    text-indent: 0.2em;
    gap: 8px;
  }
  .flag { width: 19px; height: 10px; }
}

@media (max-width: 360px) {
  .name { font-size: 12vw; letter-spacing: 0.03em; text-indent: 0.03em; }
  .place { font-size: 0.46rem; letter-spacing: 0.1em; text-indent: 0.1em; gap: 6px; }
  .flag { width: 16px; height: 8px; }
}
