:root {
  --rwb-gradient: linear-gradient(180deg, #dc5656 33.3%, #ffffff 33.3%, #ffffff 66.6%, #50aa4d 66.6%);
  /* Light theme tokens (softer, minimalist) */
  --page-bg: linear-gradient(135deg, oklab(40.167% -0.00592 -0.17616) 0%, #0e163d 100%);
  --page-bg-solid: #0e163d;
  --card-bg: #0000001c;
  --text: #1e3a52;
  --text-light: #ffffff;
  --text-muted: #64748b;
  --muted: #94a3b8;
  --accent: #a5c7f5;;
  --accent-hover: #2563eb;
  --border: #e2e8f00e;
  --border-light: #f1f5f9;
  --divider: rgba(148,163,184,0.12);
  --divider-strong: rgba(148,163,184,0.2);
  --border-hover:#4167ba;
}

@font-face {
  font-family: 'FAIRE Luma Sans';
  src: url('assets/FAIRE-LumaSans-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'FAIRE Luma Sans';
  src: url('assets/FAIRE-LumaSans-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'FAIRE Luma Sans';
  src: url('assets/FAIRE-LumaSans-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'FAIRE Luma Sans';
  src: url('assets/FAIRE-LumaSans-Black.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'FAIRE Luma Sans';
  src: url('assets/FAIRE-LumaSans-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

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

body {
  font-family: 'FAIRE Luma Sans', system-ui, -apple-system, sans-serif;
  background: var(--page-bg);
  background-attachment: fixed;
  color: var(--text-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  min-height: 100vh;
  scroll-behavior: smooth;
}

h1, h2, h3 {
  letter-spacing: -0.025em;
  line-height: 1.2;
  font-weight:600;
}

/* Layout Container */
.container {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* Header */
.site-header {
  padding-top: 2rem;
  text-align: center;

}

@media (min-width: 640px) {
  .site-header {
    padding-top: 3rem;
    box-sizing: border-box;
    min-height:calc(100vh - 60px);
    display:grid;
  }
  .site-header .container {
    display: grid;
    align-content: space-between;
  }
}

.site-title {
  font-size: 1.875rem;
  /* font-weight: 400;
  color: var(--text-light); */
  margin-bottom: 1rem;
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-transform:uppercase;
}

@media (min-width: 640px) {
  .site-title {
    font-size: 2.25rem;
  }
}

@media (min-width: 1024px) {
  .site-title {
    font-size: 3rem;
  }
}

.site-subtitle {
  font-size: 1rem;
  color: #a5c7f5;
  line-height: 1.75;
  max-width: 800px;
  margin: 0 auto;
}

.site-subtitle p {
  margin-bottom: 0.75rem;
}

.site-subtitle p:last-child {
  margin-bottom: 0;
}

.subtitle-highlight {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-light);
}

@media (min-width: 640px) {
  .site-subtitle {
    font-size: 1.125rem;
  }

  .subtitle-highlight {
    font-size: 1.375rem;
  }
}

/* Sticky Header */
.sticky-header {
position: sticky;
    top: 0;
    z-index: 20;
    background: rgb(255 255 255 / 94%);
    border-bottom: 1px solid var(--border);
    box-shadow: -4px 7px 8px rgb(15 23 42 / 74%);
}

.sticky-header-inner {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

@media (min-width: 640px) {
  .sticky-header-inner {
    padding-top: 1rem;
    padding-left:3rem;
    padding-right:3rem;
  }
}

/* Header Image */
.header-image {
  display: block;
  width: 100%;
  max-width: 1200px;
  height: auto;
  margin: 0 auto 0 auto;
}
@media (min-width: 640px) {
  .header-image {
    margin: -4rem auto 0 auto;
  }
}

.criteria-weight {
  display: none;
}

/* Tooltip */
.tooltip-wrapper {
  position: relative;
  display: inline-block;
}

.tooltip-content {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: #ffffff;
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  line-height: 1.6;
  letter-spacing: -0.005em;
  white-space: normal;
  max-width: 280px;
  width: max-content;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  pointer-events: none;
  z-index: 1000;
}

.tooltip-content::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #ffffff;
}

/* Tooltips disabled */
/* .tooltip-wrapper:hover .tooltip-content {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-12px);
} */

/* Buttons */
.btn {
  display: inline-block;
  font-family: 'FAIRE Luma Sans', system-ui, -apple-system, sans-serif;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  border: none;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  letter-spacing: -0.01em;
}

.btn-primary {
  background: linear-gradient(135deg, rgba(165, 199, 245, 0.2) 0%, rgba(37, 99, 235, 0.25) 100%);
  color: #fff;
  padding: 0.75rem 2rem;
  font-size: 1rem;
  border: 2px solid rgba(165, 199, 245, 0.3);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.2),
              inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border-radius: 2rem;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  display: block;
  margin: 0 auto;
  transform:translateY(-50%);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover::before {
  left: 100%;
}

@media (min-width: 640px) {
  .btn-primary {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
  }
}

.btn-primary:hover {
  background: linear-gradient(135deg, rgba(165, 199, 245, 0.3) 0%, rgba(37, 99, 235, 0.35) 100%);
  border-color: rgba(165, 199, 245, 0.5);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3),
              inset 0 1px 0 rgba(255, 255, 255, 0.2);
  /* transform: translateY(-2px); */
}

.btn-primary:active {
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

/* Header Grid Layout */
.header-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.header-criterion {
  display: none;
}

.header-candidate {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  text-transform:uppercase;
}

@media (min-width: 640px) {
  .header-grid {
    grid-template-columns: minmax(200px, 2fr) repeat(3, minmax(80px, 1fr));
    gap: 0.75rem;
  }

  .header-criterion {
    display: flex;
    align-items: center;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--text);
  }

  .header-candidate {
    font-size: 0.875rem;
    letter-spacing: -0.015em;
  }

  .header-candidate + .header-candidate {
    border-left: 1px solid var(--divider-strong);
    padding-left: 0.6rem;
  }
}

@media (min-width: 1024px) {
  .header-grid {
    grid-template-columns: 0fr repeat(3, 1fr);
  }

  .header-criterion {
    display: flex;
    overflow: hidden;
    width: 0;
    opacity: 0;
    transition: width 0.3s ease, opacity 0.3s ease;
  }

  .sticky-header.is-stuck .header-grid {
    grid-template-columns: minmax(200px, 2fr) repeat(3, minmax(80px, 1fr));
  }

  .sticky-header.is-stuck .header-criterion {
    width: auto;
    opacity: 1;
  }

  .header-candidate + .header-candidate {
    border-left: none;
    padding-left: 0;
    transition: border-left 0.3s ease, padding-left 0.3s ease;
  }

  .sticky-header.is-stuck .header-candidate + .header-candidate {
    /* border-left: 1px solid var(--divider-strong); */
    padding-left: 0.6rem;
  }
}

@media (min-width: 768px) {
  .header-grid {
    gap: 1rem;
  }

  .header-criterion {
    font-size: 1rem;
  }

  .header-candidate {
    font-size: 1rem;
  }
}

/* Matrix Content */
.matrix-container {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .matrix-container {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
}

.pillar-section {
  margin-bottom: 2rem;
  scroll-margin-top: 80px;
}

@media (min-width: 640px) {
  .pillar-section {
    margin-bottom: 3rem;
  }
}

@media (min-width: 1024px) {
  .pillar-section {
    min-height: calc(100vh - 100px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 2rem;
    padding-bottom: 2rem;
    margin-bottom: 0;
  }
}

.pillar-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  color:var(--accent);
}

@media (min-width: 640px) {
  .pillar-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }
}

.criteria-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .criteria-list {
    gap: 1rem;
  }
}

/* Criteria Grid Layout */
.criteria-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.criterion-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

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

.candidate-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  position: relative;
}

.candidate-cell:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -0.25rem;
  top: 50%;
  transform: translateY(-50%);
  height: 80%;
  width: 1px;
  background: var(--divider);
}

@media (min-width: 640px) {
  .criteria-grid {
    display: grid;
    grid-template-columns: minmax(200px, 2fr) repeat(3, minmax(80px, 1fr));
    gap: 0.75rem;
    align-items: stretch;
  }

  .candidates-row {
    display: contents;
  }

  .candidate-cell:not(:last-child)::after {
    right: 0;
    height: 100%;
  }

  .criteria-grid > :nth-child(3),
  .criteria-grid > :nth-child(4) {
    border-left: 1px solid var(--divider);
    padding-left: 0.75rem;
  }

  .criteria-grid > .candidate-cell {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

@media (min-width: 768px) {
  .criteria-grid {
    gap: 1rem;
  }
}

/* Card */
.glass-card {
  /* background: var(--card-bg); */
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
  color: var(--text-light);
  padding: 0.75rem;
  transition: all 0.8s ease;
  position: relative;
  background: linear-gradient(90deg, transparent, transparent, transparent)

}

@media (min-width: 640px) {
  .glass-card {
    padding: 1rem;
  }
}

.glass-card:hover {
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.03);
  border-color: var(--border-hover);
  /* background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.082), transparent) */

  /* background: rgba(239, 246, 255, 0.3); */
}

.criterion-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.criterion-code {
  font-size: 0.75rem;
  font-weight: 700;
  color: #2563eb;
  background: #eff6ff;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  display:none;
}

@media (min-width: 640px) {
  .criterion-code {
    font-size: 0.875rem;
  }
}

.criterion-title {
  font-size: 0.875rem;
  cursor: help;
}

@media (min-width: 640px) {
  .criterion-title {
    font-size: 1.5rem;
  }
}

.criterion-desc {
  font-size: 0.75rem;
  line-height: 1.75;
  opacity:0.5;

}

@media (min-width: 640px) {
  .criterion-desc {
    font-size:1rem;
  }
  .glass-card:hover .criterion-weight {
  opacity: 1;
}
}

.criterion-weight {
position: absolute;
    top: 0;
    left: 0.875rem;
    font-size: 0.625rem;
    color: var(--text-muted);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    /* background: rgba(255, 255, 255, 0.9); */
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-weight: 500;
}



/* Star Rating */
.star-rating {
  display: flex;
  gap: 0.25rem;
  justify-content: center;
  align-items: center;
  position: relative;
}
@media (min-width: 640px) {
  .star-rating{
    gap:0.75rem;
  }
  .star-rating::before {
    content: attr(data-rating);
    position: absolute;
    font-size: 2rem;
    font-weight: 300;
    color: rgb(255 255 255 / 50%);
    pointer-events: none;
    user-select: none;
    bottom: 16px;
    }
}
.star-rating[data-rating="0"]::before {
  content: '';
}

.star {
  cursor: pointer;
  width: 1rem;
  height: 1rem;
  transition: all 0.2s ease;
  user-select: none;
}

.star svg {
  width: 100%;
  height: 100%;
  fill: var(--muted);
  transition: all 0.2s ease;
}



.star.active,
.star.filled {
  transform: scale(2);
}
@media (max-width: 640px) {
  .star {
    width: 1rem;
    height: 1rem;

  }
  .star.active,
  .star.filled {
  transform: scale(1);}
}

.star[data-value="1"].active svg,
.star[data-value="1"].filled svg {
  fill: #dc5656;
  filter: drop-shadow(0 0 4px rgba(220, 86, 86, 0.6));
}

.star[data-value="2"].active svg,
.star[data-value="2"].filled svg {
  fill: #ffffff;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.8));
}

.star[data-value="3"].active svg,
.star[data-value="3"].filled svg {
  fill: #50aa4d;
  filter: drop-shadow(0 0 4px rgba(80, 170, 77, 0.6));
}

/* Summary Section */
.summary-section {
  padding-bottom: 2rem;
  border-top: 1px solid #e2e8f00e;
  scroll-margin-top: 80px;
}

@media (min-width: 640px) {
  .summary-section {
    padding-bottom: 3rem;
  }
}

.summary-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  letter-spacing: -0.025em;
}

@media (min-width: 640px) {
  .summary-title {
    font-size: 1.875rem;
  }
}

.results-intro {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--accent);
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  text-align: center;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 640px) {
  .results-intro {
    font-size: 1.125rem;
  }
}

.results-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top:1rem;
}

.result-card {
  padding: 1rem;
  border-radius: 0.5rem;
  border-width: 2px;
  border-style: solid;
  opacity: 0;
  transform: translateY(0.5rem);
  transition: all 0.3s ease-out;
}

@media (min-width: 640px) {
  .result-card {
    padding: 1.25rem;
  }
}

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

.result-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .result-content {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.result-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.result-rank {
  font-size: 1.5rem;
  font-weight: 900;
}

@media (min-width: 640px) {
  .result-rank {
    font-size: 1.875rem;
  }
}

.result-rank-1 { color: #d97706; }
.result-rank-2 { color: #334155; }
.result-rank-3 { color: #2563eb; }

.result-name {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

@media (min-width: 640px) {
  .result-name {
    font-size: 1.25rem;
  }
}

.result-score {
  font-size: 1rem;
  font-weight: 600;
  color: #334155;
  background: #f8fafc;
  padding: 0.375rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
}

@media (min-width: 640px) {
  .result-score {
    font-size: 1.125rem;
  }
}

.result-card-1 { border-color: #fbbf24; }
.result-card-2 { border-color: #cbd5e1; }
.result-card-3 { border-color: #60a5fa; }

/* Contact Section */
#contact-section {
  position: relative;
  overflow: hidden;
  z-index: 3;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgb(37, 59, 163) 0%, rgb(24, 35, 95) 100%);
  clip-path: polygon(0 50px, 100% 0, 100% 100%, 0 100%);
  padding: 7rem 2rem 5rem;
  margin-top: 4rem;
}

.contact-content {
  display: flex;
  width: 100%;
  max-width: 1400px;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 4rem;
  position: relative;
}

@media (max-width: 768px) {
  .contact-content {
    flex-direction: column;
    text-align: center;
    gap: 3rem;
  }
}

.contact-subtitle {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  line-height: 1.3;
  /* letter-spacing: -0.025em; */
  margin: 0;
  font-weight:400;
  max-width: 800px;
  position: relative;
  text-align: left;
  padding-left: 25px;
}

@media (max-width: 768px) {
  .contact-subtitle {
    text-align: center;
    padding-left: 0;
    padding-top: 25px;
  }
}

.contact-subtitle::after {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 80%;
  background: var(--rwb-gradient);
  border-radius: 1.5px;
}

@media (max-width: 768px) {
  .contact-subtitle::after {
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 120px;
    height: 3px;
  }
}

.contact-link {
  display: inline-block;
  margin-top: 1.5rem;
  color: white;
  text-decoration: none;
  font-size: 1rem;
  letter-spacing: -0.01em;
  padding: 0.625rem 1.5rem;
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: all 0.3s ease;
}

.contact-link:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.35);
}

.logo-wrapper {
  width: 180px;
  height: auto;
  position: relative;
  transition: transform 0.3s ease;
}

.logo-wrapper:hover {
  transform: translateY(-5px);
}

.logo-wrapper::before {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 3px;
  background: #3b82f6;
  border-radius: 1.5px;
  opacity: 0;
  transition: opacity 0.3s ease, width 0.3s ease;
}

.logo-wrapper:hover::before {
  opacity: 1;
  width: 60px;
}

#logo {
  transition: filter 0.3s ease;
}

#logo:hover {
  filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.8));
}

#logo img {
  max-width: 100%;
  height: auto;
}

/* Pillar Navigation Container */
.pillar-nav-container {
  position: fixed;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

@media (min-width: 1024px) {
  .pillar-nav-container {
    display: flex;
  }
}

/* Navigation Carets */
.pillar-caret {
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 2rem;
  height: 2rem;
  color: rgba(255, 255, 255, 0.6);
  user-select: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pillar-caret svg {
  width: 100%;
  height: 100%;
}

.pillar-caret-up svg {
  transform: rotate(180deg);
}

.pillar-caret:hover {
  color: rgba(59, 130, 246, 1);
  transform: scale(1.3);
  filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.5));
}

.pillar-caret.disabled {
  opacity: 0.2;
  cursor: not-allowed;
  pointer-events: none;
}

/* Navigation Dots */
.pillar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.5rem 0;
}

.pillar-nav-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.pillar-nav-dot:hover {
  background: rgba(255, 255, 255, 0.6);
  transform: scale(1.2);
}

.pillar-nav-dot.active {
  background: rgba(59, 130, 246, 1);
  border-color: rgba(59, 130, 246, 1);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.6);
  transform: scale(1.3);
}
