/* ==========================================================================
   CFTO Studio — Design Tokens
   ========================================================================== */
:root {
  --bg: #07070c;
  --bg-alt: #0c0c14;
  --surface: #12121c;
  --surface-2: #191926;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #f5f5f8;
  --text-dim: #9a9aad;
  --text-dimmer: #6c6c7e;

  --accent: #7c5cff;
  --accent-2: #22d3ee;
  --accent-3: #ff6b9d;
  --gradient: linear-gradient(135deg, var(--accent), var(--accent-2));

  --font-head: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --container: 1180px;
  --radius: 18px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Reset
   ========================================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

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

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

ul { list-style: none; }

button { font: inherit; cursor: pointer; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  z-index: 999;
}
.skip-link:focus { left: 16px; top: 16px; }

/* ==========================================================================
   Ambient background effects
   ========================================================================== */
.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.12), transparent 70%);
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
  opacity: 0;
}
.cursor-glow.active { opacity: 1; }

@media (max-width: 900px) {
  .cursor-glow { display: none; }
}

/* ==========================================================================
   Reveal-on-scroll
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: background 0.3s var(--ease), padding 0.3s var(--ease), border-color 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(7, 7, 12, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 12px 0;
  border-bottom-color: var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.logo-mark {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.logo-sub { color: var(--text-dim); font-weight: 500; font-size: 1rem; }

.nav-desktop {
  display: flex;
  gap: 32px;
  margin-left: auto;
}
.nav-desktop a {
  font-size: 0.95rem;
  color: var(--text-dim);
  position: relative;
  padding: 4px 0;
  transition: color 0.25s ease;
}
.nav-desktop a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--gradient);
  transition: width 0.25s var(--ease);
}
.nav-desktop a:hover { color: var(--text); }
.nav-desktop a:hover::after { width: 100%; }

.nav-cta { margin-left: 8px; }

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.burger span {
  display: block;
  height: 2px;
  width: 18px;
  margin: 0 auto;
  background: var(--text);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 16px 24px 24px;
  background: rgba(7, 7, 12, 0.98);
  border-bottom: 1px solid var(--border);
}
.nav-mobile a {
  padding: 12px 4px;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
}
.nav-mobile a:last-child { border-bottom: none; margin-top: 8px; }
.nav-mobile.open { display: flex; }

@media (max-width: 860px) {
  .nav-desktop, .nav-cta { display: none; }
  .burger { display: flex; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s ease, border-color 0.25s ease;
  border: 1px solid transparent;
}
.btn-small { padding: 10px 20px; font-size: 0.88rem; }
.btn-block { width: 100%; }

.btn-primary {
  background: var(--gradient);
  color: #08080d;
  box-shadow: 0 8px 24px -8px rgba(124, 92, 255, 0.5);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px -8px rgba(124, 92, 255, 0.7);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  border-color: var(--accent-2);
  color: var(--accent-2);
  transform: translateY(-2px);
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 140px 0 80px;
  overflow: hidden;
}

.hero-bg { position: absolute; inset: 0; z-index: -1; }

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  animation: float 16s ease-in-out infinite;
}
.blob-1 {
  width: 520px; height: 520px;
  background: radial-gradient(circle, var(--accent), transparent 70%);
  top: -10%; left: -8%;
}
.blob-2 {
  width: 460px; height: 460px;
  background: radial-gradient(circle, var(--accent-2), transparent 70%);
  bottom: -15%; right: -8%;
  animation-delay: -8s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -40px) scale(1.08); }
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black, transparent);
}

.hero-inner { max-width: 780px; }

.eyebrow {
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 16px;
}

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.hero-title span { display: block; }

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-text {
  font-size: 1.15rem;
  color: var(--text-dim);
  max-width: 560px;
  margin-bottom: 36px;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-dimmer);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.scroll-hint span {
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, var(--accent-2), transparent);
  position: relative;
  overflow: hidden;
}
.scroll-hint span::after {
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--accent-2);
  animation: scrollLine 2.2s ease-in-out infinite;
}
@keyframes scrollLine {
  0% { top: -100%; }
  60% { top: 100%; }
  100% { top: 100%; }
}

@media (max-width: 640px) {
  .scroll-hint { display: none; }
}

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding: 120px 0; }
.section-alt { background: var(--bg-alt); }

.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  max-width: 640px;
  margin-bottom: 18px;
}

.section-lead {
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 560px;
  margin-bottom: 48px;
}

/* ==========================================================================
   Services
   ========================================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 48px;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 26px;
  transition: transform 0.35s var(--ease), border-color 0.35s ease, background 0.35s ease;
}
.service-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.service-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(124,92,255,0.18), rgba(34,211,238,0.18));
  color: var(--accent-2);
  margin-bottom: 20px;
}
.service-icon svg { width: 24px; height: 24px; }

.service-card h3 {
  font-family: var(--font-head);
  font-size: 1.15rem;
  margin-bottom: 10px;
}
.service-card p { color: var(--text-dim); font-size: 0.95rem; }

/* ==========================================================================
   Projects
   ========================================================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s ease;
}
.project-card:hover { transform: translateY(-6px); border-color: var(--border-strong); }

.project-media { position: relative; aspect-ratio: 16/10; overflow: hidden; }
.project-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.project-card:hover .project-media img { transform: scale(1.06); }

.project-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(7,7,12,0.7);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border-strong);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.project-body { padding: 22px 24px 26px; }
.project-body h3 { font-family: var(--font-head); font-size: 1.1rem; margin-bottom: 8px; }
.project-body p { color: var(--text-dim); font-size: 0.92rem; }

/* ==========================================================================
   Own apps
   ========================================================================== */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.app-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 24px 28px;
  text-align: center;
  transition: transform 0.35s var(--ease), border-color 0.35s ease;
}
.app-card:hover { transform: translateY(-6px); border-color: var(--border-strong); }

.app-media {
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 18px;
  aspect-ratio: 9/16;
  max-width: 200px;
  margin-inline: auto;
  border: 1px solid var(--border);
}
.app-media img { width: 100%; height: 100%; object-fit: cover; }

.status-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-2);
  border: 1px solid rgba(34,211,238,0.35);
  background: rgba(34,211,238,0.08);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.app-card h3 { font-family: var(--font-head); font-size: 1.05rem; margin-bottom: 8px; }
.app-card p { color: var(--text-dim); font-size: 0.9rem; }

/* ==========================================================================
   Founders
   ========================================================================== */
.founders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
  max-width: 760px;
}

.founder-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.35s var(--ease), border-color 0.35s ease;
}
.founder-card:hover { transform: translateY(-6px); border-color: var(--border-strong); }

.founder-photo {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 18px;
  border: 1px solid var(--border-strong);
}

.founder-card h3 { font-family: var(--font-head); font-size: 1.1rem; margin-bottom: 4px; }
.founder-role { color: var(--accent-2); font-size: 0.85rem; font-weight: 600; margin-bottom: 12px; }
.founder-bio { color: var(--text-dim); font-size: 0.92rem; }

/* ==========================================================================
   Kontakt
   ========================================================================== */
.kontakt-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

@media (max-width: 860px) {
  .kontakt-inner { grid-template-columns: 1fr; gap: 40px; }
}

.kontakt-details { margin-top: 28px; display: flex; flex-direction: column; gap: 14px; }
.kontakt-details li { display: flex; gap: 12px; align-items: baseline; font-size: 0.95rem; }
.kontakt-details span { color: var(--text-dimmer); min-width: 90px; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; }
.kontakt-details a { color: var(--text); border-bottom: 1px solid var(--border-strong); transition: color 0.25s ease, border-color 0.25s ease; }
.kontakt-details a:hover { color: var(--accent-2); border-color: var(--accent-2); }

.kontakt-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row { display: flex; flex-direction: column; gap: 8px; }
.form-row label { font-size: 0.85rem; color: var(--text-dim); }

.form-row input,
.form-row textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15);
}

.form-note { font-size: 0.85rem; color: var(--text-dim); min-height: 1.2em; }
.form-note.success { color: var(--accent-2); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-nav { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-nav a { color: var(--text-dim); font-size: 0.9rem; transition: color 0.25s ease; }
.footer-nav a:hover { color: var(--text); }
.footer-copy { color: var(--text-dimmer); font-size: 0.85rem; width: 100%; text-align: center; margin-top: 8px; }

@media (min-width: 700px) {
  .footer-copy { width: auto; text-align: right; margin-top: 0; }
}
