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

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

body {
  font-family: var(--font-sans);
  color: var(--color-gray-900);
  background-color: var(--color-white);
  line-height: 1.6;
  min-height: 100vh;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

ul, ol {
  list-style: none;
}

/* ===== Typography ===== */
h1, h2, h3, h4 {
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--color-navy);
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 500;
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
}

h3 {
  font-size: 1.25rem;
}

p {
  color: var(--color-gray-700);
  font-size: 1.0625rem;
  max-width: 62ch;
}

.text-large {
  font-size: 1.25rem;
  line-height: 1.7;
  color: var(--color-gray-700);
}

.text-small {
  font-size: 0.875rem;
  color: var(--color-gray-500);
  letter-spacing: 0.02em;
}

.label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-gray-500);
}

/* ===== Layout ===== */
.page-wrapper {
  display: flex;
  min-height: 100vh;
}

/* Left Vertical Rail */
.section-rail {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--rail-width);
  height: 100vh;
  background-color: var(--color-navy-deep);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 0;
  z-index: 100;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.rail-logo {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  margin-bottom: auto;
  padding-bottom: 2rem;
}

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  align-items: center;
}

.rail-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  color: rgba(255, 255, 255, 0.35);
  transition: color var(--transition);
}

.rail-item:hover,
.rail-item.active {
  color: var(--color-white);
}

.rail-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: currentColor;
  transition: transform var(--transition), background-color var(--transition);
}

.rail-item.active .rail-dot {
  background-color: var(--color-accent);
  transform: scale(1.25);
  box-shadow: 0 0 0 3px rgba(196, 122, 58, 0.25);
}

.rail-number {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.rail-line {
  width: 1px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.12);
  margin: 0.25rem 0;
}

/* Main Content Area */
.main-content {
  margin-left: var(--rail-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3rem;
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-gray-100);
  z-index: 50;
}

.logo {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-navy);
}

.logo span {
  font-weight: 400;
  color: var(--color-gray-500);
  margin-left: 0.35rem;
}

.header-nav {
  display: flex;
  gap: 2.5rem;
}

.header-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-gray-500);
  letter-spacing: 0.01em;
}

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

/* ===== Sections ===== */
.section {
  padding: var(--space-3xl) 3rem;
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-header {
  margin-bottom: var(--space-xl);
}

.section-header .label {
  margin-bottom: 0.75rem;
  display: block;
}

/* Thermal background section */
.thermal-bg {
  position: relative;
  background-color: var(--color-navy-deep);
  background-image: url("../images/thermal-cloud.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.thermal-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(6, 16, 24, 0.82) 0%,
    rgba(6, 16, 24, 0.72) 40%,
    rgba(6, 16, 24, 0.88) 100%
  );
  z-index: 1;
}

.thermal-bg > * {
  position: relative;
  z-index: 2;
}

/* Hero */
.hero {
  padding: var(--space-3xl) 3rem var(--space-2xl);
  background: linear-gradient(180deg, var(--color-off-white) 0%, var(--color-white) 100%);
  border-bottom: 1px solid var(--color-gray-100);
}

.hero.thermal-bg {
  background-image: url("../images/thermal-cloud.png");
  background-size: cover;
  background-position: center;
  border-bottom: none;
}

.hero.thermal-bg .hero-inner {
  color: var(--color-white);
}

.hero.thermal-bg h1 {
  color: var(--color-white);
}

.hero.thermal-bg .hero-lead {
  color: rgba(255, 255, 255, 0.82);
}

.hero.thermal-bg .label {
  color: var(--color-accent);
}

.hero.thermal-bg .hero-meta {
  border-top-color: rgba(255, 255, 255, 0.15);
}

.hero.thermal-bg .hero-meta-item p {
  color: var(--color-white);
}

.hero.thermal-bg .hero-meta-item .label {
  color: rgba(255, 255, 255, 0.5);
}

/* Assessment page thermal header */
.section.thermal-bg {
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-2xl);
}

.section.thermal-bg .label {
  color: var(--color-accent);
}

.section.thermal-bg .page-title {
  color: var(--color-white);
}

.section.thermal-bg .page-intro {
  color: rgba(255, 255, 255, 0.82);
}

.section.thermal-bg .card {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

.section.thermal-bg .card h3 {
  color: var(--color-white);
}

.section.thermal-bg .card p {
  color: rgba(255, 255, 255, 0.7);
}

.section.thermal-bg .card-number {
  color: var(--color-accent);
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero .label {
  margin-bottom: 1.25rem;
  display: block;
  color: var(--color-accent);
}

.hero h1 {
  margin-bottom: 1.75rem;
  max-width: 16ch;
}

.hero-lead {
  font-size: 1.25rem;
  line-height: 1.7;
  color: var(--color-gray-700);
  max-width: 48ch;
  margin-bottom: 2.5rem;
}

.hero-meta {
  display: flex;
  gap: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-gray-200);
  max-width: 48ch;
}

.hero-meta-item .label {
  margin-bottom: 0.25rem;
}

.hero-meta-item p {
  font-size: 0.9375rem;
  color: var(--color-navy);
  font-weight: 500;
}

/* Cards / Grid */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.card {
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  padding: 2rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.card:hover {
  border-color: var(--color-gray-300);
  box-shadow: 0 8px 24px rgba(11, 28, 44, 0.06);
}

.card-number {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

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

.card p {
  font-size: 0.9375rem;
  color: var(--color-gray-500);
}

/* CTA Block */
.cta-block {
  background-color: var(--color-navy);
  color: var(--color-white);
  padding: var(--space-2xl) 3rem;
}

.cta-block .section-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.cta-block h2 {
  color: var(--color-white);
  margin-bottom: 0.5rem;
}

.cta-block p {
  color: rgba(255, 255, 255, 0.7);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-primary {
  background-color: var(--color-white);
  color: var(--color-navy);
}

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

.btn-outline {
  background: transparent;
  color: var(--color-navy);
  border: 1px solid var(--color-gray-300);
}

.btn-outline:hover {
  border-color: var(--color-navy);
  background-color: var(--color-off-white);
}

.btn-accent {
  background-color: var(--color-accent);
  color: var(--color-white);
}

.btn-accent:hover {
  background-color: #b36b2e;
}

/* Footer */
.site-footer {
  margin-top: auto;
  padding: 2.5rem 3rem;
  border-top: 1px solid var(--color-gray-100);
  background-color: var(--color-off-white);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-brand {
  font-size: 0.875rem;
  color: var(--color-gray-500);
}

.footer-brand strong {
  color: var(--color-navy);
  font-weight: 500;
}

.footer-meta {
  font-size: 0.8125rem;
  color: var(--color-gray-500);
}

/* ===== Page specific helpers ===== */
.page-title {
  margin-bottom: 1rem;
}

.page-intro {
  font-size: 1.1875rem;
  line-height: 1.7;
  color: var(--color-gray-700);
  max-width: 54ch;
  margin-bottom: var(--space-xl);
}

.content-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.content-list li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-gray-100);
}

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

.list-marker {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border: 1px solid var(--color-gray-300);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--color-gray-500);
  margin-top: 0.15rem;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  :root {
    --rail-width: 56px;
  }
  
  .section,
  .hero,
  .cta-block,
  .site-header,
  .site-footer {
    padding-left: 1.75rem;
    padding-right: 1.75rem;
  }
  
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
  
  .header-nav {
    display: none;
  }
  
  .cta-block .section-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .hero-meta {
    flex-direction: column;
    gap: 1.25rem;
  }
}

@media (max-width: 600px) {
  .section-rail {
    display: none;
  }
  
  .main-content {
    margin-left: 0;
  }
}
