/* ─────────────────────────────────────────────────────────────
   Tim Bloemers — global styles
   ───────────────────────────────────────────────────────────── */

:root {
  --bg: #07070C;
  --bg-1: #0C0C14;
  --bg-2: #12121C;
  --bg-3: #181826;
  --line: rgba(255,255,255,0.07);
  --line-strong: rgba(255,255,255,0.12);
  --ink: #EDEDF2;
  --ink-2: rgba(237,237,242,0.66);
  --ink-3: rgba(237,237,242,0.46);
  --ink-4: rgba(237,237,242,0.30);
  --accent: #8B7CFF;
  --accent-rgb: 139, 124, 255;
  --accent-soft: rgba(139,124,255,0.14);
  --accent-glow: 0 0 0 1px rgba(139,124,255,.45), 0 0 24px rgba(139,124,255,.2);
  --radius: 10px;
  --radius-lg: 16px;
  --maxw: 1240px;
  --pad: clamp(20px, 4vw, 56px);
  --font-display: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
}

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

html { background: var(--bg); }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'ss01', 'cv11';
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* Selection */
::selection { background: var(--accent); color: #0A0814; }

/* Page container */
.tb-app { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
main { flex: 1; }

/* Container */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* ─── Typography ─────────────────────────────────────────────── */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 24px; height: 1px;
  background: var(--accent);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  margin: 0;
  letter-spacing: -0.02em;
  font-weight: 600;
  color: var(--ink);
  text-wrap: balance;
}
h1 {
  font-size: clamp(44px, 6.5vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 600;
}
h2 {
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.028em;
}
h3 {
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  font-weight: 600;
}
p { margin: 0; color: var(--ink-2); text-wrap: pretty; }
.lead { font-size: clamp(18px, 1.6vw, 22px); line-height: 1.5; color: var(--ink-2); max-width: 60ch; }

/* ─── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .25s cubic-bezier(.2,.8,.2,1);
  white-space: nowrap;
  background: transparent;
  color: var(--ink);
}
.btn .arrow {
  display: inline-block;
  transition: transform .3s cubic-bezier(.2,.8,.2,1);
}
.btn:hover .arrow { transform: translateX(4px); }

.btn-primary {
  background: #FFFFFF;
  color: #0A0814;
  border-color: #FFFFFF;
}
.btn-primary:hover {
  background: #F5F3FF;
  border-color: #F5F3FF;
  box-shadow: 0 0 0 4px rgba(139,124,255,.12), 0 8px 28px rgba(139,124,255,.18);
  transform: translateY(-1px);
}

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--ink);
  background: rgba(255,255,255,0.02);
}
.btn-ghost:hover {
  border-color: rgba(255,255,255,0.32);
  color: var(--ink);
  background: rgba(255,255,255,0.04);
}

.btn-link {
  padding: 0;
  border: 0;
  color: var(--ink);
  font-weight: 500;
}
.btn-link:hover { text-decoration: none; }

/* ─── Section helpers ───────────────────────────────────────── */
section { position: relative; }
.section { padding: clamp(72px, 10vw, 140px) 0; }
.section-tight { padding: clamp(48px, 7vw, 96px) 0; }

.divider-glow {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent) 50%, transparent);
  opacity: .35;
}
.hairline {
  height: 1px;
  background: var(--line);
}

/* Grid bg pattern (very subtle) */
.bg-grid {
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 64px 64px;
}

/* ─── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: border-color .3s, transform .4s cubic-bezier(.2,.8,.2,1), background .3s;
  position: relative;
  overflow: hidden;
}
.card:hover {
  border-color: rgba(139,124,255,.35);
  background: var(--bg-2);
}

.card-glow::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(600px circle at var(--mx,50%) var(--my,0%), rgba(139,124,255,.08), transparent 40%);
  opacity: 0;
  transition: opacity .4s;
}
.card-glow:hover::after { opacity: 1; }

/* ─── Photo placeholder ─────────────────────────────────────── */
.photo-placeholder {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(139,124,255,0.08), transparent 60%),
    linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid rgba(139,124,255,0.22);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  place-items: center;
  isolation: isolate;
}
.photo-placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(80% 60% at 50% 50%, black, transparent 80%);
  z-index: 0;
}
.photo-placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 80px rgba(139,124,255,0.12);
  z-index: 1;
}
.photo-placeholder .ph-label {
  position: relative;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(139,124,255,.7);
  background: rgba(139,124,255,0.06);
  border: 1px solid rgba(139,124,255,0.25);
  padding: 8px 14px;
  border-radius: 999px;
  white-space: nowrap;
}
.photo-placeholder.compact { aspect-ratio: 1 / 1; }
.photo-placeholder.wide { aspect-ratio: 16 / 10; }

/* with real image */
.photo-placeholder.has-photo { background: var(--bg-2); border-color: rgba(139,124,255,0.18); }
.photo-placeholder.has-photo::before,
.photo-placeholder.has-photo::after { display: none; }
.photo-placeholder.has-photo img { border-radius: inherit; }

/* ─── Forms ─────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-size: 12px;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.field input, .field textarea, .field select {
  appearance: none;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  padding: 14px 16px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color .25s, background .25s, box-shadow .25s;
  width: 100%;
}
.field textarea { min-height: 130px; resize: vertical; line-height: 1.5; }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--accent);
  background: var(--bg-2);
  box-shadow: 0 0 0 4px rgba(139,124,255,0.1);
}
.field .err {
  font-size: 12px;
  color: #ff7a85;
  font-family: var(--font-mono);
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }

/* ─── Tag / chip ─────────────────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-1);
}
.chip-accent {
  color: var(--ink-2);
  border-color: rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.03);
}
.chip-dot::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 999px;
  box-shadow: 0 0 8px var(--accent);
}

/* ─── Animations ─────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .7s cubic-bezier(.2,.8,.2,1) both; }
.fade-up-d1 { animation-delay: .1s; }
.fade-up-d2 { animation-delay: .2s; }
.fade-up-d3 { animation-delay: .3s; }
.fade-up-d4 { animation-delay: .4s; }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 12px var(--accent); }
  50% { opacity: .6; box-shadow: 0 0 4px var(--accent); }
}
.pulse-dot { animation: pulse-dot 2.4s ease-in-out infinite; }

/* ─── Utilities ──────────────────────────────────────────────── */
.hide-mobile { display: initial; }
.show-mobile, .tb-burger.show-mobile { display: none !important; }
@media (max-width: 860px) {
  .hide-mobile { display: none !important; }
  .show-mobile { display: initial !important; }
  .tb-burger.show-mobile { display: inline-grid !important; }
}

.muted { color: var(--ink-3); }
.strong { color: var(--ink); font-weight: 500; }
.accent { color: var(--ink); }

.kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: 5px;
  color: var(--ink-3);
}

/* ─── Reveal-on-scroll ─────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .8s cubic-bezier(.2,.8,.2,1), transform .8s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* hide scrollbar in nav drawer */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { scrollbar-width: none; }
