/* ============================================================
   Koopware — koopmans.co.za
   Premium dark theme
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-deepest: #06060f;
  --bg-base: #0a0a1a;
  --bg-surface: #0f0f23;
  --bg-elevated: #1a1a2e;
  --border-subtle: rgba(255,255,255,0.06);
  --border-glow: rgba(255,255,255,0.1);
  --text-muted: #6b7280;
  --text-body: #c9cdd4;
  --text-heading: #f0f0f5;
  --text-white: #ffffff;
  --accent-primary: #FF9800;
  --accent-deep: #E65100;
  --accent-glow: rgba(255,152,0,0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --transition-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: var(--font-sans);
  background: var(--bg-deepest);
  color: var(--text-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

::selection { background: rgba(255,152,0,0.2); color: #fff; }

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

/* --- Ambient Background --- */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.5;
  animation: drift 25s ease-in-out infinite alternate;
}

.glow-orb--1 {
  width: 500px;
  height: 500px;
  top: -10%;
  right: -5%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  animation-delay: 0s;
}

.glow-orb--2 {
  width: 400px;
  height: 400px;
  bottom: 10%;
  left: -8%;
  background: radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 70%);
  animation-delay: -8s;
}

.glow-orb--3 {
  width: 350px;
  height: 350px;
  top: 40%;
  right: 20%;
  background: radial-gradient(circle, rgba(168,85,247,0.06) 0%, transparent 70%);
  animation-delay: -15s;
}

@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  25%  { transform: translate(60px, -40px) scale(1.05); }
  50%  { transform: translate(-40px, 30px) scale(0.95); }
  75%  { transform: translate(30px, 50px) scale(1.08); }
  100% { transform: translate(-50px, -20px) scale(1); }
}

@media (max-width: 768px) {
  .glow-orb--2, .glow-orb--3 { display: none; }
  .glow-orb--1 { width: 300px; height: 300px; }
}

/* --- Noise Overlay --- */
.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* --- Layout --- */
.page-wrapper {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container--wide { max-width: 1080px; }

/* --- Navigation / Header --- */
.site-header {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(6,6,15,0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: var(--text-heading);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  transition: opacity 0.3s ease;
}

.site-logo:hover { opacity: 0.8; }

.site-logo__icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent-deep), var(--accent-primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  color: white;
  font-weight: 800;
}

.header-nav {
  display: flex;
  gap: 1.5rem;
}

.header-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.header-nav a:hover { color: var(--text-heading); }

/* --- Hero --- */
.hero {
  padding: 8rem 0 4rem;
  text-align: center;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero .container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--accent-primary);
  background: var(--accent-glow);
  border: 1px solid rgba(255,152,0,0.15);
  border-radius: 100px;
  padding: 0.4rem 1.25rem;
  margin-bottom: 2rem;
}

.hero__title {
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--text-heading);
  margin-bottom: 1.5rem;
  max-width: 600px;
}

.hero__title span {
  background: linear-gradient(135deg, var(--accent-primary), #FFB74D, var(--accent-deep));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 6s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

.hero__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text-muted);
  max-width: 440px;
  margin: 0 auto 3rem;
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-md);
  padding: 0.875rem 2rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent-deep), var(--accent-primary));
  color: #fff;
  border: none;
  box-shadow: 0 4px 20px rgba(255,152,0,0.25);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255,152,0,0.35);
}

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

.btn--ghost:hover {
  border-color: rgba(255,255,255,0.2);
  color: var(--text-heading);
  transform: translateY(-2px);
}

.btn:active { transform: scale(0.97); }

/* --- Divider --- */
.divider-line {
  width: 60px;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255,152,0,0.3), transparent);
  margin: 0 auto;
}

/* --- Sections --- */
.section {
  padding: 5rem 0;
}

.section__header {
  text-align: center;
  margin-bottom: 3rem;
}

.section__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-heading);
  margin-bottom: 0.75rem;
}

.section__subtitle {
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

/* --- Pillars --- */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.pillar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  transition: transform 0.4s var(--transition-smooth),
              border-color 0.3s ease;
}

.pillar-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-glow);
}

.pillar-card__icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.pillar-card__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 0.625rem;
}

.pillar-card__desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* --- Contact --- */
.contact-section {
  padding: 3rem 0 5rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 480px;
}

.contact-form input,
.contact-form textarea {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.875rem 1rem;
  color: var(--text-heading);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--text-muted);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.contact-form textarea {
  min-height: 120px;
  resize: vertical;
}

.contact-form button {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--accent-deep), var(--accent-primary));
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.875rem 2rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 15px rgba(255,152,0,0.2);
  align-self: flex-start;
}

.contact-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255,152,0,0.3);
}

.contact-form button:active { transform: scale(0.97); }

/* --- Footer --- */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  padding: 2.5rem 0;
  text-align: center;
}

.site-footer__brand {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 0.375rem;
}

.site-footer__location {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.site-footer__contact {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.site-footer__contact a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer__contact a:hover { color: var(--accent-primary); }

.site-footer__links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
}

.site-footer__links a {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer__links a:hover { color: var(--accent-primary); }

.site-footer__copy {
  font-size: 0.75rem;
  color: rgba(107,114,128,0.6);
  margin-top: 1.5rem;
}

/* --- Scroll Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--transition-smooth),
              transform 0.7s var(--transition-smooth);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 80ms; }
.reveal-delay-2 { transition-delay: 160ms; }
.reveal-delay-3 { transition-delay: 240ms; }
.reveal-delay-4 { transition-delay: 320ms; }

/* --- Privacy Policy Page Styles --- */
.policy-header {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border-subtle);
}

.policy-header__back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  transition: color 0.2s ease;
}

.policy-header__back:hover { color: var(--text-heading); }

.policy-header__title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-heading);
  margin-bottom: 0.5rem;
}

.policy-header__app {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  color: var(--policy-accent, var(--accent-primary));
  font-weight: 500;
}

.policy-header__date {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.policy-content {
  padding: 2.5rem 0 4rem;
}

.policy-content h2 {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: -0.01em;
  margin: 2.5rem 0 1rem;
  padding-top: 1rem;
}

.policy-content h2:first-child {
  margin-top: 0;
  padding-top: 0;
}

.policy-content h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-heading);
  margin: 1.75rem 0 0.75rem;
}

.policy-content p {
  margin-bottom: 1rem;
  color: var(--text-body);
}

.policy-content ul, .policy-content ol {
  margin: 0.75rem 0 1.25rem 1.5rem;
  color: var(--text-body);
}

.policy-content li {
  margin-bottom: 0.5rem;
  padding-left: 0.25rem;
}

.policy-content li::marker {
  color: var(--policy-accent, var(--accent-primary));
}

.policy-content strong {
  color: var(--text-heading);
  font-weight: 600;
}

.policy-content a {
  color: var(--policy-accent, var(--accent-primary));
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.policy-content a:hover {
  border-bottom-color: var(--policy-accent, var(--accent-primary));
}

.policy-content .highlight-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--policy-accent, var(--accent-primary));
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.policy-content .highlight-box p {
  margin-bottom: 0;
  font-size: 0.9375rem;
}

/* Per-policy accent overrides */
.policy--calculator { --policy-accent: #FF9800; }
.policy--tally { --policy-accent: #42A5F5; }
.policy--qr { --policy-accent: #1E88E5; }
.policy--flashlight { --policy-accent: #FFB300; }
.policy--compass { --policy-accent: #43A047; }

/* --- Responsive --- */
@media (max-width: 640px) {
  .hero { padding: 5rem 0 3rem; min-height: 70vh; }
  .header-nav { gap: 1rem; }
  .container { padding: 0 1.25rem; }
  .pillars-grid { grid-template-columns: 1fr; }
}
