/* ============================================================
   carl. — carltheapp.com  (v2: poster, not website)
   Mobile-first. 390px base. Dark only. No animations except
   form micro-interactions.
   ============================================================ */

@font-face {
  font-family: 'VT323';
  src: url('assets/fonts/VT323-Regular.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'IBMPlexMono';
  src: url('assets/fonts/IBMPlexMono-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'IBMPlexMono';
  src: url('assets/fonts/IBMPlexMono-Medium.ttf') format('truetype');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'InterBlack';
  src: url('assets/fonts/Inter-Black.woff2') format('woff2');
  font-weight: 900;
  font-display: swap;
}

:root {
  --void: #1a1c20;
  --carbon: #22252a;
  --text: #e8e8e4;
  --muted: #8a8d94;
  --faded-steel: #6a9ab0;
  --social: #2a4878;
  --health: #4a7a52;
  --creative: #c17f3a;
  --learning: #6a4878;
  --recovery: #787c84;
  --accent: var(--social);
}

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

html {
  background: var(--void);
  color: var(--text);
  height: 100%;
}

body {
  font-family: 'IBMPlexMono', 'Courier New', monospace;
  background: var(--void);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (prefers-color-scheme: light) {
  html, body {
    background: var(--void);
    color: var(--text);
  }
}

/* ─── GRAIN ─── */
.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.45;
  /* SVG noise filter injected by JS */
}

/* ─── CATEGORY BORDER ─── */
.border-left {
  position: fixed;
  left: 0;
  top: 0;
  width: 5px;
  height: 100vh;
  background: var(--accent);
  z-index: 20;
}

/* ─── TEXTURE FRAGMENT (collage element, not background) ─── */
.texture-fragment {
  position: fixed;
  z-index: 2;
  background-image: url('assets/background-mobile.png');
  background-size: cover;
  background-position: center;
  opacity: 0.52;
  border-radius: 0;
  pointer-events: none;
  /* size/position/rotation set by JS */
}

@media (min-width: 768px) {
  .texture-fragment {
    background-image: url('assets/background.png');
  }
}

/* ─── GHOST WORDMARK ─── */
.wordmark-ghost {
  position: fixed;
  font-family: 'InterBlack', 'Helvetica Neue', 'Arial Black', sans-serif;
  font-weight: 900;
  font-size: clamp(180px, 42vw, 420px);
  line-height: 0.85;
  color: var(--accent);
  opacity: 0.055;
  z-index: 3;
  pointer-events: none;
  user-select: none;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

/* ─── DATA LAYER ─── */
.data-layer {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  overflow: hidden;
}

.data-fragment {
  position: absolute;
  pointer-events: none;
  user-select: none;
}

/* ─── COMPOSITION ─── */
.composition {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0 24px 120px calc(5px + 20px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(48px, 10vh, 80px);
}

/* ─── HAIKU ─── */
.haiku {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: visible;
}

/* LINE 1 — the question. Small, tracked wide, uppercase. */
.haiku-line.line-1 {
  font-family: 'IBMPlexMono', monospace;
  font-weight: 400;
  font-size: clamp(11px, 2.8vw, 15px);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.85;
  margin-bottom: clamp(20px, 4vh, 36px);
}

/* LINE 2 — architectural. Huge, bold, bleeds off the right edge. */
.haiku-line.line-2 {
  font-family: 'InterBlack', 'Helvetica Neue', 'Arial Black', sans-serif;
  font-weight: 900;
  font-size: clamp(48px, 14vw, 120px);
  line-height: 0.92;
  letter-spacing: -0.03em;
  color: var(--text);
  text-transform: uppercase;
  overflow: visible;
  white-space: nowrap;
  margin-bottom: clamp(16px, 3vh, 28px);
}

/* LINE 3 — the nudge. Medium, accent color, possibly outlined. */
.haiku-line.line-3 {
  font-family: 'IBMPlexMono', monospace;
  font-weight: 400;
  font-size: clamp(18px, 5vw, 36px);
  letter-spacing: 0.04em;
}

/* ─── FORM ─── */
.form-area {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 420px;
}

.form-row {
  display: flex;
  border: 1px solid rgba(106, 154, 176, 0.25);
}

.email-input {
  flex: 1;
  min-width: 0;
  background: rgba(26, 28, 32, 0.90);
  border: none;
  outline: none;
  color: var(--text);
  font-family: 'IBMPlexMono', monospace;
  font-size: clamp(13px, 3.5vw, 15px);
  padding: 13px 14px;
  letter-spacing: 0.02em;
}

.email-input::placeholder {
  color: var(--muted);
  opacity: 0.5;
}

.email-input:focus {
  background: rgba(26, 28, 32, 0.98);
  outline: none;
  box-shadow: inset 2px 0 0 var(--accent);
}

.submit-btn {
  background: transparent;
  border: none;
  border-left: 1px solid rgba(106, 154, 176, 0.25);
  color: var(--text);
  font-family: 'IBMPlexMono', monospace;
  font-size: clamp(11px, 3vw, 13px);
  padding: 13px 16px;
  cursor: pointer;
  letter-spacing: 0.08em;
  white-space: nowrap;
  transition: background 0.12s ease, color 0.12s ease;
}

.submit-btn:hover { background: var(--accent); color: var(--text); }
.submit-btn:active { opacity: 0.7; }
.submit-btn:disabled { opacity: 0.4; cursor: default; }

.subtext {
  font-family: 'IBMPlexMono', monospace;
  font-size: clamp(9px, 2.2vw, 11px);
  color: var(--muted);
  opacity: 0.4;
  letter-spacing: 0.10em;
}

.confirmation {
  font-family: 'VT323', monospace;
  font-size: clamp(32px, 9vw, 52px);
  color: var(--text);
  letter-spacing: 0.02em;
  line-height: 1;
}

/* ─── SIGNATURE ─── */
.signature {
  position: fixed;
  bottom: clamp(20px, 4vh, 36px);
  left: calc(5px + 20px);
  z-index: 15;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wordmark-small {
  font-family: 'VT323', monospace;
  font-size: clamp(22px, 5vw, 32px);
  color: var(--text);
  letter-spacing: 0.02em;
  line-height: 1;
}

.location-text {
  font-family: 'IBMPlexMono', monospace;
  font-size: clamp(8px, 2vw, 10px);
  color: var(--muted);
  letter-spacing: 0.18em;
  opacity: 0.5;
}

/* ─── SHAKE ─── */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  60% { transform: translateX(5px); }
  80% { transform: translateX(-3px); }
}
.shake { animation: shake 0.35s ease; }

/* ─── DESKTOP ─── */
@media (min-width: 768px) {
  .composition {
    max-width: 760px;
    margin: 0 auto;
    padding-left: calc(5px + 48px);
  }
  .haiku-line.line-2 { font-size: clamp(80px, 10vw, 160px); }
  .haiku-line.line-1 { font-size: 13px; }
  .haiku-line.line-3 { font-size: clamp(24px, 3.5vw, 42px); }
}
