:root {
  color-scheme: light;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --green: #009246;
  --red: #ce2b37;
  --blue: #2563eb;
  --gold: #d59f0f;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

:root.dark {
  color-scheme: dark;
  --bg: #020617;
  --surface: #0f172a;
  --surface-2: #1e293b;
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: #334155;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  letter-spacing: 0;
}

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

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-shell {
  min-height: 100vh;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.nav {
  position: fixed;
  z-index: 30;
  top: 0;
  right: 0;
  left: 0;
  border-bottom: 1px solid rgba(226, 232, 240, 0.75);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(16px);
}

:root.dark .nav {
  border-bottom-color: rgba(51, 65, 85, 0.75);
  background: rgba(2, 6, 23, 0.86);
}

.nav-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.logo-lockup {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  line-height: 1;
}

.logo-mark {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  color: var(--text);
}

.logo-mark svg {
  width: 100%;
  height: 100%;
  display: block;
}

.logo-mark .sf-pyramid,
.logo-mark .sf-pyramid-detail,
.logo-mark .sf-pyramid-wing {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.logo-mark .sf-pyramid {
  stroke-width: 2.7;
}

.logo-mark .sf-pyramid-detail,
.logo-mark .sf-pyramid-wing {
  stroke-width: 1.9;
}
.logo-type {
  display: grid;
  grid-template-columns: auto;
  align-items: end;
  color: var(--text);
}

.logo-main {
  font-size: 1.35rem;
  font-weight: 950;
  letter-spacing: 0;
}

.logo-sub {
  justify-self: end;
  margin-top: -2px;
  font-size: 0.82rem;
  font-weight: 950;
  letter-spacing: 0;
}

.chapter {
  border-left: 1px solid var(--line);
  padding-left: 16px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.93rem;
  font-weight: 650;
}

.nav-links a:hover {
  color: var(--green);
}

.theme-toggle,
.icon-button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  display: inline-grid;
  place-items: center;
}

.theme-toggle:hover,
.icon-button:hover {
  border-color: var(--green);
}

.mobile-menu {
  display: none;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 11px 18px;
  font-weight: 750;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
}

.btn-primary:hover {
  background: var(--red);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(206, 43, 55, 0.26);
}

.btn-nav-member {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.btn-nav-member:hover {
  background: var(--red);
  border-color: var(--red);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(206, 43, 55, 0.22);
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--green);
  color: var(--green);
}

.btn-green {
  background: var(--green);
  color: #ffffff;
}

.hero {
  position: relative;
  min-height: 88vh;
  padding: 132px 0 72px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 22%, rgba(0, 146, 70, 0.18), transparent 32%),
    radial-gradient(circle at 82% 18%, rgba(206, 43, 55, 0.18), transparent 34%),
    radial-gradient(circle at 52% 74%, rgba(148, 163, 184, 0.2), transparent 38%),
    var(--bg);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  width: min(44rem, 85vw);
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.58;
}

.hero-glow-green {
  top: -18rem;
  left: -18rem;
  background: rgba(0, 146, 70, 0.22);
}

.hero-glow-red {
  top: -16rem;
  right: -18rem;
  background: rgba(206, 43, 55, 0.2);
}

.hero-glow-slate {
  right: 18%;
  bottom: -20rem;
  background: rgba(100, 116, 139, 0.18);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
  color: var(--text);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(0, 146, 70, 0.22);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
}

h1 {
  margin-top: 24px;
  font-size: clamp(2.8rem, 7vw, 5.9rem);
  max-width: 780px;
}

.hero p {
  margin: 22px 0 30px;
  max-width: 640px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.tricolor {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 6px;
}

.tricolor span:nth-child(1) {
  background: var(--green);
}

.tricolor span:nth-child(2) {
  background: #ffffff;
}

.tricolor span:nth-child(3) {
  background: var(--red);
}

.section {
  padding: 88px 0;
}

.section-compact {
  padding: 64px 0;
}

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

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

.section-header {
  max-width: 720px;
  margin-bottom: 36px;
}

.section-header.center {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.kicker {
  margin-bottom: 10px;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h2 {
  color: var(--text);
  font-size: clamp(2rem, 4vw, 3rem);
}

.lead {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.copy p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 1.04rem;
}

.feature-grid,
.pillar-grid,
.team-grid,
.chapter-grid {
  display: grid;
  gap: 18px;
}

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

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

.team-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

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

.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 22px;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}

.card:hover {
  border-color: rgba(0, 146, 70, 0.45);
  box-shadow: var(--shadow);
}

.icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  background: var(--text);
  color: var(--bg);
}

.card h3 {
  margin-bottom: 8px;
  font-size: 1.15rem;
}

.card p,
.event p,
.team-card p {
  margin: 0;
  color: var(--muted);
}

.event-list {
  display: grid;
  gap: 16px;
}

.event-group + .event-group {
  margin-top: 34px;
}

.event-group > h3 {
  margin-bottom: 14px;
  font-size: 1.25rem;
}

.event {
  display: grid;
  grid-template-columns: 112px 1fr auto;
  gap: 20px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 18px;
}

.event-past {
  background: rgba(255, 255, 255, 0.64);
}

:root.dark .event-past {
  background: rgba(15, 23, 42, 0.72);
}

.event-details {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

.event-details li + li {
  margin-top: 4px;
}

.event-static {
  cursor: default;
  pointer-events: none;
}

.date-box {
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  text-align: center;
}

.date-box strong {
  display: block;
  color: var(--red);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.date-box span {
  color: var(--text);
  font-size: 2.1rem;
  font-weight: 850;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.tag {
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  padding: 4px 8px;
  font-size: 0.78rem;
  font-weight: 750;
}

.tag.dark {
  background: var(--text);
  color: var(--bg);
}

.event h3 {
  margin-bottom: 4px;
  font-size: 1.25rem;
}

.team-card {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
  overflow: visible;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.team-card:hover {
  border-color: rgba(0, 146, 70, 0.45);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.team-photo {
  width: 84px;
  height: 84px;
  flex: 0 0 84px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(0, 146, 70, 0.14), rgba(37, 99, 235, 0.18), rgba(206, 43, 55, 0.14));
  color: var(--text);
  font-size: 1.35rem;
  font-weight: 850;
  overflow: hidden;
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-body {
  min-width: 0;
  padding: 0;
}

.team-body h3 {
  margin-bottom: 2px;
  font-size: 1rem;
}

.team-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
}

.team-card:hover .team-link {
  color: var(--green);
}

.team-link svg {
  width: 14px;
  height: 14px;
}

.role {
  margin: 3px 0 8px;
  color: var(--green);
  font-weight: 800;
}

.contact-band {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 30px;
}

.contact-list {
  display: grid;
  gap: 12px;
}

.contact-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  color: var(--muted);
}

.footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 34px 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  align-items: center;
  gap: 24px;
}

.footer-logo .logo-mark {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
}

.footer-logo .logo-main {
  font-size: 1.15rem;
}

.footer-logo .logo-sub {
  font-size: 0.72rem;
}

.footer p {
  margin: 8px 0 0;
  color: var(--muted);
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(4, max-content);
  gap: 8px;
  justify-content: flex-end;
}

.chapter-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 92px;
  padding: 8px 9px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.chapter-link:hover {
  border-color: var(--green);
  color: var(--green);
}

.page {
  padding-top: 104px;
  min-height: 100vh;
}

.form-layout {
  display: grid;
  grid-template-columns: 1fr 0.76fr;
  gap: 28px;
  align-items: start;
}

.form {
  display: grid;
  gap: 16px;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--text);
  font-weight: 750;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 12px;
}

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

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.choice {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
}

.choice input {
  margin-top: 4px;
}

.notice {
  border: 1px solid rgba(0, 146, 70, 0.32);
  border-radius: 8px;
  background: rgba(0, 146, 70, 0.08);
  padding: 14px;
  color: var(--text);
}

.profile-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.member-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.member-step {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 24px;
}

.step-number {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--text);
  color: var(--bg);
  font-size: 1.4rem;
  font-weight: 900;
}

.member-step h3 {
  margin-bottom: 8px;
  font-size: 1.35rem;
}

.member-step p {
  margin: 0 0 18px;
  color: var(--muted);
}

.member-qr {
  margin: 4px 0 18px;
}

.qr-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 92px 16px 40px;
}

.qr-card {
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 28px;
  text-align: center;
}

.qr-code {
  width: 240px;
  height: 240px;
  margin: 22px auto;
  border: 12px solid #ffffff;
  border-radius: 8px;
  background: #ffffff;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 30px;
  text-align: center;
  color: var(--muted);
}

.not-found {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 80px 16px;
}

.not-found strong {
  display: block;
  font-size: clamp(5rem, 18vw, 11rem);
  line-height: 0.9;
  color: transparent;
  background: linear-gradient(90deg, var(--green), var(--text), var(--red));
  background-clip: text;
}

@media (max-width: 920px) {
  .chapter,
  .nav-links {
    display: none;
  }

  .mobile-menu {
    display: inline-grid;
  }

  .nav.open .nav-links {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    display: grid;
    gap: 0;
    padding: 8px 16px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
  }

  .nav.open .nav-links a,
  .nav.open .nav-links .btn {
    justify-content: flex-start;
    padding: 13px 10px;
  }

  .split,
  .contact-band,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .feature-grid,
  .pillar-grid,
  .team-grid,
  .chapter-grid {
    grid-template-columns: 1fr 1fr;
  }

  .member-steps {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .event {
    grid-template-columns: 96px 1fr;
  }

  .event .event-action {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 24px, 1120px);
  }

  .logo-main {
    font-size: 1.12rem;
  }

  .logo-sub {
    font-size: 0.7rem;
  }

  .logo-mark {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .hero {
    min-height: 88vh;
    padding: 112px 0 58px;
  }

  .button-row,
  .btn {
    width: 100%;
  }

  .section {
    padding: 64px 0;
  }

  .section-compact {
    padding: 52px 0;
  }

  .feature-grid,
  .pillar-grid,
  .team-grid,
  .chapter-grid,
  .field-grid,
  .choice-grid {
    grid-template-columns: 1fr;
  }

  .member-step {
    grid-template-columns: 1fr;
  }

  .event {
    grid-template-columns: 1fr;
  }

  .date-box {
    width: 110px;
  }

  .footer-inner {
    align-items: flex-start;
  }

  .footer-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: flex-start;
    width: 100%;
  }

  .chapter-link {
    min-width: 0;
  }
}
