/* ============================================================
   Brighton CTO – Global Styles
   ============================================================ */

/* ----- Design tokens ----- */
:root {
  --color-primary:      #0f2240;
  --color-accent:       #2563eb;
  --color-accent-light: #dbeafe;
  --color-teal:         #0891b2;
  --color-teal-light:   #e0f2fe;
  --color-bg:           #ffffff;
  --color-surface:      #f8fafc;
  --color-border:       #e2e8f0;
  --color-text:         #1e293b;
  --color-muted:        #64748b;
  --color-white:        #ffffff;

  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont,
               'Segoe UI', Roboto, sans-serif;

  --radius-sm:  0.375rem;
  --radius-md:  0.75rem;
  --radius-lg:  1.25rem;

  --shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md:  0 4px 12px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.05);
  --shadow-lg:  0 10px 30px rgba(0,0,0,.10);

  --max-width:  1100px;
  --nav-height: 64px;
}

/* ----- Reset ----- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }

/* ----- Typography ----- */
h1, h2, h3, h4 {
  line-height: 1.25;
  font-weight: 700;
  color: var(--color-primary);
}
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }
p  { margin-bottom: 1rem; color: var(--color-muted); }
p:last-child { margin-bottom: 0; }

/* ----- Layout helpers ----- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 1.5rem;
}
.section {
  padding-block: 4.5rem;
}
.section--alt {
  background: var(--color-surface);
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background .18s, color .18s, border-color .18s, box-shadow .18s;
  text-decoration: none;
}
.btn--primary {
  background: var(--color-accent);
  color: var(--color-white);
}
.btn--primary:hover {
  background: #1d4ed8;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(37,99,235,.35);
}
.btn--outline {
  background: transparent;
  color: var(--color-accent);
  border-color: var(--color-accent);
}
.btn--outline:hover {
  background: var(--color-accent-light);
  text-decoration: none;
}
.btn--ghost {
  background: rgba(255,255,255,.12);
  color: var(--color-white);
  border-color: rgba(255,255,255,.35);
}
.btn--ghost:hover {
  background: rgba(255,255,255,.22);
  text-decoration: none;
}
.btn--sm {
  padding: .45rem 1rem;
  font-size: .82rem;
}

/* ----- Badge ----- */
.badge {
  display: inline-block;
  padding: .2rem .65rem;
  border-radius: 9999px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .02em;
}
.badge--teal {
  background: var(--color-teal-light);
  color: var(--color-teal);
}
.badge--blue {
  background: var(--color-accent-light);
  color: var(--color-accent);
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: var(--color-primary);
  display: flex;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 1.5rem;
}
.nav__logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  color: var(--color-white);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -.01em;
}
.nav__logo-mark {
  width: 36px;
  height: 36px;
  background: var(--color-accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.nav__logo-img {
  height: 38px;
  width: auto;
  display: block;
  flex-shrink: 0;
}
.nav__logo-text {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--color-white);
}
.footer__logo-img {
  height: 32px;
  width: auto;
  display: block;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: .25rem;
}
.nav__link {
  color: rgba(255,255,255,.75);
  padding: .4rem .85rem;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 500;
  transition: color .15s, background .15s;
  text-decoration: none;
}
.nav__link:hover,
.nav__link.active {
  color: #fff;
  background: rgba(255,255,255,.1);
  text-decoration: none;
}
.nav__cta {
  margin-left: .5rem;
}

/* Hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.nav__hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: .2s;
}

/* Mobile nav */
.nav__mobile {
  display: none;
  position: absolute;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--color-primary);
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 1rem 1.5rem 1.25rem;
  flex-direction: column;
  gap: .25rem;
  box-shadow: 0 8px 20px rgba(0,0,0,.25);
}
.nav__mobile.open { display: flex; }
.nav__mobile .nav__link { padding: .65rem .85rem; font-size: 1rem; }

@media (max-width: 680px) {
  .nav__links, .nav__cta { display: none; }
  .nav__hamburger { display: flex; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: var(--color-primary);
  color: #fff;
  padding-block: 5.5rem 4.5rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 80% 50%, rgba(37,99,235,.25) 0%, transparent 70%),
    radial-gradient(ellipse 50% 80% at 10% 100%, rgba(8,145,178,.2) 0%, transparent 60%);
  pointer-events: none;
}
.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.hero__eyebrow {
  display: inline-block;
  background: rgba(37,99,235,.3);
  color: #93c5fd;
  padding: .3rem .9rem;
  border-radius: 9999px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.hero h1 {
  color: #fff;
  margin-bottom: 1.25rem;
}
.hero h1 span {
  color: #60a5fa;
}
.hero__desc {
  color: rgba(255,255,255,.75);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}
.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255,255,255,.12);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: 3rem;
}
.hero__stat {
  background: rgba(255,255,255,.06);
  padding: 1.5rem 1.25rem;
  text-align: center;
}
.hero__stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: #60a5fa;
  line-height: 1;
}
.hero__stat-label {
  font-size: .78rem;
  color: rgba(255,255,255,.6);
  margin-top: .35rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.hero__visual {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero__graphic {
  width: 100%;
  max-width: 380px;
  aspect-ratio: 1;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9rem;
  user-select: none;
}

@media (max-width: 840px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual { display: none; }
  .hero__stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
  .hero { padding-block: 3.5rem 3rem; }
  .hero__stats { grid-template-columns: 1fr; gap: 0; }
}

/* ============================================================
   ABOUT / SECTION CARDS
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.card__icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}
.card h3 {
  margin-bottom: .6rem;
}

/* ============================================================
   SECTION HEADER
   ============================================================ */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}
.section-header p {
  max-width: 560px;
  margin-inline: auto;
  font-size: 1.05rem;
}

/* ============================================================
   ORGANISERS
   ============================================================ */
.organiser-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
.organiser-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
}
.organiser-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.organiser-avatar {
  width: 72px;
  height: 72px;
  background: var(--color-accent-light);
  border-radius: 50%;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-accent);
  overflow: hidden;
}
.organiser-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.organiser-card h3 { margin-bottom: .15rem; }
.organiser-card .role { color: var(--color-muted); font-size: .88rem; margin-bottom: .15rem; }
.organiser-card .company { color: var(--color-accent); font-size: .88rem; font-weight: 600; margin-bottom: 1rem; }
.organiser-card p { font-size: .9rem; }
.social-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: var(--color-muted);
  font-size: .82rem;
  font-weight: 500;
  text-decoration: none;
  margin-top: .75rem;
}
.social-link:hover { color: var(--color-accent); text-decoration: none; }

/* ============================================================
   COMMUNITY LINKS
   ============================================================ */
.community-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 2.5rem;
}
.community-link-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  padding: 2rem 2.5rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-align: center;
  text-decoration: none;
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
  min-width: 200px;
}
.community-link-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--color-text);
}
.community-link-card .icon { font-size: 2.5rem; }
.community-link-card strong { font-size: 1rem; font-weight: 700; }
.community-link-card span { font-size: .85rem; color: var(--color-muted); }

/* ============================================================
   EVENTS
   ============================================================ */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}
.event-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
  display: flex;
  flex-direction: column;
}
.event-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.event-card__date-bar {
  background: var(--color-primary);
  color: #fff;
  padding: .85rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.event-card__date-box {
  background: var(--color-accent);
  border-radius: var(--radius-sm);
  width: 52px;
  height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.event-card__date-box .month {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  line-height: 1;
}
.event-card__date-box .day {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1;
}
.event-card__date-info .time {
  font-size: .88rem;
  color: rgba(255,255,255,.75);
}
.event-card__date-info .weekday {
  font-size: .8rem;
  color: rgba(255,255,255,.5);
}
.event-card__body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.event-card h3 {
  font-size: 1.05rem;
  margin-bottom: .25rem;
}
.event-card__location {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .85rem;
  color: var(--color-muted);
}
.event-card__desc {
  font-size: .9rem;
  color: var(--color-muted);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.event-card__footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.event-card__rsvp {
  font-size: .82rem;
  color: var(--color-muted);
}

/* Loading / empty states */
.state-box {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--color-muted);
}
.state-box .icon { font-size: 3rem; margin-bottom: 1rem; }
.state-box h3 { margin-bottom: .5rem; }

/* ============================================================
   MEMBERS
   ============================================================ */
.members-filter {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
  margin-bottom: 2.5rem;
}
.members-filter input {
  flex: 1;
  min-width: 220px;
  padding: .6rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-family: inherit;
  background: var(--color-bg);
  color: var(--color-text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.members-filter input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.members-filter select {
  padding: .6rem .9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-family: inherit;
  background: var(--color-bg);
  color: var(--color-text);
  cursor: pointer;
  outline: none;
}
.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}
.member-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: .6rem;
  transition: box-shadow .2s, transform .2s;
}
.member-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.member-card__header {
  display: flex;
  align-items: center;
  gap: .85rem;
}
.member-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-accent);
  flex-shrink: 0;
  overflow: hidden;
}
.member-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.member-card__name { font-weight: 700; font-size: 1rem; }
.member-card__title { font-size: .82rem; color: var(--color-muted); }
.member-card__company {
  font-size: .85rem;
  font-weight: 600;
  color: var(--color-accent);
}
.member-card__bio {
  font-size: .85rem;
  color: var(--color-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.member-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .25rem;
}
.tag {
  font-size: .72rem;
  font-weight: 600;
  padding: .2rem .55rem;
  border-radius: 9999px;
  background: var(--color-surface);
  color: var(--color-muted);
  border: 1px solid var(--color-border);
}
.member-card__footer {
  display: flex;
  gap: .5rem;
  margin-top: auto;
  padding-top: .5rem;
  border-top: 1px solid var(--color-border);
}
.member-card__footer a {
  font-size: .8rem;
  color: var(--color-muted);
  display: flex;
  align-items: center;
  gap: .25rem;
  text-decoration: none;
  transition: color .15s;
}
.member-card__footer a:hover { color: var(--color-accent); }
.member-count {
  color: var(--color-muted);
  font-size: .9rem;
  margin-top: .5rem;
}

/* ============================================================
   CTA BANNER
   ============================================================ */
.cta-banner {
  background: var(--color-primary);
  color: #fff;
  padding-block: 4rem;
  text-align: center;
}
.cta-banner h2 { color: #fff; margin-bottom: .75rem; }
.cta-banner p  { color: rgba(255,255,255,.7); max-width: 520px; margin-inline: auto; margin-bottom: 2rem; }
.cta-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: center;
}

/* ============================================================
   CONTRIBUTE GUIDE (members page)
   ============================================================ */
.contribute-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}
.step {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
}
.step__num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: var(--color-accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  font-weight: 700;
}
.step__content h4 { margin-bottom: .2rem; font-size: .95rem; }
.step__content p  { font-size: .85rem; }

/* ============================================================
   SILICON BRIGHTON NETWORK SECTION
   ============================================================ */
.silicon-section {
  background: linear-gradient(135deg, #f0fdfc 0%, #e8fffe 100%);
  border-top: 1px solid #99f6e4;
  border-bottom: 1px solid #99f6e4;
}
.silicon-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3.5rem;
  align-items: center;
}
.silicon-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.silicon-logo img {
  max-width: 220px;
  width: 100%;
  height: auto;
}
.silicon-content .badge--teal {
  margin-bottom: .85rem;
}
.silicon-content h2 {
  margin-bottom: .75rem;
  color: #0a4a47;
}
.silicon-content p {
  margin-bottom: 1.5rem;
  color: #2d6a65;
}
.silicon-network-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1.75rem;
}
.silicon-chip {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .3rem .75rem;
  background: rgba(59,214,212,.15);
  border: 1px solid rgba(59,214,212,.4);
  border-radius: 9999px;
  font-size: .78rem;
  font-weight: 600;
  color: #0e7a77;
}
@media (max-width: 680px) {
  .silicon-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .silicon-logo { justify-content: center; }
  .silicon-logo img { max-width: 180px; }
  .silicon-network-chips { justify-content: center; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: #070f1f;
  color: rgba(255,255,255,.55);
  padding-block: 2.5rem;
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.footer__brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: rgba(255,255,255,.8);
  font-weight: 700;
  text-decoration: none;
  font-size: .95rem;
}
.footer__links {
  display: flex;
  gap: 1.5rem;
}
.footer__links a {
  color: rgba(255,255,255,.5);
  font-size: .85rem;
  text-decoration: none;
  transition: color .15s;
}
.footer__links a:hover { color: #fff; }
.footer__network {
  font-size: .82rem;
  width: 100%;
  text-align: center;
  margin-top: 1rem;
  color: rgba(255,255,255,.45);
}
.footer__network a {
  color: #5eead4;
  text-decoration: none;
}
.footer__network a:hover { text-decoration: underline; }
.footer__copy {
  font-size: .82rem;
  width: 100%;
  text-align: center;
  margin-top: .5rem;
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 1rem;
}

/* ============================================================
   PAGE HERO (inner pages)
   ============================================================ */
.page-hero {
  background: var(--color-primary);
  color: #fff;
  padding-block: 3.5rem;
  text-align: center;
}
.page-hero h1 { color: #fff; margin-bottom: .65rem; }
.page-hero p  { color: rgba(255,255,255,.7); max-width: 560px; margin-inline: auto; font-size: 1.05rem; }

/* ============================================================
   UTILITIES
   ============================================================ */
.text-center { text-align: center; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
  .section { padding-block: 3rem; }
  .about-grid,
  .organiser-grid { grid-template-columns: 1fr; }
  .events-grid { grid-template-columns: 1fr; }
  .members-grid { grid-template-columns: 1fr; }
}
