/* ==========================================================
   SwanVerse — shared.css
   Mobile-first responsive stylesheet shared across all pages.
   ========================================================== */

/* ---------- Design Tokens ---------- */
:root {
  --color-bg: #f8f8f8;
  --color-text: #333;
  --color-header-bg: #121212;
  --color-footer-bg: #222;
  --color-footer-text: #ccc;
  --color-accent: #0066cc;
  --header-height: 56px;
  --footer-height: 46px;
  --max-width: 1100px;
  --side-padding: 16px;
}

/* ---------- Reset / Base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ---------- Fixed Header ---------- */
header {
  background: var(--color-header-bg);
  color: #ffffff;
  padding: 0 var(--side-padding);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  display: flex;
  align-items: center;
}

/* ---------- Navigation ---------- */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
}

nav .logo {
  font-size: 20px;
  font-weight: bold;
  color: #fff;
  text-decoration: none;
  flex-shrink: 0;
}

/* Hamburger button — visible only on mobile */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  gap: 5px;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Animate hamburger → X when open */
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Nav links list */
nav ul {
  list-style: none;
  margin: 0;
  padding: 0;

  /* Mobile: hidden drawer */
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--color-header-bg);
  position: absolute;
  top: var(--header-height);
  left: calc(-1 * var(--side-padding));
  right: calc(-1 * var(--side-padding));
  width: calc(100vw);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  z-index: 999;
}

/* When open, expand drawer */
.nav-open nav ul {
  max-height: 400px;
  border-top: 1px solid #333;
}

nav ul li a {
  display: block;
  color: #ffffff;
  text-decoration: none;
  font-size: 15px;
  padding: 13px var(--side-padding);
  border-bottom: 1px solid #2a2a2a;
}

nav ul li a:hover,
nav ul li a:focus {
  background: #1e1e1e;
  text-decoration: none;
}

/* ---------- Tablet & up: horizontal nav ---------- */
@media (min-width: 640px) {
  .nav-toggle {
    display: none;
  }

  nav ul {
    position: static;
    flex-direction: row;
    gap: 20px;
    background: transparent;
    max-height: none;
    width: auto;
    overflow: visible;
    border-top: none;
  }

  nav ul li a {
    padding: 0;
    border-bottom: none;
  }

  nav ul li a:hover {
    background: transparent;
    text-decoration: underline;
  }
}

/* ---------- Main Content Area ---------- */
.hero {
  flex: 1;
  max-width: var(--max-width);
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
  padding: calc(var(--header-height) + 24px) var(--side-padding) calc(var(--footer-height) + 24px);
}

.hero h1 {
  font-size: clamp(26px, 6vw, 48px);
  margin-bottom: 15px;
  text-align: center;
}

.hero h2 {
  font-size: clamp(18px, 4vw, 28px);
}

.hero p {
  font-size: clamp(15px, 2.5vw, 18px);
  line-height: 1.7;
  max-width: 700px;
  margin: 0 auto 24px auto;
  text-align: center;
}

/* ---------- Fixed Footer ---------- */
footer {
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  padding: 0 var(--side-padding);
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: var(--footer-height);
  box-sizing: border-box;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

footer .footer-content {
  text-align: center;
  font-size: clamp(11px, 2vw, 14px);
  max-width: var(--max-width);
  width: 100%;
}

footer a {
  color: var(--color-footer-text);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* ---------- Misc helpers ---------- */
.bt-30 { font-size: clamp(16px, 3vw, 18px); }
.bt-20 { font-size: clamp(14px, 2.5vw, 16px); }
.img-center { display: block; margin: 8px auto; }
.img-bottom { vertical-align: bottom; display: inline-block; margin: 0 6px; }
.modes-list { margin: 12px 0 0 20px; }
.modes-list li { margin: 8px 0; }
.muted { color: #666; font-size: 0.95em; }
