/* ============================================
   SITEGEIST — The Spirit of Website Design
   ============================================ */

:root {
  --black: #0a0a0a;
  --black-2: #141414;
  --black-3: #1c1c1c;
  --white: #f5f5f0;
  --white-dim: #a8a8a3;
  --violet: #8b5cf6;
  --violet-bright: #a78bfa;
  --violet-dark: #6d28d9;
  --grid-line: rgba(245, 245, 240, 0.08);

  --font-display: "Anton", "Arial Black", sans-serif;
  --font-serif: "Instrument Serif", "Times New Roman", serif;
  --font-mono: "JetBrains Mono", "Courier New", monospace;
  --font-body: "Inter Tight", -apple-system, sans-serif;

  --ease: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

body {
  font-family: var(--font-body);
  background: var(--black);
  color: var(--white);
  overflow-x: hidden;
  min-height: 100vh;
  cursor: none;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Grain overlay for texture */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.06;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: overlay;
}

/* Background grid */
.grid-bg {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

/* ===== Custom Cursor ===== */
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: transform 0.15s var(--ease-out), width 0.3s var(--ease), height 0.3s var(--ease), background 0.3s var(--ease);
}

.cursor-dot {
  width: 22px;
  height: 28px;
  color: var(--violet-bright);
  filter: drop-shadow(0 0 6px var(--violet));
}

.cursor-dot svg {
  width: 100%;
  height: 100%;
  display: block;
}

.cursor-ring {
  width: 36px;
  height: 36px;
  border: 1px solid var(--white);
  border-radius: 50%;
  mix-blend-mode: difference;
  transition: transform 0.4s var(--ease-out), width 0.3s var(--ease), height 0.3s var(--ease);
}

.cursor-ring.hovered {
  width: 70px;
  height: 70px;
  border-color: var(--violet-bright);
}

@media (max-width: 768px) {
  body { cursor: auto; }
  .cursor-dot, .cursor-ring { display: none; }
}

/* ===== NAV ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 24px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  mix-blend-mode: difference;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--white);
}

.nav-logo img {
  width: 36px;
  height: auto;
}

.nav-logo-text {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 36px;
  align-items: center;
}

.nav-links a {
  color: var(--white);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  position: relative;
  padding: 8px 0;
  transition: color 0.3s var(--ease);
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--violet);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-out);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-links a.active {
  color: var(--violet-bright);
}

.nav-cta {
  padding: 10px 20px;
  border: 1px solid var(--white);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  background: transparent;
  color: var(--white);
  text-decoration: none;
  transition: all 0.3s var(--ease);
  cursor: none;
}

.nav-cta:hover {
  background: var(--violet);
  border-color: var(--violet);
  color: var(--black);
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--white);
  color: var(--white);
  font-family: var(--font-mono);
  padding: 8px 14px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  cursor: none;
}

@media (max-width: 768px) {
  .nav { padding: 16px 20px; }
  .nav-links, .nav-cta { display: none; }
  .menu-toggle { display: block; position: relative; z-index: 1000; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    background: var(--black);
    padding: 100px 40px;
    gap: 32px;
    align-items: flex-start;
    z-index: 999;
  }
  .nav-links.open a { font-size: 20px; }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 32px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  text-decoration: none;
  border: 1px solid var(--white);
  background: transparent;
  color: var(--white);
  transition: all 0.4s var(--ease);
  position: relative;
  overflow: hidden;
  cursor: none;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--violet);
  transform: translateY(101%);
  transition: transform 0.4s var(--ease-out);
  z-index: -1;
}

.btn:hover::before {
  transform: translateY(0);
}

.btn:hover {
  border-color: var(--violet);
  color: var(--black);
}

.btn-primary {
  background: var(--violet);
  border-color: var(--violet);
  color: var(--black);
}

.btn-primary::before {
  background: var(--white);
}

.btn-primary:hover {
  color: var(--black);
}

.btn .arrow {
  transition: transform 0.4s var(--ease-out);
}

.btn:hover .arrow {
  transform: translateX(4px);
}

/* ===== Page Header (interior pages) ===== */
.page-header {
  position: relative;
  padding: 180px 40px 100px;
  border-bottom: 1px solid var(--grid-line);
  z-index: 2;
}

.page-header-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--violet);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.page-header-meta::before {
  content: "";
  width: 40px;
  height: 1px;
  background: var(--violet);
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(64px, 14vw, 220px);
  line-height: 0.9;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--white);
}

.page-header h1 em {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--violet-bright);
  font-weight: 400;
  letter-spacing: -0.03em;
}

@media (max-width: 768px) {
  .page-header { padding: 120px 20px 60px; }
}

/* ===== FOOTER ===== */
.footer {
  position: relative;
  background: var(--black);
  border-top: 1px solid var(--grid-line);
  padding: 120px 40px 40px;
  z-index: 2;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  max-width: 1600px;
  margin: 0 auto 80px;
}

.footer-brand h3 {
  font-family: var(--font-display);
  font-size: clamp(48px, 8vw, 120px);
  line-height: 0.9;
  text-transform: uppercase;
  margin-bottom: 16px;
  letter-spacing: 0.06em;
}

.footer-brand h3 em {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--violet-bright);
  font-weight: 400;
}

.footer-brand p {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--white-dim);
  max-width: 400px;
  margin-top: 24px;
  font-style: italic;
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--violet);
  margin-bottom: 24px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 12px;
}

.footer-col a {
  color: var(--white);
  text-decoration: none;
  font-size: 15px;
  transition: color 0.3s var(--ease), padding-left 0.3s var(--ease);
}

.footer-col a:hover {
  color: var(--violet-bright);
  padding-left: 8px;
}

.footer-bottom {
  max-width: 1600px;
  margin: 0 auto;
  padding-top: 32px;
  border-top: 1px solid var(--grid-line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--white-dim);
}

.footer-bottom .ghost-mark {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  color: var(--violet-bright);
  letter-spacing: 0;
  text-transform: none;
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .footer { padding: 60px 20px 30px; }
  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
}

/* ===== Reveal Animation ===== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Marquee ===== */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--grid-line);
  border-bottom: 1px solid var(--grid-line);
  padding: 32px 0;
  white-space: nowrap;
  position: relative;
  z-index: 2;
  background: var(--black);
}

.marquee-track {
  display: inline-flex;
  gap: 60px;
  animation: marquee 35s linear infinite;
}

.marquee-track > * {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 80px);
  text-transform: uppercase;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 60px;
}

.marquee-track .ghost {
  color: var(--violet);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}

.marquee-track .dot {
  width: 12px;
  height: 12px;
  background: var(--violet);
  border-radius: 50%;
  display: inline-block;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ===== Selection ===== */
::selection {
  background: var(--violet);
  color: var(--black);
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--black);
}

::-webkit-scrollbar-thumb {
  background: var(--black-3);
  border-left: 1px solid var(--grid-line);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--violet-dark);
}
