/* ============================================================
   formativelabs.co — Global Styles
   ============================================================ */

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

:root {
  --bg: #09090f;
  --bg-secondary: #111118;
  --text: #e4e4dc;
  --text-muted: #888880;
  --accent: #d4a535;
  --accent-dim: #a67c1a;
  --border: #222218;
  --link-classic: #d4a535;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  color: #e8bc50;
}

/* ── Navigation ─────────────────────────────────────── */

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  background: rgba(9, 9, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-logo img {
  height: 26px;
  width: auto;
  display: block;
}

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

.nav-links a {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

/* ── Home / Crystal Canvas ───────────────────────────── */

#crystal-canvas {
  display: block;
  width: 100vw;
  height: 100vh;
  cursor: pointer;
}

.home-hint {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  opacity: 0.6;
  pointer-events: none;
  animation: fadeInUp 1s ease 1.5s both;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to   { opacity: 0.6; transform: translateX(-50%) translateY(0); }
}

/* ── Page Layout (About, Projects) ──────────────────── */

.page-wrapper {
  min-height: 100vh;
  padding-top: 80px;
}

.page-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 32px 96px;
}

.page-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 48px;
}

/* ── About Page ──────────────────────────────────────── */

.about-photo-wrap {
  width: 160px;
  height: 160px;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 32px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
}

.about-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.about-bio {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 56px;
  max-width: 600px;
}

/* ── Contact Form ────────────────────────────────────── */

.contact-section h2 {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 480px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 10px 14px;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
  appearance: none;
  -webkit-appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent-dim);
}

.form-group textarea {
  resize: vertical;
  min-height: 110px;
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23d4a535' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.form-group select option {
  background: #1a1a28;
}

.btn-submit {
  align-self: flex-start;
  margin-top: 8px;
  padding: 10px 28px;
  background: transparent;
  border: 1px solid var(--accent-dim);
  border-radius: 3px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn-submit:hover {
  background: var(--accent-dim);
  color: #fff;
}

.form-success {
  display: none;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #6ee7b7;
  letter-spacing: 0.06em;
  padding: 12px 0;
}

/* ── Projects Page ───────────────────────────────────── */

.projects-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.project-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
}

.project-item:first-child {
  border-top: 1px solid var(--border);
}

.project-number {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  padding-top: 2px;
  min-width: 24px;
  letter-spacing: 0.06em;
}

.project-thumb {
  width: 64px;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-secondary);
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    45deg,
    var(--bg-secondary),
    var(--bg-secondary) 4px,
    var(--border) 4px,
    var(--border) 5px
  );
}

.project-info {
  flex: 1;
}

.project-link-title {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--link-classic);
  text-decoration: underline;
  text-underline-offset: 3px;
  display: inline-block;
  margin-bottom: 4px;
  transition: color 0.15s;
}

.project-item:hover .project-link-title {
  color: #7bb8e8;
}

.project-coming-soon {
  color: var(--text-muted);
  text-decoration: none;
  cursor: default;
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
}
.project-item:hover .project-coming-soon { color: var(--text-muted); }

.coming-soon-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 3px;
  padding: 2px 6px;
  vertical-align: middle;
}

.project-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Footer ──────────────────────────────────────────── */

.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 48px 32px 40px;
  border-top: 1px solid var(--border);
  margin-top: 64px;
}

.footer-logo {
  height: 28px;
  width: auto;
  opacity: 0.7;
  filter: brightness(0) invert(1);
}

.footer-name {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  color: var(--text-muted);
}

/* ── Home Video ──────────────────────────────────────── */

.home-video-wrap {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #09090f;
  cursor: none;
}

#home-video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

.home-scrub-hint {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  opacity: 0.6;
  pointer-events: none;
  white-space: nowrap;
  animation: fadeInUp 1s ease 1.5s both;
}

/* ── Responsive ──────────────────────────────────────── */

@media (max-width: 768px) {
  /* Nav */
  nav {
    padding: 14px 20px;
  }
  .nav-logo {
    font-size: 0.82rem;
  }
  .nav-links {
    gap: 18px;
  }
  .nav-links a {
    font-size: 0.76rem;
  }

  /* Pages */
  .page-content {
    padding: 48px 20px 80px;
  }

  /* About */
  .about-photo-wrap {
    width: 120px;
    height: 120px;
  }
  .about-bio {
    font-size: 1rem;
  }

  /* Contact form */
  .contact-form {
    max-width: 100%;
  }
  .btn-submit {
    width: 100%;
    text-align: center;
    align-self: stretch;
    padding: 13px 20px;
  }

  /* Projects */
  .project-thumb { display: none; }
  .project-link-title { font-size: 0.9rem; }

  /* Footer */
  .site-footer {
    padding: 36px 20px 32px;
    margin-top: 40px;
  }

  /* Home hint */
  .home-hint { font-size: 0.68rem; }
}

@media (max-width: 420px) {
  nav {
    padding: 12px 16px;
  }
  .nav-links {
    gap: 14px;
  }
  .page-content {
    padding: 40px 16px 72px;
  }
}
