/* ==========================================================================
   FairsFair HQ — v0.1
   Brand: deep teal, Montserrat, circular motifs, calm whitespace
   ========================================================================== */

:root {
  --teal-primary: #0f766e;
  --teal-dark: #115e59;
  --teal-highlight: #14b8a6;
  --teal-muted: #5eead4;
  --teal-tint: #f0fdfa;
  --teal-tint-deep: #ccfbf1;

  --text-primary: #134e4a;
  --text-body: #3f4f4e;
  --text-muted: #5c6b6a;
  --text-on-teal: #f0fdfa;

  --surface: #ffffff;
  --surface-alt: #f7fbfb;
  --border: rgba(15, 118, 110, 0.12);
  --shadow-soft: 0 4px 24px rgba(17, 94, 89, 0.08);
  --shadow-card: 0 8px 32px rgba(17, 94, 89, 0.1);

  --font: 'Montserrat', Arial, sans-serif;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-full: 9999px;

  --max-width: 72rem;
  --narrow-width: 42rem;
  --header-height: 4.5rem;

  --gradient-hero: linear-gradient(
    145deg,
    var(--teal-tint) 0%,
    var(--surface) 45%,
    var(--teal-tint-deep) 100%
  );
  --gradient-teal: linear-gradient(135deg, var(--teal-dark) 0%, var(--teal-primary) 55%, var(--teal-highlight) 100%);
}

/* Reset & base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-weight: var(--weight-medium);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text-body);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--teal-primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--teal-dark);
}

h1,
h2,
h3 {
  color: var(--text-primary);
  line-height: 1.25;
  margin-top: 0;
}

h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: var(--weight-bold);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: var(--weight-semibold);
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.125rem;
  font-weight: var(--weight-semibold);
}

p {
  margin: 0 0 var(--space-sm);
}

ul,
ol {
  margin: 0;
  padding: 0;
}

/* Utilities
   -------------------------------------------------------------------------- */

.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

.narrow {
  width: min(100% - 2rem, var(--narrow-width));
  margin-inline: auto;
}

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

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-sm);
  z-index: 1000;
  padding: 0.75rem 1rem;
  background: var(--teal-dark);
  color: var(--text-on-teal);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: var(--weight-semibold);
}

.skip-link:focus {
  top: var(--space-sm);
}

.eyebrow {
  font-size: 0.8125rem;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-primary);
  margin: 0 0 var(--space-xs);
}

.section__lead {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 38rem;
}

.section__note {
  margin-top: var(--space-lg);
  font-size: 0.9375rem;
  color: var(--text-muted);
  border-left: 3px solid var(--teal-highlight);
  padding-left: var(--space-md);
}

.section__note.center {
  border-left: none;
  padding-left: 0;
  text-align: center;
  max-width: 32rem;
  margin-inline: auto;
}

/* Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: var(--space-md);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: var(--text-primary);
}

.brand__logo {
  border-radius: var(--radius-full);
  object-fit: cover;
}

.brand__name {
  font-size: 1.125rem;
  font-weight: var(--weight-bold);
  letter-spacing: -0.02em;
}

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  list-style: none;
}

.site-nav a {
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: var(--weight-semibold);
  color: var(--text-muted);
}

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

/* Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.5rem;
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: var(--weight-semibold);
  text-decoration: none;
  border-radius: var(--radius-full);
  border: 2px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn--primary {
  background: var(--gradient-teal);
  color: var(--text-on-teal);
  box-shadow: var(--shadow-soft);
}

.btn--primary:hover {
  color: var(--text-on-teal);
  box-shadow: var(--shadow-card);
}

.btn--ghost {
  background: transparent;
  color: var(--teal-primary);
  border-color: var(--border);
}

.btn--ghost:hover {
  background: var(--teal-tint);
  border-color: var(--teal-primary);
}

/* Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: var(--space-xl) 0 var(--space-2xl);
  background: var(--gradient-hero);
}

.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.circle {
  position: absolute;
  border-radius: var(--radius-full);
  background: radial-gradient(circle at 30% 30%, var(--teal-muted), transparent 70%);
  opacity: 0.35;
}

.circle--lg {
  width: min(28rem, 80vw);
  height: min(28rem, 80vw);
  top: -8rem;
  right: -6rem;
}

.circle--md {
  width: 12rem;
  height: 12rem;
  bottom: 10%;
  left: 5%;
  opacity: 0.2;
}

.circle--sm {
  width: 6rem;
  height: 6rem;
  top: 40%;
  left: 45%;
  opacity: 0.15;
}

.hero__grid {
  position: relative;
  display: grid;
  gap: var(--space-xl);
  align-items: center;
}

.hero__content {
  max-width: 36rem;
}

.hero__lead {
  font-size: 1.1875rem;
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.hero__visual {
  margin: 0;
  padding: var(--space-md);
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
}

.hero__visual img {
  border-radius: var(--radius-md);
}

/* Sections
   -------------------------------------------------------------------------- */

.section {
  padding: var(--space-2xl) 0;
}

.section--alt {
  background: var(--surface-alt);
}

.section__header {
  margin-bottom: var(--space-xl);
}

.section__header .section__lead {
  margin-top: var(--space-sm);
}

/* Principles grid
   -------------------------------------------------------------------------- */

.principles-grid {
  display: grid;
  gap: var(--space-md);
  margin: var(--space-xl) 0;
}

.principle-card {
  padding: var(--space-md) var(--space-md) var(--space-md) calc(var(--space-md) + 3rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  position: relative;
}

.section--alt .principle-card,
.section:not(.section--alt) .principle-card {
  background: var(--surface);
}

.principle-card__icon {
  position: absolute;
  left: var(--space-md);
  top: var(--space-md);
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-full);
  background: var(--gradient-teal);
  opacity: 0.85;
}

.principle-card h3 {
  margin-bottom: 0.35rem;
}

.principle-card p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* Ecosystem
   -------------------------------------------------------------------------- */

.ecosystem-layout {
  display: grid;
  gap: var(--space-xl);
  align-items: start;
}

.ecosystem-layout__diagram {
  margin: 0;
  padding: var(--space-md);
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.ecosystem-layout__diagram img {
  border-radius: var(--radius-md);
}

.ecosystem-layout__nodes {
  display: grid;
  gap: var(--space-sm);
}

.node-card {
  padding: var(--space-md);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.node-card--hub {
  background: var(--gradient-teal);
  border-color: transparent;
  color: var(--text-on-teal);
}

.node-card--hub h3,
.node-card--hub p {
  color: inherit;
}

.node-card--hub p {
  opacity: 0.9;
}

.node-card h3 {
  margin-bottom: 0.35rem;
}

.node-card p {
  margin: 0 0 var(--space-xs);
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.node-card--hub p {
  color: var(--text-on-teal);
}

.node-card__url,
.node-card__link {
  font-size: 0.8125rem;
  font-weight: var(--weight-semibold);
}

.node-card__url {
  color: rgba(240, 253, 250, 0.85);
}

.node-card__link {
  text-decoration: none;
  color: var(--teal-primary);
}

.node-card__link:hover {
  color: var(--teal-dark);
}

.node-card--muted {
  background: var(--teal-tint);
  border-style: dashed;
}

/* Product blocks
   -------------------------------------------------------------------------- */

.product-block {
  display: grid;
  gap: var(--space-lg);
  align-items: center;
  position: relative;
}

.product-block__content {
  position: relative;
  z-index: 1;
  max-width: 36rem;
}

.feature-list {
  list-style: none;
  margin: var(--space-md) 0 var(--space-lg);
}

.feature-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.65rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.feature-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: var(--radius-full);
  background: var(--teal-highlight);
}

.product-block__accent {
  display: none;
}

.circle--product {
  width: min(20rem, 60vw);
  height: min(20rem, 60vw);
  position: relative;
  background: radial-gradient(circle, var(--teal-tint-deep) 0%, transparent 70%);
  opacity: 0.6;
}

/* Future list
   -------------------------------------------------------------------------- */

.future-list {
  list-style: none;
  margin-top: var(--space-lg);
}

.future-list li {
  position: relative;
  padding: var(--space-sm) 0 var(--space-sm) 2rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

.future-list li:last-child {
  border-bottom: none;
}

.future-list li::before {
  content: '';
  position: absolute;
  left: 0.25rem;
  top: 1.35rem;
  width: 0.625rem;
  height: 0.625rem;
  border: 2px solid var(--teal-primary);
  border-radius: var(--radius-full);
}

/* AI flow
   -------------------------------------------------------------------------- */

.flow-steps {
  list-style: none;
  display: grid;
  gap: var(--space-md);
  max-width: 40rem;
  margin: var(--space-xl) auto 0;
}

.flow-step {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
  padding: var(--space-md);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.flow-step__num {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--weight-bold);
  font-size: 0.9375rem;
  color: var(--text-on-teal);
  background: var(--gradient-teal);
  border-radius: var(--radius-full);
}

.flow-step h3 {
  margin-bottom: 0.25rem;
}

.flow-step p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* Trust grid
   -------------------------------------------------------------------------- */

.trust-grid {
  display: grid;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.trust-card {
  padding: var(--space-md);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.trust-card h3 {
  margin-bottom: 0.35rem;
}

.trust-card p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* Footer
   -------------------------------------------------------------------------- */

.site-footer {
  padding: var(--space-xl) 0 var(--space-lg);
  background: var(--teal-dark);
  color: rgba(240, 253, 250, 0.85);
}

.site-footer a {
  color: var(--teal-muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--text-on-teal);
}

.site-footer__grid {
  display: grid;
  gap: var(--space-lg);
}

.brand--footer {
  color: var(--text-on-teal);
}

.brand--footer .brand__name {
  color: inherit;
}

.site-footer__tagline {
  margin: var(--space-sm) 0 0;
  font-size: 0.9375rem;
  max-width: 20rem;
  opacity: 0.85;
}

.site-footer__nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.site-footer__nav a {
  font-size: 0.875rem;
  font-weight: var(--weight-semibold);
}

.site-footer__meta p {
  margin: 0 0 0.25rem;
  font-size: 0.8125rem;
  opacity: 0.75;
}

.site-footer__domain {
  font-weight: var(--weight-semibold);
  color: var(--teal-muted);
  opacity: 1;
}

/* Responsive
   -------------------------------------------------------------------------- */

@media (min-width: 40rem) {
  .principles-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (min-width: 48rem) {
  .hero__grid {
    grid-template-columns: 1fr 1fr;
  }

  .ecosystem-layout {
    grid-template-columns: 1.1fr 1fr;
  }

  .product-block {
    grid-template-columns: 1fr auto;
  }

  .product-block--reverse {
    direction: rtl;
  }

  .product-block--reverse > * {
    direction: ltr;
  }

  .product-block__accent {
    display: block;
  }

  .site-footer__grid {
    grid-template-columns: 1.5fr 1fr 1fr;
    align-items: start;
  }
}

@media (min-width: 64rem) {
  .principles-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .principle-card {
    padding: var(--space-lg) var(--space-md) var(--space-md);
    padding-top: calc(var(--space-lg) + 2.5rem);
    text-align: center;
  }

  .principle-card__icon {
    left: 50%;
    transform: translateX(-50%);
    top: var(--space-md);
  }
}

@media (max-width: 47.99rem) {
  .site-nav__list {
    gap: 0.5rem 0.875rem;
  }

  .site-nav a {
    font-size: 0.8125rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
