:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --text: #15323a;
  --muted: #5f7178;
  --line: #e4ece9;
  /* Brand palette shared with VirtuaMakers */
  --green: #61a138;
  --teal: #167082;
  --teal-deep: #01566b;
  --accent: var(--teal);
  --accent-soft: #e7f1f1;
  --radius: 14px;
  --maxw: 960px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: #ffffff;
}

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

/* Header */
.site-header {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.6rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
}

.brand-globe {
  font-size: 1rem;
}

.word-agor {
  color: #224587;
}

.word-a {
  color: var(--teal);
}

.word-virtua {
  color: var(--green);
}

.word-makers {
  color: var(--teal);
}

.back-link {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.15s ease;
}

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

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.auth-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease;
}

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

.auth-email {
  color: var(--muted);
  font-size: 0.9rem;
  margin-right: 0.6rem;
}

.hero-signin {
  text-align: center;
  font-size: 2rem;
  margin: 0.6rem 0 1.2rem;
}

.hero-signin .auth-link {
  font-size: inherit;
}

.join-signin {
  margin: 0.4rem 0 0.8rem;
}

.signin-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 20, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}

.signin-modal-backdrop[hidden] {
  display: none;
}

.signin-modal {
  position: relative;
  width: min(360px, 100%);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.4);
}

.signin-modal h2 {
  font-size: 1.3rem;
  text-align: center;
  margin-bottom: 1.2rem;
}

.signin-modal-close {
  position: absolute;
  top: 0.8rem;
  right: 0.9rem;
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}

.signin-modal-close:hover {
  color: var(--text);
}

.signin-providers {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.signin-provider-btn {
  padding: 0.65rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg);
  font: inherit;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.signin-provider-btn:hover {
  border-color: var(--teal);
  background: var(--accent-soft);
}

.signin-divider {
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin: 1rem 0;
}

.signin-divider::before,
.signin-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--line);
}

.signin-divider span {
  padding: 0 0.7rem;
}

.signin-email-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.signin-email-form input {
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
}

.signin-error {
  color: #c0392b;
  font-size: 0.85rem;
}

.signin-submit-btn {
  padding: 0.65rem 1rem;
  border-radius: 8px;
  border: none;
  background: var(--teal);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.signin-submit-btn:hover {
  opacity: 0.9;
}

.signin-toggle {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Layout */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hero {
  padding: 3rem 0 3.5rem;
}

.page-logo {
  display: block;
  width: min(520px, 90vw);
  height: auto;
  margin: 0.5rem auto 1.4rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--green);
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 800;
  margin-bottom: 1.1rem;
}

.lede {
  font-size: 1.18rem;
  color: var(--muted);
  max-width: 38rem;
}

.hero-fine {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 42rem;
  margin-top: 1rem;
}

.feature-grid {
  margin-top: 2.2rem;
}

.card.feature {
  padding: 0.9rem;
}

/* aspect-ratio + object-fit:contain keeps every feature tile's image the
   same height (and centered within that box) regardless of the source
   image's native aspect ratio, so captions line up across the row even
   when one tile's artwork isn't a perfect square like the others. */
.feature-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 8px;
}

a.card.feature {
  display: block;
  text-decoration: none;
  color: inherit;
}

.feature-caption {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--muted);
}

.feature-caption strong {
  color: var(--text);
}

/* Sections */
.section {
  padding: 3rem 0;
  border-top: 1px solid var(--line);
}

.section-title {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--teal);
  font-weight: 700;
  margin-bottom: 1rem;
}

.pillar-title {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 0.7rem;
}

/* Sub-sections nested under a pillar: no divider, tucked closer */
.subsection {
  border-top: none;
  padding-top: 0.6rem;
  padding-bottom: 1.4rem;
}

.intro {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 40rem;
  margin-bottom: 1.8rem;
}

.body-text {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 42rem;
  margin-top: 1.1rem;
}

.body-text a,
.intro a {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.body-text a:hover,
.intro a:hover {
  color: var(--teal-deep);
}

.body-list {
  margin: 0.7rem 0 0 1.2rem;
  max-width: 42rem;
  color: var(--muted);
  line-height: 1.7;
}

.body-list li {
  margin: 0.35rem 0;
}

.news-list {
  list-style: none;
  margin: 0.9rem 0 0;
  max-width: 42rem;
}

.news-item {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}

.news-image {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
  border-radius: 10px;
  margin-bottom: 0.7rem;
}

.news-item a {
  font-weight: 600;
  color: var(--text);
}

.news-item a:hover {
  color: var(--teal);
}

.news-source {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.news-quote {
  margin-top: 0.5rem;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--muted);
}

.product-table {
  width: 100%;
  max-width: 42rem;
  margin-top: 0.9rem;
  border-collapse: collapse;
}

.product-table th,
.product-table td {
  text-align: left;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--line);
}

.product-table th {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.product-table td a {
  font-weight: 600;
  color: var(--text);
}

.product-table td a:hover {
  color: var(--teal);
}

.body-quote {
  font-size: 1.1rem;
  font-style: italic;
  color: var(--text);
  max-width: 42rem;
  margin-top: 0.6rem;
  padding-left: 1rem;
  border-left: 3px solid var(--teal);
  line-height: 1.6;
}

.section-image {
  display: block;
  width: min(360px, 82%);
  height: auto;
  border-radius: 12px;
  margin: 0.4rem auto 1.2rem;
}

.shape-row {
  text-align: right;
}

.shape-row img {
  display: inline-block;
  width: min(360px, 90%);
  height: auto;
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: #d4e6dd;
  box-shadow: 0 12px 30px -16px rgba(20, 80, 70, 0.28);
}

.member {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.member-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: contain;
}

.avatar-photo {
  border-radius: 50%;
  object-fit: cover;
}

.avatar-photo-lg {
  border-radius: 50%;
  object-fit: cover;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}

.card:nth-child(even) .avatar {
  background: var(--green);
}

/* Member profile pages */
.profile-header {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 1.2rem;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  object-fit: contain;
  flex-shrink: 0;
}

.avatar-lg {
  width: 72px;
  height: 72px;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.profile-header h1 {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.profile-fields {
  margin-top: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 32rem;
}

.profile-field dt {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--teal);
  margin-bottom: 0.2rem;
}

/* flex-wrap: nowrap plus flex-basis 0 means every thumbnail always
   shares the row equally and never wraps to a second line, regardless
   of container width - portrait and landscape get the same layout,
   just scaled, instead of a breakpoint that only covers one case. */
.profile-gallery {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  margin: 0.4rem 0 1.2rem;
}

.profile-gallery img {
  flex: 1 1 0;
  min-width: 0;
  width: 0;
  aspect-ratio: 1 / 1;
  max-width: 110px;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.profile-gallery img:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -10px rgba(20, 80, 70, 0.35);
}

.profile-gallery img.active {
  box-shadow: 0 0 0 3px var(--teal);
}

/* Fixed-height frame so the featured photo doesn't resize the page as
   visitors click through different-aspect-ratio photos. Height is sized
   to fully contain the tallest photo in a typical 5-photo set. */
.profile-photo-frame {
  width: min(360px, 82%);
  height: 540px;
  margin: 0.4rem auto 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 12px;
  background: var(--accent-soft);
}

.profile-photo-frame img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.profile-field dd {
  color: var(--text);
  font-size: 1rem;
}

.profile-field dd ul {
  list-style: disc;
  padding-left: 1.3rem;
  margin: 0.5rem 0;
}

.profile-field dd li {
  margin: 0.35rem 0;
}

.member h3 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.member-org {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: -0.35rem;
}

/* Pills */
.pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
}

.pill-soon {
  color: var(--teal);
  background: var(--accent-soft);
}

#join .pill-soon {
  margin-top: 1rem;
}

.membership-stats {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.6rem;
  font-size: 1.05rem;
  color: var(--muted);
}

.membership-stats strong {
  color: var(--text);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.12s ease, background 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--teal);
  color: #fff;
}

.btn-primary:hover {
  background: var(--teal-deep);
}

.install-note {
  margin-top: 0.7rem;
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 32rem;
}

/* Footer */
.site-footer {
  max-width: var(--maxw);
  margin: 2rem auto 0;
  padding: 2rem 1.5rem 3rem;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.9rem;
}

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

@media (max-width: 560px) {
  .site-header {
    flex-wrap: wrap;
    gap: 0.6rem;
  }
}

/* Profile create/edit form */
.kind-selector {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin: 1rem 0 1.5rem;
}

.kind-selector[hidden],
.profile-form[hidden],
.admin-actions[hidden] {
  display: none;
}

.kind-option {
  padding: 0.65rem 1.2rem;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}

.kind-option.selected {
  border-color: var(--teal);
  background: var(--accent-soft);
  color: var(--teal-deep);
}

.profile-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 520px;
}

.profile-form label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.profile-form input,
.profile-form textarea {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
}

.profile-form textarea {
  min-height: 7rem;
  resize: vertical;
}

.profile-form .field-hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.3rem;
}

.profile-form-actions {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.form-status {
  font-size: 0.9rem;
  color: var(--muted);
}

.form-error {
  color: #c0392b;
  font-size: 0.9rem;
}

.btn-danger {
  background: #c0392b;
  color: #fff;
}

.btn-danger:hover {
  background: #a5301f;
}

.admin-actions {
  display: flex;
  gap: 0.7rem;
  margin: 1.5rem 0;
}
