/* NutCase Website - Apple/Stripe-inspired design */
/* Halo effect • Gradient mesh • Premium first impression */

:root {
  --color-accent: #CC9933;
  --color-accent-hover: #B8862B;
  --color-brown: #4A3728;
  --color-brown-light: #6B5344;
  --color-brown-warm: #C29973;
  --color-cream: #FAF7F2;
  --color-cream-dark: #F0EBDC;
  --color-sage: #5C6B52;
  --color-sage-light: #7A8A6E;
  --color-text: #1d1d1f;
  --color-text-muted: #6e6e73;
  --color-white: #FFFFFF;
  --color-success: #4A7C59;
  --color-icon-bg: #6B5344;
  --halo-gold: rgba(204, 153, 51, 0.25);
  --halo-amber: rgba(212, 175, 55, 0.2);
  --halo-warm: rgba(160, 124, 23, 0.15);
  --shadow-soft: 0 4px 24px rgba(0, 0, 0, 0.06);
  --shadow-card: 0 8px 40px rgba(0, 0, 0, 0.08);
  --shadow-hero: 0 40px 80px rgba(0, 0, 0, 0.12);
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --font-heading: 'DM Serif Display', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.1;
}

h1 {
  font-size: clamp(3rem, 8vw, 5.5rem);
  color: var(--color-text);
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  color: var(--color-text);
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.35rem;
  color: var(--color-brown-light);
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
  color: var(--color-text-muted);
}

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

a:hover {
  color: var(--color-accent-hover);
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header - minimal, Apple-style */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(250, 247, 242, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  padding: 16px 0;
  transition: background var(--transition);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  color: var(--color-text);
}

.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: contain;
  display: block;
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  opacity: 0.9;
}

.nav-links a:hover {
  opacity: 1;
  color: var(--color-accent);
}

/* Hamburger toggle - hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 8px;
  transition: background var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle:hover {
  background: rgba(0, 0, 0, 0.04);
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
  transition: transform var(--transition), opacity var(--transition);
}

/* Mobile nav overlay (injected by JS) */
.nav-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.nav-menu-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

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

/* Gradient mesh halos - Stripe/Apple style */
.hero-halo {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
  pointer-events: none;
  animation: haloFloat 20s ease-in-out infinite;
}

.hero-halo--1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--halo-gold) 0%, transparent 70%);
  top: -200px;
  left: -100px;
  animation-delay: 0s;
}

.hero-halo--2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--halo-amber) 0%, transparent 70%);
  top: 20%;
  right: -150px;
  animation-delay: -5s;
}

.hero-halo--3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--halo-warm) 0%, transparent 70%);
  bottom: 10%;
  left: -100px;
  animation-delay: -10s;
}

.hero-halo--4 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(204, 153, 51, 0.15) 0%, transparent 70%);
  bottom: -100px;
  right: 10%;
  animation-delay: -15s;
}

@keyframes haloFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 30px) scale(0.98); }
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-title {
  margin-bottom: 20px;
  animation: fadeUp 0.8s var(--ease-out) forwards;
}

.hero-tagline {
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.5;
  font-weight: 400;
  animation: fadeUp 0.8s var(--ease-out) 0.1s both;
}

.hero-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 20px;
  animation: fadeUp 0.8s var(--ease-out) forwards;
}

.hero-heading .hero-title {
  margin-bottom: 0;
}

.cta-download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.cta-qr-wrap {
  display: inline-block;
  padding: 8px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
}

.cta-qr {
  display: block;
  width: 100px;
  height: 100px;
  object-fit: contain;
}

.app-store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  background: var(--color-brown);
  color: white;
  border-radius: 980px;
  font-weight: 600;
  font-size: 1rem;
  transition: background var(--transition), transform var(--transition);
  animation: fadeUp 0.8s var(--ease-out) 0.2s both;
}

.app-store-badge:hover {
  background: var(--color-brown-light);
  transform: scale(1.02);
}

.app-store-badge--light {
  background: white;
  color: var(--color-brown);
}

.app-store-badge--light:hover {
  background: rgba(255, 255, 255, 0.9);
}

.app-store-badge svg {
  width: 24px;
  height: 24px;
}

/* Hero device mockup - floating phone with halo */
.hero-device {
  position: relative;
  margin: 64px auto 48px;
  animation: fadeUp 1s var(--ease-out) 0.3s both;
}

.hero-device-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 320px;
  height: 600px;
  background: radial-gradient(ellipse at center, var(--halo-gold) 0%, transparent 70%);
  filter: blur(60px);
  opacity: 0.5;
  pointer-events: none;
}

.hero-device-frame {
  position: relative;
  width: 280px;
  margin: 0 auto;
  background: #1d1d1f;
  border-radius: 44px;
  padding: 12px;
  box-shadow: var(--shadow-hero),
    0 0 0 1px rgba(0, 0, 0, 0.1),
    inset 0 0 0 2px rgba(255, 255, 255, 0.05);
}

.hero-device-screen {
  background: var(--color-cream);
  border-radius: 34px;
  overflow: hidden;
  aspect-ratio: 9 / 19.5;
  min-height: 520px;
}

.screenshot-placeholder {
  width: 100%;
  height: 100%;
  min-height: 400px;
  background: linear-gradient(180deg, #FAF7F2 0%, #F0EBDC 50%, #E8E0D5 100%);
}

.screenshot-placeholder--hero {
  min-height: 520px;
  background: linear-gradient(180deg, #FAF7F2 0%, #F0EBDC 30%, #E8E0D5 70%, #F0EBDC 100%);
}

.screenshot-placeholder--accent {
  background: linear-gradient(180deg, #FAF7F2 0%, #E8E0D5 30%, rgba(204, 153, 51, 0.1) 15%, #E8E0D5 70%, #FAF7F2 100%);
}

/* Real screenshots: replace placeholder div with img using these classes */
.hero-device-screen img,
.showcase-device-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Trust bar */
.trust-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: center;
  padding-top: 48px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  margin-top: 48px;
  animation: fadeUp 0.8s var(--ease-out) 0.5s both;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.trust-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--color-icon-bg);
  border-radius: 12px;
  flex-shrink: 0;
}

.trust-icon svg {
  width: 22px;
  height: 22px;
  color: white;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* SEO / content — why track nuts */
.why-track {
  padding: 100px 0 80px;
  background: var(--color-white);
}

.why-track-headline {
  text-align: center;
  margin-bottom: 24px;
}

.why-track-lead {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.125rem;
  color: var(--color-text-muted);
  text-align: center;
  line-height: 1.65;
}

.why-track-lead strong {
  color: var(--color-text);
  font-weight: 600;
}

/* Showcase - Apple-style product grid */
.showcase {
  padding: 120px 0 140px;
  background: var(--color-white);
}

.showcase-headline {
  text-align: center;
  margin-bottom: 16px;
}

.showcase-subtitle {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 1.25rem;
  max-width: 480px;
  margin: 0 auto 64px;
}

.showcase-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 32px;
  align-items: end;
  max-width: 1000px;
  margin: 0 auto;
}

.showcase-device {
  text-align: center;
  transition: transform var(--transition);
}

.showcase-device:hover {
  transform: translateY(-8px);
}

.showcase-device--primary {
  position: relative;
}

.showcase-device-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 240px;
  height: 420px;
  background: radial-gradient(ellipse at center, var(--halo-amber) 0%, transparent 70%);
  filter: blur(50px);
  opacity: 0.6;
  pointer-events: none;
}

.showcase-device-frame {
  position: relative;
  width: 220px;
  margin: 0 auto 20px;
  background: #1d1d1f;
  border-radius: 36px;
  padding: 10px;
  box-shadow: var(--shadow-card),
    0 0 0 1px rgba(0, 0, 0, 0.08);
}

.showcase-device--primary .showcase-device-frame {
  width: 260px;
  padding: 12px;
  border-radius: 40px;
  box-shadow: var(--shadow-hero),
    0 0 0 1px rgba(0, 0, 0, 0.1);
}

.showcase-device-screen {
  background: var(--color-cream);
  border-radius: 28px;
  overflow: hidden;
  aspect-ratio: 9 / 19.5;
  min-height: 380px;
}

.showcase-device--primary .showcase-device-screen {
  border-radius: 30px;
  min-height: 440px;
}

.showcase-caption {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* Features */
.features {
  padding: 120px 0;
  background: var(--color-cream);
}

.features-headline {
  text-align: center;
  margin-bottom: 16px;
}

.features-subtitle {
  text-align: center;
  color: var(--color-text-muted);
  max-width: 560px;
  margin: 0 auto 56px;
  font-size: 1.125rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--color-white);
  padding: 36px 28px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  transition: box-shadow var(--transition), transform var(--transition);
}

.feature-card:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-6px);
}

.feature-icon {
  width: 52px;
  height: 52px;
  background: var(--color-icon-bg);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.feature-icon svg {
  width: 26px;
  height: 26px;
  color: white;
}

.feature-card h3 {
  margin-bottom: 12px;
}

.feature-card p {
  margin-bottom: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* CTA with halo */
.cta-section {
  padding: 120px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-halo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 400px;
  background: radial-gradient(ellipse at center, var(--halo-gold) 0%, transparent 70%);
  filter: blur(80px);
  opacity: 0.4;
  pointer-events: none;
}

.cta-box {
  position: relative;
  background: linear-gradient(135deg, var(--color-brown) 0%, var(--color-brown-light) 100%);
  color: white;
  padding: 80px 64px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}

.cta-box h2 {
  color: white;
  margin-bottom: 20px;
  font-size: clamp(2rem, 4vw, 3rem);
}

.cta-box p {
  color: rgba(255, 255, 255, 0.9);
  max-width: 480px;
  margin: 0 auto 36px;
  font-size: 1.125rem;
}

/* Footer */
.site-footer {
  background: var(--color-brown);
  color: rgba(255, 255, 255, 0.85);
  padding: 56px 0 28px;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  justify-content: space-between;
  margin-bottom: 36px;
}

.footer-brand .logo {
  color: white;
  margin-bottom: 12px;
}

.footer-brand .logo-icon {
  filter: brightness(0) saturate(100%) invert(0.96) sepia(0.12) saturate(2) hue-rotate(350deg);
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
}

.footer-links h4 {
  color: white;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 16px;
}

.footer-links ul {
  list-style: none;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.6);
}

.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.footer-bottom-inner .spacer {
  flex: 1;
  min-width: 1rem;
}

/* Legal pages */
.legal-page {
  padding: 140px 0 96px;
}

.legal-page h1 {
  margin-bottom: 8px;
}

.legal-page .updated {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 40px;
}

.legal-page h2 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.15rem;
  margin-top: 32px;
  margin-bottom: 12px;
}

.legal-page p {
  font-size: 1rem;
}

/* Support page */
.support-page {
  padding: 140px 0 96px;
}

.support-card {
  background: var(--color-white);
  padding: 40px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  margin-bottom: 32px;
  max-width: 640px;
}

.support-card h2 {
  font-size: 1.35rem;
  margin-bottom: 16px;
}

.support-card p:last-child {
  margin-bottom: 0;
}

/* Mobile */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .showcase-grid {
    gap: 24px;
  }
}

@media (max-width: 768px) {
  /* Hamburger visible, desktop nav hidden */
  .nav-toggle {
    display: flex;
    margin-left: auto;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(320px, 85vw);
    height: 100vh;
    height: 100dvh;
    background: var(--color-cream);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
    z-index: 1001;
    padding: 0 32px;
    transform: translateX(100%);
    transition: transform var(--transition);
    display: flex;
    flex-direction: column;
  }

  .nav-menu.is-open {
    transform: translateX(0);
  }

  .nav-menu .nav-links {
    flex-direction: column;
    gap: 0;
    align-items: stretch;
    justify-content: flex-start;
  }

  .nav-menu .nav-links li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  }

  .nav-menu .nav-links li:last-child {
    border-bottom: none;
  }

  .nav-menu .nav-links a {
    display: block;
    padding: 20px 0;
    font-size: 1.125rem;
    width: 100%;
  }

  /* Hamburger to X when open */
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .nav-links {
    gap: 24px;
  }
  
  .hero {
    min-height: auto;
    padding: 120px 0 64px;
  }
  
  .hero-device-frame {
    width: 260px;
  }
  
  .hero-device-screen {
    min-height: 460px;
  }
  
  .trust-bar {
    flex-direction: column;
    align-items: center;
    gap: 24px;
    margin-top: 40px;
    padding-top: 40px;
  }
  
  .showcase-grid {
    grid-template-columns: 1fr;
    gap: 48px;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .showcase-device--primary {
    order: -1;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .site-footer .container {
    flex-direction: column;
  }
  
  .cta-box {
    padding: 48px 32px;
  }
  
  .hero-heading {
    flex-direction: column;
    gap: 16px;
  }
  
  .hero-app-icon {
    width: 64px !important;
    height: 64px !important;
  }
  
  .cta-qr {
    width: 80px !important;
    height: 80px !important;
  }
}

/* Cookie consent banner (EU compliance) */
.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-brown);
  color: rgba(255, 255, 255, 0.9);
  padding: 20px 24px;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  transition: transform 0.3s ease;
}

.cookie-consent--hidden {
  transform: translateY(100%);
  pointer-events: none;
}

.cookie-consent-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  justify-content: space-between;
}

.cookie-consent p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
  flex: 1;
  min-width: 200px;
}

.cookie-consent a {
  color: var(--color-cream);
  text-decoration: underline;
}

.cookie-consent a:hover {
  color: white;
}

.cookie-consent-buttons {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.cookie-consent-accept,
.cookie-consent-decline {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.2s;
}

.cookie-consent-accept {
  background: var(--color-cream);
  color: var(--color-brown);
}

.cookie-consent-accept:hover {
  background: rgba(255, 255, 255, 0.95);
}

.cookie-consent-decline {
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.cookie-consent-decline:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}
