/* ============================================================
   ISSMCSP — Aztec-flavored Cyber Sec Professionals
   Palette: obsidian, jade, gold, bone
   Hidden watermarks: ghost glyph (corner) + sunstone (behind hero)
   ============================================================ */
:root {
  --obsidian: #0a0c0b;
  --stone: #14181a;
  --stone-light: #1d2224;
  --jade: #3fb98c;
  --jade-dim: #2a8c66;
  --gold: #c8a24b;
  --gold-dim: #8f7333;
  --bone: #e8e3d6;
  --muted: #8b8a82;
  --blood: #9c4a3c;
  --border: #2a2f2c;
  --display: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --body: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--obsidian);
  color: var(--bone);
  font-family: var(--body);
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
}

/* Stone texture overlay — subtle, covers whole page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 20% 30%, rgba(63,185,140,0.04), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(200,162,75,0.04), transparent 40%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.012) 0 2px, transparent 2px 4px);
  pointer-events: none;
}

/* HIDDEN WATERMARK 1: Ghost glyph in bottom-right corner, very faint */
.watermark-ghost {
  position: fixed;
  right: -30px;
  bottom: -40px;
  font-size: 26rem;
  color: rgba(200,162,75,0.045);
  z-index: -1;
  pointer-events: none;
  user-select: none;
  font-family: var(--display);
  line-height: 1;
  transform: rotate(-4deg);
}

/* HIDDEN WATERMARK 2: Sunstone ring behind hero, faint */
.watermark-sun {
  position: fixed;
  left: 50%;
  top: 18%;
  width: 620px;
  height: 620px;
  margin-left: -310px;
  border-radius: 50%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.05;
  background:
    repeating-conic-gradient(from 0deg, var(--gold) 0deg 2deg, transparent 2deg 10deg);
  -webkit-mask: radial-gradient(circle, #000 38%, transparent 39%, transparent 60%, #000 61%, transparent 62%);
  mask: radial-gradient(circle, #000 38%, transparent 39%, transparent 60%, #000 61%, transparent 62%);
}

/* Nav */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 2rem;
  background: rgba(10,12,11,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.12em;
  color: var(--gold);
  text-decoration: none;
  text-shadow: 0 0 14px rgba(200,162,75,0.35);
}
.nav-logo span { color: var(--jade); }
.nav-links { display: flex; gap: 1.6rem; list-style: none; }
.nav-links a {
  color: var(--bone);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  transition: color 0.25s;
  position: relative;
}
.nav-links a::after {
  content: "";
  position: absolute; left: 0; bottom: -4px;
  width: 0; height: 1px; background: var(--jade);
  transition: width 0.25s;
}
.nav-links a:hover { color: var(--jade); }
.nav-links a:hover::after { width: 100%; }

/* Layout */
section {
  max-width: 980px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.section-kicker {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 0.6rem;
}
.section-title {
  font-family: var(--display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--bone);
  margin-bottom: 0.8rem;
  position: relative;
  display: inline-block;
}
.section-title::before {
  content: "❖";
  color: var(--gold-dim);
  font-size: 1.1rem;
  margin-right: 0.6rem;
  vertical-align: middle;
  opacity: 0.8;
}
.section-title em { color: var(--jade); font-style: normal; }
.section-sub { color: var(--muted); max-width: 60ch; }

/* Stepped-pyramid divider between sections (Aztec motif) */
.pyramid-divider {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  height: 22px;
  background:
    linear-gradient(135deg, var(--gold-dim) 25%, transparent 25%) -11px 0,
    linear-gradient(225deg, var(--gold-dim) 25%, transparent 25%) -11px 0;
  background-size: 22px 22px;
  opacity: 0.55;
  -webkit-mask: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
  mask: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
}
.pyramid-divider::after {
  content: "";
  display: block;
  height: 3px;
  margin-top: 19px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* Mayan numeral date stamp */
.mayan-date {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  color: var(--gold-dim);
  text-align: center;
  margin-top: 0.6rem;
}
.mayan-date b { color: var(--jade); }

/* Hero */
.hero {
  text-align: center;
  padding: 8rem 1.5rem 5rem;
  position: relative;
}
.hero-glyph-row {
  display: flex;
  justify-content: center;
  gap: 1.4rem;
  margin-bottom: 1.8rem;
  font-size: 1.6rem;
  color: var(--gold);
  opacity: 0.6;
}
.hero-glyph-row span { filter: drop-shadow(0 0 8px rgba(200,162,75,0.4)); }
.hero h1 {
  font-family: var(--display);
  font-size: clamp(2.6rem, 8vw, 5rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.05;
  background: linear-gradient(180deg, var(--bone), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 40px rgba(200,162,75,0.15);
}
.hero h1 b { color: var(--jade); -webkit-text-fill-color: var(--jade); }
.hero p {
  margin: 1.4rem auto 0;
  max-width: 56ch;
  color: var(--muted);
  font-size: 1.05rem;
}
.hero-rule {
  width: 120px; height: 2px; margin: 2rem auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* Tech Word */
.tw-card {
  width: 320px; height: 210px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.4,0,0.2,1);
  cursor: pointer;
  margin: 2rem auto 0;
}
.tw-card.flipped { transform: rotateY(180deg); }
.tw-face {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--stone);
  padding: 1.5rem;
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
}
.tw-face-back { transform: rotateY(180deg); }
.tw-term { font-family: var(--display); font-size: 2.2rem; color: var(--jade); text-shadow: 0 0 16px rgba(63,185,140,0.4); }
.tw-hint { font-size: 0.85rem; color: var(--muted); margin-top: 0.8rem; font-style: italic; }
.tw-def { font-size: 1rem; line-height: 1.6; }
.tw-btn {
  margin-top: 1.2rem; background: transparent; border: 1px solid var(--gold);
  color: var(--gold); padding: 0.5rem 1rem; border-radius: 3px; cursor: pointer;
  font-family: var(--display); letter-spacing: 0.05em; font-size: 0.8rem;
  text-decoration: none;
}
.tw-btn:hover { background: var(--gold); color: #1a1407; }

/* Ghost Frequencies player */
#music-player-container {
  max-width: 640px; margin: 2.5rem auto 0;
  background: var(--stone); border: 1px solid var(--border);
  border-radius: 6px; padding: 2rem;
  box-shadow: 0 18px 50px rgba(0,0,0,0.6);
}
.gf-header { text-align:center; margin-bottom: 1.6rem; }
.gf-title { font-family: var(--display); font-size: 1.8rem; color: var(--gold); letter-spacing: 0.08em; }
.gf-sub { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted); }
audio { width: 100%; margin-bottom: 1.2rem; filter: invert(88%) hue-rotate(180deg); }
.gf-now { text-align:center; color: var(--jade); font-size: 0.9rem; margin-bottom: 1rem; }
.gf-tracklist { list-style: none; }
.gf-track {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.8rem 1rem; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background 0.2s;
}
.gf-track:hover { background: rgba(63,185,140,0.07); }
.gf-track.active { border-left: 3px solid var(--gold); color: var(--gold); }
.gf-track-name { font-weight: 500; }
.gf-track-meta { font-size: 0.72rem; color: var(--muted); font-family: var(--mono); }
.gf-buy {
  font-size: 0.7rem; padding: 0.3rem 0.6rem; border: 1px solid var(--gold);
  color: var(--gold); border-radius: 3px; text-decoration: none;
}
.gf-buy:hover { background: var(--gold); color: #1a1407; }

/* Footer — carries the third hidden watermark note */
footer {
  text-align: center; padding: 3rem 1.5rem;
  font-size: 0.78rem; color: var(--muted);
  border-top: 1px solid var(--border);
  position: relative;
}
footer .ghost-mark { color: rgba(200,162,75,0.5); font-family: var(--display); letter-spacing: 0.2em; }

@media (max-width: 640px) {
  .nav-links { gap: 1rem; }
  .nav-links a { font-size: 0.78rem; }
  .watermark-ghost { font-size: 14rem; }
  section { padding: 3.5rem 1.2rem; }
  .section-title { font-size: 1.7rem; }
}

/* Hidden jade glyph hunt — 4 faint glyphs scattered, clickable easter eggs */
.jade-glyph {
  position: fixed;
  font-family: var(--display);
  font-size: 1.4rem;
  color: rgba(63,185,140,0.10);
  z-index: 0;
  cursor: pointer;
  user-select: none;
  transition: color 0.3s, transform 0.3s, text-shadow 0.3s;
}
.jade-glyph:hover {
  color: var(--jade);
  transform: scale(1.4) rotate(8deg);
  text-shadow: 0 0 18px rgba(63,185,140,0.8);
  z-index: 50;
}
.jade-glyph.found {
  color: var(--gold);
  text-shadow: 0 0 22px rgba(200,162,75,0.9);
  animation: glyphPop 0.5s ease;
}
@keyframes glyphPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.8); }
  100% { transform: scale(1.4) rotate(8deg); }
}
.glyph-counter {
  position: fixed;
  bottom: 14px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: var(--gold-dim);
  background: rgba(10,12,11,0.85);
  border: 1px solid var(--border);
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  z-index: 200;
  pointer-events: none;
  backdrop-filter: blur(6px);
}
.glyph-counter b { color: var(--jade); }

/* Aztec day-sign toast */
.day-sign-toast {
  position: fixed;
  top: 80px; right: 20px;
  max-width: 280px;
  background: var(--stone);
  border: 1px solid var(--gold-dim);
  border-radius: 6px;
  padding: 1rem 1.2rem;
  font-size: 0.82rem;
  color: var(--bone);
  z-index: 300;
  box-shadow: 0 14px 40px rgba(0,0,0,0.6);
  transform: translateX(120%);
  transition: transform 0.5s cubic-bezier(0.2,0.8,0.2,1);
}
.day-sign-toast.show { transform: translateX(0); }
.day-sign-toast .ds-glyph {
  width: 56px; height: 56px;
  margin-bottom: 0.5rem;
  color: var(--gold);
}
.day-sign-toast .ds-glyph svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 0 6px rgba(200,162,75,0.5)); }
.day-sign-toast .ds-title { font-family: var(--display); color: var(--gold); font-size: 1rem; margin-bottom: 0.3rem; }
.day-sign-toast .ds-sub { color: var(--muted); font-size: 0.74rem; }

/* Tool cards section */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.tool-card {
  background: var(--stone);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--jade);
  opacity: 0;
  transition: opacity 0.3s;
}
.tool-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  border-color: var(--jade);
}
.tool-card:hover::before {
  opacity: 1;
}
.tool-card .ti {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}
.tool-card h4 {
  font-family: var(--display);
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--bone);
}
.tool-card p {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}
.tool-card .tag {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(63,185,140,0.1);
  border: 1px solid var(--jade);
  border-radius: 4px;
  font-size: 0.8rem;
  color: var(--jade);
  text-decoration: none;
  transition: all 0.3s;
}
.tool-card .tag:hover {
  background: var(--jade);
  color: var(--obsidian);
}

/* Coming Soon cards */
.tool-soon {
  opacity: 0.65;
  cursor: default;
  pointer-events: none;
}
.tool-soon .tag {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(200,162,75,0.08);
}