/*
 * Benjamin Cowen Website Clone - Style Sheets
 * Created with modern Vanilla CSS, dark mode priority, responsive layout.
 */

:root {
  /* Font Families */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Anton', 'Inter', sans-serif;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Theme variable mapping */
[data-theme="dark"], :root:not([data-theme="light"]) {
  --background: 224 40% 6%;
  --background-alt: 224 35% 8%;
  --foreground: 210 40% 98%;
  --card: 224 35% 10%;
  --card-hover: 224 35% 14%;
  --card-foreground: 210 40% 98%;
  --primary: 195 100% 50%;
  --primary-rgb: 0, 200, 255;
  --secondary: 250 85% 65%;
  --secondary-rgb: 100, 103, 242;
  --accent: 224 30% 12%;
  --border: 220 25% 15%;
  --border-hover: 220 25% 25%;
  --muted: 220 25% 12%;
  --muted-foreground: 215 15% 65%;
  --shadow: rgba(0, 0, 0, 0.5);
  --grid-line: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] {
  --background: 210 40% 98%;
  --background-alt: 210 40% 95%;
  --foreground: 222 47% 11%;
  --card: 0 0% 100%;
  --card-hover: 210 40% 99%;
  --card-foreground: 222 47% 11%;
  --primary: 221 83% 53%;
  --primary-rgb: 37, 99, 235;
  --secondary: 262 83% 58%;
  --secondary-rgb: 124, 58, 237;
  --accent: 210 40% 96.1%;
  --border: 214.3 31.8% 91.4%;
  --border-hover: 214.3 31.8% 80%;
  --muted: 210 40% 96.1%;
  --muted-foreground: 215.4 16.3% 46.9%;
  --shadow: rgba(0, 0, 0, 0.05);
  --grid-line: rgba(0, 0, 0, 0.05);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: hsl(var(--background));
}
::-webkit-scrollbar-thumb {
  background: hsl(var(--border));
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: hsl(var(--muted-foreground) / 0.5);
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: hsl(var(--foreground));
  font-weight: 700;
  line-height: 1.25;
}

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

/* Header & Navigation */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  border-bottom: 1px solid hsl(var(--border) / 0.4);
  background-color: hsl(var(--background) / 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color var(--transition-normal), background-color var(--transition-normal);
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(to right, hsl(var(--primary)), hsl(var(--secondary)));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: center;
  letter-spacing: -0.025em;
}

.nav {
  display: none;
  align-items: center;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .nav {
    display: flex;
  }
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  position: relative;
  padding: 0.25rem 0;
}

.nav-link:hover, .nav-link.active {
  color: hsl(var(--foreground));
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: hsl(var(--primary));
  transition: width var(--transition-normal);
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Theme Toggle Button */
.btn-icon {
  background: transparent;
  border: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
  cursor: pointer;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.btn-icon:hover {
  background-color: hsl(var(--muted));
  border-color: hsl(var(--border-hover));
}

.btn-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* Toggle svg display based on theme */
[data-theme="light"] .btn-icon .sun-icon {
  display: none;
}
[data-theme="dark"] .btn-icon .moon-icon {
  display: none;
}
:root:not([data-theme="light"]) .btn-icon .moon-icon {
  display: none;
}

/* Menu Toggle for Mobile */
.menu-toggle {
  display: flex;
}
@media (min-width: 768px) {
  .menu-toggle {
    display: none;
  }
}

/* Mobile Menu */
.mobile-nav {
  position: fixed;
  top: 4.5rem;
  left: 0;
  width: 100%;
  height: calc(100vh - 4.5rem);
  background-color: hsl(var(--background));
  z-index: 99;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  transform: translateX(100%);
  transition: transform var(--transition-normal);
}

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

.mobile-nav-link {
  font-size: 1.25rem;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
  padding-bottom: 0.5rem;
  border-bottom: 1px solid hsl(var(--border));
}

.mobile-nav-link:hover, .mobile-nav-link.active {
  color: hsl(var(--foreground));
  border-bottom-color: hsl(var(--primary));
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all var(--transition-normal);
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--secondary) / 0.9));
  color: #ffffff;
  box-shadow: 0 4px 14px 0 rgba(var(--primary-rgb), 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgba(var(--primary-rgb), 0.4);
  opacity: 0.95;
}

.btn-ghost {
  background-color: hsl(var(--muted) / 0.5);
  border-color: hsl(var(--border));
  color: hsl(var(--muted-foreground));
}

.btn-ghost:hover {
  background-color: hsl(var(--muted));
  color: hsl(var(--foreground));
  border-color: hsl(var(--border-hover));
}

.btn svg {
  width: 1.25rem;
  height: 1.25rem;
  stroke: currentColor;
}

/* Grid & Layout elements */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Cards styling */
.card {
  background-color: hsl(var(--card) / 0.5);
  border: 1px solid hsl(var(--border) / 0.6);
  border-radius: 1rem;
  padding: 2rem;
  transition: border-color var(--transition-normal), background-color var(--transition-normal), transform var(--transition-normal), box-shadow var(--transition-normal);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.card:hover {
  background-color: hsl(var(--card-hover) / 0.7);
  border-color: hsl(var(--border-hover) / 0.8);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px -10px var(--shadow);
}

.card-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  background-color: hsl(var(--primary) / 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--primary));
  margin-bottom: 1.5rem;
}

.card-icon svg {
  width: 1.5rem;
  height: 1.5rem;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.card-description {
  color: hsl(var(--muted-foreground));
  font-size: 0.95rem;
  line-height: 1.6;
  flex: 1;
}

/* Footer styling */
.footer {
  border-top: 1px solid hsl(var(--border) / 0.5);
  background-color: hsl(var(--background));
  padding-top: 4rem;
  padding-bottom: 3rem;
  margin-top: auto;
  transition: border-color var(--transition-normal), background-color var(--transition-normal);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer-brand h3 {
  margin-bottom: 1rem;
}

.footer-description {
  color: hsl(var(--muted-foreground));
  font-size: 0.9rem;
  max-width: 300px;
  margin-bottom: 1.5rem;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-link {
  color: hsl(var(--muted-foreground));
  transition: color var(--transition-fast);
}

.social-link:hover {
  color: hsl(var(--foreground));
}

.social-link svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
}

.footer-section h4 {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
  color: hsl(var(--foreground));
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-link {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

.footer-link:hover {
  color: hsl(var(--primary));
}

.footer-bottom {
  border-top: 1px solid hsl(var(--border) / 0.4);
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
  }
}

.copyright {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
}

/* Animations */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .5; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Hero Section Base */
.hero-section {
  position: relative;
  padding: 8rem 0 6rem 0;
  overflow: hidden;
  background-color: #070a13;
}

.hero-grids {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(30, 41, 59, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 41, 59, 0.1) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at center, black, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black, transparent 80%);
  pointer-events: none;
}

.hero-glow-1 {
  position: absolute;
  top: -10%;
  left: -10%;
  width: 40%;
  height: 40%;
  border-radius: 50%;
  background-color: hsl(var(--secondary) / 0.1);
  filter: blur(100px);
  pointer-events: none;
  animation: pulse 8s infinite alternate;
}

.hero-glow-2 {
  position: absolute;
  bottom: 10%;
  right: -5%;
  width: 35%;
  height: 35%;
  border-radius: 50%;
  background-color: hsl(var(--primary) / 0.1);
  filter: blur(80px);
  pointer-events: none;
  animation: pulse 6s infinite alternate;
}

/* Alerts and notice */
.notice {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: hsl(var(--muted));
  border: 1px solid hsl(var(--border));
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: hsl(var(--foreground));
  margin-bottom: 1rem;
}

.notice-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: hsl(var(--primary));
  animation: pulse 2s infinite;
}

/* Forms general */
.form-card {
  background-color: hsl(var(--card) / 0.5);
  border: 1px solid hsl(var(--border));
  border-radius: 1rem;
  padding: 2.5rem;
  width: 100%;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .form-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: hsl(var(--foreground));
}

label .required {
  color: #ef4444;
}

label .optional {
  font-weight: 400;
  color: hsl(var(--muted-foreground));
}

input[type="text"],
input[type="email"],
textarea,
select {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid hsl(var(--border));
  background-color: hsl(var(--background) / 0.5);
  color: hsl(var(--foreground));
  font-family: inherit;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  outline: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

.hp-field {
  display: none !important;
}

/* Page Section headers */
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
}

.section-header p {
  color: hsl(var(--muted-foreground));
  font-size: 1.15rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Back to top button styling overrides */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 50;
  border-radius: 50%;
  width: 3.25rem;
  height: 3.25rem;
  opacity: 0;
  pointer-events: none;
  background-color: hsl(var(--card) / 0.8) !important;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid hsl(var(--border)) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--transition-normal), transform var(--transition-fast), background-color var(--transition-fast) !important;
}

#back-to-top:hover {
  background-color: hsl(var(--card-hover)) !important;
  transform: translateY(-2px);
}

#back-to-top.visible {
  opacity: 1 !important;
  pointer-events: auto !important;
}


/* ==========================================================================
   Tailwind Mappings & Fidelity Utilities (Antigravity Custom styling)
   ========================================================================== */
.grid { display: grid; }
@media (min-width: 1024px) {
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.gap-8 { gap: 2rem; }
.gap-6 { gap: 1.5rem; }
.gap-4 { gap: 1rem; }
.gap-2 { gap: 0.5rem; }
.gap-1 { gap: 0.25rem; }
.mb-16 { margin-bottom: 4rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mt-8 { margin-top: 2rem; }
.pt-8 { padding-top: 2rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.mx-2 { margin-left: 0.5rem; margin-right: 0.5rem; }
.w-8 { width: 2rem; }
.h-8 { height: 2rem; }
.h-16 { height: 4rem; }
.w-16 { width: 4rem; }
.h-12 { height: 3rem; }
.w-12 { width: 3rem; }
.w-1\.5 { width: 6px; }
.h-1\.5 { height: 6px; }
.bg-primary { background-color: hsl(var(--primary)); }
.rounded-full { border-radius: 9999px; }
.rounded-2xl { border-radius: 1rem; }
.rounded-3xl { border-radius: 1.5rem; }
.shadow-lg { box-shadow: 0 10px 30px -10px var(--shadow); }
.shadow-2xl { box-shadow: 0 25px 50px -12px var(--shadow); }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-4xl { font-size: 2.25rem; }
.text-slate-400 { color: hsl(var(--muted-foreground)); }
.text-slate-500 { color: hsl(var(--muted-foreground) / 0.8); }
.text-white { color: hsl(var(--foreground)); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-mono { font-family: monospace; }
.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.05em; }
.text-primary { color: hsl(var(--primary)); }
.text-muted-foreground { color: hsl(var(--muted-foreground)); }
.border-t { border-top: 1px solid hsl(var(--border) / 0.6); }

/* Stack effect for avatars */
.flex.-space-x-3 {
  display: flex;
}
.flex.-space-x-3 > * + * {
  margin-left: -0.5rem;
}

/* Portrait mask gradient for fading at the bottom edge */
.masked-portrait {
  mask-image: linear-gradient(to bottom, black 82%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 82%, transparent 100%);
}

.hidden { display: none; }
@media (min-width: 640px) {
  .sm\:block { display: block; }
}

.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }

/* Backdrop blur support for premium cards */
.backdrop-blur {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
