:root {
  --bg: #0a0d12;
  --bg-soft: #11161d;
  --surface: rgba(16, 22, 30, 0.9);
  --surface-strong: #171e27;
  --text: #eef3fb;
  --muted: #8e9aa8;
  --border: rgba(255, 255, 255, 0.09);
  --gold: #d39a42;
  --gold-deep: #a87327;
  --sage: #5fd1bb;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.32);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --container: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Aptos", "Segoe UI Variable", "Trebuchet MS", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(211, 154, 66, 0.16), transparent 24%),
    radial-gradient(circle at top right, rgba(95, 209, 187, 0.12), transparent 24%),
    linear-gradient(180deg, #06080c 0%, var(--bg) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.58), transparent 90%);
}

.page-shell {
  width: min(calc(100% - 32px), var(--container));
  margin: 0 auto;
  padding: 18px 0 28px;
}

.site-header,
.site-footer,
.hero,
.section-block {
  position: relative;
  z-index: 1;
}

.site-header,
.site-footer,
.tool-card,
.floating-card,
.mini-feed,
.feature-grid article,
.membership-card,
.faq-cards article,
.notification-drawer,
.auth-modal,
.legal-card {
  backdrop-filter: blur(18px);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(13, 18, 25, 0.88);
  box-shadow: var(--shadow);
  position: sticky;
  top: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

.brand strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
}

.brand small {
  color: var(--muted);
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, var(--gold) 0%, #f4d184 100%);
  color: white;
  font-weight: 700;
  font-size: 1.3rem;
}

.nav-links,
.nav-actions,
.hero-actions,
.hero-metrics,
.tool-card-top,
.rating-row,
.tool-footer,
.drawer-header,
.footer-links {
  display: flex;
  align-items: center;
}

.nav-links,
.footer-links {
  gap: 14px;
}

.nav-links a,
.footer-links a,
.text-link {
  color: var(--muted);
  text-decoration: none;
}

.nav-links a:hover,
.footer-links a:hover,
.text-link:hover {
  color: var(--text);
}

.nav-actions {
  gap: 12px;
}

.primary-button,
.secondary-button,
.ghost-button,
.tiny-button,
.icon-button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.primary-button,
.secondary-button,
.ghost-button,
.tiny-button {
  padding: 10px 14px;
  text-decoration: none;
}

.primary-button {
  background: linear-gradient(135deg, var(--gold-deep), var(--gold));
  color: white;
  box-shadow: 0 10px 24px rgba(184, 130, 46, 0.26);
}

.secondary-button,
.ghost-button,
.tiny-button {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid var(--border);
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.tiny-button:hover,
.icon-button:hover,
.save-button:hover {
  transform: translateY(-1px);
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  padding: 28px 0 16px;
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  color: var(--sage);
  margin-bottom: 10px;
  font-weight: 700;
}

.hero h1,
.section-heading h2,
.membership-card h2,
.auth-modal h2,
.legal-card h1,
.legal-card h2 {
  font-family: Georgia, "Times New Roman", serif;
}

.hero h1 {
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  line-height: 0.98;
  margin: 0;
  max-width: 7ch;
}

.section-heading h2,
.membership-card h2,
.auth-modal h2,
.legal-card h2 {
  margin: 0;
}

.hero-text,
.section-heading p,
.membership-card p,
.tool-card p,
.faq-cards p,
.feature-grid p,
.mini-feed span,
.notify-tag,
.notification-drawer p,
.site-footer p,
.modal-note,
.legal-card p,
.legal-card li {
  color: var(--muted);
}

.hero-copy {
  animation: riseIn 700ms ease forwards;
}

.hero-panel {
  display: grid;
  gap: 14px;
  animation: riseIn 900ms ease forwards;
}

.floating-card,
.mini-feed,
.section-block,
.notification-drawer,
.auth-modal,
.legal-card {
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.floating-card {
  padding: 22px;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(20, 27, 36, 0.96), rgba(14, 19, 26, 0.96));
}

.badge,
.tool-chip,
.notify-tag {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(95, 209, 187, 0.12);
  color: var(--sage);
  font-size: 0.8rem;
  font-weight: 700;
}

.floating-card h2 {
  margin: 12px 0 8px;
  font-size: 1.7rem;
}

.panel-chart {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.panel-chart div,
.hero-metrics li {
  padding: 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.panel-chart span,
.hero-metrics span,
.tool-meta,
.membership-form span,
.directory-toolbar span,
.rating-row span {
  display: block;
  color: var(--muted);
}

.panel-chart strong,
.hero-metrics strong {
  font-size: 1.4rem;
}

.mini-feed {
  padding: 16px;
  border-radius: var(--radius-lg);
  background: rgba(16, 22, 30, 0.9);
}

.mini-feed div + div {
  border-top: 1px solid var(--border);
  margin-top: 14px;
  padding-top: 14px;
}

.mini-feed strong {
  display: block;
  margin-top: 6px;
}

.hero-actions,
.hero-metrics {
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
  padding: 0;
  list-style: none;
}

.section-block,
.legal-card {
  border-radius: var(--radius-xl);
  background: rgba(14, 19, 26, 0.82);
}

.section-block,
.legal-card {
  padding: 22px;
  margin-top: 16px;
}

.section-heading,
.directory-toolbar,
.membership-card,
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.section-heading {
  align-items: end;
  margin-bottom: 16px;
}

.section-heading h2 {
  font-size: clamp(1.8rem, 4vw, 2.7rem);
}

.directory-toolbar {
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.directory-toolbar label,
.membership-form label,
.auth-form label {
  display: grid;
  gap: 8px;
}

.search-field {
  min-width: 280px;
  flex: 1;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  color: var(--text);
}

select option {
  background: var(--surface-strong);
  color: var(--text);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

.tool-grid,
.feature-grid,
.faq-cards {
  display: grid;
  gap: 14px;
}

.tool-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.tool-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: rgba(22, 29, 38, 0.88);
  transition: transform 200ms ease, border-color 200ms ease;
}

.tool-card:hover {
  transform: translateY(-4px);
  border-color: rgba(211, 154, 66, 0.35);
}

.tool-card h3 {
  margin: 0;
  font-size: 1.2rem;
}

.tool-card-top {
  justify-content: space-between;
}

.tool-meta {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}

.rating-row,
.tool-footer {
  gap: 8px;
  flex-wrap: wrap;
}

.save-button,
.icon-button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
}

.save-button.active {
  color: var(--gold-deep);
}

.stars {
  --rating: 5;
  position: relative;
  display: inline-block;
  font-size: 1rem;
  letter-spacing: 0.15em;
}

.stars::before {
  content: "★★★★★";
  color: rgba(211, 154, 66, 0.24);
}

.stars::after {
  content: "★★★★★";
  color: var(--gold);
  position: absolute;
  top: 0;
  left: 0;
  width: calc(var(--rating) / 5 * 100%);
  overflow: hidden;
}

.feature-grid,
.faq-cards {
  grid-template-columns: repeat(2, 1fr);
}

.feature-grid article,
.faq-cards article {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: rgba(22, 29, 38, 0.82);
  border: 1px solid var(--border);
}

.membership-card {
  align-items: center;
}

.membership-form {
  width: min(100%, 420px);
  display: grid;
  gap: 14px;
}

.faq-cards {
  grid-template-columns: repeat(3, 1fr);
}

.site-footer {
  align-items: center;
  margin-top: 16px;
  padding: 18px 22px;
  border-radius: var(--radius-xl);
  background: rgba(13, 18, 25, 0.94);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.footer-brand {
  margin-bottom: 12px;
}

.notification-drawer,
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10;
}

.notification-drawer {
  inset: 24px 24px 24px auto;
  width: min(380px, calc(100vw - 32px));
  padding: 18px;
  border-radius: 22px;
  background: rgba(13, 18, 25, 0.96);
  transform: translateX(120%);
  transition: transform 250ms ease;
}

.notification-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  justify-content: space-between;
  margin-bottom: 16px;
}

.drawer-list {
  display: grid;
  gap: 14px;
}

.drawer-list article {
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.modal-backdrop {
  display: grid;
  place-items: center;
  background: rgba(28, 19, 13, 0.34);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.auth-modal {
  width: min(540px, calc(100vw - 32px));
  padding: 22px;
  border-radius: 22px;
  background: rgba(13, 18, 25, 0.98);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
}

.auth-form {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.full-width {
  width: 100%;
}

.rating-picker {
  display: flex;
  gap: 10px;
  margin: 14px 0;
}

.rating-picker button {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  font: inherit;
  color: var(--text);
  cursor: pointer;
}

.rating-picker button.active {
  background: linear-gradient(135deg, var(--gold-deep), var(--gold));
  color: white;
}

.legal-body {
  width: min(calc(100% - 32px), 920px);
}

.legal-main {
  padding: 26px 0 12px;
}

.legal-card h1 {
  font-size: clamp(2.8rem, 7vw, 4.6rem);
  margin: 0 0 18px;
}

.legal-card p,
.legal-card li {
  line-height: 1.75;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1024px) {
  .hero,
  .membership-card,
  .section-heading,
  .site-footer {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }

  .tool-grid,
  .feature-grid,
  .faq-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .site-header {
    border-radius: 18px;
    position: static;
    flex-wrap: wrap;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(calc(100% - 20px), var(--container));
    padding-top: 14px;
  }

  .hero {
    padding-top: 18px;
  }

  .hero h1 {
    max-width: 100%;
  }

  .nav-links,
  .footer-links {
    flex-wrap: wrap;
  }

  .tool-grid,
  .feature-grid,
  .faq-cards {
    grid-template-columns: 1fr;
  }

  .section-block,
  .legal-card {
    padding: 22px;
  }

  .notification-drawer {
    inset: auto 10px 10px 10px;
    width: auto;
    transform: translateY(120%);
  }

  .notification-drawer.open {
    transform: translateY(0);
  }

  .hero-actions,
  .nav-actions {
    width: 100%;
  }

  .hero-actions a,
  .nav-actions button {
    flex: 1;
    text-align: center;
  }
}
