/* Sandymount Styles */

:root {
  --bg: #fafafa;
  --bg-card: #ffffff;
  --bg-card-hover: #f5f5f5;
  --text: #18181b;
  --text-muted: #52525b;
  --accent: #7c3aed;
  --accent-cyan: #0891b2;
  --accent-orange: #ea580c;
  --accent-green: #16a34a;
  --accent-pink: #db2777;
  --accent-yellow: #ca8a04;
  --accent-glow: rgba(124, 58, 237, 0.15);
  --border: #e4e4e7;
  --gradient: linear-gradient(135deg, #7c3aed, #0891b2);
}

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

/* Skip Link - Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent);
  color: white;
  padding: 8px 16px;
  z-index: 9999;
  font-weight: 600;
  border-radius: 0 0 4px 0;
}
.skip-link:focus {
  top: 0;
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
}

/* Stack Comparison */
.stack-compare-section {
  max-width: 800px;
  margin: 0 auto 4rem;
  padding: 0 1.5rem;
}
.stack-compare {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
}
.era {
  text-align: center;
}
.era-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-weight: 500;
}
.stack-visual {
  border: 2px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  min-width: 160px;
}
.era-sand .stack-visual {
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}
.layer {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: var(--bg-card);
}
.layer:last-child {
  border-bottom: none;
}
.era-sand .layer {
  border-color: rgba(124, 58, 237, 0.2);
}
.layer-name {
  font-weight: 600;
  color: var(--text);
}
.layer-name.sand-s { color: var(--accent); }
.layer-name.sand-a { color: var(--accent-cyan); }
.layer-name.sand-n { color: var(--accent-orange); }
.layer-name.sand-d { color: var(--accent-green); }
.layer-role {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.stack-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 1rem;
  color: var(--text);
}
.era-sand .stack-name {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stack-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}
.era-arrow {
  font-size: 2rem;
  color: var(--text-muted);
}
@media (max-width: 600px) {
  .stack-compare {
    flex-direction: column;
    gap: 1.5rem;
  }
  .era-arrow {
    transform: rotate(90deg);
  }
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: all 0.2s; }
a:hover { color: var(--accent-cyan); }

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Subtle background */
.bg-grid {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    linear-gradient(rgba(124, 58, 237, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 58, 237, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: -1;
}

.bg-glow {
  position: fixed;
  width: 800px; height: 800px;
  border-radius: 50%;
  filter: blur(180px);
  opacity: 0.08;
  pointer-events: none;
  z-index: -1;
  animation: pulse 8s ease-in-out infinite;
}

.bg-glow-1 { top: -300px; left: -200px; background: var(--accent); }
.bg-glow-2 { bottom: -300px; right: -200px; background: var(--accent-cyan); animation-delay: 4s; }

/* Navigation */
.nav {
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  position: sticky;
  top: 0;
  background: rgba(250, 250, 250, 0.9);
  backdrop-filter: blur(20px);
  z-index: 100;
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient);
  transition: width 0.3s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 10px;
  z-index: 200;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: all 0.3s ease;
  transform-origin: center;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(250, 250, 250, 0.98);
  backdrop-filter: blur(20px);
  z-index: 150;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-menu.active {
  opacity: 1;
  pointer-events: all;
}

.mobile-menu a {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  animation: fadeInUp 0.5s ease forwards;
  opacity: 0;
}

.mobile-menu.active a:nth-child(1) { animation-delay: 0.1s; }
.mobile-menu.active a:nth-child(2) { animation-delay: 0.15s; }
.mobile-menu.active a:nth-child(3) { animation-delay: 0.2s; }
.mobile-menu.active a:nth-child(4) { animation-delay: 0.25s; }
.mobile-menu.active a:nth-child(5) { animation-delay: 0.3s; }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .mobile-menu { display: flex; }
}

/* Hero */
.hero {
  text-align: center;
  padding: 8rem 2rem 6rem;
  max-width: 1000px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.2);
  padding: 0.6rem 1.25rem;
  border-radius: 25px;
  font-size: 0.9rem;
  color: var(--accent);
  margin-bottom: 2rem;
  animation: fadeInUp 0.6s ease forwards;
}

.hero h1 {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #18181b 0%, #7c3aed 50%, #0891b2 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: fadeInUp 0.6s ease 0.1s forwards, gradientShift 8s ease infinite;
  opacity: 0;
}

@media (max-width: 768px) {
  .hero h1 { font-size: 2.5rem; }
  .hero { padding: 5rem 1.5rem 3rem; }
}

.hero-subtitle {
  font-size: 1.5rem;
  color: var(--text-muted);
  max-width: 800px;
  margin: 0 auto 1rem;
  font-weight: 300;
  animation: fadeInUp 0.6s ease 0.2s forwards;
  opacity: 0;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 2.5rem;
  animation: fadeInUp 0.6s ease 0.3s forwards;
  opacity: 0;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.6s ease 0.4s forwards;
  opacity: 0;
}

.btn {
  padding: 0.9rem 1.75rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary {
  background: var(--gradient);
  background-size: 200% 200%;
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 50px var(--accent-glow);
  color: white;
  animation: gradientShift 2s ease infinite;
}

.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-2px);
}

/* Quick Install */
.quick-install {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  animation: fadeInUp 0.6s ease 0.5s forwards;
  opacity: 0;
}

.install-box {
  display: flex;
  align-items: center;
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.15);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.install-box:hover {
  border-color: var(--accent);
}

.quick-install code {
  font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
  padding: 0.75rem 1rem 0.75rem 1.25rem;
  font-size: 1rem;
  color: var(--text);
}

.copy-btn {
  background: transparent;
  border: none;
  border-left: 1px solid rgba(124, 58, 237, 0.15);
  padding: 0.75rem 1rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
}

.copy-btn:hover {
  background: rgba(124, 58, 237, 0.1);
  color: var(--accent);
}

.copy-btn.copied {
  color: var(--accent-green);
}

.install-note {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Section styling */
.section {
  padding: 5rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

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

.section-tag {
  display: inline-block;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.15);
  padding: 0.35rem 0.9rem;
  border-radius: 15px;
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* SAND Stack */
.sand-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .sand-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 500px) {
  .sand-grid { grid-template-columns: 1fr; }
}

.sand-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.sand-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--card-accent);
  opacity: 0;
  transition: opacity 0.3s;
}

.sand-card:hover {
  transform: translateY(-8px);
  border-color: var(--card-accent);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.sand-card:hover::before { opacity: 1; }

.sand-card:hover .letter {
  animation: pulse 0.5s ease;
}

.sand-card .letter {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--card-accent), var(--card-accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: transform 0.3s ease;
}

.sand-card h3 { font-size: 1.35rem; margin-bottom: 0.75rem; }
.sand-card p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 1rem; }
.sand-card .link { font-size: 0.85rem; }

.sand-s { --card-accent: #7c3aed; --card-accent-2: #a78bfa; }
.sand-a { --card-accent: #0891b2; --card-accent-2: #22d3ee; }
.sand-n { --card-accent: #ea580c; --card-accent-2: #fb923c; }
.sand-d { --card-accent: #16a34a; --card-accent-2: #4ade80; }

/* Project Categories */
.category {
  margin-bottom: 4rem;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.category-icon {
  width: 48px; height: 48px;
  background: rgba(124, 58, 237, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

.category-header:hover .category-icon {
  transform: scale(1.1) rotate(5deg);
}

.category-header h3 {
  font-size: 1.5rem;
  font-weight: 600;
}

.category-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

a.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}

a.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 15px 40px rgba(0,0,0,0.12);
  color: var(--text);
}

a.project-card:hover .project-icon {
  transform: scale(1.1);
}

.project-top {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.project-icon {
  width: 44px; height: 44px;
  background: rgba(124, 58, 237, 0.08);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.project-icon.green { background: rgba(22, 163, 74, 0.08); }
.project-icon.cyan { background: rgba(8, 145, 178, 0.08); }
.project-icon.orange { background: rgba(234, 88, 12, 0.08); }
.project-icon.pink { background: rgba(219, 39, 119, 0.08); }
.project-icon.yellow { background: rgba(202, 138, 4, 0.08); }

.project-info h4 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.project-info .status {
  font-size: 0.75rem;
  color: var(--accent-green);
  background: rgba(22, 163, 74, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  display: inline-block;
}

.project-info .status.wip {
  color: var(--accent-orange);
  background: rgba(234, 88, 12, 0.1);
}

.project-card > p {
  color: var(--text-muted);
  font-size: 0.9rem;
  flex-grow: 1;
}

/* Architecture Diagram */
.arch-section {
  background: linear-gradient(180deg, transparent, rgba(124, 58, 237, 0.02), transparent);
  padding: 5rem 2rem;
}

.arch-inner {
  max-width: 1000px;
  margin: 0 auto;
}

.arch-diagram {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3rem;
  margin-top: 2rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.arch-layers {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.arch-layer {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.arch-label {
  width: 120px;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: right;
  flex-shrink: 0;
}

.arch-boxes {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  flex: 1;
}

.arch-box {
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.15);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  color: var(--text);
}

.arch-box:hover {
  background: rgba(124, 58, 237, 0.15);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.arch-box.cyan { background: rgba(8, 145, 178, 0.08); border-color: rgba(8, 145, 178, 0.15); }
.arch-box.cyan:hover { background: rgba(8, 145, 178, 0.15); border-color: var(--accent-cyan); color: var(--accent-cyan); }
.arch-box.orange { background: rgba(234, 88, 12, 0.08); border-color: rgba(234, 88, 12, 0.15); }
.arch-box.orange:hover { background: rgba(234, 88, 12, 0.15); border-color: var(--accent-orange); color: var(--accent-orange); }
.arch-box.green { background: rgba(22, 163, 74, 0.08); border-color: rgba(22, 163, 74, 0.15); }
.arch-box.green:hover { background: rgba(22, 163, 74, 0.15); border-color: var(--accent-green); color: var(--accent-green); }

@media (max-width: 700px) {
  .arch-layer { flex-direction: column; align-items: flex-start; }
  .arch-label { width: auto; text-align: left; }
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2rem;
  text-align: center;
  margin-top: 3rem;
}

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

@media (max-width: 500px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

.stat-item {
  transition: transform 0.3s ease;
}

.stat-item:hover {
  transform: scale(1.05);
}

.stat-item .number {
  font-size: 2.75rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-item .label {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Principles Link */
.principles-section {
  padding: 4rem 2rem;
  text-align: center;
}

.principles-card {
  max-width: 800px;
  margin: 0 auto;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.05), rgba(8, 145, 178, 0.05));
  border: 1px solid rgba(124, 58, 237, 0.15);
  border-radius: 20px;
  padding: 3.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.principles-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(124, 58, 237, 0.1);
}

.principles-card h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.principles-card p {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.principles-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  text-align: left;
  margin-bottom: 2rem;
}

@media (max-width: 600px) {
  .principles-list { grid-template-columns: 1fr; }
}

.principles-list span {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 0.5rem 0;
  transition: color 0.2s ease, transform 0.2s ease;
}

.principles-list span:hover {
  color: var(--text);
  transform: translateX(4px);
}

.principles-list span::before {
  content: '→ ';
  color: var(--accent);
}

/* Footer */
.footer {
  padding: 4rem 2rem 2rem;
  border-top: 1px solid var(--border);
  max-width: 1400px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
}

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

@media (max-width: 600px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

.footer-brand p {
  color: var(--text-muted);
  margin-top: 1rem;
  font-size: 0.9rem;
  max-width: 280px;
}

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-col a {
  display: block;
  color: var(--text-muted);
  padding: 0.3rem 0;
  font-size: 0.9rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-col a:hover {
  color: var(--accent);
  transform: translateX(4px);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Scroll animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}
