:root {
  --primary: #0284c7;
  --primary-dark: #0369a1;
  --primary-light: #e0f2fe;
  --primary-ultralight: #f0f9ff;
  --secondary: #0f766e;
  --text-main: #0f172a;
  --text-muted: #475569;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --border: #e2e8f0;
  --border-focus: #0284c7;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-full: 9999px;
  --transition: all 0.25s ease-in-out;
}

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

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header & Navigation */
header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-main);
}

.logo-icon {
  width: 42px;
  height: 42px;
  color: var(--primary);
  background: var(--primary-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 1.75rem;
  align-items: center;
}

nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  text-align: center;
}

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

.btn-primary:hover {
  background-color: var(--primary-dark);
}

.btn-secondary {
  background-color: var(--primary-light);
  color: var(--primary-dark);
}

.btn-secondary:hover {
  background-color: #bae6fd;
}

.btn-outline {
  border-color: var(--border);
  background: #ffffff;
  color: var(--text-main);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Hero Section */
.hero {
  padding: 4.5rem 0 3.5rem;
  background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 100%);
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 0.825rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: 2.5rem;
  line-height: 1.2;
  font-weight: 800;
  margin-bottom: 1.25rem;
  color: var(--text-main);
}

.hero p {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-card {
  background: #ffffff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.hero-card h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.feature-list svg {
  flex-shrink: 0;
  color: var(--secondary);
}

/* Sections */
.section {
  padding: 4.5rem 0;
}

.section-alt {
  background-color: #ffffff;
}

.section-head {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem;
}

.section-head h2 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.section-head p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* Grid & Cards */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

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

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: #cbd5e1;
}

.card-icon {
  width: 52px;
  height: 52px;
  background: var(--primary-ultralight);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin-bottom: 1.25rem;
  border: 1px solid var(--primary-light);
}

.card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Interactive Calculator / Quiz Block */
.tool-box {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow);
  max-width: 850px;
  margin: 0 auto;
}

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

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.form-group select,
.form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  background: #ffffff;
  color: var(--text-main);
  outline: none;
  transition: var(--transition);
}

.form-group select:focus,
.form-group input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.tool-result {
  margin-top: 2rem;
  padding: 1.5rem;
  border-radius: var(--radius-sm);
  background: var(--primary-ultralight);
  border: 1px solid var(--primary-light);
  display: none;
}

.tool-result.active {
  display: block;
}

/* Habits Table */
.data-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #ffffff;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

table.data-table th,
table.data-table td {
  padding: 1.15rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

table.data-table th {
  background: #f8fafc;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

table.data-table tr:last-child td {
  border-bottom: none;
}

table.data-table tr:hover {
  background-color: #f1f5f9;
}

/* Call to action */
.cta-banner {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  padding: 4rem 2rem;
  border-radius: var(--radius);
  text-align: center;
}

.cta-banner h2 {
  font-size: 2.25rem;
  margin-bottom: 1rem;
}

.cta-banner p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 2rem;
}

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

.btn-white:hover {
  background: #f1f5f9;
}

/* Contact & Info Pages */
.legal-content {
  background: #ffffff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 3rem;
  margin: 3rem 0;
}

.legal-content h1 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.legal-content h2 {
  font-size: 1.35rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--primary-dark);
}

.legal-content p, .legal-content ul {
  margin-bottom: 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.legal-content ul {
  padding-left: 1.5rem;
}

/* Footer */
footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 4.5rem 0 2rem;
  font-size: 0.9rem;
}

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

.footer-col h4 {
  color: #ffffff;
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
}

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

.footer-col a {
  color: #94a3b8;
  transition: var(--transition);
}

.footer-col a:hover {
  color: #ffffff;
}

.disclaimer-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.825rem;
  color: #94a3b8;
  line-height: 1.5;
  margin-top: 1rem;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: #64748b;
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  left: 1.5rem;
  max-width: 520px;
  background: #ffffff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius);
  padding: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cookie-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  nav ul {
    display: none;
  }
}

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