@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&family=Space+Grotesk:wght@500;700&family=Rammetto+One&display=swap');

/* ======================================================
   THEME VARIABLES
====================================================== */
:root {
  --bg: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #4F46E5;
  --secondary: #2DD4BF;
  --border: #e5e7eb;
  --logo-color: #4F46E5;
}

[data-theme="dark"] {
  --bg: #0b1020;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --border: #1e293b;
  --logo-color: #a5b4fc;
}

/* ======================================================
   RESET / BASE
====================================================== */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: Inter, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.3s ease, color 0.3s ease;
}

/* ======================================================
   TYPOGRAPHY
====================================================== */
h1, h2, h3 {
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2rem, 4vw, 3rem);
}

p {
  color: var(--muted);
}

/* ======================================================
   LAYOUT
====================================================== */
.container {
  max-width: 1100px;
  margin: auto;
  padding: 3rem 1.5rem;
}

.site-header,
.site-footer {
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.site-header .header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  border-bottom: none;
  font-size: 0.9rem;
  color: var(--muted);
}

.logo {
  font-family: "Rammetto One", sans-serif;
  font-weight: 400;
  text-decoration: none;
  color: var(--logo-color);
  display: inline-block;
  animation: logoReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  opacity: 0;
}

@keyframes logoReveal {
  0% {
    opacity: 0;
    letter-spacing: 0.2em;
    transform: translateY(6px);
  }
  100% {
    opacity: 1;
    letter-spacing: 0;
    transform: translateY(0);
  }
}

nav a {
  margin-left: 1.2rem;
  text-decoration: none;
  color: var(--muted);
}

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

/* ======================================================
   LANDING / BLANK CANVAS
====================================================== */
.landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.gateway {
  flex: 1;
  display: grid;
  place-items: center;
}

.blank-canvas {
  text-align: center;
}

.statement {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  color: var(--muted);
}

/* invisible scroll space */
.scroll-spacer {
  height: 120vh;
  pointer-events: none;
}

/* ======================================================
   CENTER SCROLL INDICATOR
====================================================== */
.scroll-indicator.center {
  position: fixed;
  top: 60%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  pointer-events: none;
  z-index: 10;
  transition: opacity 0.3s ease;
}

/* vertical line */
.scroll-line {
  position: relative;
  width: 4px;
  height: 56px;
  background: rgba(79, 70, 229, 0.25);
  border-radius: 4px;
  overflow: hidden;
}

/* animated dot */
.scroll-dot {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 14px;
  background: var(--primary);
  border-radius: 4px;
  animation: scrollMove 1.5s ease-in-out infinite;
}

/* text */
.scroll-text {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
  opacity: 0.6;
}

/* dark mode tuning */
[data-theme="dark"] .scroll-line {
  background: rgba(255, 255, 255, 0.25);
}

/* animation */
@keyframes scrollMove {
  0% {
    transform: translateY(-20px);
    opacity: 0;
  }
  30% {
    opacity: 1;
  }
  100% {
    transform: translateY(60px);
    opacity: 0;
  }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  .scroll-dot {
    animation: none;
  }
  .logo {
    animation: none;
    opacity: 1;
  }
}

/* ======================================================
   BUTTONS
====================================================== */
.btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.btn.ghost {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--border);
}

/* ======================================================
   GRID / CARDS
====================================================== */
.grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  padding: 1.6rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-6px);
  border-color: var(--primary);
}

.meta {
  margin-top: 1rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}

.tech {
  color: var(--muted);
}

.badge.live {
  color: var(--secondary);
  font-weight: 600;
}

/* ======================================================
   APPS LISTING PAGE
====================================================== */
.apps-listing {
  max-width: 720px;
  padding-top: 2rem;
  padding-bottom: 3rem;
}

.apps-intro {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.apps-intro h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  margin-bottom: 0.5rem;
}

.apps-lead {
  font-size: 1.05rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

.apps-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.app-card {
  display: block;
  padding: 1.5rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.app-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.12);
}

[data-theme="dark"] .app-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.app-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.app-card-header h2 {
  font-size: 1.25rem;
  margin: 0;
  font-weight: 600;
}

.app-badge {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--secondary);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: rgba(45, 212, 191, 0.15);
}

.app-card-desc {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 1rem;
}

.app-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--muted);
}

.app-card-tech {
  opacity: 0.9;
}

.app-card-arrow {
  color: var(--primary);
  font-weight: 600;
  transition: transform 0.2s ease;
}

.app-card:hover .app-card-arrow {
  transform: translateX(4px);
}

/* ======================================================
   PROJECT PAGE
====================================================== */
.project .tagline {
  margin-bottom: 1.5rem;
}

.stack span {
  display: inline-block;
  margin-right: 0.6rem;
  margin-bottom: 0.6rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.1);
  color: var(--primary);
  font-size: 0.8rem;
}

.flow {
  display: grid;
  gap: 1.5rem;
  margin: 3rem 0;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ======================================================
   APP PAGE (AvanTask)
====================================================== */
.app-page {
  max-width: 800px;
  padding-top: 2rem;
  padding-bottom: 3rem;
}

.app-hero {
  text-align: center;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.app-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  margin-bottom: 0.75rem;
  line-height: 1.25;
}

.app-tagline {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 540px;
  margin: 0 auto 1.25rem;
  line-height: 1.5;
}

.app-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.app-stack span {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.1);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 500;
}

.app-about {
  margin-bottom: 2.5rem;
}

.app-about h2 {
  font-size: 1.35rem;
  margin-bottom: 1rem;
}

.app-about p {
  margin-bottom: 1rem;
  color: var(--text);
  line-height: 1.65;
}

.app-about p:last-child {
  margin-bottom: 0;
}

.app-preview {
  margin-bottom: 2.5rem;
  text-align: center;
}

.app-preview img {
  display: block;
  max-width: min(320px, 100%);
  width: auto;
  height: auto;
  margin: 0 auto;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .app-preview img {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.app-preview img.app-preview-light {
  display: block;
}

.app-preview img.app-preview-dark {
  display: none;
}

[data-theme="dark"] .app-preview img.app-preview-light {
  display: none;
}

[data-theme="dark"] .app-preview img.app-preview-dark {
  display: block;
}

.app-features {
  margin-bottom: 2.5rem;
}

.app-features > h2 {
  font-size: 1.35rem;
  margin-bottom: 1.25rem;
}

.feature-block {
  padding: 1.25rem 1.25rem 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.feature-block:last-child {
  border-bottom: none;
}

.feature-block h3 {
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.feature-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.feature-block ul {
  margin: 0;
  padding-left: 1.5rem;
  color: var(--muted);
  line-height: 1.6;
}

.feature-block li {
  margin-bottom: 0.35rem;
}

.feature-block-highlight {
  margin-top: 0.5rem;
  padding: 1.25rem;
  border-radius: 12px;
  background: rgba(79, 70, 229, 0.06);
  border: 1px solid rgba(79, 70, 229, 0.2);
}

.feature-block-highlight ul {
  color: var(--text);
}

.app-cta {
  text-align: center;
  margin-bottom: 2rem;
  padding: 2rem 1.5rem;
  border-radius: 14px;
  background: var(--border);
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.08) 0%, rgba(45, 212, 191, 0.06) 100%);
  border: 1px solid var(--border);
}

.app-cta-text {
  font-size: 1.1rem;
  color: var(--text);
  margin: 0 0 1.25rem;
  font-weight: 500;
  line-height: 1.5;
}

.app-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.app-legal {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  font-size: 0.9rem;
}

.app-legal a {
  color: var(--muted);
  text-decoration: none;
}

.app-legal a:hover {
  color: var(--primary);
}

/* ======================================================
   ABOUT PAGE
====================================================== */
.about-page {
  max-width: 640px;
  padding-top: 2rem;
  padding-bottom: 3rem;
}

.about-intro {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.about-intro h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  margin-bottom: 0.5rem;
}

.about-lead {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

.about-block {
  margin-bottom: 1.75rem;
}

.about-block:last-child {
  margin-bottom: 0;
}

.about-block h2 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.about-block p {
  margin: 0;
  color: var(--text);
  line-height: 1.65;
}

/* ======================================================
   CONTACT PAGE & GAME
====================================================== */
.contact-page {
  max-width: 560px;
  padding-top: 2rem;
  padding-bottom: 3rem;
}

.contact-intro {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.contact-intro h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  margin-bottom: 0.5rem;
}

.contact-lead {
  font-size: 1rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

.contact-game {
  margin-bottom: 2rem;
}

.game-arena {
  position: relative;
  height: 200px;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.06) 0%, rgba(45, 212, 191, 0.05) 100%);
  border: 2px dashed var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.game-station {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  width: 100px;
  height: 80px;
  background: rgba(45, 212, 191, 0.2);
  border: 2px solid var(--secondary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.game-station.game-station-active {
  background: rgba(45, 212, 191, 0.3);
  box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.25);
}

.game-station-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--secondary);
}

.game-vehicle {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  background: var(--primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  user-select: none;
  transition: box-shadow 0.2s ease, transform 0.1s ease;
  z-index: 2;
}

.game-vehicle:hover {
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
}

.game-vehicle:active {
  cursor: grabbing;
}

.game-vehicle.dragging {
  opacity: 0.95;
  transform: translateY(-50%) scale(1.05);
}

.game-vehicle.vehicle-docked {
  left: auto;
  right: 24px;
  cursor: default;
  transition: right 0.3s ease;
}

.game-vehicle-icon {
  font-size: 1.75rem;
  line-height: 1;
}

.contact-reveal {
  text-align: center;
  padding: 1.75rem;
  border-radius: 14px;
  background: rgba(79, 70, 229, 0.08);
  border: 1px solid rgba(79, 70, 229, 0.2);
  transition: opacity 0.4s ease, transform 0.3s ease;
}

.contact-reveal.hidden {
  display: none;
}

.contact-reveal-title {
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
}

.contact-email {
  display: inline-block;
  font-size: 1.15rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.contact-email:hover {
  text-decoration: underline;
}

.contact-reveal-hint {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}

/* ======================================================
   TEXT PAGES
====================================================== */
.text {
  max-width: 720px;
}

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

.text section h2 {
  font-size: 1.25rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.text section h3 {
  font-size: 1.05rem;
  margin-top: 1rem;
  margin-bottom: 0.35rem;
}

.text section ul {
  margin: 0.5rem 0 1rem 1.25rem;
  padding: 0;
}

.text section li {
  margin-bottom: 0.35rem;
}

/* ======================================================
   UTILITIES
====================================================== */
.hidden {
  display: none;
}

/* fade-out on enter */
.fade-out {
  opacity: 0;
  transition: opacity 0.5s ease;
}
