:root {
  --bg-canvas: #18312b;
  --bg-surface: #24443a;
  --bg-surface-hover: #2c5246;
  --text-primary: #e0f2f1;
  --text-muted: #a7c7c2;
  --accent-primary: #ff6f59;
  --accent-secondary: #ff8e7d;
  --border-subtle: rgba(224, 242, 241, 0.14);
  --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-elevation: 0 16px 32px -4px rgba(10, 22, 19, 0.55);
  --glow-accent: 0 0 28px -4px rgba(255, 111, 89, 0.45);
}

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

html, body {
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.7;
  font-size: 16px;
  overflow-wrap: anywhere;
  hyphens: auto;
  position: relative;
}

body::before, body::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 111, 89, 0.14) 0%, rgba(255, 111, 89, 0) 70%);
  pointer-events: none;
  z-index: 0;
  animation: floatOrb 15s ease-in-out infinite alternate;
}

body::before {
  top: 120px;
  right: 5%;
}

body::after {
  top: 1100px;
  left: 3%;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-30px, 40px) scale(1.08); }
}

h1, h2, h3, h4 {
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.18;
  color: var(--text-primary);
}

h1 { font-size: clamp(2.25rem, 4vw, 3.35rem); margin-bottom: 0.5rem; }
h2 { font-size: clamp(1.55rem, 2.5vw, 2rem); margin-bottom: 0.85rem; }
h3 { font-size: 1.3rem; margin-bottom: 0.5rem; }
p { margin-bottom: 1.1rem; color: var(--text-primary); }
.text-muted { color: var(--text-muted); font-size: 0.95rem; }
.prose { max-width: 70ch; }

a {
  color: var(--text-primary);
  text-decoration: none;
  position: relative;
  transition: color 0.3s var(--ease-kinetic);
}

.link-grow {
  display: inline-block;
  font-weight: 700;
  color: var(--accent-primary);
  padding-bottom: 2px;
}

.link-grow::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 28%;
  height: 2px;
  background-color: var(--accent-primary);
  transition: width 0.35s var(--ease-kinetic);
}

.link-grow:hover::after {
  width: 100%;
}

.btn-coral {
  display: inline-block;
  background-color: var(--accent-primary);
  color: #12241f;
  font-weight: 800;
  padding: 0.8rem 1.5rem;
  border: 2px solid var(--accent-primary);
  border-radius: 0;
  cursor: pointer;
  letter-spacing: -0.01em;
  transition: transform 0.35s var(--ease-kinetic), box-shadow 0.35s var(--ease-kinetic), background-color 0.25s ease;
}

.btn-coral:hover, .btn-coral:focus-visible {
  background-color: var(--accent-secondary);
  transform: translateY(-3px);
  box-shadow: var(--glow-accent);
}

.btn-outline {
  display: inline-block;
  background: transparent;
  color: var(--text-primary);
  font-weight: 700;
  padding: 0.75rem 1.35rem;
  border: 1px solid var(--border-subtle);
  border-radius: 0;
  cursor: pointer;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.btn-outline:hover {
  border-color: var(--accent-primary);
  background-color: var(--bg-surface);
}

/* Header: static flow, brand far-left above centered nav row */
.site-header {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid var(--border-subtle);
  background-color: var(--bg-canvas);
  padding: 1.1rem 1.5rem 0.85rem;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.brand-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.75rem;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.brand-mark {
  width: 28px;
  height: 28px;
  background-color: var(--accent-primary);
  display: inline-grid;
  place-items: center;
  color: #18312b;
  font-weight: 900;
  font-size: 0.9rem;
  border-radius: 0;
}

.nav-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2.2rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border-subtle);
}

.nav-row a {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-muted);
  padding: 0.25rem 0;
}

.nav-row a:hover, .nav-row a[aria-current="page"] {
  color: var(--accent-primary);
}

.mobile-dots-btn {
  display: none;
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  padding: 0.35rem 0.75rem;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

/* Main Wrapper & Hero Band */
.main-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
  position: relative;
  z-index: 2;
}

.hero-band {
  padding: 1.25rem 0 1.75rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.25rem;
}

.hero-band-copy {
  max-width: 760px;
}

/* Badges & Avatars */
.badge-pill {
  display: inline-block;
  background-color: rgba(255, 111, 89, 0.16);
  color: var(--accent-primary);
  border: 1px solid rgba(255, 111, 89, 0.45);
  border-radius: 999px;
  padding: 0.2rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.65rem;
}

.author-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.avatar-round {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-primary);
}

/* Open Bento Regions (Square corners, thin dividers, no closed cards) */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.bento-region {
  background-color: var(--bg-surface);
  border-top: 2px solid var(--accent-primary);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1.65rem;
  border-radius: 0;
  transition: transform 0.4s var(--ease-kinetic), box-shadow 0.4s var(--ease-kinetic);
}

.bento-region:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-elevation);
}

.span-12 { grid-column: span 12; }
.span-8 { grid-column: span 8; }
.span-7 { grid-column: span 7; }
.span-6 { grid-column: span 6; }
.span-5 { grid-column: span 5; }
.span-4 { grid-column: span 4; }

/* Icon-led list rows with thin dividers */
.icon-list {
  list-style: none;
  margin-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.icon-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.row-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  background-color: var(--bg-canvas);
  color: var(--accent-primary);
  border: 1px solid var(--border-subtle);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.9rem;
  border-radius: 0;
}

.row-body h3, .row-body h4 {
  font-size: 1.05rem;
  margin-bottom: 0.2rem;
}

.row-body p {
  margin-bottom: 0;
  font-size: 0.94rem;
  color: var(--text-muted);
}

/* Visual Study Figures (Square corners, clear 3D render labels) */
.study-figure {
  margin: 1rem 0 1.25rem;
  position: relative;
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-canvas);
  border-radius: 0;
}

.study-figure img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 0;
}

.ratio-16-9 img { aspect-ratio: 16 / 9; }
.ratio-4-3 img { aspect-ratio: 4 / 3; }
.ratio-1-1 img { aspect-ratio: 1 / 1; }

.study-caption {
  padding: 0.65rem 0.9rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  background-color: rgba(24, 49, 43, 0.85);
}

.study-tag {
  color: var(--accent-primary);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  margin: 1.25rem 0;
  border: 1px solid var(--border-subtle);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
}

th, td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

th {
  background-color: var(--bg-canvas);
  color: var(--accent-primary);
  font-weight: 800;
}

/* FAQ Disclosures */
.faq-item {
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.9rem 0;
}

.faq-item summary {
  font-weight: 800;
  font-size: 1.08rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-item summary::after {
  content: "+";
  color: var(--accent-primary);
  font-size: 1.35rem;
  font-weight: 800;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-answer {
  padding-top: 0.75rem;
  color: var(--text-muted);
}

/* Forms & Interactive Tools */
.form-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.field-group label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.field-group input, .field-group select, .field-group textarea {
  width: 100%;
  padding: 0.75rem;
  background-color: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  border-radius: 0;
}

.field-group input:focus, .field-group select:focus, .field-group textarea:focus {
  outline: 2px solid var(--accent-primary);
  border-color: transparent;
}

.tool-output {
  background-color: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  padding: 1rem;
  font-family: monospace;
  font-size: 0.88rem;
  white-space: pre-wrap;
  margin-top: 1rem;
  min-height: 110px;
}

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.65s var(--ease-kinetic), transform 0.65s var(--ease-kinetic);
}

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

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background-color: #132722;
  padding: 2.5rem 1.5rem;
  margin-top: 3rem;
  position: relative;
  z-index: 2;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 0.75rem;
}

.footer-links a {
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.92rem;
}

.footer-links a:hover {
  color: var(--accent-primary);
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .span-8, .span-7, .span-6, .span-5, .span-4 {
    grid-column: span 6;
  }
}

@media (max-width: 768px) {
  .mobile-dots-btn {
    display: inline-block;
  }
  .nav-row {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1rem;
    background-color: var(--bg-surface);
    margin-top: 0.5rem;
  }
  .nav-row.nav-open {
    display: flex;
  }
  .span-8, .span-7, .span-6, .span-5, .span-4 {
    grid-column: span 12;
  }
}

@media (max-width: 480px) {
  .main-wrap {
    padding: 1rem;
  }
  .bento-region {
    padding: 1.15rem;
  }
}

@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
