/* ============================================================
   TIPPLINK — STYLES
   Mobile-first. CSS variables for easy theming.
   ============================================================ */

/* ---------- DESIGN TOKENS (edit these to change the whole site) ---------- */
:root {
  /* Colors */
  --color-bg:          #0A0A0A;
  --color-surface:     #141414;
  --color-text:        #F0F0F0;
  --color-text-muted:  #A0A0A0;
  --color-primary:     #2D7A3A;    /* vibrant green */
  --color-primary-hover: #3AA04A;
  --color-green-dark:  #1A5C28;    /* deep green */
  --color-green-light: #4ADE68;    /* bright green */
  --color-accent:      #1A3A1E;    /* dark green tint */
  --color-border:      #2A2A2A;
  --color-badge:       #1A5C28;

  /* Typography */
  --font-sans:         "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-bold:   700;

  /* Spacing */
  --space-xs:   0.25rem;
  --space-sm:   0.5rem;
  --space-md:   1rem;
  --space-lg:   1.5rem;
  --space-xl:   2.5rem;
  --space-2xl:  4rem;

  /* Sizing */
  --container-max:  1120px;
  --radius-sm:      6px;
  --radius-md:      10px;
  --radius-lg:      16px;

  /* Transitions */
  --transition: 180ms ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-weight: var(--font-weight-normal);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--color-green-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}
a:hover { color: var(--color-primary); }

/* Focus styles — keyboard-only, accessible */
:focus-visible {
  outline: 3px solid var(--color-green-light);
  outline-offset: 2px;
  border-radius: 2px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- CONTAINER ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.5rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: var(--font-weight-medium);
  line-height: 1;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), opacity var(--transition);
}

.btn-primary {
  background: var(--color-green-light);
  color: #000;
  box-shadow: 0 2px 8px rgba(74, 222, 104, 0.25);
}
.btn-primary:hover {
  background: var(--color-primary);
  box-shadow: 0 4px 16px rgba(74, 222, 104, 0.35);
  transform: translateY(-1px);
}
.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn-secondary:hover {
  background: var(--color-surface);
  border-color: var(--color-green-light);
  color: var(--color-green-light);
}
.btn-full { width: 100%; }

/* ---------- HEADER ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

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

/* Logo */
.logo-link {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  color: var(--color-text);
}
.logo-img {
  height: 448px;
  width: auto;
  object-fit: contain;
}

/* Nav */
.nav-list {
  display: flex;
  list-style: none;
  gap: var(--space-lg);
}
.nav-list a {
  text-decoration: none;
  color: var(--color-text);
  font-size: 0.9rem;
  font-weight: var(--font-weight-medium);
  transition: color var(--transition);
}
.nav-list a:hover { color: var(--color-green-light); }

/* Nav toggle (mobile) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  position: relative;
}
.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-green-light);
  border-radius: 2px;
  transition: var(--transition);
}
.hamburger { position: relative; }
.hamburger::before, .hamburger::after {
  content: "";
  position: absolute;
  left: 0;
}
.hamburger::before { top: -7px; }
.hamburger::after  { top: 7px; }

/* Cart toggle */
.cart-toggle {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text);
  padding: var(--space-xs);
}
.cart-count {
  position: absolute;
  top: -2px;
  right: -4px;
  background: var(--color-green-light);
  color: #000;
  font-size: 0.7rem;
  font-weight: var(--font-weight-bold);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
}
.cart-count[data-visible="true"] { opacity: 1; }

/* ---------- HERO ---------- */
.hero {
  padding: var(--space-2xl) 0;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.hero-eyebrow {
  font-size: 0.85rem;
  font-weight: var(--font-weight-medium);
  color: var(--color-green-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: var(--font-weight-bold);
  line-height: 1.15;
  color: var(--color-text);
  margin-bottom: var(--space-md);
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  max-width: 520px;
  margin-bottom: var(--space-xl);
  line-height: 1.7;
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-img {
  width: 100%;
  max-width: 460px;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(74, 222, 104, 0.15);
  transition: transform 400ms ease, box-shadow 400ms ease;
}
.hero-img:hover {
  transform: scale(1.03);
  box-shadow: 0 12px 40px rgba(74, 222, 104, 0.25);
}

/* ---------- SECTIONS ---------- */
.section {
  padding: var(--space-2xl) 0;
}

.section--how { background: var(--color-surface); }
.section--products { background: var(--color-bg); }
.section--about { background: var(--color-surface); }

/* Section divider accent */
.section--how::before,
.section--about::before {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: var(--color-green-light);
  border-radius: 2px;
  margin: 0 auto var(--space-xl);
}

.section-title {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: var(--font-weight-bold);
  text-align: center;
  margin-bottom: var(--space-sm);
}

.section-intro {
  text-align: center;
  color: var(--color-text-muted);
  margin-bottom: var(--space-xl);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- STEPS (How it works) ---------- */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  max-width: 720px;
  margin: 0 auto;
}

.step {
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
}

.step-number {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-green-dark);
  color: var(--color-green-light);
  font-weight: var(--font-weight-bold);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-content h3 {
  font-size: 1.05rem;
  font-weight: var(--font-weight-medium);
  margin-bottom: var(--space-xs);
}
.step-content p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* ---------- PRODUCTS ---------- */
.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  max-width: 800px;
  margin: 0 auto;
}

.product-card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 280ms ease, box-shadow 280ms ease;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(74, 222, 104, 0.1);
}

.product-card--bundle {
  border-color: var(--color-green-light);
  border-width: 2px;
}

.product-badge {
  position: absolute;
  top: var(--space-md);
  left: var(--space-md);
  background: var(--color-green-light);
  color: #000;
  font-size: 0.78rem;
  font-weight: var(--font-weight-medium);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  z-index: 1;
}

.product-image {
  background: var(--color-surface);
  overflow: hidden;
}

.product-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 0;
  transition: transform 400ms ease;
}

.product-card:hover .product-img {
  transform: scale(1.05);
}

.product-info {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  flex: 1;
}

.product-info h3 {
  font-size: 1.15rem;
  font-weight: var(--font-weight-medium);
}

.product-price {
  font-size: 1.6rem;
  font-weight: var(--font-weight-bold);
  color: var(--color-green-light);
}

.product-price-save {
  font-size: 0.82rem;
  font-weight: var(--font-weight-medium);
  color: var(--color-text-muted);
  margin-left: var(--space-xs);
}

.product-desc {
  font-size: 0.92rem;
  color: var(--color-text-muted);
  flex: 1;
}

/* ---------- ABOUT ---------- */
.about-content {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
.about-content p {
  color: var(--color-text-muted);
  line-height: 1.75;
}

/* ---------- FOOTER ---------- */
.site-footer {
  background: var(--color-text);
  color: #CCC;
  padding-top: var(--space-2xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  padding-bottom: var(--space-xl);
}

.footer-col h3 {
  color: var(--color-green-light);
  font-size: 0.95rem;
  font-weight: var(--font-weight-medium);
  margin-bottom: var(--space-sm);
}

.footer-tagline {
  font-size: 0.88rem;
  line-height: 1.6;
}

.footer-col address {
  font-style: normal;
  font-size: 0.88rem;
  line-height: 1.8;
}
.footer-col address a {
  color: var(--color-green-light);
}

/* Impressum */
.footer-legal {
  padding-top: var(--space-lg);
  padding-bottom: var(--space-xl);
}
.footer-legal hr {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.15);
  margin-bottom: var(--space-lg);
}
.footer-legal-title {
  font-size: 0.95rem;
  font-weight: var(--font-weight-medium);
  color: var(--color-green-light);
  margin-bottom: var(--space-md);
}
.impressum-text {
  font-size: 0.82rem;
  line-height: 1.7;
  max-width: 640px;
}
.impressum-text p { margin-bottom: var(--space-md); }
.impressum-text a { color: var(--color-green-light); }

.footer-copy {
  margin-top: var(--space-lg);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
}

/* ---------- CART DRAWER ---------- */
.cart-drawer[aria-hidden="false"] {
  visibility: visible;
}
.cart-drawer[aria-hidden="true"] {
  visibility: hidden;
  pointer-events: none;
}
.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  visibility: hidden;
}
.cart-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  transition: opacity 200ms;
}
.cart-drawer[aria-hidden="false"] .cart-overlay { opacity: 1; }
.cart-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(400px, 90vw);
  height: 100%;
  background: var(--color-surface);
  box-shadow: -4px 0 24px rgba(0,0,0,0.12);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 280ms cubic-bezier(0.4, 0, 0.2, 1);
}
.cart-drawer[aria-hidden="false"] .cart-panel {
  transform: translateX(0);
  pointer-events: auto;
}
.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--color-border);
}
.cart-header h2 {
  font-size: 1.1rem;
  font-weight: var(--font-weight-medium);
}
.cart-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text);
  padding: var(--space-xs);
}
.cart-body {
  flex: 1;
  padding: var(--space-lg);
  overflow-y: auto;
}
.cart-empty {
  color: var(--color-text-muted);
  text-align: center;
  padding: var(--space-xl) 0;
}
.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--color-border);
}
.cart-item-name { font-weight: var(--font-weight-medium); font-size: 0.95rem; }
.cart-item-price { color: var(--color-primary); font-weight: var(--font-weight-bold); }
.cart-item-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  text-decoration: underline;
  padding: 0;
}
.cart-item-remove:hover { color: var(--color-green-light); }
.cart-footer {
  padding: var(--space-lg);
  border-top: 1px solid var(--color-border);
}
.cart-total {
  display: flex;
  justify-content: space-between;
  font-weight: var(--font-weight-bold);
  font-size: 1.1rem;
  margin-bottom: var(--space-md);
}

/* ---------- RESPONSIVE ---------- */

/* Tablet and up */
@media (min-width: 640px) {
  .product-grid {
    grid-template-columns: 1fr 1fr;
  }
  .product-card { flex-direction: column; }
}

@media (min-width: 768px) {
  .hero-inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
  }
  .hero-img {
    max-width: 500px;
  }
  .footer-grid {
    grid-template-columns: 1.2fr 1fr 1fr;
  }
}

/* Desktop: hide hamburger, show nav */
@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .nav-list {
    display: flex !important;
  }
}

/* Mobile: collapse nav */
@media (max-width: 899px) {
  .nav-toggle { display: block; }
  .nav-list {
    display: none;
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-md) var(--space-lg);
    gap: var(--space-sm);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  }
  .nav-list[data-open="true"] {
    display: flex;
  }
}

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- PRINT ---------- */
@media print {
  .site-header, .cart-drawer, .cart-toggle { display: none; }
  body { background: #fff; color: #000; }
}
