/* ===================================================================
   GREY BUSCEMI — design tokens
   Early-2000s Windows skin: Luna-blue title bars, silver/grey
   dialog faces, chunky 3D bevels, Tahoma everywhere.
=================================================================== */
:root {
  --win-face:        #ece9d8; /* classic XP dialog body color */
  --win-face-shadow: #aca899;
  --win-titlebar-1:  #3a87e0; /* title bar gradient, top */
  --win-titlebar-2:  #0a246a; /* title bar gradient + frame border */
  --win-text:        #000000;
  --win-text-mid:    #444444;
  --win-desktop:     #008080; /* classic Windows teal desktop */

  --font-system: Tahoma, 'MS Sans Serif', Geneva, sans-serif;
  /* Reserved for the home-screen wordmark only — see .wordmark__name */
  --font-wordmark: 'Sinhala Sangam MN', Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--win-desktop); /* only ever visible for an instant before video loads */
  color: var(--win-text);
  font-family: var(--font-system);
  height: 100%;
  overflow: hidden; /* this is a single full-bleed screen, not a scrolling page */
}

button {
  font-family: inherit;
  cursor: pointer;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* Honeypot field — hidden from humans, visible to bots/Netlify spam filter */
.hp-field {
  position: absolute;
  left: -9999px;
}

:focus-visible {
  outline: 1px dotted var(--win-text);
  outline-offset: 2px;
}

/* ===================================================================
   VIDEO STAGE
=================================================================== */
.video-stage {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: #000;
  overflow: hidden;
}

.video-stage video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.bg-video {
  object-fit: cover;
  filter: blur(70px) brightness(0.5) saturate(1.15);
  transform: scale(1.2);
}

.fg-video {
  object-fit: contain;
}

.grain {
  position: absolute;
  inset: -10%;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ===================================================================
   WORDMARK + SOUND TOGGLE
   Styled as small raised "chrome" — the same beveled-grey language
   as every other window on screen, instead of floating over the video.
=================================================================== */
.wordmark {
  position: fixed;
  top: clamp(16px, 4vh, 28px);
  left: clamp(16px, 4vw, 28px);
  z-index: 10;
  background: var(--win-face);
  border: 2px outset var(--win-face);
  padding: 4px 10px;
}

.wordmark__name {
  font-family: var(--font-wordmark);
  font-weight: 700;
  font-size: clamp(13px, 2vw, 16px);
  color: var(--win-text);
}

.sound-toggle {
  position: fixed;
  top: clamp(16px, 4vh, 28px);
  right: clamp(16px, 4vw, 28px);
  z-index: 10;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--win-face);
  border: 2px outset var(--win-face);
  color: var(--win-text);
}

.sound-toggle:active { border-style: inset; }

.sound-toggle .icon { position: absolute; }
.sound-toggle .icon--on { opacity: 0; }
.sound-toggle[aria-pressed="true"] .icon--muted { opacity: 0; }
.sound-toggle[aria-pressed="true"] .icon--on { opacity: 1; }

/* ===================================================================
   MODAL — a classic Windows message box.
   Appears immediately, no way to dismiss except submitting: the
   title-bar buttons are drawn flat/disabled and have no handlers.
=================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.25s linear;
}

.modal-overlay.is-visible { opacity: 1; }
.modal-overlay[hidden] { display: none; }

.modal-card {
  width: 100%;
  max-width: 300px;
  background: var(--win-face);
  border: 2px solid var(--win-titlebar-2);
  box-shadow:
    inset 1px 1px 0 #fff,
    inset -1px -1px 0 var(--win-face-shadow),
    3px 3px 0 rgba(0, 0, 0, 0.35);
}

.title-bar {
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
  background: linear-gradient(180deg, var(--win-titlebar-1), var(--win-titlebar-2));
  border-bottom: 1px solid var(--win-titlebar-2);
}

.title-bar__icon {
  width: 12px;
  height: 12px;
  background: #fff;
  border: 1px solid var(--win-titlebar-2);
}

.title-bar__controls {
  display: flex;
  gap: 2px;
}

.title-bar__btn {
  width: 15px;
  height: 13px;
  background: var(--win-face);
  border: 1px solid var(--win-face-shadow);
  box-shadow: inset 1px 1px 0 #fff;
  opacity: 0.6; /* reads as disabled — these do nothing */
}

.modal-content {
  padding: 22px 20px;
  text-align: center;
}

.modal-title {
  margin: 0 0 16px;
  font-family: var(--font-system);
  font-weight: bold;
  font-size: 15px;
  color: var(--win-text);
}

.modal-input {
  display: block;
  width: 100%;
  background: #fff;
  border: 2px inset var(--win-face);
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.3);
  font-family: var(--font-system);
  font-size: 12px;
  color: var(--win-text);
  padding: 5px 6px;
  margin-bottom: 14px;
  text-align: left;
  border-radius: 0;
}
.modal-input::placeholder { color: #6e6e6e; }

.modal-submit {
  min-width: 84px;
  background: var(--win-face);
  border: 2px outset var(--win-face);
  font-family: var(--font-system);
  font-size: 12px;
  color: var(--win-text);
  padding: 4px 16px;
}
.modal-submit:active { border-style: inset; }
