@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700&display=swap");

:root {
  --ink: #13262d;
  --muted: #607178;
  --paper: #f8fbfa;
  --white: #ffffff;
  --teal: #1f6c70;
  --teal-dark: #155256;
  --mint: #dff2eb;
  --blue: #b9dcea;
  --lilac: #d9c4df;
  --line: #dce7e4;
  --shadow: 0 24px 70px rgba(25, 74, 75, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "DM Sans", system-ui, sans-serif;
  line-height: 1.6;
}
a { color: inherit; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  min-height: 84px;
  padding: 14px clamp(24px, 6vw, 96px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  background: rgba(248, 251, 250, 0.9);
  border-bottom: 1px solid rgba(220, 231, 228, 0.8);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font: 700 1.3rem "Manrope", sans-serif;
  letter-spacing: -0.03em;
}
.brand img { width: 44px; height: 44px; border-radius: 12px; }
.site-nav { display: flex; align-items: center; gap: clamp(18px, 2.5vw, 38px); }
.site-nav a {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.93rem;
  font-weight: 600;
}
.site-nav a:hover,
.site-nav a.active { color: var(--teal-dark); }
.site-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -9px;
  height: 2px;
  background: var(--teal);
}
.menu-button { display: none; }

.hero {
  min-height: calc(100vh - 84px);
  padding: clamp(70px, 10vw, 140px) clamp(24px, 7vw, 120px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 0.85fr);
  align-items: center;
  gap: clamp(50px, 8vw, 130px);
  overflow: hidden;
  background:
    radial-gradient(circle at 84% 22%, rgba(185, 220, 234, 0.4), transparent 28%),
    radial-gradient(circle at 92% 76%, rgba(217, 196, 223, 0.32), transparent 24%);
}
.eyebrow {
  margin: 0 0 18px;
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
h1, h2, h3 { font-family: "Manrope", sans-serif; }
h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(3.5rem, 7vw, 7.3rem);
  line-height: 0.96;
  letter-spacing: -0.065em;
}
h1 em { color: var(--teal); font-style: normal; font-weight: 500; }
.hero-text {
  max-width: 650px;
  margin: 34px 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }
.button {
  min-height: 52px;
  padding: 13px 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.button:hover { transform: translateY(-2px); }
.button.primary { color: white; background: var(--teal); box-shadow: 0 12px 30px rgba(31, 108, 112, 0.22); }
.button.primary:hover { background: var(--teal-dark); }
.button.secondary { border: 1px solid var(--line); background: rgba(255,255,255,0.7); }

.hero-visual { position: relative; min-height: 520px; }
.clarity-card {
  position: absolute;
  inset: 54px 20px 54px 24px;
  padding: clamp(32px, 5vw, 66px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(255,255,255,0.75);
  border-radius: 42px;
  background: linear-gradient(145deg, rgba(185,220,234,0.88), rgba(223,242,235,0.8) 53%, rgba(217,196,223,0.86));
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}
.clarity-label {
  font-size: 0.77rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.clarity-card strong { font: 600 clamp(1.8rem, 3.2vw, 3.2rem)/1.15 "Manrope", sans-serif; letter-spacing: -0.04em; }
.pattern-line { height: 70px; display: flex; align-items: end; gap: 9px; }
.pattern-line i { width: 8px; border-radius: 99px; background: rgba(19,38,45,0.72); }
.pattern-line i:nth-child(1) { height: 24%; }
.pattern-line i:nth-child(2) { height: 70%; }
.pattern-line i:nth-child(3) { height: 42%; }
.pattern-line i:nth-child(4) { height: 100%; }
.pattern-line i:nth-child(5) { height: 58%; }
.explore-section { padding: 110px clamp(24px, 7vw, 120px) 130px; background: var(--white); }
.section-heading { max-width: 720px; margin-bottom: 52px; }
h2 { margin: 0; font-size: clamp(2.25rem, 4.2vw, 4.2rem); line-height: 1.08; letter-spacing: -0.05em; }
.section-heading > p:last-child { color: var(--muted); font-size: 1.1rem; }
.resource-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.resource-card {
  min-height: 390px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 24px;
  background: linear-gradient(
    145deg,
    rgba(185, 220, 234, 0.72),
    rgba(223, 242, 235, 0.68) 52%,
    rgba(217, 196, 223, 0.72)
  );
  box-shadow: 0 14px 38px rgba(25, 74, 75, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  color: inherit;
  text-decoration: none;
}
.resource-card:hover { transform: translateY(-7px); box-shadow: var(--shadow); }
.resource-card h3 { margin: 4px 0 10px; font-size: 1.6rem; letter-spacing: -0.035em; }
.resource-card p { margin: 0; color: var(--muted); }
.coming-soon { margin-top: auto; padding-top: 28px; color: var(--teal); font-size: 0.82rem; font-weight: 700; }

.library-section {
  padding: 110px clamp(24px, 7vw, 120px) 130px;
  background:
    radial-gradient(circle at 90% 8%, rgba(185, 220, 234, 0.32), transparent 25%),
    var(--paper);
}
.library-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
}
.library-heading > div { max-width: 780px; }
.library-heading > div > p:last-child { color: var(--muted); font-size: 1.1rem; }
.library-count {
  min-width: 150px;
  margin: 0 0 12px;
  display: flex;
  flex-direction: column;
  color: var(--muted);
  text-align: right;
}
.library-count strong { color: var(--teal); font: 600 2.5rem/1 "Manrope", sans-serif; }
.library-count span { font-size: 0.82rem; }
.library-controls {
  margin-top: 46px;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(220px, 0.34fr);
  gap: 14px;
}
.search-field, .category-field {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
}
.search-field > span { color: var(--teal); font-size: 1.7rem; line-height: 1; }
.search-field input, .category-field select {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font: 500 1rem "DM Sans", sans-serif;
}
.category-field select { cursor: pointer; }
.library-status { min-height: 30px; margin: 22px 2px 12px; color: var(--muted); font-size: 0.88rem; }
.condition-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.condition-card {
  min-height: 230px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border: 1px solid rgba(255,255,255,0.78);
  border-radius: 22px;
  color: var(--ink);
  text-align: left;
  background: linear-gradient(145deg, rgba(185,220,234,0.6), rgba(223,242,235,0.64) 52%, rgba(217,196,223,0.58));
  box-shadow: 0 10px 28px rgba(25,74,75,0.07);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.condition-card:hover, .condition-card:focus-visible { transform: translateY(-4px); box-shadow: 0 18px 42px rgba(25,74,75,0.13); }
.condition-category {
  color: var(--teal);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.condition-card strong { margin-top: 16px; font: 600 1.3rem/1.25 "Manrope", sans-serif; letter-spacing: -0.025em; }
.condition-meta { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--muted); font-size: 0.82rem; }
.condition-meta b { color: var(--ink); }
.condition-open { margin-top: auto; padding-top: 22px; color: var(--teal); font-size: 0.8rem; font-weight: 700; }
.show-more {
  min-height: 50px;
  margin: 34px auto 0;
  padding: 12px 26px;
  display: block;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--teal-dark);
  background: white;
  font: 700 0.9rem "DM Sans", sans-serif;
  cursor: pointer;
}
.show-more[hidden] { display: none; }
.condition-dialog {
  width: min(900px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  border-radius: 28px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 30px 100px rgba(19,38,45,0.3);
}
.condition-dialog::backdrop { background: rgba(19,38,45,0.55); backdrop-filter: blur(5px); }
.dialog-shell { position: relative; padding: clamp(28px, 6vw, 64px); }
.dialog-close {
  position: sticky;
  top: 0;
  z-index: 2;
  width: 42px;
  height: 42px;
  margin: 0 0 -42px auto;
  display: block;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255,255,255,0.92);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.detail-header { padding-right: 54px; }
.detail-header h2 { font-size: clamp(2.1rem, 5vw, 4rem); }
.detail-abbreviation { margin: 12px 0 0; color: var(--teal); font-weight: 700; }
.detail-facts { margin: 36px 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--line); }
.detail-facts div { padding: 18px; background: white; }
.detail-facts dt { color: var(--muted); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.detail-facts dd { margin: 5px 0 0; font-weight: 600; }
.detail-sections { display: grid; gap: 14px; }
.detail-section { padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: white; }
.detail-section h3 { margin: 0 0 10px; font-size: 1rem; }
.detail-section p { margin: 4px 0; color: var(--muted); white-space: pre-wrap; }
.detail-section .empty-value { color: #94a1a5; font-style: italic; }
.detail-disclaimer { margin: 28px 0 0; color: var(--muted); font-size: 0.76rem; }
body.dialog-open { overflow: hidden; }

.about-section {
  padding: 120px clamp(24px, 7vw, 120px);
  display: grid;
  grid-template-columns: 1.1fr 0.8fr;
  gap: clamp(50px, 10vw, 150px);
  background: var(--ink);
  color: white;
}
.about-section .eyebrow { color: #9edbd1; }
.about-copy { align-self: end; color: #c6d2d5; font-size: 1.08rem; }
.about-copy .author { margin-top: 28px; color: white; }

footer {
  padding: 34px clamp(24px, 7vw, 120px);
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: center;
  gap: 30px;
  border-top: 1px solid var(--line);
  background: white;
  color: var(--muted);
  font-size: 0.8rem;
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { width: 42px; height: 42px; border-radius: 11px; }
.footer-brand div { display: flex; flex-direction: column; }
.footer-brand strong { color: var(--ink); font-size: 0.95rem; }

@media (max-width: 900px) {
  .site-header { min-height: 72px; }
  .menu-button {
    width: 44px;
    height: 44px;
    padding: 11px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    border: 0;
    border-radius: 10px;
    background: transparent;
  }
  .menu-button span:not(.sr-only) { width: 100%; height: 2px; background: var(--ink); }
  .site-nav {
    display: none;
    position: absolute;
    top: 71px;
    left: 0;
    right: 0;
    padding: 20px 24px 28px;
    flex-direction: column;
    align-items: flex-start;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }
  .site-nav.open { display: flex; }
  .site-nav a.active::after { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 80px; }
  .hero-visual { min-height: 480px; }
  .resource-grid { grid-template-columns: 1fr; }
  .resource-card { min-height: 300px; }
  .library-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .library-count { text-align: left; }
  .condition-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-section { grid-template-columns: 1fr; }
  footer { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  h1 { font-size: clamp(3.15rem, 16vw, 4.6rem); }
  .hero { padding-left: 20px; padding-right: 20px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-visual { min-height: 410px; }
  .clarity-card { inset: 54px 8px 42px 22px; border-radius: 30px; }
  .library-controls { grid-template-columns: 1fr; }
  .condition-list { grid-template-columns: 1fr; }
  .condition-card { min-height: 210px; }
  .detail-facts { grid-template-columns: 1fr; }
  .dialog-shell { padding: 24px 18px 34px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
