/* Wiesefy — Swiss-inspired minimal system */
:root {
  --primary-50: #eff6ff;
  /* New Wiesefy palette */
  --primary-500: #1375a6; /* teal-blue */
  --primary-600: #003399; /* deep blue */
  --primary-700: #333399; /* indigo */
  --primary-900: #0b1b42; /* navy */

  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
}

html, body { height: 100%; }
html.light {
  --bg: var(--gray-50);
  --surface: #ffffff;
  --text: var(--gray-900);
  --muted: var(--gray-600);
  --border: var(--gray-200);
  --ring: var(--primary-600);
  --shadow: 0 1px 2px rgba(0,0,0,0.05);
}
html.dark {
  --bg: var(--gray-900);
  --surface: var(--gray-800);
  --text: #ffffff;
  --muted: #9ca3af;
  --border: var(--gray-700);
  --ring: var(--primary-500);
  --shadow: 0 1px 2px rgba(0,0,0,0.35);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* Header */
.site-header {
  position: sticky;
  top: 12px;
  z-index: 50;
  background: transparent;
}
.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  height: 72px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.08);
}

/* Ensure menu aligns with new floating header height */
.menu { top: 84px; }

/* Dark/light backgrounds are driven by --surface already. Ensure contrast */
html.light .header-inner { background: #ffffff; }
html.dark .header-inner { background: var(--gray-800); }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  position: relative;
  padding: 6px 12px;
  border-radius: 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: linear-gradient(135deg, 
    color-mix(in srgb, var(--primary-600) 8%, transparent),
    color-mix(in srgb, var(--primary-700) 12%, transparent)
  );
  backdrop-filter: blur(10px);
  border: 1px solid color-mix(in srgb, var(--primary-600) 20%, transparent);
}
.brand:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 25px color-mix(in srgb, var(--primary-600) 15%, transparent);
  background: linear-gradient(135deg, 
    color-mix(in srgb, var(--primary-600) 12%, transparent),
    color-mix(in srgb, var(--primary-700) 18%, transparent)
  );
}
.brand-container { display: inline-flex; align-items: center; gap: 10px; }
.brand-logo { 
  height: 32px; 
  width: auto; 
  display: inline-block;
  filter: drop-shadow(0 2px 4px color-mix(in srgb, var(--primary-600) 20%, transparent));
  transition: all 0.3s ease;
}
.brand:hover .brand-logo {
  transform: none; /* disable scale */
  filter: drop-shadow(0 4px 8px color-mix(in srgb, var(--primary-600) 30%, transparent));
}
.brand-text {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.5px;
  color: var(--primary-600);
  position: relative;
  transition: all 0.3s ease;
}
.brand-text::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}
.brand:hover .brand-text::before {
  opacity: 0.1;
}
html.dark .brand-text {
  color: white;
}
html.dark .brand {
  background: linear-gradient(135deg, 
    color-mix(in srgb, white 8%, transparent),
    color-mix(in srgb, white 12%, transparent)
  );
  border: 1px solid color-mix(in srgb, white 20%, transparent);
}
html.dark .brand:hover {
  background: linear-gradient(135deg, 
    color-mix(in srgb, white 12%, transparent),
    color-mix(in srgb, white 18%, transparent)
  );
}

.nav { display: flex; gap: 20px; }
.nav-group { position: relative; }
.nav-group:hover .nav-submenu { display: block; }
.nav-submenu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 8px;
  min-width: 180px;
  z-index: 55;
}
.nav-submenu a { display: block; color: var(--text); text-decoration: none; padding: 8px 10px; border-radius: 8px; }
.nav-submenu a:hover { background: color-mix(in srgb, var(--primary-50) 60%, transparent); }
.nav-link {
  position: relative;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  padding: 8px 2px;
}
.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--text); }
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -13px;
  height: 2px;
  background: var(--primary-600);
}

.header-actions { display: flex; align-items: center; gap: 8px; }

/* Layout: show hamburger on the left on small screens */
@media (max-width: 768px) {
  .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .mobile-menu-toggle { order: 0; }
  .brand { order: 1; }
  .header-actions { order: 2; }
  .nav { display: none; }
}

/* Theme switcher */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  border-radius: 8px;
  box-shadow: var(--shadow);
  cursor: pointer;
}
.icon-btn:hover { color: var(--text); }
.icon { display: inline-flex; align-items: center; }

.menu {
  position: fixed; /* allow viewport clamping */
  right: 24px;
  top: 68px;
  width: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0,0,0,.15);
  padding: 8px;
  max-width: calc(100vw - 16px);
  max-height: min(60vh, 360px);
  overflow: auto;
  z-index: 60;
}
.menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: transparent;
  border: 0;
  color: var(--text);
  border-radius: 8px;
  cursor: pointer;
}
.menu-item:hover { background: color-mix(in srgb, var(--primary-50) 60%, transparent); }
html.dark .menu-item:hover { background: color-mix(in srgb, var(--primary-900) 30%, transparent); }
.menu-item .label { font-weight: 500; }

/* Sections */
.hero { padding: 72px 0 40px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}
.display {
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.lede {
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 28px;
}
.actions { display: flex; gap: 12px; align-items: center; }
.btn { 
  display: inline-flex; align-items: center; justify-content: center; 
  height: 44px; padding: 0 18px; border-radius: 10px; 
  font-weight: 600; text-decoration: none; cursor: pointer; border: 1px solid transparent;
}
.btn-primary {
  color: #fff;
  background: var(--primary-600);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--primary-600) 25%, transparent);
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-ghost { color: var(--text); border-color: var(--border); background: var(--surface); }
.btn-ghost:hover { border-color: color-mix(in srgb, var(--text) 20%, var(--border)); }

/* Respect reduced motion: limit transitions */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Shine hover effect for CTA */
.btn-shine { position: relative; overflow: hidden; }
.btn-shine::before {
  content: '';
  position: absolute;
  top: -2px; left: -2px; right: -2px; bottom: -2px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
  pointer-events: none;
}
.btn-shine:hover::before { transform: translateX(100%); }

/* Spacing for Custom Offer CTA contents */
.custom-offer-btn { gap: 8px; }

/* Animated border in same direction as shine */
.shine-border { position: relative; }
.shine-border::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.9), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
  pointer-events: none;
  /* Only show the border ring using mask */
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  padding: 2px; /* border thickness */
}
.shine-border:hover::after { transform: translateX(100%); }

/* Modernized form fields */
.form-field { position: relative; }
.form-field .input, .form-field .textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  outline: none;
}
.form-field .input { height: 44px; padding: 0 12px; }
.form-field .textarea { padding: 10px 12px; min-height: 120px; }
.form-field:focus-within .input, .form-field:focus-within .textarea {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 20%, transparent);
}

.hero-visual { width: 100%; height: 100%; }
.poster {
  position: relative; 
  background: var(--surface); 
  border: 1px solid var(--border); 
  border-radius: 16px; 
  min-height: 260px; 
  box-shadow: var(--shadow);
}
.poster-accent {
  position: absolute; inset: 0; pointer-events: none; border-radius: 16px;
  background: linear-gradient(120deg, color-mix(in srgb, var(--primary-600) 10%, transparent), transparent 60%);
}
.poster-body { padding: 20px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.stat { display: grid; gap: 4px; }
.stat-kpi { font-weight: 800; font-size: 28px; letter-spacing: -0.02em; }
.stat-label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }

.features { padding: 40px 0 72px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 20px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 10px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); }
.footer-inner { height: 72px; display: flex; align-items: center; justify-content: space-between; }
.foot-note { color: var(--muted); }
.foot-nav { display: flex; gap: 16px; }
.foot-nav a { color: var(--muted); text-decoration: none; }
.foot-nav a:hover { color: var(--text); }

/* Utilities */
.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; }

/* Back to top */
.back-to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  z-index: 70;
}
.back-to-top.show { display: inline-flex; }

/* Forms */
.input, .textarea {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}
.textarea { height: auto; padding: 10px 12px; }

.alert {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 0 0 16px;
  background: color-mix(in srgb, var(--primary-50) 40%, transparent);
}
.alert-success { border-color: color-mix(in srgb, var(--primary-600) 30%, var(--border)); }
.alert-error { border-color: #e11d48; background: color-mix(in srgb, #e11d48 10%, transparent); }

/* Page templates */
.page-header { padding: 72px 0 24px; border-bottom: 1px solid var(--border); }
.page-title { margin: 0; font-size: clamp(28px, 4vw, 48px); letter-spacing: -0.02em; }
.page-lede { margin: 8px 0 0; color: var(--muted); max-width: 58ch; }
.page-section { padding: 40px 0; }

/* Legal page */
.legal-toc { display: flex; gap: 10px; flex-wrap: wrap; }
.legal-toc a {
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  background: var(--surface);
}
.legal-toc a:hover { border-color: var(--ring); }

.legal-prose { max-width: 70ch; }
.legal-prose h2 { margin: 0 0 8px; font-size: 22px; }
.legal-prose p { margin: 0; line-height: 1.7; color: var(--muted); }

/* Mobile menu styles */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
  gap: 4px;
  box-shadow: var(--shadow);
}

.hamburger-line {
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: color-mix(in srgb, var(--bg) 95%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  z-index: 40;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-nav-overlay[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

.mobile-nav {
  position: absolute;
  top: 84px; /* match header height + offset */
  left: 0;
  right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

.mobile-nav-group { display: block; }
.mobile-nav-submenu { display: grid; gap: 8px; padding-left: 12px; margin: 8px 0 0; }
.mobile-nav-sublink { color: var(--muted); text-decoration: none; }
.mobile-nav-sublink:hover { color: var(--text); }

.mobile-nav-overlay[aria-hidden="false"] .mobile-nav {
  transform: translateY(0);
}

.mobile-nav-link {
  display: block;
  padding: 12px 0;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s ease;
  position: relative;
}

.mobile-nav-link:hover {
  color: var(--text);
}

.mobile-nav-link.active {
  color: var(--text);
  font-weight: 600;
}

.mobile-nav-link.active::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 20px;
  background: var(--primary-600);
  border-radius: 2px;
}

.mobile-nav-link:last-child {
  border-bottom: none;
}

/* Responsiveness */
@media (min-width: 961px) {
  .hero-grid { grid-template-columns: 1.05fr .95fr; gap: 48px; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .nav {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .header-inner {
    grid-template-columns: auto 1fr auto;
  }
}


