/* styles.css
 * Copyright (c) 2025, 7th software Ltd.
 * All rights reserved.
 */

/* Default base: assume large landscape (desktop/tablet) */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Urbanist', sans-serif;
  font-size: 18px;
  color: #eee;
  /*color: green;*/

  /* Disable (generally accidental) text selection throughout the site */
  user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
}

/* Small physical device, portrait (e.g. phone upright) */
@media (max-width: 768px) and (orientation: portrait) and (pointer: coarse) {
  html {
    font-size: 12.5px;
    /*color: magenta;*/
  }
}

/* Small physical device, landscape (e.g. phone sideways) */
@media (max-height: 500px) and (orientation: landscape) and (pointer: coarse) {
  html {
    font-size: 12.5px;
    /*color: yellow;*/
  }
}

/* Large screen, portrait (e.g. tablet or monitor rotated) */
@media (min-width: 769px) and (orientation: portrait) and (pointer: fine) {
  html {
    font-size: 16px;
    /*color: blue;*/
  }
}

.container {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.background {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.top-banner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 10vw;
  font-size: 10vw; /* match height exactly */
  background: linear-gradient(
    to bottom in oklch,
    rgba(0, 0, 0, 0.8) 0%,
    rgba(0, 0, 0, 0.4) 75%,
    rgba(0, 0, 0, 0.2) 90%,
    rgba(0, 0, 0, 0) 100%
  );
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 10;
  box-sizing: border-box;
}

.left-section {
  display: flex;
  align-items: center;
  gap: 0.33em;
}

.logo {
  height: 0.67em;
  width: 0.67em;
  cursor: pointer;
}

.title {
  font-size: 0.4em;
  font-weight: 500;
}

.right-section {
  display: flex;
  align-items: center;
  gap: 0.33em;
}

.info-box {
  text-align: right;
  font-size: 0.25em;
  line-height: 1.2;
  color: #bbb;

  opacity: 0;
  transition: opacity 400ms ease;
  pointer-events: none;
}

.info-box.visible {
  opacity: 1;
  pointer-events: auto;
}

.info {
  color: white;
}

.about {
  font-size: 0.35em;
  cursor: pointer;
  color: #7ec4dd;
}

.hamburger {
  font-size: 0.35em;
  cursor: pointer;
  color: #e69a75;
}

.message-box {
  position: fixed;
  top: 12vh;
  left: 50%;
  transform: translateX(-50%);
  width: 90vw;
  max-width: 90vw;

  min-height: 0;                  /* force Firefox to respect flex scroll */
  max-height: calc(100vh - 10vh); /* limit height */
  overflow-y: auto;               /* enable vertical scroll if needed */
  overscroll-behavior: contain;   /* optional: prevent scroll chaining on touch devices */
  overflow-anchor: none;          /* prevent scroll anchoring issues */

  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px); /* for compatability */
  z-index: 40;

  /*color: #fff;*/
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  padding: 1.5rem;
  box-sizing: border-box;
  font-family: sans-serif;

  opacity: 0;
  transition: opacity 500ms ease-in;
  pointer-events: none;

  /*outline: 2px solid red;*/ /* debug */
}

.message-box > * {
  flex-shrink: 0; /* ensure all children contribute to scroll height */
  min-height: 0;  /* ensures children don’t collapse */
}

.message-box.visible {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 1000ms ease-out;
}

.message-title {
  font-size: 1.5rem;
  font-weight: bold;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.75rem;
  color: #e69a75;
}

.message-body {
  font-size: 1.2rem;
  text-align: left;
  line-height: 1.4;
}

.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px); /* for compatability */
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
  z-index: 90;
}

.menu-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.side-menu {
  position: fixed;
  top: 0;
  right: -300px; /* hidden by default */
  width: 300px;
  height: 100vh;
  background-color: rgba(33, 15, 1, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px); /* for compatability */
  transition: right 300ms ease;
  z-index: 100;
  box-shadow: -4px 0 8px rgba(33, 15, 1, 0.5);
  display: flex;
  flex-direction: column;
  padding: 1rem;
  box-sizing: border-box;
}

.side-menu.open {
  right: 0;
}

.menu-item {
  background: rgba(230, 205, 194, 0.1);
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(230, 205, 194, 0.2);
  color: #e69a75;
  font-size: 1.2rem;
  cursor: pointer;
}

.side-menu label {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.1rem;
}

.menu-item input[type="checkbox"] {
  width: 2rem;
  height: 2rem;
  color: #e6cdc2;
  accent-color: #e6cdc2;
  background-color: #e6cdc2;
}

.menu-item input[type="checkbox"]:not(:checked) {
  appearance: none;
  -webkit-appearance: none;
  background-color: #e6cdc2;
}
