/* ToolAccess.io landing — design tokens shared with the member application. */

:root {
  color-scheme: light;

  --bg: #fbfbfd;
  --surface: #fff;
  --surface-2: #f4f4f8;
  --surface-3: #ecebf2;

  --text: #17161f;
  --text-muted: #61606d;
  --text-subtle: #8b8a97;

  --border: #e6e5ee;
  --border-strong: #d3d2df;

  --accent: #5a4ad4;
  --accent-hover: #4b3cc2;
  --accent-soft: #f0edff;
  --accent-contrast: #fff;

  --radius-sm: 0.5rem;
  --radius: 0.75rem;
  --radius-lg: 1rem;

  --shadow-sm: 0 1px 2px rgb(20 18 40 / 5%);
  --shadow-lg: 0 12px 48px rgb(20 18 40 / 16%);

  --transition: 140ms ease;
}

:root[data-theme='dark'] {
  color-scheme: dark;

  --bg: #0c0c10;
  --surface: #141419;
  --surface-2: #1b1b22;
  --surface-3: #23232c;

  --text: #f1f1f5;
  --text-muted: #a1a0ad;
  --text-subtle: #77768a;

  --border: #262630;
  --border-strong: #33333f;

  --accent: #9384ff;
  --accent-hover: #a79aff;
  --accent-soft: #1f1c39;
  --accent-contrast: #14121f;

  --shadow-sm: 0 1px 2px rgb(0 0 0 / 40%);
  --shadow-lg: 0 12px 48px rgb(0 0 0 / 56%);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body {
  min-width: 20rem;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-size: 0.9375rem;
}

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

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(100%, 68rem);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2rem);
}

.sr-only {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  margin: -1px;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ── Buttons ────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  background: var(--surface);
  font-size: 0.8125rem;
  font-weight: 560;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background var(--transition),
    border-color var(--transition);
}

.btn:hover {
  border-color: var(--text-subtle);
  background: var(--surface-2);
}

.btn-primary {
  border-color: transparent;
  color: var(--accent-contrast);
  background: var(--accent);
}

.btn-primary:hover {
  border-color: transparent;
  background: var(--accent-hover);
}

.btn-lg {
  padding: 0.65rem 1.2rem;
  font-size: 0.875rem;
}

/* ── Header ─────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
}

.header-row {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  height: 3.75rem;
}

.brand {
  display: inline-flex;
  gap: 0.55rem;
  align-items: center;
  font-size: 0.9375rem;
  font-weight: 660;
  letter-spacing: -0.025em;
}

.brand-mark {
  display: grid;
  width: 1.75rem;
  height: 1.75rem;
  place-items: center;
  border-radius: 0.55rem;
  color: var(--accent-contrast);
  background: var(--accent);
}

.brand-mark svg {
  width: 1.05rem;
  height: 1.05rem;
}

.brand-word > span {
  color: var(--text-subtle);
  font-weight: 500;
}

.site-nav {
  display: flex;
  gap: 1.25rem;
  margin-right: auto;
  margin-left: 1rem;
}

.site-nav a {
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 520;
  transition: color var(--transition);
}

.site-nav a:hover {
  color: var(--text);
}

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

/* ── Preferences ────────────────────────────────────────────── */

.preferences {
  position: relative;
}

.pref-trigger {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  padding: 0.42rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  background: transparent;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.pref-trigger:hover {
  color: var(--text);
  background: var(--surface-2);
}

.pref-trigger svg {
  width: 1rem;
  height: 1rem;
}

.pref-popover {
  position: absolute;
  right: 0;
  z-index: 40;
  display: grid;
  gap: 0.35rem;
  width: 13.5rem;
  padding: 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  margin-top: 0.4rem;
}

.pref-group {
  padding: 0 0.25rem;
  color: var(--text-subtle);
  font-size: 0.6875rem;
  font-weight: 620;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.segmented + .pref-group {
  margin-top: 0.5rem;
}

.segmented {
  display: grid;
  gap: 0.15rem;
  padding: 0.15rem;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  grid-template-columns: repeat(3, 1fr);
}

.segmented button {
  padding: 0.4rem 0.2rem;
  border: 0;
  border-radius: calc(var(--radius-sm) - 0.15rem);
  color: var(--text-muted);
  background: transparent;
  font: inherit;
  font-size: 0.6875rem;
  font-weight: 560;
  cursor: pointer;
}

.segmented button.active {
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.option-list {
  display: grid;
  gap: 0.1rem;
}

.option-list button {
  padding: 0.45rem 0.55rem;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  background: transparent;
  font: inherit;
  font-size: 0.8125rem;
  text-align: left;
  cursor: pointer;
}

.option-list button:hover {
  color: var(--text);
  background: var(--surface-2);
}

.option-list button.active {
  color: var(--accent);
  font-weight: 560;
}

/* ── Hero ───────────────────────────────────────────────────── */

.hero {
  padding: clamp(3.5rem, 9vw, 6.5rem) 0 clamp(2.5rem, 6vw, 4rem);
}

.hero h1 {
  max-width: 18ch;
  font-size: clamp(2rem, 5.5vw, 3.25rem);
}

.hero .lead {
  max-width: 54ch;
  margin-top: 1.15rem;
  color: var(--text-muted);
  font-size: clamp(0.9375rem, 1.6vw, 1.0625rem);
}

.hero-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.hero-points {
  display: flex;
  gap: 1.5rem;
  padding: 0;
  margin: 2.25rem 0 0;
  flex-wrap: wrap;
  list-style: none;
}

.hero-points li {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.hero-points li::before {
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--accent);
  content: '';
}

/* ── Sections ───────────────────────────────────────────────── */

.section {
  padding: clamp(3rem, 7vw, 4.5rem) 0;
}

.section.alt {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.section-head {
  margin-bottom: 2rem;
}

.section-head h2 {
  max-width: 24ch;
  font-size: clamp(1.375rem, 3vw, 1.875rem);
}

.section-head p {
  max-width: 56ch;
  margin-top: 0.6rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* ── Catalog ────────────────────────────────────────────────── */

.catalog-controls {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

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

.search svg {
  position: absolute;
  top: 50%;
  left: 0.65rem;
  width: 0.95rem;
  height: 0.95rem;
  color: var(--text-subtle);
  pointer-events: none;
  transform: translateY(-50%);
}

.search input {
  width: 100%;
  padding: 0.5rem 0.7rem 0.5rem 2.1rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: inherit;
  background: var(--surface);
  font: inherit;
  font-size: 0.875rem;
}

.search input:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.filters {
  display: flex;
  gap: 0.15rem;
  padding: 0.15rem;
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  flex-wrap: wrap;
}

.filters button {
  padding: 0.35rem 0.7rem;
  border: 0;
  border-radius: calc(var(--radius-sm) - 0.15rem);
  color: var(--text-muted);
  background: transparent;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 560;
  cursor: pointer;
  transition:
    color var(--transition),
    background var(--transition);
}

.filters button:hover {
  color: var(--text);
}

.filters button.active {
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.catalog-count {
  margin-bottom: 1rem;
  color: var(--text-subtle);
  font-size: 0.75rem;
}

.catalog-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
}

.catalog-message {
  padding: 3rem 1.5rem;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
  font-size: 0.875rem;
  text-align: center;
}

.tool-card {
  display: grid;
  gap: 0.5rem;
  align-content: start;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
}

.tool-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.tool-logo {
  position: relative;
  display: grid;
  overflow: hidden;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  color: var(--tool-accent, var(--accent));
  background: color-mix(in srgb, var(--tool-accent, var(--accent)) 12%, var(--surface));
  font-size: 0.6875rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

:root[data-theme='dark'] .tool-logo {
  color: #fff;
  background: color-mix(in srgb, var(--tool-accent, var(--accent)) 38%, var(--surface-3));
}

/* A constant light plate keeps dark-on-transparent logos legible in both themes. */
.tool-logo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0.2rem;
  background: #fff;
  object-fit: contain;
}

.tool-card h3 {
  font-size: 0.9375rem;
}

.tool-domain {
  color: var(--text-subtle);
  font-size: 0.75rem;
}

.tool-description {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 0.8125rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.chip {
  display: inline-flex;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  background: var(--surface-2);
  font-size: 0.6875rem;
  font-weight: 560;
  justify-self: start;
  margin-top: 0.25rem;
}

/* ── Steps ──────────────────────────────────────────────────── */

.steps {
  display: grid;
  gap: 0.75rem;
  padding: 0;
  margin: 0;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  list-style: none;
}

.steps li {
  display: grid;
  gap: 0.4rem;
  align-content: start;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.step-number {
  display: grid;
  width: 1.6rem;
  height: 1.6rem;
  place-items: center;
  border-radius: 50%;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 0.75rem;
  font-weight: 680;
  margin-bottom: 0.35rem;
}

.steps h3 {
  font-size: 0.9375rem;
}

.steps p {
  color: var(--text-muted);
  font-size: 0.8438rem;
}

/* ── Final call to action ───────────────────────────────────── */

.cta-card {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  flex-wrap: wrap;
}

.cta-card h2 {
  max-width: 22ch;
  font-size: clamp(1.25rem, 2.6vw, 1.625rem);
}

.cta-card p {
  margin-top: 0.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.cta-actions {
  display: grid;
  gap: 0.6rem;
  justify-items: center;
}

.cta-link {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.cta-link:hover {
  color: var(--text);
}

/* ── Footer ─────────────────────────────────────────────────── */

.site-footer {
  padding: clamp(2.75rem, 6vw, 4rem) 0 1.5rem;
  color: #f5f4fa;
  background: #09080f;
}

.footer-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: minmax(16rem, 1.7fr) repeat(4, minmax(7rem, 1fr));
}

.footer-brand {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.footer-brand .brand-word > span {
  color: #888694;
}

.footer-brand > p {
  max-width: 32rem;
  color: #9694a2;
  font-size: 0.8125rem;
}

.footer-socials {
  display: flex;
  gap: 0.5rem;
}

.footer-socials a {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid #292733;
  border-radius: 0.5rem;
  color: #aaa8b5;
  background: #121119;
  transition:
    color var(--transition),
    border-color var(--transition),
    background var(--transition);
}

.footer-socials a:hover {
  border-color: #494653;
  color: #fff;
  background: #1a1822;
}

.footer-socials svg {
  width: 1rem;
  height: 1rem;
}

.footer-column h2 {
  color: #f5f4fa;
  font-size: 0.6875rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-column ul {
  display: grid;
  gap: 0.65rem;
  padding: 0;
  margin: 1rem 0 0;
  list-style: none;
}

.footer-column a {
  color: #9694a2;
  font-size: 0.75rem;
  transition: color var(--transition);
}

.footer-column a:hover {
  color: #fff;
}

.footer-bottom {
  display: grid;
  gap: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #24222d;
  color: #777582;
  font-size: 0.6875rem;
  grid-template-columns: 1fr minmax(18rem, 1fr);
  margin-top: 2.75rem;
}

.footer-bottom p:last-child {
  max-width: 42rem;
}

@media (max-width: 46rem) {
  .site-nav {
    display: none;
  }

  .header-row {
    justify-content: space-between;
  }

  .header-actions .btn:not(.btn-primary) {
    display: none;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 46.01rem) and (max-width: 64rem) {
  .footer-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 1ms !important;
  }
}
