/* ========================================
   TVLSS — Main Stylesheet
   ======================================== */

/* --- Reset & Variables --- */

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

:root {
  --bg: #0c0a09;
  --bg-raised: #141210;
  --bg-surface: #1c1917;
  --bg-surface-hover: #292524;
  --text: #fafaf9;
  --text-muted: #a8a29e;
  --text-dim: #57534e;
  --accent: #f97316;
  --accent-hover: #ea580c;
  --accent-glow: rgba(249, 115, 22, 0.2);
  --yellow: #fbbf24;
  --orange: #f5a623;
  --purple: #7c3aed;
  --purple-muted: #a78bfa;
  --cyan: #22d3ee;
  --green: #34d399;
  --border: rgba(255, 255, 255, 0.07);
  --border-bright: rgba(255, 255, 255, 0.12);
  --font-display: 'Instrument Serif', serif;
  --font-body: 'Manrope', sans-serif;
  --max-width: 1200px;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

::selection {
  background: rgba(249, 115, 22, 0.3);
  color: var(--text);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* --- Grain Overlay --- */

.grain {
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
  opacity: 0.024;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* --- Navigation --- */

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background 0.4s ease, backdrop-filter 0.4s ease;
}

header.scrolled {
  background: rgba(12, 10, 9, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 2rem;
}

.logo {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2.5rem;
}

nav ul a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  position: relative;
  transition: color 0.3s ease;
}

nav ul a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}

nav ul a:hover {
  color: var(--text);
}

nav ul a:hover::after {
  width: 100%;
}

/* --- Hero --- */

#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  filter: blur(80px);
}

.hero-grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(ellipse 70% 50% at 50% 40%, black 20%, transparent 70%);
  mask-image: radial-gradient(ellipse 70% 50% at 50% 40%, black 20%, transparent 70%);
  pointer-events: none;
}

.hero-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  z-index: 1;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
}

.hero-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(3.2rem, 8.5vw, 7.5rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}

.line-wrap {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
}

.line {
  display: block;
  transform: translateY(115%);
  animation: line-up 1.2s var(--ease-out-expo) forwards;
  animation-delay: calc(var(--i) * 0.12s + 0.3s);
}

@keyframes line-up {
  to { transform: translateY(0); }
}

.hero-sub {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 2.5rem;
  max-width: 480px;
  font-weight: 400;
}

/* --- Fade-Up Entrance --- */

.fade-up {
  opacity: 0;
  transform: translateY(24px);
  animation: fade-up 0.9s var(--ease-out-expo) forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes fade-up {
  to { opacity: 1; transform: translateY(0); }
}

/* --- Button --- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 2.2rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border: none;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s, box-shadow 0.3s, transform 0.3s;
  box-shadow: 0 0 40px var(--accent-glow), 0 4px 20px rgba(0, 0, 0, 0.3);
}

.btn:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 60px rgba(249, 115, 22, 0.35), 0 6px 30px rgba(0, 0, 0, 0.4);
  transform: translateY(-2px);
}

.btn .arrow {
  display: inline-block;
  transition: transform 0.3s ease;
}

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

/* --- Ticker --- */

.ticker {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.2rem 0;
  overflow: hidden;
  white-space: nowrap;
  background: var(--bg-raised);
}

.ticker-inner {
  display: inline-block;
  animation: ticker-scroll 35s linear infinite;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.ticker-inner span {
  display: inline-block;
  padding: 0 1rem;
}

.ticker-dot {
  color: var(--accent);
  font-size: 0.6rem;
  vertical-align: middle;
}

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

/* --- Sections --- */

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 8rem 0;
  scroll-margin-top: 80px;
  position: relative;
}

.section-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 3rem;
}

/* --- Product Feature (Work) --- */

#work::before {
  content: '';
  position: absolute;
  top: 10%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.06), transparent 70%);
  filter: blur(80px);
  pointer-events: none;
}

#work::after {
  content: '';
  position: absolute;
  bottom: 10%;
  left: -15%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.05), transparent 70%);
  filter: blur(80px);
  pointer-events: none;
}

.product-feature {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.product-preview {
  border-radius: 16px;
  padding: 2px;
  background: linear-gradient(
    135deg,
    rgba(249, 115, 22, 0.4),
    rgba(124, 58, 237, 0.3),
    rgba(34, 211, 238, 0.2)
  );
  transition: transform 0.15s ease, box-shadow 0.5s ease;
  will-change: transform;
  cursor: default;
  box-shadow: 0 0 60px rgba(124, 58, 237, 0.06), 0 0 30px rgba(249, 115, 22, 0.04);
}

.product-preview:hover {
  box-shadow:
    0 0 100px rgba(124, 58, 237, 0.1),
    0 0 50px rgba(249, 115, 22, 0.08),
    0 20px 60px rgba(0, 0, 0, 0.3);
}

/* --- Dashboard Mockup --- */

.dashboard-mock {
  background: #111110;
  border-radius: 14px;
  overflow: hidden;
  font-size: 0.7rem;
  line-height: 1.4;
}

.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

.dash-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dash-logo-wrap {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  overflow: hidden;
  background: #fff;
  flex-shrink: 0;
}

.dash-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dash-app-name {
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--text);
  letter-spacing: 0.02em;
}

.dash-nav-tabs {
  display: flex;
  gap: 0.8rem;
}

.dash-tab {
  font-size: 0.58rem;
  color: var(--text-dim);
  font-weight: 500;
}

.dash-tab.active {
  color: var(--text-muted);
}

.dash-body {
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.dash-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
}

.dash-stat {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 0.7rem 0.5rem;
  text-align: center;
}

.dash-stat-value {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.dash-stat-value.orange { color: var(--accent); }
.dash-stat-value.purple { color: var(--purple-muted); }
.dash-stat-value.green { color: var(--green); }

.dash-stat-label {
  display: block;
  font-size: 0.48rem;
  color: var(--text-dim);
  margin-top: 0.15rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.dash-section-title {
  display: block;
  font-size: 0.55rem;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}

/* --- Dashboard Chart --- */

.dash-chart-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 0.7rem;
}

.dash-chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
  height: 70px;
}

.dash-chart-bars .bar {
  flex: 1;
  height: var(--h);
  border-radius: 4px 4px 0 0;
  background: linear-gradient(to top, var(--purple), var(--accent));
  opacity: 0.85;
  position: relative;
  transition: opacity 0.2s;
}

.dash-chart-bars .bar:hover {
  opacity: 1;
}

.dash-chart-bars .bar span {
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.42rem;
  color: var(--text-dim);
  font-weight: 600;
}

/* --- Dashboard Job List --- */

.dash-list {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 0.7rem;
}

.dash-list-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0;
  font-size: 0.55rem;
  color: var(--text-muted);
}

.dash-list-item + .dash-list-item {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.dash-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dash-dot.green { background: var(--green); box-shadow: 0 0 6px rgba(52, 211, 153, 0.4); }
.dash-dot.purple { background: var(--purple-muted); box-shadow: 0 0 6px rgba(167, 139, 250, 0.4); }
.dash-dot.orange { background: var(--accent); box-shadow: 0 0 6px rgba(249, 115, 22, 0.4); }

.dash-job {
  font-weight: 600;
  color: var(--text);
  font-size: 0.55rem;
}

.dash-company {
  color: var(--text-dim);
  font-size: 0.5rem;
}

.dash-match {
  margin-left: auto;
  color: var(--green);
  font-weight: 700;
  font-size: 0.55rem;
}

/* --- Product Info --- */

.product-info h2 {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(2.5rem, 4vw, 3.8rem);
  margin-bottom: 1rem;
  line-height: 1.1;
}

.product-info p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 2rem;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: gap 0.3s ease;
}

.link-arrow:hover {
  gap: 0.9rem;
}

/* --- Approach --- */

#approach {
  overflow: hidden;
}

.approach-glow {
  position: absolute;
  top: 30%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.05), transparent 70%);
  filter: blur(80px);
  pointer-events: none;
}

.approach-header {
  max-width: 800px;
  margin-bottom: 3.5rem;
}

.approach-header h2 {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(2.5rem, 5vw, 4.2rem);
  line-height: 1.08;
  margin-bottom: 1.5rem;
}

.approach-desc {
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.75;
  max-width: 640px;
}

/* --- Capability Cards --- */

.cap-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.cap-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2.2rem 1.8rem;
  transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.3s ease;
}

.cap-card:hover {
  border-color: var(--border-bright);
  box-shadow: 0 0 40px rgba(124, 58, 237, 0.06), 0 10px 40px rgba(0, 0, 0, 0.2);
  transform: translateY(-4px);
}

.cap-number {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 0.6rem;
  background: linear-gradient(135deg, var(--accent), var(--yellow), var(--purple-muted));
  background-size: 200% 200%;
  animation: gradient-shift 6s ease infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.cap-label {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.cap-desc {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* --- Contact --- */

#contact::before {
  content: '';
  position: absolute;
  top: 20%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.05), transparent 70%);
  filter: blur(80px);
  pointer-events: none;
}

.contact-title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(2.5rem, 5vw, 4.2rem);
  line-height: 1.08;
  margin-bottom: 3rem;
}

#contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 600px;
  position: relative;
  z-index: 1;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

#contact-form input,
#contact-form textarea {
  padding: 1rem 1.2rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  outline: none;
}

#contact-form input:focus,
#contact-form textarea:focus {
  border-color: rgba(249, 115, 22, 0.4);
  box-shadow: 0 0 20px rgba(249, 115, 22, 0.06);
}

#contact-form input::placeholder,
#contact-form textarea::placeholder {
  color: var(--text-dim);
}

#contact-form textarea {
  resize: vertical;
  min-height: 140px;
}

#contact-form .btn {
  align-self: flex-start;
  margin-top: 0.5rem;
}

/* --- Scroll Reveal --- */

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 1s var(--ease-out-expo);
}

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

/* --- Footer --- */

footer {
  border-top: 1px solid var(--border);
  background: var(--bg-raised);
  padding: 0;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  padding: 4rem 0 3rem;
}

.footer-brand {
  padding-right: 2rem;
}

.footer-logo {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text);
  display: block;
  margin-bottom: 0.8rem;
}

.footer-tagline {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.footer-desc {
  color: var(--text-dim);
  font-size: 0.85rem;
  font-style: italic;
}

.footer-col h4 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
}

.footer-col a {
  display: block;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 0.7rem;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--text);
}

.footer-socials {
  display: flex;
  gap: 0.8rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.social-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-bright);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.8rem;
}

/* --- Responsive --- */

@media (max-width: 900px) {
  .product-feature {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .cap-cards {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 640px) {
  nav {
    padding: 1.2rem 1.5rem;
  }

  nav ul {
    gap: 1.8rem;
  }

  nav ul a {
    font-size: 0.85rem;
  }

  main {
    padding: 0 1.5rem;
  }

  section {
    padding: 5rem 0;
  }

  .hero-title {
    margin-bottom: 1.5rem;
  }

  .hero-sub br {
    display: none;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .section-label {
    margin-bottom: 2rem;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 3rem 0 2rem;
  }

  .footer-brand {
    padding-right: 0;
  }
}

@media (max-width: 420px) {
  nav {
    padding: 1rem;
  }

  nav ul {
    gap: 1.2rem;
  }

  .hero-content {
    padding: 0 1rem;
  }

  .btn {
    padding: 0.9rem 1.8rem;
    font-size: 0.9rem;
  }
}
