/* ============================================
   VOLUME CALCULATOR — Premium Luxury Design
   ============================================ */

/* === Design Tokens === */
:root {
  --bg-primary: #07070d;
  --bg-secondary: #0d0d16;
  --bg-tertiary: #13131f;
  --bg-card: rgba(18, 18, 30, 0.65);
  --bg-card-hover: rgba(25, 25, 42, 0.8);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --bg-glass-strong: rgba(255, 255, 255, 0.06);

  --gold-100: #fef6e0;
  --gold-200: #fce9a8;
  --gold-300: #f5d87a;
  --gold-400: #e8c44a;
  --gold-500: #d4a853;
  --gold-600: #b8923e;
  --gold-700: #96742e;
  --gold-800: #6b5420;

  --text-primary: #f0ece4;
  --text-secondary: #a09b90;
  --text-muted: #6b675e;
  --text-gold: var(--gold-400);

  --border-subtle: rgba(212, 168, 83, 0.08);
  --border-light: rgba(212, 168, 83, 0.15);
  --border-medium: rgba(212, 168, 83, 0.25);
  --border-glow: rgba(212, 168, 83, 0.4);

  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-lg: 0 16px 64px rgba(0,0,0,0.5);
  --shadow-gold: 0 4px 30px rgba(212, 168, 83, 0.15);
  --shadow-gold-lg: 0 8px 50px rgba(212, 168, 83, 0.2);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 999px;

  --font-body: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  --max-width: 1280px;
}

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

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

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--gold-700); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-500); }

/* === Noise Texture Overlay === */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  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)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 { line-height: 1.2; font-weight: 700; }

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(212, 168, 83, 0.08);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-400);
  margin-bottom: 16px;
}

.section-badge .badge-dot {
  width: 6px; height: 6px;
  background: var(--gold-400);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.7); }
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  background: linear-gradient(135deg, var(--gold-200), var(--gold-500), var(--gold-300));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto;
}

.text-gold {
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* === Layout === */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 100px 0;
  position: relative;
}

/* === Section Divider === */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-light), transparent);
  margin: 0 auto;
  max-width: 900px;
}

/* =====================
   NAVIGATION
   ===================== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: var(--transition-base);
}

.navbar.scrolled {
  background: rgba(7, 7, 13, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 0;
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.2rem;
}

.nav-logo span {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, var(--gold-100), var(--gold-400), var(--gold-200));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  transition: var(--transition-fast);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--gold-400);
  transition: var(--transition-base);
  border-radius: 1px;
}

.nav-links a:hover { color: var(--gold-300); }
.nav-links a:hover::after { width: 100%; }

.nav-cta {
  padding: 8px 20px;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-700));
  color: var(--bg-primary) !important;
  border-radius: var(--radius-full);
  font-weight: 600 !important;
  font-size: 0.85rem;
  transition: var(--transition-base);
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-gold);
}

.nav-cta::after { display: none !important; }

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.mobile-toggle span {
  width: 24px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition-base);
}

/* =====================
   HERO SECTION
   ===================== */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.3;
}

.hero-glow-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--gold-700), transparent);
  top: -200px; right: -100px;
}

.hero-glow-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(100, 80, 160, 0.4), transparent);
  bottom: -100px; left: -100px;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(212, 168, 83, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 168, 83, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 20%, transparent 70%);
}

/* Floating shapes */
.hero-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.floating-shape {
  position: absolute;
  opacity: 0.12;
  animation: float-shape 20s ease-in-out infinite;
}

.floating-shape svg {
  width: 100%;
  height: 100%;
}

.floating-shape:nth-child(1) { top: 15%; right: 10%; width: 120px; animation-delay: 0s; }
.floating-shape:nth-child(2) { top: 60%; right: 20%; width: 80px; animation-delay: -4s; animation-duration: 16s; }
.floating-shape:nth-child(3) { top: 30%; left: 8%; width: 100px; animation-delay: -8s; animation-duration: 22s; }
.floating-shape:nth-child(4) { bottom: 20%; left: 15%; width: 70px; animation-delay: -12s; animation-duration: 18s; }
.floating-shape:nth-child(5) { top: 45%; right: 35%; width: 60px; animation-delay: -6s; animation-duration: 25s; }

@keyframes float-shape {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-30px) rotate(5deg); }
  50% { transform: translateY(-15px) rotate(-3deg); }
  75% { transform: translateY(-35px) rotate(7deg); }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: rgba(212, 168, 83, 0.06);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-300);
  margin-bottom: 32px;
  animation: fadeInUp 0.8s ease-out;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 24px;
  animation: fadeInUp 0.8s ease-out 0.15s both;
}

.hero-title.compact {
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.1;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--gold-200), var(--gold-500), var(--gold-300));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title .highlight {
  background: linear-gradient(135deg, var(--gold-200), var(--gold-500), var(--gold-300));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 40px;
  line-height: 1.8;
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease-out 0.45s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: var(--transition-base);
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
  color: var(--bg-primary);
  box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold-lg);
}

.btn-secondary {
  background: var(--bg-glass-strong);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  backdrop-filter: blur(10px);
}

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

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 60px;
  animation: fadeInUp 0.8s ease-out 0.6s both;
}

.hero-stat {
  text-align: center;
}

.hero-stat-number {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold-400);
}

.hero-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
}

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

/* =====================
   CALCULATOR SECTION
   ===================== */
#calculator {
  background: var(--bg-secondary);
}

.calc-header {
  text-align: center;
  margin-bottom: 48px;
}

.calc-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

/* Shape Selector */
.shape-selector {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(10px);
}

.shape-selector-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.shape-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 10px;
  margin-bottom: 28px;
}

.shape-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-base);
  color: var(--text-secondary);
}

.shape-btn:hover {
  background: var(--bg-glass-strong);
  border-color: var(--border-light);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.shape-btn.active {
  background: rgba(212, 168, 83, 0.1);
  border-color: var(--gold-500);
  color: var(--gold-300);
  box-shadow: 0 0 20px rgba(212, 168, 83, 0.1);
}

.shape-btn svg {
  width: 32px; height: 32px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
}

.shape-btn span {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
  line-height: 1.2;
}

/* Input Fields */
.calc-inputs {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.input-group {
  position: relative;
}

.input-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.input-row {
  display: flex;
  gap: 10px;
}

.input-row .input-group {
  flex: 1;
}

.input-field {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition-fast);
  outline: none;
}

.input-field:focus {
  border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(212, 168, 83, 0.1);
}

.input-field::placeholder {
  color: var(--text-muted);
}

.unit-select {
  padding: 12px 16px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;
  min-width: 100px;
  transition: var(--transition-fast);
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a09b90' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.unit-select:focus {
  border-color: var(--gold-500);
}

.unit-select option {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

/* Formula Display */
.formula-display {
  margin-top: 16px;
  padding: 16px;
  background: rgba(212, 168, 83, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.formula-display .formula-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.formula-display .formula-text {
  font-family: 'Courier New', monospace;
  color: var(--gold-300);
  font-size: 1rem;
  font-weight: 600;
}

/* Result Display */
.result-display {
  margin-top: 20px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(212, 168, 83, 0.08), rgba(212, 168, 83, 0.02));
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  text-align: center;
}

.result-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.result-value {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--gold-300);
  line-height: 1.2;
  word-break: break-all;
}

.result-unit {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Diagram Panel */
.diagram-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  min-height: 580px;
}

.diagram-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.diagram-title .live-dot {
  width: 8px; height: 8px;
  background: #4ade80;
  border-radius: 50%;
  animation: pulse-dot 1.5s ease-in-out infinite;
}

.diagram-canvas-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.2);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  position: relative;
}

#shapeCanvas {
  display: block;
}

.diagram-info {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.diagram-info-item {
  padding: 10px 14px;
  background: var(--bg-glass);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.diagram-info-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.diagram-info-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 2px;
}

/* =====================
   VOLUME CONVERTER
   ===================== */
#converter {
  background: var(--bg-primary);
}

.converter-header {
  text-align: center;
  margin-bottom: 48px;
}

.converter-card {
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 40px;
  backdrop-filter: blur(10px);
}

.converter-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: end;
}

.converter-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.converter-field .input-field,
.converter-field .unit-select {
  width: 100%;
}

.converter-field .converter-input-row {
  display: flex;
  gap: 10px;
}

.converter-field .converter-input-row .input-field {
  flex: 1;
}

.converter-swap {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-700));
  border: none;
  border-radius: 50%;
  color: var(--bg-primary);
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-bottom: 2px;
}

.converter-swap:hover {
  transform: rotate(180deg);
  box-shadow: var(--shadow-gold);
}

.converter-result {
  margin-top: 28px;
  padding: 20px;
  background: rgba(212, 168, 83, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  text-align: center;
}

.converter-result-text {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--gold-300);
}

/* Quick Conversions */
.quick-conversions {
  margin-top: 36px;
}

.quick-conversions-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 14px;
  text-align: center;
}

.quick-conversion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.quick-conversion-item {
  padding: 12px 16px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
  text-align: center;
}

.quick-conversion-item:hover {
  background: rgba(212, 168, 83, 0.06);
  border-color: var(--border-light);
  color: var(--text-primary);
}

/* =====================
   SHAPES ENCYCLOPEDIA
   ===================== */
#shapes {
  background: var(--bg-secondary);
}

.shapes-header {
  text-align: center;
  margin-bottom: 48px;
}

.shapes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.shape-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: var(--transition-base);
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.shape-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-4px);
  box-shadow: var(--shadow-gold);
}

.shape-card-icon {
  width: 56px; height: 56px;
  background: rgba(212, 168, 83, 0.08);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.shape-card-icon svg {
  width: 28px; height: 28px;
  stroke: var(--gold-400);
  fill: none;
  stroke-width: 1.5;
}

.shape-card-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.shape-card-formula {
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  color: var(--gold-400);
  padding: 6px 12px;
  background: rgba(212, 168, 83, 0.06);
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-bottom: 12px;
}

.shape-card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.shape-card-example {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.shape-card-example strong {
  color: var(--text-secondary);
}

/* =====================
   HOW IT WORKS
   ===================== */
#how-it-works {
  background: var(--bg-primary);
}

.how-header {
  text-align: center;
  margin-bottom: 60px;
}

.steps-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
}

.steps-container::before {
  content: '';
  position: absolute;
  top: 44px;
  left: 60px;
  right: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold-700), var(--gold-500), var(--gold-700));
  opacity: 0.3;
}

.step-card {
  text-align: center;
  position: relative;
  z-index: 1;
}

.step-number {
  width: 50px; height: 50px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-700));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--bg-primary);
}

.step-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.step-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.step-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* =====================
   FAQ SECTION
   ===================== */
#faq {
  background: var(--bg-secondary);
}

.faq-header {
  text-align: center;
  margin-bottom: 48px;
}

.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
  transition: var(--transition-base);
}

.faq-item:hover {
  border-color: var(--border-light);
}

.faq-item.active {
  border-color: var(--border-medium);
}

.faq-question {
  width: 100%;
  padding: 20px 24px;
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: var(--transition-fast);
}

.faq-question:hover {
  color: var(--gold-300);
}

.faq-chevron {
  width: 20px; height: 20px;
  flex-shrink: 0;
  transition: var(--transition-base);
  color: var(--text-muted);
}

.faq-item.active .faq-chevron {
  transform: rotate(180deg);
  color: var(--gold-400);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.faq-answer-inner {
  padding: 0 24px 20px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.faq-answer-inner ul {
  margin: 8px 0;
  padding-left: 20px;
}

.faq-answer-inner li {
  margin-bottom: 4px;
}

.faq-answer-inner strong {
  color: var(--text-primary);
}

/* =====================
   FOOTER
   ===================== */
.footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-subtle);
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) repeat(auto-fit, minmax(150px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-top: 12px;
  max-width: 280px;
  line-height: 1.7;
}

.footer-col-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-primary);
  margin-bottom: 16px;
}

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

.footer-links li { margin-bottom: 10px; }

.footer-pages {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 24px;
  align-items: start;
}

.footer-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  transition: var(--transition-fast);
}

.footer-links a:hover { color: var(--gold-400); }

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* =====================
   CONTENT SECTIONS
   ===================== */
.content-section {
  background: var(--bg-primary);
}

.content-section:nth-child(4n+1) {
  background: var(--bg-secondary);
}

.content-header {
  text-align: center;
  margin-bottom: 40px;
}

.content-body {
  max-width: 820px;
  margin: 0 auto 40px;
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.85;
}

.content-body p {
  margin-bottom: 16px;
}

.content-body p:last-child {
  margin-bottom: 0;
}

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

.styled-list {
  max-width: 820px;
  margin: 16px auto;
  padding-left: 24px;
  color: var(--text-secondary);
  line-height: 1.85;
}

.styled-list li {
  margin-bottom: 8px;
}

.styled-list li strong {
  color: var(--text-primary);
}

/* === Interactive Diagrams === */
.interactive-diagram {
  margin-top: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 32px;
  backdrop-filter: blur(10px);
}

.diagram-header {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.concept-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.concept-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  transition: var(--transition-base);
  cursor: pointer;
}

.concept-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-4px);
  box-shadow: var(--shadow-gold);
}

.concept-card canvas {
  display: block;
  margin: 0 auto 12px;
  border-radius: var(--radius-sm);
}

.concept-label {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.concept-unit {
  font-size: 0.8rem;
  color: var(--gold-400);
}

.concept-arrow {
  font-size: 2rem;
  color: var(--gold-500);
  font-weight: 700;
}

/* === Conversion Table === */
.conversion-table-wrap {
  margin-top: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 32px;
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.table-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.table-filter-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.table-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.table-filter-btn {
  padding: 6px 16px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.table-filter-btn:hover {
  border-color: var(--border-light);
  color: var(--text-primary);
}

.table-filter-btn.active {
  background: rgba(212, 168, 83, 0.1);
  border-color: var(--gold-500);
  color: var(--gold-300);
}

.table-scroll {
  overflow-x: auto;
}

.conversion-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.conversion-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold-400);
  border-bottom: 2px solid var(--border-light);
  white-space: nowrap;
}

.conversion-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  white-space: nowrap;
}

.conversion-table tr:hover td {
  background: rgba(212, 168, 83, 0.03);
  color: var(--text-primary);
}

.conversion-table td:first-child {
  font-weight: 600;
  color: var(--text-primary);
}

.conversion-table td:nth-child(2) {
  color: var(--gold-400);
  font-family: 'Courier New', monospace;
}

/* === Formula Explorer === */
.formula-explorer {
  margin-top: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 32px;
  backdrop-filter: blur(10px);
}

.formula-explorer-header {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.formula-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.formula-tab {
  padding: 8px 16px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.formula-tab:hover {
  border-color: var(--border-light);
  color: var(--text-primary);
}

.formula-tab.active {
  background: rgba(212, 168, 83, 0.1);
  border-color: var(--gold-500);
  color: var(--gold-300);
}

.formula-detail {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 32px;
  align-items: center;
}

.formula-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.formula-visual canvas {
  display: block;
}

.formula-shape-name {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.formula-equation {
  font-family: 'Courier New', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold-300);
  padding: 12px 20px;
  background: rgba(212, 168, 83, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-bottom: 16px;
}

.formula-breakdown {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.formula-breakdown strong {
  color: var(--text-primary);
}

.formula-example {
  padding: 16px;
  background: rgba(212, 168, 83, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.formula-example strong {
  color: var(--gold-300);
}

/* === Matter States Grid === */
.matter-states-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.matter-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: var(--transition-base);
  backdrop-filter: blur(10px);
}

.matter-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-4px);
  box-shadow: var(--shadow-gold);
}

.matter-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
  color: var(--gold-400);
}

.matter-icon svg {
  width: 100%;
  height: 100%;
}

.matter-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.matter-content {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.matter-content p {
  margin-bottom: 12px;
}

.matter-content p:last-child {
  margin-bottom: 0;
}

.matter-content strong {
  color: var(--text-primary);
}

/* === Comparison Diagram === */
.comparison-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.comparison-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
  backdrop-filter: blur(10px);
  transition: var(--transition-base);
}

.comparison-item:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-gold);
}

.comparison-item canvas {
  display: block;
  margin: 0 auto 16px;
}

.comparison-label {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.comparison-formula {
  font-family: 'Courier New', monospace;
  font-size: 0.95rem;
  color: var(--gold-300);
  margin-bottom: 6px;
}

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

.comparison-vs {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold-500);
}

/* === Comparison Table === */
.comparison-table-wrap {
  max-width: 900px;
  margin: 0 auto;
  overflow-x: auto;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.comparison-table th {
  padding: 14px 18px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold-400);
  background: rgba(212, 168, 83, 0.04);
  border-bottom: 2px solid var(--border-light);
}

.comparison-table td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.comparison-table td strong {
  color: var(--text-primary);
}

.comparison-table tr:hover td {
  background: rgba(212, 168, 83, 0.03);
}

/* === Applications Grid === */
.applications-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.app-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: var(--transition-base);
  backdrop-filter: blur(10px);
}

.app-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-3px);
  box-shadow: var(--shadow-gold);
}

.app-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.app-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.app-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.app-desc strong {
  color: var(--gold-300);
}

/* === Units Summary Grid === */
.units-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.unit-category-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(10px);
  transition: var(--transition-base);
}

.unit-category-card:hover {
  border-color: var(--border-medium);
}

.unit-cat-title {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--gold-400);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.unit-cat-list {
  list-style: none;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 2;
}

.unit-cat-list li strong {
  color: var(--gold-300);
}

/* === Shape Content Grid === */
.shapes-content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.shape-content-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: var(--transition-base);
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.shape-content-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-4px);
  box-shadow: var(--shadow-gold);
}

.shape-content-top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.shape-content-icon {
  width: 52px;
  height: 52px;
  background: rgba(212, 168, 83, 0.08);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.shape-content-icon svg {
  width: 26px;
  height: 26px;
  stroke: var(--gold-400);
  fill: none;
  stroke-width: 1.5;
}

.shape-content-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--text-primary);
}

.shape-content-formula {
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  color: var(--gold-400);
  padding: 8px 14px;
  background: rgba(212, 168, 83, 0.06);
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-bottom: 14px;
}

.shape-content-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 12px;
}

.shape-content-desc strong {
  color: var(--text-primary);
}

.shape-content-examples {
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.shape-content-examples strong {
  color: var(--text-secondary);
}

/* === Lang Switcher === */
.lang-switcher {
  margin-top: 30px;
  margin-bottom: 30px;
  padding: 24px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}

.lang-switcher-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.lang-switcher-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lang-switcher-grid a {
  padding: 4px 12px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.lang-switcher-grid a:hover {
  color: var(--gold-400);
  background: rgba(212, 168, 83, 0.06);
}

.lang-switcher-grid a.active {
  color: var(--gold-300);
  background: rgba(212, 168, 83, 0.1);
  font-weight: 600;
}

/* =====================
   SCROLL ANIMATIONS
   ===================== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* =====================
   RESPONSIVE DESIGN
   ===================== */
@media (max-width: 1024px) {
  .calc-layout {
    grid-template-columns: 1fr;
  }
  .diagram-panel { min-height: 400px; }
  .steps-container { grid-template-columns: repeat(2, 1fr); }
  .steps-container::before { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .formula-detail { grid-template-columns: 1fr; }
  .matter-states-grid { grid-template-columns: 1fr 1fr; }
  .applications-grid { grid-template-columns: 1fr; }
  .units-summary-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  section { padding: 60px 0; }

  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: rgba(7, 7, 13, 0.95);
    backdrop-filter: blur(20px);
    padding: 20px;
    gap: 16px;
    border-bottom: 1px solid var(--border-subtle);
  }

  .mobile-toggle { display: flex; }

  .hero-stats { gap: 24px; }
  .hero-stat-number { font-size: 1.5rem; }

  .converter-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .converter-swap {
    margin: 0 auto;
    transform: rotate(90deg);
  }

  .converter-swap:hover {
    transform: rotate(270deg);
  }

  .shapes-grid { grid-template-columns: 1fr; }
  .steps-container { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-pages {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    max-width: 340px;
  }

  .shape-grid { grid-template-columns: repeat(3, 1fr); }

  .diagram-info { grid-template-columns: 1fr; }

  .formula-detail { grid-template-columns: 1fr; text-align: center; }
  .formula-visual { max-width: 320px; margin: 0 auto; }
  .matter-states-grid { grid-template-columns: 1fr; }
  .concept-arrow { transform: rotate(90deg); }
  .comparison-diagram { flex-direction: column; }
  .comparison-vs { transform: rotate(90deg); }
  .shapes-content-grid { grid-template-columns: 1fr; }
  .units-summary-grid { grid-template-columns: 1fr; }
  .applications-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2.2rem; }
  .hero-actions { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
  .hero-stats { flex-direction: column; gap: 16px; }
  .shape-grid { grid-template-columns: repeat(2, 1fr); }
  .converter-card { padding: 24px; }
  .result-value { font-size: 1.6rem; }
}

/* ==========================================================================
   COMPACT HERO CALCULATOR ALIGNMENT (ABOVE THE FOLD OPTIMIZATION)
   ========================================================================== */
#hero {
  min-height: 100vh;
  padding-top: 90px;
  padding-bottom: 30px;
  display: flex;
  align-items: center;
}
.hero-content.compact {
  max-width: 800px;
  margin: 0 auto 16px;
  text-align: center;
}
.hero-content.compact .hero-eyebrow {
  margin-bottom: 12px;
  padding: 6px 16px;
}
.hero-title.compact {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.15;
  margin-bottom: 8px;
}
.hero-description.compact {
  font-size: 0.95rem;
  margin-bottom: 0;
  max-width: 600px;
  line-height: 1.6;
}
.hero-calc-layout {
  margin-top: 10px;
  position: relative;
  z-index: 5;
}

/* Compact Calculator elements under hero */
.hero-calc-layout .shape-selector {
  padding: 16px;
}
.hero-calc-layout .shape-selector-title {
  margin-bottom: 10px;
}
.hero-calc-layout .shape-grid {
  margin-bottom: 16px;
  gap: 8px;
}
.hero-calc-layout .shape-btn {
  padding: 8px 4px;
  gap: 4px;
}
.hero-calc-layout .shape-btn svg {
  width: 24px;
  height: 24px;
}
.hero-calc-layout .shape-btn span {
  font-size: 0.62rem;
}
.hero-calc-layout .calc-inputs {
  gap: 10px;
}
.hero-calc-layout .input-group label {
  margin-bottom: 4px;
  font-size: 0.72rem;
}
.hero-calc-layout .input-field,
.hero-calc-layout .unit-select {
  padding: 10px 14px;
  font-size: 0.9rem;
}
.hero-calc-layout .diagram-panel {
  min-height: 430px;
  padding: 16px;
}
.hero-calc-layout #shapeCanvas {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
}
.hero-calc-layout .diagram-title {
  margin-bottom: 10px;
}
.hero-calc-layout .diagram-info {
  margin-top: 10px;
}
.hero-calc-layout .diagram-info-item {
  padding: 8px 12px;
}

/* Formula and Result Display Side-by-Side */
.formula-result-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

@media (min-width: 640px) {
  .formula-result-row {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 12px;
  }
  .hero-calc-layout .formula-display,
  .hero-calc-layout .result-display {
    margin-top: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 10px 14px;
  }
  .hero-calc-layout .result-value {
    font-size: 1.5rem;
  }
  .hero-calc-layout .result-unit {
    font-size: 0.78rem;
    margin-top: 2px;
  }
  .hero-calc-layout .formula-display .formula-text {
    font-size: 0.9rem;
  }
}

/* ============================================
   ALL CALCULATORS LINK GRID
   ============================================ */
.calc-group {
  margin-bottom: 40px;
}

.calc-group-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.calc-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.calc-link-card {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 16px;
  row-gap: 4px;
  padding: 16px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg, 16px);
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  align-items: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.calc-link-card:hover {
  border-color: var(--gold-400);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-gold), 0 12px 30px rgba(0, 0, 0, 0.4);
}

.calc-link-icon {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(212, 168, 83, 0.05);
  border: 1px solid rgba(212, 168, 83, 0.18);
  border-radius: 12px;
  font-size: 1.55rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.05);
  margin: 0;
  text-align: center;
}

.calc-link-card:hover .calc-link-icon {
  background: rgba(212, 168, 83, 0.12);
  border-color: var(--gold-300);
  transform: scale(1.06);
  box-shadow: 0 0 15px rgba(212, 168, 83, 0.25), inset 0 1px 2px rgba(255, 255, 255, 0.1);
}

.calc-link-title {
  grid-column: 2;
  grid-row: 1;
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.25;
  letter-spacing: -0.01em;
  display: block;
}

.calc-link-formula {
  grid-column: 2;
  grid-row: 2;
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--gold-300);
  font-weight: 500;
  opacity: 0.85;
  line-height: 1.2;
  letter-spacing: 0.02em;
  margin-top: 2px;
  display: block;
}

@media (max-width: 640px) {
  .calc-links-grid {
    grid-template-columns: 1fr;
  }
  .calc-group-title {
    font-size: 1.1rem;
  }
}

/* ============================================
   STYLED LIST (used on sub-pages)
   ============================================ */
.styled-list {
  list-style: none;
  padding: 0;
}

.styled-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.styled-list li a {
  color: var(--gold-400);
  text-decoration: none;
  transition: color 0.2s;
}

.styled-list li a:hover {
  color: var(--gold-300);
  text-decoration: underline;
}

.styled-list li:last-child {
  border-bottom: none;
}

/* Social icons */
.social-icons {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.social-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg-glass-strong);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition-fast);
}

.social-icon:hover {
  background: rgba(212, 168, 83, 0.1);
  border-color: var(--gold-500);
  color: var(--gold-400);
}

.social-icon svg { width: 18px; height: 18px; }
