/* Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* Base */
html, body {
  height: 100%;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: #eaf2ff;
  background: #0b0f14;
}

/* Motion prefs */
@media (prefers-reduced-motion: no-preference) {
  :root { --trans-fast: 200ms; --trans-med: 400ms; --trans-slow: 800ms; }
}
@media (prefers-reduced-motion: reduce) {
  :root { --trans-fast: 0ms; --trans-med: 0ms; --trans-slow: 0ms; }
}

/* HEADER CODE START */

/* =========================
   Scoped header + full menu
   ========================= */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 100px;
  display: flex;
  align-items: center;
  padding-left: 32px;
  z-index: 1400;
  pointer-events: none;
}

/* brand (bigger logo + text) */
.site-header__brand-holder {
  pointer-events: auto;
  display: flex;
  align-items: center;
}
.site-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: #fff;
}
.site-header__logo {
  height: 76px; /* increased size */
  width: auto;
  border-radius: 10px;
}
.site-header__brand-text {
  font-weight: 800;
  font-size: 1.6rem; /* increased font size */
  color: #fff;
  letter-spacing: 0.7px;
}

/* toggle checkbox hidden */
.site-header__toggle {
  position: absolute;
  left: -9999px;
  opacity: 0;
}

/* menu button (now perfectly aligned top-right) */
.site-header__toggle-btn {
  position: fixed;
  top: 0; /* removed extra gap */
  right: 0; /* removed extra gap */
  width: 86px;
  height: 86px;
  background: #000;
  border-bottom-left-radius: 70px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  padding: 20px;
  gap: 7px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
  z-index: 1500;
  cursor: pointer;
  pointer-events: auto;
  transition: transform 180ms ease, background 140ms ease;
}
.site-header__toggle-btn:hover {
  transform: translateY(-1px);
  background: #0b0b0b;
}

/* menu lines (bold + stylish descending widths) */
.site-header__bar {
  display: block;
  height: 4.5px;
  background: #fff;
  border-radius: 4px;
  transition: width 420ms cubic-bezier(.2,.9,.3,1), transform 220ms ease, opacity 160ms ease;
}
.site-header__bar:nth-child(1) { width: 46px; }
.site-header__bar:nth-child(2) { width: 32px; }
.site-header__bar:nth-child(3) { width: 20px; }
.site-header__toggle-btn:hover .site-header__bar {
  width: 40px;
  transition-duration: 0.55s;
}

/* fullscreen panel */
.site-header__panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  z-index: 1450;
  transform-origin: top right;
  transform: scale(0.98);
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(180deg, #000, #050505);
  overflow: hidden;
  transition: transform 0.82s cubic-bezier(.16,1,.3,1), opacity 0.34s ease;
}
.site-header__toggle:checked ~ .site-header__panel {
  width: 100vw;
  height: 100vh;
  transform: scale(1);
  opacity: 1;
  pointer-events: auto;
  transition: transform 0.9s cubic-bezier(.16,1,.3,1), opacity 0.44s ease;
}

/* grid layout */
.site-header__panel-grid {
  display: grid;
  grid-template-columns: 1fr 600px;
  width: 100%;
  height: 100%;
}

/* left canvas */
.site-header__left {
  position: relative;
  padding: 96px 72px;
  display: flex;
  align-items: center;
  background: radial-gradient(circle at 25% 45%, rgba(255,255,255,0.02), transparent 28%);
  color: rgba(255,255,255,0.92);
}
.site-header__wordmark {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  font-weight: 900;
  line-height: 0.9;
  color: rgba(255,255,255,0.12);
  font-size: clamp(64px, 10vw, 140px);
  letter-spacing: 2px;
  text-transform: uppercase;
  transform: translateY(10px);
  opacity: 0;
  transition: transform 640ms cubic-bezier(.16,1,.3,1), opacity 420ms ease;
}
.site-header__wordmark span {
  color: rgba(255,255,255,0.16);
  display: block;
}
.site-header__toggle:checked ~ .site-header__panel .site-header__wordmark {
  transform: translateY(0);
  opacity: 1;
  transition-delay: 140ms;
}

/* right divider + menu */
.site-header__right {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 56px;
}
.site-header__right::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 12%;
  bottom: 12%;
  width: 1px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.03), rgba(255,255,255,0.06), rgba(255,255,255,0.03));
}

/* right menu */
.site-header__menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 28px;
  align-items: flex-end;
  margin: 0;
  padding: 0;
  width: 100%;
}
.site-header__menu a {
  text-decoration: none;
  color: #fff;
  font-weight: 800;
  font-size: clamp(32px, 4.2vw, 56px);
  line-height: 1;
  transition: color 220ms ease, transform 220ms ease;
  padding-right: 6%;
  text-align: right;
}
.site-header__menu a:hover {
  color: #ffd24d;
  transform: translateX(-8px);
}

/* toggle morph to X */
.site-header__toggle:checked + .site-header__toggle-btn .site-header__bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
  width: 46px;
}
.site-header__toggle:checked + .site-header__toggle-btn .site-header__bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.site-header__toggle:checked + .site-header__toggle-btn .site-header__bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
  width: 46px;
}

/* responsive */
@media (max-width: 900px) {
  .site-header__panel-grid {
    grid-template-columns: 1fr;
  }
  .site-header__left {
    padding: 44px;
    align-items: flex-end;
  }
  .site-header__wordmark {
    font-size: clamp(40px, 12vw, 72px);
    text-align: left;
  }
  .site-header__right {
    padding: 28px;
    align-items: center;
  }
  .site-header__menu {
    align-items: center;
    gap: 20px;
  }
  .site-header__menu a {
    font-size: clamp(28px, 8vw, 46px);
    text-align: center;
    padding-right: 0;
  }
}

/* HEADER CODE END */

/* Viewport wrapper (full height; header floats over it) */
.viewport{ height: 100dvh; }

/* ===== Interactive section ===== */
.container{
  position: relative;
  width: 100%;
  height: 100%;
  background-image: url('../src/scenary.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: grid;
  place-items: center;
  isolation: isolate;
  transition: background-image var(--trans-slow) ease-in-out;
}

.container::before{
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1200px 600px at 50% 20%, rgba(0,0,0,0.25), transparent 60%),
    linear-gradient(180deg, rgba(0,0,0,0.35), rgba(0,0,0,0.55));
  z-index: 1;
}

.content{
  z-index: 2;
  text-align: center;
  padding: 2rem;
  max-width: min(1100px, 92vw);
}

.main-text{
  font-size: clamp(2rem, 4.8vw + 0.5rem, 3.6rem);
  font-weight: 800;
  line-height: 1.25;
  color: #ffffff;
  letter-spacing: 1.5px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.55);
}

.normal-text,
.hover-word{
  display: inline-block;
  transition: opacity var(--trans-med) ease, transform var(--trans-med) ease, text-shadow var(--trans-med) ease;
}

.hover-word {
  display: inline-block;
  cursor: pointer;
  position: relative;
  padding: 0.15em 0.35em;
  border-radius: 10px;
  text-decoration: underline;
  text-decoration-color: #FFD700;
  text-decoration-thickness: 3px;
  text-underline-offset: 8px;
  outline-offset: 4px;
  font-weight: 900;
  font-size: 1.2em; /* slightly larger than normal words */
  transition: transform var(--trans-med) ease, text-shadow var(--trans-med) ease;
  will-change: transform, opacity;
  background: linear-gradient(135deg, transparent 0%, transparent 100%);
  
  /* Breathing animation */
  animation: hoverWordPulse 3.6s ease-in-out infinite;
}

/* Breathing keyframes */
@keyframes hoverWordPulse {
  0%   { transform: scale(1.12); }
  50%  { transform: scale(1.18); }
  100% { transform: scale(1.12); }
}

.hover-word:hover,
.hover-word:focus-visible {
  color: #FFD700;
  background: linear-gradient(135deg, rgba(255,215,0,0.18) 0%, rgba(255,215,0,0.08) 100%);
  transform: scale(1.24);
  text-shadow: 0 4px 18px rgba(255,215,0,0.7);
  box-shadow: 0 10px 28px rgba(255,215,0,0.35);
  text-decoration-color: #FFA500;
}

.content.word-hovered .normal-text{ opacity: 0; transform: scale(0.86); visibility: hidden; }
.content.word-hovered .hover-word:not(.active-hover){ opacity: 0; transform: scale(0.86); visibility: hidden; }
.content.word-hovered .hover-word.active-hover{ opacity: 1; transform: scale(1.26); visibility: visible; }

/* Fade-in */
.fade-transition{ opacity: 0; }
.fade-transition.active{ opacity: 1; transition: opacity var(--trans-slow) ease-in-out; }

/* Responsive */
@media (max-width: 768px){
  .content{ padding: 1.25rem; }
  .hover-word{ text-underline-offset: 6px; text-decoration-thickness: 2px; }
}
@media (max-width: 480px){
  .hover-word{ text-underline-offset: 4px; text-decoration-thickness: 2px; }
  .content.word-hovered .hover-word.active-hover{ transform: scale(1.16); }
}

/* Focus rings */
.hover-word:focus-visible,
.nav-list a:focus-visible,
.nav-toggle:focus-visible{
  outline: 2px solid #79c6ff;
  outline-offset: 2px;
}
