/* ═══════════════════════════════════════════
   BASE — Dark theme shared styles
   Reset · Variables · Typography · Header ·
   Slide Menu · Scroll Reveal
   ═══════════════════════════════════════════ */

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

:root {
  --black: #000000;
  --white: #ffffff;
  --off: #0e0e0e;
  --surface: #151515;
  --surface-hover: #1c1c1c;
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.15);
  --muted: #666666;
  --body: #999999;
  --accent: #d97757;
  --font-ui: 'Manrope', sans-serif;
  --font-display: 'DM Serif Display', serif;
  --font-mono: 'JetBrains Mono', monospace;
  --page-pad: clamp(20px, 5vw, 72px);
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: var(--font-ui);
  background: var(--black);
  color: var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── GRAIN TEXTURE OVERLAY ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 var(--page-pad);
}

/* ── SCROLL REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Staggered children — add .stagger-children to parent .reveal */
.reveal.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.stagger-children.visible > * { opacity: 1; transform: translateY(0); }
.reveal.stagger-children.visible > *:nth-child(1) { transition-delay: 0s; }
.reveal.stagger-children.visible > *:nth-child(2) { transition-delay: 0.08s; }
.reveal.stagger-children.visible > *:nth-child(3) { transition-delay: 0.16s; }
.reveal.stagger-children.visible > *:nth-child(4) { transition-delay: 0.24s; }
.reveal.stagger-children.visible > *:nth-child(5) { transition-delay: 0.32s; }
.reveal.stagger-children.visible > *:nth-child(6) { transition-delay: 0.40s; }

/* ═══════════════════════════════════════════
   HEADER — dark
   ═══════════════════════════════════════════ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 24px var(--page-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-mark {
  height: 28px;
  width: 28px;
  display: block;
  object-fit: contain;
}
.logo-text {
  font-family: var(--font-ui);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--white);
}
.logo-dot {
  color: var(--accent);
  font-weight: 600;
}

/* MENU button */
.menu-btn {
  position: fixed;
  top: 36px;
  transform: translateY(-50%);
  right: var(--page-pad);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.menu-btn-label {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--white);
  text-transform: uppercase;
}
.menu-btn-icon {
  width: 28px;
  height: 18px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.menu-btn-icon span {
  display: block;
  height: 1.5px;
  background: var(--accent);
  transition: transform 0.35s var(--ease), opacity 0.2s ease;
  transform-origin: center;
}
.menu-btn-icon span:first-child { width: 100%; }
.menu-btn-icon span:nth-child(2) { width: 100%; }
.menu-btn-icon span:last-child { width: 60%; }

/* ═══════════════════════════════════════════
   SLIDE MENU — dark
   ═══════════════════════════════════════════ */
.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 199;
  background: rgba(0,0,0,0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}
.menu-backdrop.open {
  opacity: 1;
  pointer-events: all;
}
.menu-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 400px;
  z-index: 200;
  background: var(--surface);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.5s var(--ease), visibility 0s 0.5s;
  padding: 32px 48px 48px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  border-left: 1px solid var(--border);
}
.menu-panel.open { transform: translateX(0); visibility: visible; transition: transform 0.5s var(--ease), visibility 0s 0s; }
.menu-close {
  align-self: flex-end;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  margin-bottom: 48px;
  transition: color 0.2s ease;
}
.menu-close:hover { color: var(--white); }
.menu-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px 0;
}
.menu-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 48px;
}
.menu-nav a {
  font-family: var(--font-ui);
  font-size: 32px;
  font-weight: 600;
  color: var(--white);
  text-decoration: none;
  line-height: 1.6;
  transition: color 0.2s ease;
}
.menu-nav a:hover { color: var(--accent); }
.menu-highlight {
  display: inline-block;
  border: 1.5px solid transparent;
  border-radius: 0.28em;
  padding: 0.02em 0.14em 0.06em;
  margin-left: -0.14em;
  margin-right: -0.14em;
  transition: border-color 0.25s ease;
}
.menu-nav a:hover .menu-highlight { border-color: rgba(217,119,87,0.4); }
.menu-info {
  margin-top: auto;
  padding-left: 4px;
}
.menu-info-section { margin-bottom: 28px; }
.menu-info-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.menu-info-section a {
  display: block;
  font-size: 15px;
  font-weight: 500;
  color: var(--body);
  text-decoration: none;
  margin-bottom: 6px;
  transition: color 0.2s ease;
}
.menu-info-section a:hover { color: var(--white); }
.menu-contact-section .menu-info-label {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 14px;
}
a.menu-pill {
  display: inline-flex;
  align-items: center;
  font-size: 15px;
  font-weight: 500;
  color: var(--white);
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 100px;
  padding: 12px 28px;
  transition: background 0.25s ease, border-color 0.25s ease;
}
a.menu-pill:hover {
  background: rgba(217,119,87,0.08);
  border-color: rgba(217,119,87,0.4);
  color: var(--accent);
}
.menu-lang-section { margin-bottom: 0; }

/* ═══════════════════════════════════════════
   RESPONSIVE — shared
   ═══════════════════════════════════════════ */
@media (max-width: 900px) {
  .menu-btn-label { display: none; }
  .menu-panel { width: 85%; max-width: 400px; }
  .menu-nav a { font-size: 28px; }
}
@media (max-width: 480px) {
  .menu-panel { width: 100%; max-width: none; }
}
