:root {
  --ink: #102928;
  --muted: #5e706e;
  --green: #006d64;
  --green-2: #398e88;
  --mint: #dff3ed;
  --cream: #f4f6f1;
  --white: #ffffff;
  --line: #dbe3de;
  --shadow: 0 20px 60px rgba(14, 57, 53, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 300px;
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.page-glow {
  position: fixed;
  z-index: -1;
  width: 32rem;
  height: 32rem;
  border-radius: 50%;
  filter: blur(15px);
  pointer-events: none;
}

.page-glow--one {
  top: -18rem;
  right: -10rem;
  background: rgba(73, 166, 151, 0.14);
}

.page-glow--two {
  top: 35rem;
  left: -24rem;
  background: rgba(73, 166, 151, 0.09);
}

.site-header,
main,
footer {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 96px;
  border-bottom: 1px solid var(--line);
}

.brand {
  position: relative;
  display: inline-flex;
  width: 210px;
  height: 62px;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  text-decoration: none;
}

.brand__logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
}

.brand__fallback {
  display: none;
  padding: 8px 14px;
  color: white;
  border-radius: 10px;
  background: var(--green);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.brand--fallback .brand__fallback {
  display: inline-block;
}

.site-header__tag {
  padding: 8px 14px;
  color: var(--green);
  border: 1px solid rgba(0, 109, 100, 0.22);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero {
  padding: 48px 0 42px;
}

.eyebrow,
.section-label {
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  text-transform: uppercase;
}

.eyebrow span {
  width: 28px;
  height: 2px;
  background: var(--green);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: "Segoe UI", Arial, sans-serif;
}

h1 {
  max-width: none;
  margin-bottom: 16px;
  font-size: clamp(2.8rem, 4.25vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.055em;
  white-space: nowrap;
}

h1 em {
  color: var(--green-2);
  font-style: normal;
}

.hero__intro {
  max-width: 640px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: clamp(1rem, 1.7vw, 1.2rem);
  line-height: 1.65;
}

.search-wrap {
  position: relative;
  display: flex;
  width: min(100%, 720px);
  align-items: center;
}

.search-wrap__icon {
  position: absolute;
  left: 22px;
  width: 21px;
  fill: none;
  stroke: var(--green);
  stroke-linecap: round;
  stroke-width: 1.8;
}

.search-wrap input {
  width: 100%;
  height: 66px;
  padding: 0 24px 0 60px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 35px rgba(19, 70, 63, 0.06);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.search-wrap input:focus {
  border-color: var(--green-2);
  box-shadow: 0 0 0 4px rgba(57, 142, 136, 0.12), var(--shadow);
}

.search-wrap input:disabled {
  cursor: wait;
  opacity: 0.65;
}

.directory {
  padding: 38px 0 88px;
  border-top: 1px solid var(--line);
}

.directory__heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 32px;
}

.section-label {
  margin-bottom: 10px;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  letter-spacing: -0.045em;
}

.counter {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.9rem;
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.link-card {
  position: relative;
  display: flex;
  min-height: 290px;
  padding: 26px;
  overflow: hidden;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(0, 109, 100, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 6px 24px rgba(19, 70, 63, 0.045);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.link-card::after {
  position: absolute;
  right: -45px;
  bottom: -55px;
  width: 145px;
  height: 145px;
  border-radius: 50%;
  background: var(--mint);
  content: "";
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 220ms ease, transform 220ms ease;
}

.link-card:hover,
.link-card:focus-within {
  border-color: rgba(0, 109, 100, 0.35);
  box-shadow: var(--shadow);
  transform: translateY(-5px);
}

.link-card:hover::after,
.link-card:focus-within::after {
  opacity: 0.7;
  transform: scale(1);
}

.link-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.link-card__index {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--green);
  border-radius: 10px;
  background: var(--mint);
  font-family: "Segoe UI", sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
}

.link-card__arrow {
  color: var(--green);
  font-size: 1.5rem;
  transition: transform 200ms ease;
}

.link-card:hover .link-card__arrow {
  transform: translate(3px, -3px);
}

.link-card h3 {
  margin: 32px 0 10px;
  font-size: 1.3rem;
  letter-spacing: -0.035em;
}

.link-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.6;
}

.link-card a {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 28px;
  color: var(--green);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.link-card a::before {
  position: absolute;
  inset: -250px -26px -26px;
  content: "";
}

.status,
.empty-state,
.error-state {
  min-height: 230px;
  border: 1px dashed #c7d5ce;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.5);
}

.status,
.empty-state {
  display: grid;
  place-content: center;
  text-align: center;
}

.status p,
.empty-state p,
.error-state p {
  margin-bottom: 0;
  color: var(--muted);
}

.loader {
  width: 28px;
  height: 28px;
  margin: 0 auto 14px;
  border: 3px solid var(--mint);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.empty-state span {
  color: var(--green-2);
  font-size: 3rem;
  line-height: 1;
}

.empty-state h3 {
  margin: 10px 0 6px;
}

.empty-state button,
.error-state button {
  margin-top: 18px;
  padding: 10px 16px;
  color: white;
  border: 0;
  border-radius: 9px;
  background: var(--green);
  cursor: pointer;
  font-weight: 700;
}

.error-state {
  display: flex;
  padding: 42px;
  align-items: flex-start;
  gap: 20px;
}

.error-state__icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  color: #8b3e2f;
  border-radius: 50%;
  background: #f9e4de;
  font-weight: 800;
}

.error-state h3 {
  margin: 3px 0 8px;
}

[hidden] {
  display: none !important;
}

footer {
  display: flex;
  min-height: 100px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
}

footer p {
  margin: 0;
}

body.easter-egg-open {
  overflow: hidden;
}

.easter-egg {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  padding: 24px;
  overflow: hidden;
  place-items: center;
  color: white;
  background: rgba(0, 47, 43, 0.97);
  opacity: 0;
  transition: opacity 240ms ease;
}

.easter-egg::before {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(137, 231, 214, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(137, 231, 214, 0.06) 1px, transparent 1px);
  background-size: 42px 42px;
  content: "";
  mask-image: radial-gradient(circle at center, black, transparent 75%);
}

.easter-egg.is-active {
  opacity: 1;
}

.easter-egg__panel {
  position: relative;
  width: min(620px, 100%);
  padding: clamp(34px, 6vw, 68px);
  text-align: center;
  border: 1px solid rgba(159, 241, 224, 0.36);
  border-radius: 24px;
  background: rgba(0, 75, 68, 0.72);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.38), inset 0 0 60px rgba(123, 225, 207, 0.05);
  transform: translateY(18px) scale(0.96);
  transition: transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.easter-egg.is-active .easter-egg__panel {
  transform: translateY(0) scale(1);
}

.easter-egg__code {
  margin-bottom: 18px;
  color: #9ff1e0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.19em;
}

.easter-egg__binary {
  margin-bottom: 18px;
  color: rgba(159, 241, 224, 0.5);
  font: 0.73rem Consolas, "Courier New", monospace;
  letter-spacing: 0.1em;
}

.easter-egg h2 {
  margin-bottom: 14px;
  color: white;
  font-size: clamp(2rem, 6vw, 3.8rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.easter-egg__panel > p:not(.easter-egg__code, .easter-egg__binary) {
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.65;
}

.easter-egg__message {
  margin: 24px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(159, 241, 224, 0.18);
  font-style: italic;
}

.easter-egg button {
  margin-top: 28px;
  padding: 12px 20px;
  color: #004b44;
  border: 0;
  border-radius: 10px;
  background: #9ff1e0;
  cursor: pointer;
  font-weight: 700;
}

.easter-egg button:hover,
.easter-egg button:focus-visible {
  background: white;
  outline: 3px solid rgba(159, 241, 224, 0.28);
  outline-offset: 3px;
}

.easter-egg__particles,
.easter-egg__particles span {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.easter-egg__particles span::before {
  position: absolute;
  top: var(--y);
  left: var(--x);
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: #9ff1e0;
  box-shadow: 0 0 18px #9ff1e0;
  content: "";
  opacity: 0;
  animation: particle-burst 1.4s var(--delay) ease-out forwards;
}

@keyframes particle-burst {
  0% { opacity: 0; transform: scale(0); }
  22% { opacity: 0.9; transform: scale(1); }
  100% { opacity: 0; transform: translateY(-45px) scale(0.15); }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  .links-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    padding-top: 46px;
  }
}

@media (max-width: 620px) {
  .site-header,
  main,
  footer {
    width: min(100% - 30px, 1180px);
  }

  .site-header {
    min-height: 92px;
  }

  .brand {
    width: 175px;
    height: 58px;
  }

  .site-header__tag {
    display: none;
  }

  .hero {
    padding: 52px 0 56px;
  }

  h1 {
    font-size: clamp(2.75rem, 14vw, 4.4rem);
    white-space: normal;
  }

  .search-wrap input {
    height: 60px;
    padding-right: 20px;
  }

  .directory {
    padding-top: 42px;
  }

  .directory__heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .links-grid {
    grid-template-columns: 1fr;
  }

  .link-card {
    min-height: 260px;
  }

  .error-state {
    padding: 28px 22px;
  }

  footer {
    padding: 28px 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}

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