@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  --bg: #f9fafb;
  --bg-grid: #f3f4f6;
  --surface: rgba(255, 255, 255, 0.85);
  --surface-opaque: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --line: #e2e8f0;
  --line-light: rgba(0, 0, 0, 0.04);
  
  --accent-cyan: #0ea5e9;
  --accent-blue: #0284c7;
  --accent-purple: #4f46e5;
  
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --shadow-glow: 0 10px 30px rgba(0, 0, 0, 0.02);
  --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Base Styles & Scrollbar
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg);
}

section {
  scroll-margin-top: 72px;
}

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

::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: #e2e8f0;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #cbd5e1;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

/* ==========================================================================
   Page Frame
   ========================================================================== */
.page-frame {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  background: transparent;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  border-bottom: 1px solid transparent;
  z-index: 100;
  transition: background-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              backdrop-filter 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-header.scrolled {
  background: rgba(249, 250, 251, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-logo-svg {
  width: 32px;
  height: 32px;
  display: block;
}

.brand-name {
  font-size: 18px;
  background: linear-gradient(to right, #0f172a, #475569);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 12px;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}

.top-nav a {
  color: var(--muted);
  position: relative;
  padding: 6px 0;
}

.top-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-blue);
  transition: var(--transition);
}

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

.top-nav a:hover::after,
.top-nav a.active::after {
  width: 100%;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding: 120px 48px 80px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background-image: 
    radial-gradient(circle at 50% 50%, rgba(94, 75, 182, 0.025) 0%, transparent 60%),
    radial-gradient(circle at 30% 40%, rgba(2, 132, 199, 0.015) 0%, transparent 50%),
    linear-gradient(to bottom, #f9fafb, #ffffff);
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1040px;
  margin: 0 auto;
  width: 100%;
}

.hero-tag {
  position: relative;
  font-family: var(--font-mono);
  color: var(--accent-blue);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 24px;
  display: inline-flex;
  align-items: center;
}

.hero-tag::before {
  content: '';
  position: absolute;
  left: -14px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent-blue);
  box-shadow: 0 0 8px var(--accent-blue);
}

.hero h1 {
  font-size: clamp(38px, 6.5vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 800;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #0f172a 30%, #475569 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-text {
  max-width: 580px;
  color: var(--muted);
  font-size: clamp(16px, 2.2vw, 20px);
  line-height: 1.6;
  margin-bottom: 40px;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #0f172a;
  color: #ffffff;
  padding: 14px 28px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.15);
  transition: var(--transition);
}

.cta-button:hover {
  background: #1e293b;
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(2, 132, 199, 0.18);
}

.cta-button svg {
  transition: transform 0.2s ease;
}

.cta-button:hover svg {
  transform: translateX(4px);
}

/* ==========================================================================
   Tools Section (List Layout)
   ========================================================================== */
.tools-section {
  padding: 80px 48px;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.section-header {
  max-width: 1040px;
  margin: 0 auto 32px;
}

.eyebrow {
  font-family: var(--font-mono);
  color: var(--accent-blue);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  background: linear-gradient(to right, #0f172a, #475569);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tool-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
  max-width: 1040px;
  margin: 0 auto;
}

/* Spotlight Glowing Card Design (Light) */
.tool-card {
  position: relative;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid rgba(15, 23, 42, 0.05);
  padding: 48px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
  overflow: hidden;
  box-shadow: var(--shadow-glow);
  transition: border-color 0.5s ease, box-shadow 0.3s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Spotlight Mouse Glow Hover effects using pseudo-elements */
.tool-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    600px circle at var(--mouse-x, 0px) var(--mouse-y, 0px),
    rgba(2, 132, 199, 0.02),
    transparent 80%
  );
  z-index: 1;
}

.tool-card::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 24px;
  pointer-events: none;
  background: radial-gradient(
    350px circle at var(--mouse-x, 0px) var(--mouse-y, 0px),
    rgba(2, 132, 199, 0.15),
    rgba(79, 70, 229, 0.08) 50%,
    transparent 80%
  );
  z-index: 0;
  padding: 1px;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.tool-card:hover {
  border-color: rgba(2, 132, 199, 0.2);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(0, 0, 0, 0.01);
}

/* Alternating Card Columns on Desktop */
@media (min-width: 981px) {
  .tool-card:nth-child(even) {
    grid-template-columns: 1fr 1.1fr;
  }
  .tool-card:nth-child(even) .tool-info {
    order: 2;
  }
  .tool-card:nth-child(even) .tool-visual {
    order: 1;
  }
}

.tool-info {
  position: relative;
  z-index: 2;
}

.tool-number {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-blue);
  margin-bottom: 24px;
  opacity: 0.8;
}

.tool-info h3 {
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: var(--text);
}

.tool-info p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 32px;
}

.tool-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
  border-bottom: 1px solid rgba(15, 23, 42, 0.2);
  padding-bottom: 4px;
}

.tool-link::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 10;
}

.tool-card:hover .tool-link {
  color: var(--accent-blue);
  border-color: var(--accent-blue);
}

.tool-link svg {
  transition: transform 0.2s ease;
}

.tool-card:hover .tool-link svg {
  transform: translate(2px, -2px);
}

/* ==========================================================================
   Tool Visuals (Static SVGs)
   ========================================================================== */
.tool-visual {
  position: relative;
  z-index: 2;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.05);
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.03), inset 0 0 0 1px rgba(15, 23, 42, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 280px;
  transition: var(--transition);
}

.tool-visual svg,
.tool-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

#visual-fastgraphics {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  padding: 20px;
}

#visual-timetracker {
  background: linear-gradient(135deg, #fffaf0 0%, #ffebcc 100%);
  padding: 20px;
}

#visual-distances {
  background: linear-gradient(135deg, #f0f9ff 0%, #bae6fd 100%);
  padding: 20px;
}

#visual-fastgraphics img,
#visual-timetracker img,
#visual-distances img {
  object-fit: contain;
  border-radius: 10px;
  background-color: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05), 0 2px 6px rgba(15, 23, 42, 0.03);
}

.tool-card:hover .tool-visual {
  border-color: rgba(2, 132, 199, 0.15);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.04), inset 0 1px 3px rgba(0, 0, 0, 0.01);
}

.tool-card:hover .tool-visual img {
  transform: scale(1.04);
}

/* Styling for mobile App-Visual in cards (e.g. Gipfelwind) */
.tool-visual-app {
  background: linear-gradient(135deg, #f5f3ff 0%, #e0d7ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: hidden;
}

.app-screenshot-wrapper {
  display: flex;
  gap: 20px;
  height: 100%;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.app-screenshot {
  height: 85%;
  width: auto;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(94, 75, 182, 0.15), 0 2px 6px rgba(15, 23, 42, 0.05);
  object-fit: contain;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
  background-color: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

/* Hover effects for the screenshots */
.tool-card:hover .tool-visual-app .screen-main {
  transform: translateY(-12px) rotate(-3deg) scale(1.05);
  box-shadow: 0 16px 36px rgba(94, 75, 182, 0.2), 0 4px 12px rgba(15, 23, 42, 0.08);
}

.tool-card:hover .tool-visual-app .screen-fav {
  transform: translateY(12px) rotate(3deg) scale(1.05);
  box-shadow: 0 16px 36px rgba(94, 75, 182, 0.2), 0 4px 12px rgba(15, 23, 42, 0.08);
}

/* App Download & QR Code styles */
.app-download-container {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 32px;
}

.qr-code-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  padding: 6px 12px 6px 8px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.02);
  transition: var(--transition);
  pointer-events: auto; /* ensure links/hovers work */
  position: relative;
  z-index: 12;
}

.qr-code-wrapper:hover {
  border-color: rgba(94, 75, 182, 0.2);
  box-shadow: 0 6px 16px rgba(94, 75, 182, 0.06);
}

.qr-code-img {
  width: 48px;
  height: 48px;
  display: block;
  border-radius: 6px;
  border: 1px solid rgba(15, 23, 42, 0.05);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.qr-code-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.qr-code-title {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
}

.qr-code-subtitle {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Hover zoom effect for scanning ease */
.qr-code-wrapper:hover .qr-code-img {
  transform: scale(3.5);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.15);
  z-index: 100;
  position: relative;
}

/* ========================================================================== */



/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  padding: 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.footer-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1040px;
  margin: 0 auto;
  width: 100%;
}

.footer-links {
  display: flex;
  gap: 32px;
}

.footer-links a:hover {
  color: var(--accent-blue);
}

/* ==========================================================================
   Legal Pages (Impressum & Datenschutz)
   ========================================================================== */
.legal-section {
  padding: 120px 48px 80px;
  min-height: 80vh;
  display: flex;
  justify-content: center;
}

.legal-container {
  max-width: 720px;
  width: 100%;
}

.legal-container p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.legal-container h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 40px;
  background: linear-gradient(135deg, #0f172a 30%, #475569 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.legal-container h2 {
  font-size: clamp(20px, 3vw, 24px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-top: 40px;
  margin-bottom: 16px;
  color: var(--text);
}

.legal-container h3 {
  font-size: 18px;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 8px;
  color: var(--text);
}

.legal-container ul {
  list-style-type: none;
  margin-bottom: 24px;
  padding-left: 0;
}

.legal-container li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  color: var(--muted);
}

.legal-container li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent-blue);
  font-weight: bold;
}

.legal-container a {
  color: var(--accent-blue);
  border-bottom: 1px solid rgba(2, 132, 199, 0.2);
}

.legal-container a:hover {
  border-color: var(--accent-blue);
}

.legal-container strong {
  color: var(--text);
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
  border-bottom: 1px solid rgba(15, 23, 42, 0.2);
  padding-bottom: 4px;
  margin-top: 48px;
  cursor: pointer;
}

.btn-back:hover {
  color: var(--accent-blue);
  border-color: var(--accent-blue);
}

.btn-back svg {
  transition: transform 0.2s ease;
}

.btn-back:hover svg {
  transform: translateX(-4px);
}

@media (max-width: 980px) {
  .legal-section {
    padding: 100px 24px 60px;
  }
}

/* ==========================================================================
   Tactile Click Feedback
   ========================================================================== */
.cta-button:active,
.btn-back:active,
.qr-code-wrapper:active,
.top-nav a:active {
  transform: scale(0.96);
}

.tool-card:active {
  transform: scale(0.993);
}

/* ==========================================================================
   Scroll Reveal Animation
   ========================================================================== */
.reveal-init {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

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

/* ==========================================================================
   Media Queries & Responsiveness
   ========================================================================== */
@media (max-width: 980px) {
  .site-header {
    padding: 0 24px;
  }
  
  .hero {
    padding: 100px 24px 60px;
  }

  .tools-section {
    padding: 80px 24px;
  }

  .tool-card {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 32px;
  }
}

@media (max-width: 640px) {
  .site-header {
    height: 64px;
  }

  .top-nav {
    gap: 16px;
    font-size: 11px;
  }

  .hero h1 {
    font-size: 42px;
  }

  .cta-button {
    width: 100%;
    justify-content: center;
  }

  .tool-card {
    padding: 24px;
    gap: 24px;
  }

  .app-download-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .site-footer {
    padding: 32px 24px;
  }

  .footer-container {
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
  }
}