/* ================================================================
   CrazeWorks — styles.css
   Design system per CRAZEWORKS-BRAND.md
   ================================================================ */

:root {
  --charcoal: #171717;
  --dark-gray: #404040;
  --mid-gray: #8A8A8A;
  --light-gray: #EAEAEA;
  --off-white: #FAFAFA;
  --white: #FFFFFF;
  --green: #00FF66;

  --display: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'Space Mono', 'Courier New', monospace;
  --body: 'Inter', 'Helvetica Neue', Arial, sans-serif;

  --container: 1140px;
  --pad-x: 32px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  color: var(--charcoal);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--charcoal); color: var(--white); }

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

section { scroll-margin-top: 88px; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

/* ---------------- type helpers ---------------- */

.kicker {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--mid-gray);
  display: block;
  margin-bottom: 20px;
}
.kicker::before { content: "> "; color: currentColor; }

.dark .kicker { color: var(--green); }

h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; }

.h-xl { font-size: clamp(42px, 6.4vw, 84px); line-height: 1.02; }
.h-lg { font-size: clamp(32px, 4.2vw, 56px); line-height: 1.06; }
.h-md { font-size: clamp(22px, 2.6vw, 32px); line-height: 1.15; }

.lede {
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.65;
  color: var(--dark-gray);
  max-width: 560px;
}
.dark .lede { color: #B9B9B9; }

.mono-line { font-family: var(--mono); font-size: 14px; color: var(--dark-gray); }

/* ---------------- buttons ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
  text-decoration: none;
  border-radius: 10px;
  padding: 16px 26px;
  transition: transform 0.35s var(--ease-out), background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  cursor: pointer;
  border: 2px solid transparent;
  white-space: nowrap;
}
.btn .arrow { display: inline-block; transition: transform 0.35s var(--ease-out); }
.btn:hover .arrow { transform: translateX(5px); }

.btn-primary { background: var(--charcoal); color: var(--white); }
.btn-primary:hover { transform: translateY(-2px); }

.btn-on-dark { background: var(--green); color: var(--charcoal); }
.btn-on-dark:hover { transform: translateY(-2px); }

.btn-ghost {
  background: transparent;
  color: var(--charcoal);
  border-color: var(--light-gray);
}
.btn-ghost:hover { border-color: var(--charcoal); transform: translateY(-2px); }

.text-link {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--charcoal);
  text-decoration: none;
  border-bottom: 1px solid var(--charcoal);
  padding-bottom: 2px;
  transition: opacity 0.2s ease;
}
.text-link:hover { opacity: 0.6; }

/* ---------------- nav ---------------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.35s ease, border-color 0.35s ease;
}
.nav.scrolled {
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--light-gray);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--charcoal);
}
.nav-brand svg { width: 30px; height: auto; }
.nav-brand .word {
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.5px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a.nav-link {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.4px;
  color: var(--dark-gray);
  text-decoration: none;
  transition: color 0.2s ease;
}
.nav-links a.nav-link:hover { color: var(--charcoal); }

.nav-cta {
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  color: var(--white);
  background: var(--charcoal);
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 8px;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}
.nav.scrolled .nav-cta {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

@media (max-width: 860px) {
  .nav-links a.nav-link { display: none; }
}

/* ---------------- hero ---------------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 140px 0 90px;
  overflow: hidden;
}

.hero-hex {
  position: absolute;
  right: -180px;
  top: 50%;
  transform: translateY(-50%);
  width: clamp(420px, 46vw, 700px);
  opacity: 0.05;
  pointer-events: none;
  animation: hex-drift 14s ease-in-out infinite alternate;
}
@keyframes hex-drift {
  from { transform: translateY(-52%) rotate(-1.5deg); }
  to   { transform: translateY(-48%) rotate(1.5deg); }
}

.hero-kicker { margin-bottom: 28px; }

.hero h1 { margin-bottom: 28px; }
.hero h1 .line { display: block; }

.hero .lede { margin-bottom: 40px; }

.hero-ctas {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.hero-tags {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.hero-tags span {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--mid-gray);
  border: 1px solid var(--light-gray);
  border-radius: 999px;
  padding: 7px 14px;
}

.cursor {
  display: inline-block;
  width: 0.55em;
  height: 1.05em;
  background: var(--charcoal);
  vertical-align: text-bottom;
  margin-left: 4px;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------------- section scaffolding ---------------- */

.section { padding: 120px 0; }
.section-head { margin-bottom: 64px; max-width: 720px; }
.section-head .lede { margin-top: 20px; }

.dark {
  background: var(--charcoal);
  color: var(--white);
}
.soft { background: var(--off-white); }

/* ---------------- process (dark) ---------------- */

.process-grid {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: 80px;
  align-items: start;
}
.process-rail {
  position: sticky;
  top: 120px;
}
.process-rail h2 { margin-bottom: 24px; }
.process-rail .lede { margin-bottom: 40px; }

.term {
  background: #101010;
  border: 1px solid #2A2A2A;
  border-radius: 14px;
  padding: 24px 26px;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 2;
  color: var(--off-white);
  max-width: 460px;
  min-height: 132px;
}
.term .g { color: var(--green); }
.term .dim { color: var(--mid-gray); }
.term .tcursor {
  display: inline-block;
  width: 0.6em; height: 1.1em;
  background: var(--green);
  vertical-align: text-bottom;
  animation: blink 1.1s steps(1) infinite;
}

.steps { display: flex; flex-direction: column; }
.step {
  padding: 44px 0;
  border-top: 1px solid #2E2E2E;
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 24px;
  transition: opacity 0.5s ease;
  opacity: 0.38;
}
.step:last-child { border-bottom: 1px solid #2E2E2E; }
.step.active { opacity: 1; }
.step-num {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--mid-gray);
  padding-top: 8px;
  transition: color 0.5s ease;
}
.step.active .step-num { color: var(--green); }
.step h3 { font-size: clamp(22px, 2.4vw, 30px); margin-bottom: 14px; }
.step p { color: #B9B9B9; line-height: 1.7; font-size: 16px; max-width: 480px; }
.step p strong { color: var(--off-white); font-weight: 500; }

@media (max-width: 900px) {
  .process-grid { grid-template-columns: 1fr; gap: 48px; }
  .process-rail { position: static; }
}

/* ---------------- deliverables ---------------- */

.deliver-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.deliver-card {
  background: var(--white);
  border: 1px solid var(--light-gray);
  border-radius: 14px;
  padding: 34px 30px;
  transition: transform 0.4s var(--ease-out), border-color 0.3s ease;
}
.deliver-card:hover { transform: translateY(-4px); border-color: var(--charcoal); }
.deliver-card .idx {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--mid-gray);
  display: block;
  margin-bottom: 22px;
}
.deliver-card h3 { font-size: 20px; margin-bottom: 12px; letter-spacing: -0.01em; }
.deliver-card p { font-size: 14.5px; line-height: 1.65; color: var(--dark-gray); }

.pricing-line {
  margin-top: 48px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: space-between;
  border: 1px solid var(--light-gray);
  background: var(--white);
  border-radius: 14px;
  padding: 28px 30px;
}
.pricing-line p { color: var(--dark-gray); font-size: 15.5px; line-height: 1.6; max-width: 640px; }
.pricing-line p strong { color: var(--charcoal); font-weight: 600; }

@media (max-width: 900px) {
  .deliver-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .deliver-grid { grid-template-columns: 1fr; }
}

/* ---------------- spotlight (dark) ---------------- */

.spot-grid {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: 80px;
  align-items: center;
}
.spot-copy h2 { margin-bottom: 24px; }
.spot-copy .lede { margin-bottom: 32px; }

.spot-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.spot-meta span {
  font-family: var(--mono);
  font-size: 12px;
  color: #B9B9B9;
  border: 1px solid #333;
  border-radius: 999px;
  padding: 7px 14px;
}
.spot-meta span.live { color: var(--green); border-color: rgba(0, 255, 102, 0.35); }
.spot-meta span.live::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  margin-right: 8px;
  animation: blink 1.6s steps(1) infinite;
}

/* CSS browser mock — stylized dashboard wireframe, deliberately abstract */
.browser-wrap { display: flex; justify-content: center; }
.browser {
  width: min(560px, 90vw);
  background: #101010;
  border: 1px solid #2E2E2E;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.6);
  transform: rotate(-1deg);
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  border-bottom: 1px solid #2A2A2A;
}
.browser-bar i {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #333;
}
.browser-url {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--mid-gray);
  background: #1A1A1A;
  border-radius: 6px;
  padding: 4px 40px;
  margin-left: 14px;
}
.browser-body {
  display: grid;
  grid-template-columns: 64px 1fr;
  min-height: 300px;
}
.bb-side {
  border-right: 1px solid #2A2A2A;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.bb-side i {
  display: block;
  height: 10px;
  border-radius: 5px;
  background: #2E2E2E;
}
.bb-side i.on { background: var(--green); }
.bb-main { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.bb-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.bb-stat {
  background: #171717;
  border: 1px solid #2A2A2A;
  border-radius: 10px;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bb-stat b { display: block; height: 8px; border-radius: 4px; background: #333; width: 75%; }
.bb-stat b.g { background: var(--green); width: 45%; }
.bb-chart {
  flex: 1;
  min-height: 110px;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  background: #171717;
  border: 1px solid #2A2A2A;
  border-radius: 10px;
  padding: 14px;
}
.bb-chart i { flex: 1; border-radius: 4px 4px 2px 2px; background: #333; }
.bb-chart i.g { background: var(--green); }
.bb-rows { display: flex; flex-direction: column; gap: 8px; }
.bb-rows i { display: block; height: 12px; border-radius: 6px; background: #1F1F1F; border: 1px solid #2A2A2A; }

@media (max-width: 900px) {
  .spot-grid { grid-template-columns: 1fr; gap: 56px; }
}

/* ---------------- founder ---------------- */

.founder-grid {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: 80px;
  align-items: center;
}
.founder-photo { position: relative; }
.founder-photo img {
  border-radius: 18px;
  filter: grayscale(100%);
  transition: filter 0.6s ease;
}
.founder-photo:hover img { filter: grayscale(0%); }
.founder-photo::after {
  content: "";
  position: absolute;
  inset: 18px -18px -18px 18px;
  border: 1px solid var(--light-gray);
  border-radius: 18px;
  z-index: -1;
}
.founder-copy h2 { margin-bottom: 26px; }
.founder-copy p {
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--dark-gray);
  margin-bottom: 20px;
  max-width: 540px;
}
.founder-copy p strong { color: var(--charcoal); font-weight: 600; }
.founder-sig {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--charcoal);
  margin-top: 30px;
}
.founder-sig span { color: var(--mid-gray); display: block; margin-top: 4px; font-size: 12.5px; }

@media (max-width: 900px) {
  .founder-grid { grid-template-columns: 1fr; gap: 56px; }
  .founder-photo { max-width: 420px; }
}

/* ---------------- FAQ ---------------- */

.faq-list { max-width: 780px; }
.faq-item { border-top: 1px solid var(--light-gray); }
.faq-item:last-child { border-bottom: 1px solid var(--light-gray); }
.faq-q {
  width: 100%;
  background: none;
  border: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(17px, 2vw, 21px);
  letter-spacing: -0.01em;
  color: var(--charcoal);
  text-align: left;
  padding: 26px 8px 26px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  cursor: pointer;
}
.faq-q .plus {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 22px;
  color: var(--mid-gray);
  transition: transform 0.4s var(--ease-out);
  flex-shrink: 0;
}
.faq-item.open .faq-q .plus { transform: rotate(45deg); }
.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s var(--ease-out);
}
.faq-item.open .faq-a { grid-template-rows: 1fr; }
.faq-a-inner { overflow: hidden; }
.faq-a-inner p {
  padding: 0 48px 28px 0;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--dark-gray);
  max-width: 660px;
}
.faq-a-inner a {
  color: var(--charcoal);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.faq-a-inner a:hover { opacity: 0.65; }

/* ---------------- booking (dark) ---------------- */

.book-head { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.book-head .kicker { margin-bottom: 24px; }
.book-head h2 { margin-bottom: 22px; }
.book-head .lede { margin: 0 auto; }

.book-shell {
  background: #101010;
  border: 1px solid #2A2A2A;
  border-radius: 18px;
  max-width: 900px;
  margin: 0 auto;
  min-height: 420px;
  padding: 18px;
  display: flex;
  align-items: stretch;
  justify-content: center;
}
#cal-embed { width: 100%; min-height: 500px; }

.book-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 22px;
  width: 100%;
  padding: 60px 24px;
}
.book-fallback .mono-line { color: var(--mid-gray); max-width: 460px; line-height: 1.8; }

.book-note {
  text-align: center;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--mid-gray);
  margin-top: 28px;
}
.book-note a { color: var(--green); text-decoration: none; }
.book-note a:hover { text-decoration: underline; }

/* ---------------- footer ---------------- */

footer {
  background: var(--charcoal);
  border-top: 1px solid #2A2A2A;
  padding: 44px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand svg { width: 26px; height: auto; }
.footer-brand span {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--mid-gray);
}
.footer-tag {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--mid-gray);
}
.footer-tag b { color: var(--green); font-weight: 400; }

/* ---------------- reveal animations ---------------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.65s var(--ease-out),
    transform 0.65s var(--ease-out);
  transition-delay: var(--d, 0s);
}
[data-reveal].in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { transform: none; transition: opacity 0.4s ease; }
  .hero-hex { animation: none; }
  .cursor, .term .tcursor, .spot-meta span.live::before { animation: none; }
  .btn:hover, .deliver-card:hover { transform: none; }
}

@media (max-width: 640px) {
  :root { --pad-x: 22px; }
  .section { padding: 88px 0; }
  .hero { padding: 120px 0 70px; }
}
