/* THE ELEMENTAL AI COUNCIL · stylesheet
   Cinematic dark, gold accents, Fraunces serif display */

:root {
  --black: #000000;
  --ink: #0B0D14;
  --ink-soft: #12151F;
  --ink-card: #181C28;
  --line: #1F232E;
  --line-bright: #2A2F3D;
  --bone: #F4EFE6;
  --cream: #D9D3C5;
  --soft: #A8ADB7;
  --muted: #6F7480;
  --gold: #C9A961;
  --gold-dim: #8A7A4A;
  --gold-bright: #E0C27C;

  --earth: #B08860;
  --fire: #D85A48;
  --air: #95BED6;
  --water: #5A8FB3;
  --wood: #6B8F63;
  --apex: #C9A961;

  --display: 'Fraunces', 'Times New Roman', serif;
  --body: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; background: var(--black); }

body {
  background: var(--black);
  color: var(--bone);
  font-family: var(--body);
  font-weight: 300;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.grain {
  position: fixed;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.04;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain-shift 8s steps(10) infinite;
}

@keyframes grain-shift {
  0%,100% { transform: translate(0,0); }
  10% { transform: translate(-3%,-5%); }
  30% { transform: translate(3%,-2%); }
  50% { transform: translate(-1%,4%); }
  70% { transform: translate(2%,3%); }
  90% { transform: translate(-4%,-3%); }
}

/* NAV */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 48px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
  transition: background 0.4s ease, padding 0.4s ease;
}
.nav.scrolled {
  background: rgba(0,0,0,0.95);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 16px 48px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 4px;
  color: var(--bone);
}
.mark { color: var(--gold); font-size: 14px; display: inline-flex; align-items: center; }
.mark img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 6px rgba(201, 169, 97, 0.18));
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--soft);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.3s ease;
}
.nav-links a:hover { color: var(--gold); }
.nav-cta {
  color: var(--black) !important;
  background: var(--gold);
  padding: 12px 22px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: all 0.3s ease !important;
}
.nav-cta:hover { background: var(--gold-bright) !important; }

/* HERO */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 100px 48px 60px;
}
.hero-atmosphere {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 75% 50%, rgba(201, 169, 97, 0.12), transparent 60%),
    radial-gradient(ellipse at 20% 80%, rgba(216, 90, 72, 0.06), transparent 50%),
    linear-gradient(180deg, #000 0%, #0B0D14 100%);
  z-index: 0;
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(201,169,97,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,169,97,0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  z-index: 1;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 5px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 60px;
}
.eyebrow .line { width: 48px; height: 1px; background: var(--gold); }
.hero-title {
  font-family: var(--display);
  font-size: clamp(64px, 9vw, 124px);
  line-height: 0.95;
  font-weight: 300;
  letter-spacing: -0.02em;
  margin-bottom: 48px;
}
.title-line { display: block; color: var(--bone); }
.title-line.gold {
  color: var(--gold);
  font-style: italic;
  font-weight: 400;
}
.hero-sub {
  font-family: var(--display);
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.4;
  color: var(--cream);
  font-weight: 300;
  margin-bottom: 64px;
  max-width: 560px;
}
.hero-meta {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-bottom: 80px;
}
.meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.meta-num {
  font-family: var(--display);
  font-size: 56px;
  font-weight: 300;
  color: var(--gold);
  line-height: 1;
}
.meta-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--muted);
  text-transform: uppercase;
}
.meta-divider {
  width: 1px;
  height: 48px;
  background: var(--line-bright);
}
.scroll-cue {
  position: absolute;
  bottom: -40px;
  left: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 4px;
  color: var(--muted);
  animation: bob 2.5s ease-in-out infinite;
}
.scroll-cue .arrow { font-size: 14px; }
@keyframes bob {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}
.hero-logo {
  margin-bottom: clamp(24px, 4vw, 40px);
}
.hero-logo img {
  width: clamp(56px, 8vw, 80px);
  height: clamp(56px, 8vw, 80px);
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 24px rgba(201, 169, 97, 0.18));
}

.fade-in-1 { animation: fadeUp 1s ease forwards; opacity: 0; animation-delay: 0.2s; }
.fade-in-2 { animation: fadeUp 1s ease forwards; opacity: 0; animation-delay: 0.4s; }
.fade-in-3 { animation: fadeUp 1s ease forwards; opacity: 0; animation-delay: 0.6s; }
.fade-in-4 { animation: fadeUp 1s ease forwards; opacity: 0; animation-delay: 0.9s; }
.fade-in-5 { animation: fadeUp 1s ease forwards; opacity: 0; animation-delay: 1.1s; }
.fade-in-6 { animation: fadeUp 1s ease forwards; opacity: 0; animation-delay: 1.5s; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* SECTIONS */
section {
  position: relative;
  padding: 140px 48px;
}
.section-inner {
  max-width: 1280px;
  margin: 0 auto;
}
.section-eyebrow {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 5px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 40px;
}
.section-eyebrow .line { width: 48px; height: 1px; background: var(--gold); }
.section-title {
  font-family: var(--display);
  font-size: clamp(40px, 6vw, 80px);
  line-height: 1.02;
  font-weight: 300;
  letter-spacing: -0.02em;
  margin-bottom: 80px;
  max-width: 1000px;
}
.italic { font-style: italic; font-weight: 400; }
.gold { color: var(--gold); }

/* VIDEO */
.video-section {
  background: var(--ink);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--black);
  border: 1px solid var(--line-bright);
  overflow: hidden;
  margin-bottom: 32px;
}
.video-frame::before,
.video-frame::after {
  content: '';
  position: absolute;
  width: 24px; height: 24px;
  border: 1px solid var(--gold);
  z-index: 2;
}
.video-frame::before {
  top: -1px; left: -1px;
  border-right: none; border-bottom: none;
}
.video-frame::after {
  bottom: -1px; right: -1px;
  border-left: none; border-top: none;
}
.video-frame video,
.video-frame iframe {
  width: 100%; height: 100%;
  object-fit: cover;
  border: 0;
  display: block;
}
.video-caption {
  font-family: var(--display);
  font-style: italic;
  font-size: 18px;
  color: var(--cream);
  text-align: center;
}

/* CONCEPT */
.concept-section { background: var(--black); }
.concept-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 48px;
  margin-top: 48px;
}
.concept-block {
  border-top: 1px solid var(--line-bright);
  padding-top: 32px;
  position: relative;
}
.concept-block::before {
  content: '';
  position: absolute;
  top: -1px; left: 0;
  width: 40px; height: 1px;
  background: var(--gold);
}
.concept-num {
  font-family: var(--display);
  font-style: italic;
  font-size: 32px;
  color: var(--gold);
  margin-bottom: 16px;
}
.concept-block h3 {
  font-family: var(--display);
  font-size: 26px;
  line-height: 1.2;
  font-weight: 400;
  color: var(--bone);
  margin-bottom: 16px;
}
.concept-block p {
  font-size: 15px;
  color: var(--soft);
  line-height: 1.6;
}

/* COUNCIL */
.council-section {
  background: var(--ink);
  border-top: 1px solid var(--line);
}
.dept { margin-bottom: 80px; position: relative; }
.dept-header {
  display: grid;
  grid-template-columns: 140px 1fr 2fr;
  align-items: baseline;
  gap: 32px;
  padding-bottom: 24px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--line-bright);
}
.dept-el {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 5px;
  color: var(--muted);
}
.dept[data-element="earth"] .dept-el { color: var(--earth); }
.dept[data-element="fire"] .dept-el { color: var(--fire); }
.dept[data-element="air"] .dept-el { color: var(--air); }
.dept[data-element="water"] .dept-el { color: var(--water); }
.dept[data-element="wood"] .dept-el { color: var(--wood); }
.dept[data-element="apex"] .dept-el { color: var(--apex); }
.dept-name {
  font-family: var(--display);
  font-size: 42px;
  font-weight: 300;
  color: var(--bone);
  line-height: 1;
}
.dept-motto {
  font-family: var(--display);
  font-style: italic;
  font-size: 18px;
  color: var(--soft);
  line-height: 1.4;
}
.dept-bots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.dept-bots.apex-single {
  grid-template-columns: minmax(400px, 600px);
  justify-content: center;
}
.bot-card {
  background: var(--ink-card);
  border: 1px solid var(--line-bright);
  padding: 32px;
  position: relative;
  transition: all 0.4s ease;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.bot-card:hover {
  border-color: var(--gold-dim);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.bot-card.head {
  border-color: var(--gold-dim);
  background: linear-gradient(180deg, #1A1D28 0%, #14171F 100%);
}
.bot-card.head::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gold);
}
.bot-card.featured {
  padding: 48px;
  flex-direction: row;
  align-items: center;
  gap: 40px;
}
.bot-card.featured .bot-img-wrap {
  width: 200px; height: 200px;
  flex-shrink: 0;
}
.bot-img-wrap {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background: var(--black);
  position: relative;
  max-width: 220px;
  margin: 0 auto;
}
.bot-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(201, 169, 97, 0.15);
  pointer-events: none;
}
.bot-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.bot-card:hover .bot-img-wrap img { transform: scale(1.05); }
.bot-meta { flex: 1; text-align: center; }
.bot-card.featured .bot-meta { text-align: left; }
.bot-role {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 4px;
  color: var(--gold);
  margin-bottom: 12px;
}
.bot-name {
  font-family: var(--display);
  font-size: 32px;
  font-weight: 400;
  color: var(--bone);
  line-height: 1;
  margin-bottom: 6px;
}
.bot-species {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--muted);
  margin-bottom: 16px;
}
.bot-desc {
  font-size: 14px;
  color: var(--soft);
  line-height: 1.55;
}

/* STRUCTURE */
.structure-section { background: var(--black); }
.structure-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  margin-bottom: 80px;
}
.struct-block { position: relative; }
.struct-badge {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 4px;
  color: var(--gold);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-bright);
}
.struct-block h3 {
  font-family: var(--display);
  font-size: 44px;
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--bone);
  margin-bottom: 16px;
  line-height: 1;
}
.struct-lead {
  font-family: var(--display);
  font-style: italic;
  font-size: 20px;
  color: var(--gold);
  margin-bottom: 24px;
}
.struct-block ul { list-style: none; padding: 0; }
.struct-block li {
  padding: 12px 0 12px 24px;
  border-bottom: 1px solid var(--line);
  position: relative;
  color: var(--soft);
  font-size: 15px;
  line-height: 1.5;
}
.struct-block li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-size: 10px;
  top: 14px;
}
.codex-block {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 40px;
  background: linear-gradient(135deg, rgba(201,169,97,0.08), transparent);
  border: 1px solid var(--gold-dim);
  position: relative;
}
.codex-block::before,
.codex-block::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  border: 1px solid var(--gold);
}
.codex-block::before {
  top: -1px; left: -1px;
  border-right: none; border-bottom: none;
}
.codex-block::after {
  bottom: -1px; right: -1px;
  border-left: none; border-top: none;
}
.codex-icon {
  font-size: 48px;
  color: var(--gold);
  line-height: 1;
}
.codex-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 4px;
  color: var(--gold);
  margin-bottom: 8px;
}
.codex-text {
  font-family: var(--display);
  font-size: 18px;
  line-height: 1.4;
  color: var(--cream);
  font-style: italic;
}

/* SURFACES */
.surfaces-section {
  background: var(--ink);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.surfaces-lead {
  font-family: var(--display);
  font-style: italic;
  font-size: 22px;
  color: var(--soft);
  margin-bottom: 64px;
  max-width: 700px;
}
.surfaces-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 2px;
  margin-bottom: 80px;
  background: var(--line-bright);
  border: 1px solid var(--line-bright);
}
.surface {
  background: var(--ink-card);
  padding: 48px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  transition: background 0.4s ease;
  font-family: var(--display);
  font-size: 20px;
  color: var(--bone);
}
.surface:hover { background: #1F2430; }
.surf-icon { font-size: 28px; color: var(--gold); }
.surfaces-punchline {
  font-family: var(--display);
  font-size: 22px;
  text-align: center;
  color: var(--cream);
  line-height: 1.8;
  padding: 40px 0;
}
.ext-item {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}
.ext-num {
  font-family: var(--mono);
  font-size: 18px;
  color: var(--gold);
  letter-spacing: 1px;
}
.ext-sep { color: var(--muted); margin: 0 8px; }
.ext-finale {
  font-style: italic;
  color: var(--gold);
  display: block;
  margin-top: 16px;
  font-size: 28px;
}

/* PROCESS */
.process-section { background: var(--black); }
.process-steps {
  display: flex;
  align-items: stretch;
  gap: 16px;
  margin-top: 48px;
}
.proc-step {
  flex: 1;
  padding: 40px;
  background: var(--ink-card);
  border: 1px solid var(--line-bright);
  position: relative;
}
.proc-num {
  font-family: var(--display);
  font-style: italic;
  font-size: 64px;
  font-weight: 300;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 24px;
}
.proc-step h3 {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 400;
  color: var(--bone);
  margin-bottom: 16px;
}
.proc-step p {
  font-size: 14px;
  color: var(--soft);
  line-height: 1.6;
}
.proc-arrow {
  display: flex;
  align-items: center;
  color: var(--gold);
  font-size: 24px;
  opacity: 0.5;
}

/* CTA */
.cta-section {
  background: linear-gradient(180deg, var(--black) 0%, #0A0C12 50%, var(--black) 100%);
  padding: 180px 48px;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(201,169,97,0.08), transparent 60%);
  pointer-events: none;
}
.cta-inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}
.cta-title {
  font-family: var(--display);
  font-size: clamp(48px, 7vw, 88px);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-bottom: 32px;
  color: var(--bone);
}
.cta-sub {
  font-family: var(--display);
  font-size: 22px;
  color: var(--cream);
  margin-bottom: 64px;
  line-height: 1.5;
}
.cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 48px;
  flex-wrap: wrap;
}
.cta-btn {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  padding: 22px 44px;
  border: 1px solid var(--gold);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: all 0.3s ease;
}
.cta-btn.primary {
  background: var(--gold);
  color: var(--black);
}
.cta-btn.primary:hover {
  background: var(--gold-bright);
  transform: translateY(-2px);
  box-shadow: 0 10px 40px rgba(201, 169, 97, 0.3);
}
.cta-btn.secondary {
  color: var(--gold);
  background: transparent;
}
.cta-btn.secondary:hover {
  background: rgba(201, 169, 97, 0.1);
  transform: translateY(-2px);
}
.cta-btn .arrow {
  font-size: 14px;
  transition: transform 0.3s ease;
}
.cta-btn:hover .arrow { transform: translateX(4px); }
.cta-note {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
  letter-spacing: 1px;
}

/* FOOTER */
.footer {
  background: var(--black);
  border-top: 1px solid var(--line);
  padding: 48px;
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 4px;
  color: var(--bone);
}
.footer-meta,
.footer-credit {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--muted);
}
.footer-sep { margin: 0 8px; }

/* RESPONSIVE */
@media (max-width: 1024px) {
  .dept-bots { grid-template-columns: 1fr 1fr; }
  .concept-grid { grid-template-columns: 1fr; gap: 32px; }
  .structure-split { grid-template-columns: 1fr; gap: 48px; }
  .process-steps { flex-direction: column; }
  .proc-arrow { display: none; }
  .surfaces-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .nav { padding: 16px 24px; }
  .nav-links { gap: 20px; }
  .nav-links a:not(.nav-cta) { display: none; }
  section { padding: 80px 24px; }
  .hero { padding: 80px 24px 60px; }
  .dept-header { grid-template-columns: 1fr; gap: 8px; }
  .dept-bots { grid-template-columns: 1fr; }
  .bot-card.featured { flex-direction: column; text-align: center; padding: 32px; }
  .bot-card.featured .bot-meta { text-align: center; }
  .hero-meta { gap: 16px; flex-wrap: wrap; }
  .meta-num { font-size: 44px; }
  .surfaces-grid { grid-template-columns: 1fr 1fr; }
}

/* TOUCH-DEVICE OVERRIDES — disable sticky hover effects on iPhone/iPad/Android */
@media (hover: none) {
  .bot-card:hover {
    transform: none;
    box-shadow: none;
  }
  .bot-card:hover .bot-img-wrap img {
    transform: none;
  }
  .cta-btn:hover {
    transform: none;
    box-shadow: none;
  }
  .cta-btn:hover .arrow {
    transform: none;
  }
}
