:root {
  --bg-dark: #121619;
  --bg-card: #1c2226;
  --bg-card-hover: #242c32;
  --accent-orange: #e65c00;
  --accent-gold: #f39c12;
  --text-primary: #f4f4f6;
  --text-secondary: #a0aab2;
  --border-color: #2e373e;
  --font-heading: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
}

a {
  color: var(--accent-gold);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Header & Nav */
header {
  background-color: rgba(18, 22, 25, 0.95);
  border-bottom: 1px solid var(--border-color);
  padding: 1.2rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.nav-container {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-logo {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-logo span {
  color: var(--accent-orange);
}

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

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: #fff;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent-orange), #ff7b25);
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(230, 92, 0, 0.3);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(230, 92, 0, 0.4);
  text-decoration: none;
}

.btn-outline {
  border: 1px solid var(--border-color);
  color: var(--text-primary) !important;
  background: var(--bg-card);
}

.btn-outline:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--accent-gold);
  text-decoration: none;
}

/* Hero Section */
.hero {
  max-width: 1140px;
  margin: 3rem auto 4rem auto;
  padding: 0 1.5rem;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  background: rgba(230, 92, 0, 0.15);
  color: var(--accent-orange);
  border: 1px solid rgba(230, 92, 0, 0.3);
  padding: 0.3rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 3.2rem;
  line-height: 1.15;
  margin-bottom: 1.2rem;
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 760px;
  margin: 0 auto 2.5rem auto;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

/* Calculator & Tool Widget (Unique Feature) */
.tool-section {
  max-width: 1140px;
  margin: 0 auto 5rem auto;
  padding: 0 1.5rem;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.tool-info h2 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: #fff;
}

.tool-info p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.calc-box {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
}

.calc-group {
  margin-bottom: 1.2rem;
}

.calc-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.calc-group input, .calc-group select {
  width: 100%;
  padding: 0.75rem;
  background: #1c2226;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: #fff;
  font-size: 1rem;
}

.calc-result {
  background: rgba(243, 156, 18, 0.1);
  border: 1px solid rgba(243, 156, 18, 0.3);
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
}

.calc-result-val {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent-gold);
}

/* Category Matrix / Hub Grid */
.hub-section {
  max-width: 1140px;
  margin: 0 auto 5rem auto;
  padding: 0 1.5rem;
}

.section-header {
  margin-bottom: 2.5rem;
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  color: #fff;
}

.section-header p {
  color: var(--text-secondary);
}

.matrix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.8rem;
}

.matrix-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 2rem;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
}

.matrix-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-orange);
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.card-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-orange);
  margin-bottom: 0.8rem;
}

.matrix-card h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  color: #fff;
  margin-bottom: 0.8rem;
}

.matrix-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.matrix-card .card-link {
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent-gold);
}

/* Article Layout */
.article-wrapper {
  max-width: 860px;
  margin: 3rem auto 5rem auto;
  padding: 0 1.5rem;
}

.article-header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.article-header h1 {
  font-family: var(--font-heading);
  font-size: 2.6rem;
  line-height: 1.2;
  color: #fff;
  margin-bottom: 1rem;
}

.article-meta {
  display: flex;
  gap: 1.5rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.article-content {
  color: #d1d5db;
  font-size: 1.08rem;
  line-height: 1.75;
}

.article-content h2 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  color: #fff;
  margin: 2.5rem 0 1rem 0;
}

.article-content h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: #f39c12;
  margin: 1.8rem 0 0.8rem 0;
}

.article-content p {
  margin-bottom: 1.4rem;
}

.article-content ul, .article-content ol {
  margin: 0 0 1.5rem 1.8rem;
}

.article-content li {
  margin-bottom: 0.5rem;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background: var(--bg-card);
  border-radius: 8px;
  overflow: hidden;
}

th, td {
  padding: 1rem;
  border: 1px solid var(--border-color);
  text-align: left;
}

th {
  background: #242c32;
  color: #fff;
  font-weight: 600;
}

/* Callout Box for Saporio */
.saporio-highlight {
  background: linear-gradient(135deg, rgba(230,92,0,0.12), rgba(243,156,18,0.08));
  border-left: 4px solid var(--accent-orange);
  border-radius: 10px;
  padding: 1.8rem;
  margin: 2.5rem 0;
}

.saporio-highlight h4 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 0.6rem;
}

.saporio-highlight p {
  color: var(--text-secondary);
  font-size: 0.98rem;
  margin-bottom: 1.2rem;
}

.disclaimer-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 1.2rem;
  border-radius: 8px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-top: 3rem;
}

/* Footer */
footer {
  background: #0b0d0f;
  border-top: 1px solid var(--border-color);
  padding: 4rem 1.5rem 2rem 1.5rem;
  color: var(--text-secondary);
}

.footer-grid {
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 1.2rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.6rem;
}

.footer-bottom {
  max-width: 1140px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
  font-size: 0.85rem;
}

@media (max-width: 850px) {
  .hero h1 { font-size: 2.3rem; }
  .tool-card { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
