:root {
  --font: "Nunito Sans", "Segoe UI", "Frutiger", "Trebuchet MS", sans-serif;
  --ink: #083c78;
  --ink-dim: rgba(8, 60, 120, 0.7);
  --white: #ffffff;
  --ice: #e4f7ff;
  --lime1: #f4ffb0;
  --lime2: #b6ea2c;
  --lime3: #4f9a08;
  --pad: clamp(16px, 2.8vw, 40px);
  --ease: cubic-bezier(0.19, 1, 0.22, 1);
}

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

html, body {
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* sunny sky above a horizon at 52%, turquoise water below */
body {
  background: linear-gradient(180deg,
    #1470d9 0%, #2d92ea 22%, #5fb7f8 40%, #a9dcff 51.4%,
    #8de6f6 52%, #3fc8ee 62%, #1fa7e0 80%, #0f86c9 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

::selection { background: #b6ea2c; color: #083c78; }

a { color: inherit; text-decoration: none; }

/* ---------- sun ---------- */
.sun {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(circle at 7% -3%, #fff 0%, rgba(255,255,255,0.85) 4%, rgba(255,255,255,0.4) 12%, rgba(255,255,255,0.12) 26%, transparent 46%),
    radial-gradient(ellipse at 10% 4%, rgba(255,255,255,0.35), transparent 42%);
}
.rays {
  position: fixed; inset: -25%; z-index: 0; pointer-events: none;
  background: conic-gradient(from 188deg at 12% 4%,
    transparent 0deg, rgba(255,255,255,0.5) 4deg, transparent 9deg,
    transparent 15deg, rgba(255,255,255,0.35) 19deg, transparent 26deg,
    transparent 33deg, rgba(255,255,255,0.42) 38deg, transparent 44deg,
    transparent 53deg, rgba(255,255,255,0.28) 57deg, transparent 63deg,
    transparent 360deg);
  mix-blend-mode: soft-light;
  opacity: 0.9;
  -webkit-mask-image: radial-gradient(ellipse at 12% 4%, #000 0%, transparent 72%);
  mask-image: radial-gradient(ellipse at 12% 4%, #000 0%, transparent 72%);
  animation: sway 18s ease-in-out infinite alternate;
  transform-origin: 12% 4%;
}
@keyframes sway { from { transform: rotate(-2.5deg); } to { transform: rotate(2.5deg); } }

#sky, #scene {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 1; pointer-events: none; display: block;
}
/* the water surface is drawn on the GPU; JS sets its height so it starts at the horizon */
#waterGL {
  position: fixed; left: 0; bottom: 0; width: 100%; height: 48vh;
  z-index: 1; pointer-events: none; display: block;
}

/* ---------- gulls ---------- */
.gull { position: fixed; z-index: 2; pointer-events: none; width: 74px; left: 0; top: 11vh; animation: glide 80s linear infinite; }
.gull.g2 { width: 46px; top: 22vh; animation-duration: 110s; animation-delay: -46s; }
@keyframes glide { from { transform: translateX(-14vw); } to { transform: translateX(112vw); } }
.gull-bob { animation: bob 5s ease-in-out infinite alternate; filter: drop-shadow(0 3px 4px rgba(0, 60, 130, 0.3)); }
.gull-bob svg { display: block; width: 100%; height: auto; transform-origin: 50% 60%; animation: flap 2.6s ease-in-out infinite; }
@keyframes bob { from { transform: translateY(-8px) rotate(-2deg); } to { transform: translateY(10px) rotate(2deg); } }
@keyframes flap { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(0.78); } }

/* ---------- leaves ---------- */
.leaf {
  position: fixed; z-index: 3; pointer-events: none;
  transform-origin: 50% 100%;
  filter: drop-shadow(0 14px 14px rgba(0, 70, 40, 0.35));
  animation: leafSway var(--d, 7s) ease-in-out infinite alternate;
}
.leaf svg { display: block; width: 100%; height: auto; }
@keyframes leafSway {
  from { transform: rotate(calc(var(--r) - 2.2deg)); }
  to   { transform: rotate(calc(var(--r) + 2.2deg)); }
}
.leaf.l1 { --r: 24deg;  --d: 8s;  width: clamp(150px, 20vw, 300px); left: -3vw;  bottom: -7vh; }
.leaf.l2 { --r: -6deg;  --d: 6s;  width: clamp(120px, 15vw, 230px); left: 7vw;   bottom: -11vh; }
.leaf.l3 { --r: 158deg; --d: 9s;  width: clamp(110px, 14vw, 210px); left: -3vw;  top: -7vh; transform-origin: 50% 100%; }
.leaf.l4 { --r: -64deg; --d: 7.5s; width: clamp(130px, 17vw, 260px); right: -7vw; bottom: 16vh; }
.leaf.l5 { --r: -26deg; --d: 8.5s; width: clamp(120px, 15vw, 230px); right: -1vw; bottom: -10vh; }

/* ---------- chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink);
  background: linear-gradient(180deg, rgba(255,255,255,0.8), rgba(255,255,255,0.4));
  border: 1px solid rgba(255,255,255,0.95);
  box-shadow: 0 6px 16px rgba(0, 70, 150, 0.28), inset 0 1px 0 #fff;
  backdrop-filter: blur(10px) saturate(1.4);
  -webkit-backdrop-filter: blur(10px) saturate(1.4);
}
.status { position: fixed; top: var(--pad); right: var(--pad); z-index: 20; }

/* music toggle: same glossy chip, top left */
.music { position: fixed; top: var(--pad); left: var(--pad); z-index: 20; font-family: inherit; cursor: pointer; }
.music:hover { background: linear-gradient(180deg, #fff, rgba(255,255,255,0.65)); }
.music-state { min-width: 2.4ch; opacity: 0.7; }
.music.on .music-state { opacity: 1; }
.music.missing { opacity: 0.55; }
.music-bars { display: flex; align-items: flex-end; gap: 2px; width: 16px; height: 12px; }
.music-bars i { display: block; flex: 1; height: 3px; border-radius: 1px; background: currentColor; }
.music.on .music-bars i { animation: eq 0.9s ease-in-out infinite; }
.music.on .music-bars i:nth-child(2) { animation-delay: -0.3s; }
.music.on .music-bars i:nth-child(3) { animation-delay: -0.6s; }
.music.on .music-bars i:nth-child(4) { animation-delay: -0.15s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 12px; } }

.orb {
  width: 11px; height: 11px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f2ffd2 0%, #8be23a 45%, #3e9a12 100%);
  box-shadow: 0 0 8px rgba(150, 255, 80, 0.95);
  animation: glow 2.6s ease-in-out infinite;
}
@keyframes glow { 50% { opacity: 0.45; } }

/* ---------- page ---------- */
.page {
  position: relative; z-index: 5;
  min-height: 100vh;
  width: min(1040px, 100%);
  margin: 0 auto;
  padding: 26px var(--pad) 96px;
  display: flex; flex-direction: column; justify-content: center; gap: 28px;
}

.head { text-align: center; }

.logo {
  display: inline-block;
  font-weight: 300; font-size: 34px; letter-spacing: 0.22em; padding-left: 0.22em;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 80, 170, 0.75), 0 0 2px rgba(0, 60, 140, 0.6);
}
.logo sup { font-weight: 800; font-size: 0.7em; letter-spacing: 0; margin-left: 2px; color: #d8ff6a; vertical-align: 0.55em; }

.welcome {
  margin-top: 12px;
  font-size: 12px; font-weight: 800; letter-spacing: 0.22em; text-transform: uppercase;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0, 80, 170, 0.8);
}

/* ---------- glass slabs ---------- */
.slab {
  position: relative;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255,255,255,0.66) 0%, rgba(214,242,255,0.42) 55%, rgba(150,216,250,0.42) 100%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow:
    0 30px 60px rgba(0, 70, 150, 0.35),
    inset 0 1px 0 #fff,
    inset 0 -26px 44px rgba(110, 210, 255, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.4),
    0 0 0 8px rgba(255, 255, 255, 0.16),
    0 0 0 9px rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
}
.tabs {
  background: linear-gradient(180deg, rgba(235,250,255,0.55) 0%, rgba(150,215,250,0.42) 60%, rgba(100,190,245,0.45) 100%);
}

.slab::before, .slab::after {
  content: "";
  position: absolute; top: 28%; width: 220px; height: 120px;
  pointer-events: none; z-index: -1;
  background:
    radial-gradient(closest-side, rgba(255,255,255,0.95), rgba(190,240,255,0.55) 38%, transparent 72%) center / 60% 100% no-repeat,
    linear-gradient(90deg, transparent, rgba(255,255,255,0.95), transparent) center / 100% 2px no-repeat;
  filter: blur(3px);
  opacity: 0.85;
}
.slab::before { left: -110px; }
.slab::after { right: -110px; }

.gloss {
  position: absolute; left: 12px; right: 12px; top: 8px; height: 40%;
  border-radius: 24px 24px 70% 70% / 24px 24px 38% 38%;
  background: linear-gradient(180deg, rgba(255,255,255,0.7), rgba(255,255,255,0.05));
  pointer-events: none;
}
.slab > * { position: relative; }
.slab > .gloss { position: absolute; }

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 30px;
  align-items: center;
  padding: 34px;
  min-height: clamp(250px, 38vh, 380px);
}

.eyebrow {
  display: inline-block;
  font-size: 11px; font-weight: 800; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--ink-dim); margin-bottom: 12px;
}

.name {
  font-weight: 800;
  font-size: clamp(56px, 8.4vw, 118px);
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
  background: linear-gradient(180deg, #0b4aa0 0%, #1aa2fa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 0 rgba(255,255,255,0.9)) drop-shadow(0 10px 14px rgba(0, 90, 180, 0.3));
}

.role {
  margin-top: 16px;
  font-size: 16px; font-weight: 600; letter-spacing: 0.03em; line-height: 1.7;
  min-height: 5.1em;                       /* room for three lines: temperature, eastern time, click */
  color: var(--ink);
}
.role-line { display: block; }
.role-click { transition: opacity 0.8s var(--ease); }
.role-click.gone { opacity: 0; }           /* after the first click / once the music is playing */
.role-line::after {
  content: ""; display: inline-block; width: 2px; height: 1.05em; margin-left: 3px;
  vertical-align: -0.16em; background: var(--ink); opacity: 0;
}
.role-line.typing::after { opacity: 1; animation: blink 0.9s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* inset window with moving water light */
.window {
  position: relative;
  height: clamp(190px, 28vh, 290px);
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid #fff;
  box-shadow: 0 12px 30px rgba(0, 70, 150, 0.4), 0 0 0 5px rgba(255,255,255,0.3), inset 0 0 24px rgba(0, 90, 180, 0.35);
}
.window canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.window-sheen {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(160deg, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0.08) 38%, transparent 55%),
    radial-gradient(120% 70% at 50% 120%, rgba(0, 70, 160, 0.3), transparent 60%);
}
.window-mark {
  position: absolute; right: 16px; bottom: 12px;
  font-size: 13px; font-weight: 800; letter-spacing: 0.2em; color: #fff;
  text-shadow: 0 1px 5px rgba(0, 70, 150, 0.8);
}
.window-mark sup { color: #d8ff6a; letter-spacing: 0; }

/* ---------- link tabs ---------- */
.tabs { padding: 16px; }
.links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

.link {
  position: relative;
  display: flex; flex-direction: column; justify-content: space-between;
  gap: 18px;
  min-height: 112px;
  padding: 14px 16px 16px;
  border-radius: 18px;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 50, 120, 0.6);
  background: linear-gradient(180deg, #86d8ff 0%, #2eaaf0 48%, #0f7fd6 52%, #3db8f7 100%);
  border: 1px solid rgba(255,255,255,0.9);
  box-shadow: inset 0 1px 0 #fff, inset 0 -3px 6px rgba(0, 60, 140, 0.3), 0 8px 18px rgba(0, 80, 160, 0.4);
  overflow: hidden;
  isolation: isolate;
  opacity: 0;
  transform: translateY(14px);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), filter 0.3s;
}
.link.in {
  opacity: 1; transform: none;
  transition: opacity 0.9s var(--ease), transform 0.45s var(--ease), box-shadow 0.45s var(--ease), filter 0.3s;
}
/* top gloss */
.link::after {
  content: ""; position: absolute; z-index: -1; left: 3%; right: 3%; top: 3px; height: 46%;
  border-radius: 14px 14px 60% 60% / 14px 14px 40% 40%;
  background: linear-gradient(180deg, rgba(255,255,255,0.75), rgba(255,255,255,0.12));
}
/* sweeping shine */
.link::before {
  content: ""; position: absolute; z-index: -1; inset: 0;
  background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,0.65) 50%, transparent 62%);
  background-size: 260% 100%; background-position: 130% 0;
  transition: background-position 0.9s var(--ease);
}
.link:hover, .link:focus-visible {
  transform: translateY(-4px);
  filter: brightness(1.08) saturate(1.1);
  box-shadow: inset 0 1px 0 #fff, inset 0 -3px 6px rgba(0, 60, 140, 0.3), 0 14px 26px rgba(0, 80, 160, 0.45), 0 0 26px rgba(190, 255, 120, 0.7);
  outline: none;
}
.link:hover::before, .link:focus-visible::before { background-position: -30% 0; }

.link-top { display: flex; justify-content: space-between; align-items: center; }
.link-idx { font-size: 11px; font-weight: 800; letter-spacing: 0.18em; opacity: 0.9; }

.link-arrow-wrap {
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 35% 28%, rgba(255,255,255,0.7), rgba(255,255,255,0.15) 70%);
  border: 1px solid rgba(255,255,255,0.85);
  transition: background 0.4s, box-shadow 0.4s;
}
.link:hover .link-arrow-wrap {
  background: radial-gradient(circle at 35% 28%, var(--lime1) 0%, var(--lime2) 50%, var(--lime3) 100%);
  box-shadow: 0 0 12px rgba(180, 255, 80, 0.95);
}
.link-arrow { width: 13px; height: 13px; transition: transform 0.45s var(--ease); }
.link:hover .link-arrow { transform: translate(2px, -2px); }

.link-name { display: block; font-size: 21px; font-weight: 800; letter-spacing: 0.01em; }
.link-handle { display: block; margin-top: 3px; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; opacity: 0.92; }

/* ---------- bottom ---------- */
.bottom {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--pad); pointer-events: none;
}
.bottom > * { pointer-events: auto; }
.clock span:first-child { opacity: 0.7; }
.clock span:last-child { font-variant-numeric: tabular-nums; }
.bottom-mid {
  position: absolute; left: 50%; transform: translateX(-50%);
  font-size: 11px; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase;
  color: #fff; text-shadow: 0 1px 6px rgba(0, 80, 170, 0.8);
}

/* ---------- boot ---------- */
.boot {
  position: fixed; inset: 0; z-index: 200;
  background: linear-gradient(180deg, #1470d9 0%, #5fb7f8 45%, #bfe9ff 70%, #3fc8ee 100%);
  color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
  clip-path: inset(0 0 0 0);
  transition: clip-path 1.1s var(--ease), opacity 0.4s 0.9s;
}
.boot.done { clip-path: inset(0 0 100% 0); opacity: 0; pointer-events: none; }
.boot-count { font-size: 14px; font-weight: 800; letter-spacing: 0.26em; text-shadow: 0 2px 8px rgba(0, 80, 170, 0.7); }
.boot-bar {
  width: 240px; height: 16px; border-radius: 999px; position: relative; overflow: hidden;
  background: rgba(255,255,255,0.35); border: 1px solid #fff;
  box-shadow: inset 0 2px 5px rgba(0, 80, 160, 0.4);
}
.boot-bar i {
  position: absolute; inset: 0; border-radius: 999px;
  background: linear-gradient(180deg, #e4ffa8 0%, #9ee03a 50%, #4f9a08 52%, #8fd830 100%);
  transform: scaleX(0); transform-origin: left;
}
.boot-bar i::after {
  content: ""; position: absolute; left: 3%; right: 3%; top: 2px; height: 42%;
  border-radius: 999px; background: linear-gradient(180deg, rgba(255,255,255,0.85), rgba(255,255,255,0.1));
}

/* ---------- smaller screens ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding: 28px 24px; }
  .window { height: 170px; }
  .links { grid-template-columns: repeat(2, 1fr); }
  .slab::before, .slab::after { display: none; }
  .bottom-mid { display: none; }
}
@media (max-width: 520px) {
  .logo { font-size: 28px; }
  .links { grid-template-columns: 1fr; }
  .link { min-height: 0; flex-direction: row; align-items: center; }
  .link-top { order: 2; }
  .link-idx { display: none; }
  .status, .bottom { display: none; }
  .page { padding-bottom: 36px; }
  .leaf.l3, .leaf.l5 { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .rays, .orb, .gull, .gull-bob, .gull-bob svg, .leaf, .role-line::after, .music.on .music-bars i { animation: none; }
  .music.on .music-bars i { height: 9px; }
  .link { opacity: 1; transform: none; }
  .gull { left: 70vw; }
}
