:root {
  --primary: #004E64;
  --secondary: #FF7F50;
  --bg-color: #ffffff;
  --text-color: #171717;
  --text-muted: #575757;
  --border-color: #e5e7eb;
  --card-bg: #fafafa;
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --radius: 16px;
  --grain: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: var(--grain);
  opacity: 0.03;
  pointer-events: none;
  z-index: 9999;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

header {
  padding: 2rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

nav a {
  text-decoration: none;
  color: var(--text-color);
  margin-left: 2rem;
  font-weight: 500;
  transition: var(--transition);
}

nav a:hover {
  color: var(--primary);
}

/* Typography */
h1, h2, h3 {
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: 3.5rem; margin-bottom: 1.5rem; }
h2 { font-size: 2.25rem; margin-bottom: 1rem; }

/* Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(180px, auto);
  gap: 1.5rem;
  margin: 3rem 0;
}

.bento-item {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 2rem;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.bento-item:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.item-large { grid-column: span 8; }
.item-medium { grid-column: span 4; }
.item-small { grid-column: span 3; }
.item-tall { grid-row: span 2; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.8rem 1.8rem;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: #003646;
  box-shadow: 0 4px 12px rgba(0, 78, 100, 0.2);
}

.btn-secondary {
  background-color: var(--secondary);
  color: #ffffff;
}

.btn-secondary:hover {
  background-color: #e66b3d;
  box-shadow: 0 4px 12px rgba(255, 127, 80, 0.2);
}

/* Simulator Form Elements */
.simulator-card {
  background-color: #f8fafc;
  padding: 3rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

input, select {
  width: 100%;
  padding: 1rem;
  margin-top: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: inherit;
  transition: var(--transition);
}

input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 78, 100, 0.1);
}

/* Tags & Labels */
.tag {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: rgba(0, 78, 100, 0.08);
  color: var(--primary);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Footer */
footer {
  margin-top: 5rem;
  padding: 4rem 0;
  background-color: #fafafa;
  border-top: 1px solid var(--border-color);
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3.5rem;
  height: 3.5rem;
  background-color: var(--primary);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: var(--transition);
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0, 78, 100, 0.15);
  border: none;
  cursor: pointer;
}

.back-to-top:hover {
  background-color: #003646;
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 78, 100, 0.25);
}

.back-to-top::before {
  content: "↑";
  font-size: 1.5rem;
  font-weight: 600;
}

/* Utilities */
.text-muted { color: var(--text-muted); }
.mt-4 { margin-top: 1rem; }
.mb-8 { margin-bottom: 2rem; }

/* Responsive */
@media (max-width: 1024px) {
  .item-large, .item-medium, .item-small {
    grid-column: span 12;
  }
  h1 { font-size: 2.5rem; }
}

@media (max-width: 768px) {
  header { flex-direction: column; gap: 1rem; text-align: center; }
  nav a { margin: 0 0.75rem; }
  .container { padding: 0 1.5rem; }
}