:root {
  --ink: #122315;
  --green: #316f25;
  --green-dark: #174d1c;
  --orange: #e86f05;
  --cream: #fbf6ec;
  --line: #e1cda4;
  --soft-line: #eadcc1;
  --contact-scale: 1;
  --contact-width: calc(960px * var(--contact-scale));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.contact-page {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Nunito Sans", Arial, sans-serif;
}

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

button {
  font: inherit;
}

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

.contact-wrap {
  width: var(--contact-width);
  max-width: calc(100vw - 38px);
  margin: 0 auto;
}

.contact-header {
  position: relative;
  z-index: 10;
  background: linear-gradient(180deg, #fffaf0 0%, rgba(255, 250, 240, 0.94) 100%);
}

.contact-nav {
  display: flex;
  align-items: center;
  gap: calc(28px * var(--contact-scale));
  height: calc(72px * var(--contact-scale));
}

.contact-brand {
  flex: 0 0 auto;
  width: calc(236px * var(--contact-scale));
}

.contact-menu {
  display: flex;
  align-items: center;
  gap: calc(24px * var(--contact-scale));
  margin-left: auto;
  color: #0d1b12;
  font-size: calc(13px * var(--contact-scale));
  font-weight: 800;
  white-space: nowrap;
}

.contact-menu a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: calc(34px * var(--contact-scale));
}

.contact-menu a.active::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: var(--green);
  content: "";
}

.contact-join {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: calc(86px * var(--contact-scale));
  height: calc(36px * var(--contact-scale));
  border-radius: 6px;
  background: linear-gradient(180deg, #3d7228 0%, #245a18 100%);
  color: #fffdf4;
  font-size: calc(13px * var(--contact-scale));
  font-weight: 800;
  white-space: nowrap;
}

.contact-main {
  padding-bottom: calc(24px * var(--contact-scale));
}

.contact-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: calc(48px * var(--contact-scale));
  align-items: start;
  padding-top: calc(18px * var(--contact-scale));
}

.contact-breadcrumb {
  display: flex;
  align-items: center;
  gap: calc(10px * var(--contact-scale));
  color: #102016;
  font-size: calc(12px * var(--contact-scale));
  font-weight: 800;
}

.contact-breadcrumb span {
  color: #4e6b44;
  font-size: calc(18px * var(--contact-scale));
  line-height: 1;
}

.contact-copy h1,
.system-text h2,
.events-head h2 {
  margin: 0;
  color: #173b1b;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  line-height: 1.02;
}

.contact-copy h1 {
  margin-top: calc(26px * var(--contact-scale));
  font-size: calc(42px * var(--contact-scale));
}

.contact-intro {
  margin: calc(18px * var(--contact-scale)) 0 0;
  color: #17231a;
  font-size: calc(15px * var(--contact-scale));
  font-weight: 700;
  line-height: 1.5;
}

.contact-card {
  display: grid;
  gap: calc(12px * var(--contact-scale));
  margin-top: calc(28px * var(--contact-scale));
  padding: calc(19px * var(--contact-scale)) calc(20px * var(--contact-scale));
  border: 1px solid var(--soft-line);
  border-radius: 10px;
  background:
    radial-gradient(circle at 35% 10%, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0) 48%),
    rgba(255, 250, 240, 0.6);
}

.contact-row {
  display: grid;
  grid-template-columns: calc(42px * var(--contact-scale)) minmax(0, 1fr);
  gap: calc(14px * var(--contact-scale));
  align-items: center;
  padding-bottom: calc(12px * var(--contact-scale));
  border-bottom: 1px solid #e0d3b9;
}

.contact-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.contact-icon,
.system-icon,
.event-location svg,
.footer-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.contact-icon {
  width: calc(38px * var(--contact-scale));
  height: calc(38px * var(--contact-scale));
  border-radius: 50%;
  background: linear-gradient(180deg, #2f6a22, #174d1c);
  color: #fff;
}

.contact-row.nostr {
  grid-template-columns: calc(42px * var(--contact-scale)) minmax(0, 1fr) auto;
}

.contact-row.nostr .contact-icon {
  background: linear-gradient(180deg, #8d5cff, #6836cf);
}

.contact-label {
  display: block;
  color: #17231a;
  font-size: calc(12.5px * var(--contact-scale));
  font-weight: 700;
}

.contact-value {
  display: block;
  margin-top: calc(3px * var(--contact-scale));
  color: #0f1c12;
  font-size: calc(15.2px * var(--contact-scale));
  font-weight: 900;
  line-height: 1.25;
}

.nostr-hex {
  font-family: "Nunito Sans", Arial, sans-serif;
  font-size: calc(10.5px * var(--contact-scale));
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.copy-button {
  display: inline-flex;
  align-items: center;
  gap: calc(7px * var(--contact-scale));
  height: calc(34px * var(--contact-scale));
  padding: 0 calc(13px * var(--contact-scale));
  border: 1px solid #7aa072;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.66);
  color: #17351a;
  cursor: pointer;
  font-size: calc(12px * var(--contact-scale));
  font-weight: 900;
}

.quote {
  display: grid;
  grid-template-columns: calc(54px * var(--contact-scale)) 1fr;
  gap: calc(12px * var(--contact-scale));
  margin: calc(23px * var(--contact-scale)) 0 0;
  color: #1c271d;
}

.quote-mark {
  color: #9aac82;
  font-family: Georgia, serif;
  font-size: calc(72px * var(--contact-scale));
  line-height: 0.78;
}

.quote p {
  margin: 0;
  font-size: calc(14px * var(--contact-scale));
  font-style: italic;
  font-weight: 700;
  line-height: 1.65;
}

.quote strong {
  display: block;
  margin-top: calc(8px * var(--contact-scale));
  font-style: normal;
}

.contact-photo {
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 14px 30px rgba(33, 46, 24, 0.08);
}

.contact-photo img {
  width: 100%;
  height: calc(620px * var(--contact-scale));
  object-fit: cover;
  object-position: center 42%;
}

.system-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.9fr);
  gap: calc(22px * var(--contact-scale));
  min-height: calc(314px * var(--contact-scale));
  margin-top: calc(24px * var(--contact-scale));
  overflow: hidden;
  border: 1px solid var(--soft-line);
  border-radius: 10px;
  background: #fff8ec;
}

.system-card::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  height: 46%;
  background: linear-gradient(180deg, rgba(255, 248, 236, 0), rgba(255, 248, 236, 0.88) 34%, #fff8ec 100%);
  content: "";
  pointer-events: none;
}

.system-text {
  position: relative;
  z-index: 3;
  padding: calc(30px * var(--contact-scale)) calc(34px * var(--contact-scale)) calc(24px * var(--contact-scale));
}

.system-text h2 {
  max-width: calc(410px * var(--contact-scale));
  font-size: calc(30px * var(--contact-scale));
}

.title-flourish {
  display: flex;
  align-items: center;
  gap: calc(9px * var(--contact-scale));
  margin: calc(14px * var(--contact-scale)) 0 calc(20px * var(--contact-scale));
  color: var(--green);
}

.title-flourish span {
  width: calc(58px * var(--contact-scale));
  height: 1px;
  background: #adbd87;
}

.title-flourish svg {
  width: calc(22px * var(--contact-scale));
  height: calc(17px * var(--contact-scale));
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.system-text p {
  max-width: calc(470px * var(--contact-scale));
  margin: 0;
  color: #17231a;
  font-size: calc(13.4px * var(--contact-scale));
  font-weight: 700;
  line-height: 1.55;
}

.system-image {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 54%;
  background:
    linear-gradient(90deg, #fff8ec 0%, rgba(255, 248, 236, 0.74) 12%, rgba(255, 248, 236, 0.05) 36%),
    url("assets/contact-system.png") center center / cover no-repeat;
}

.system-stats {
  position: relative;
  z-index: 4;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: start;
  gap: 0;
  margin: 0 calc(30px * var(--contact-scale)) calc(22px * var(--contact-scale));
  text-align: center;
}

.system-stat {
  min-height: calc(94px * var(--contact-scale));
  padding: 0 calc(14px * var(--contact-scale));
  border-left: 1px solid #ded2b8;
}

.system-stat:first-child {
  border-left: 0;
}

.system-icon {
  width: calc(40px * var(--contact-scale));
  height: calc(40px * var(--contact-scale));
  margin: 0 auto calc(7px * var(--contact-scale));
  color: var(--green-dark);
}

.system-stat h3 {
  margin: 0;
  color: #143017;
  font-size: calc(13px * var(--contact-scale));
  font-weight: 900;
  line-height: 1.25;
}

.system-stat p {
  margin: calc(7px * var(--contact-scale)) 0 0;
  color: #17231a;
  font-size: calc(10.5px * var(--contact-scale));
  font-weight: 700;
  line-height: 1.4;
}

.events-section {
  padding-top: calc(12px * var(--contact-scale));
}

.events-head {
  text-align: center;
}

.events-head h2 {
  color: #20231d;
  font-size: calc(27px * var(--contact-scale));
}

.events-head .title-flourish {
  justify-content: center;
  margin: calc(5px * var(--contact-scale)) 0 calc(8px * var(--contact-scale));
}

.events-head p {
  max-width: calc(650px * var(--contact-scale));
  margin: 0 auto calc(17px * var(--contact-scale));
  color: #17231a;
  font-size: calc(13px * var(--contact-scale));
  font-weight: 800;
  line-height: 1.45;
}

.event-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: calc(16px * var(--contact-scale));
}

.event-card {
  overflow: hidden;
  border: 1px solid var(--soft-line);
  border-radius: 9px;
  background: #fffaf1;
  box-shadow: 0 8px 20px rgba(46, 59, 33, 0.06);
}

.event-image {
  position: relative;
  height: calc(120px * var(--contact-scale));
  overflow: visible;
  background: #e5ddc8;
}

.event-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-date {
  position: absolute;
  left: calc(14px * var(--contact-scale));
  bottom: calc(-21px * var(--contact-scale));
  display: grid;
  place-items: center;
  width: calc(48px * var(--contact-scale));
  height: calc(54px * var(--contact-scale));
  border-radius: 6px;
  background: linear-gradient(180deg, #2f6f24, #1a4f18);
  color: #fff;
  font-weight: 900;
  text-align: center;
  line-height: 1;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.08);
}

.event-date strong {
  font-size: calc(19px * var(--contact-scale));
}

.event-date span {
  display: block;
  margin-top: calc(3px * var(--contact-scale));
  font-size: calc(10px * var(--contact-scale));
}

.event-body {
  display: flex;
  min-height: calc(192px * var(--contact-scale));
  flex-direction: column;
  padding: calc(30px * var(--contact-scale)) calc(16px * var(--contact-scale)) calc(14px * var(--contact-scale));
}

.event-meta {
  color: #142318;
  font-size: calc(10.5px * var(--contact-scale));
  font-weight: 900;
  text-transform: uppercase;
}

.event-card h3 {
  min-height: calc(42px * var(--contact-scale));
  margin: calc(7px * var(--contact-scale)) 0 calc(8px * var(--contact-scale));
  color: #143017;
  font-size: calc(14px * var(--contact-scale));
  font-weight: 900;
  line-height: 1.2;
}

.event-card p {
  margin: 0;
  color: #1b261d;
  font-size: calc(11.5px * var(--contact-scale));
  font-weight: 700;
  line-height: 1.45;
}

.event-location {
  display: flex;
  align-items: center;
  gap: calc(7px * var(--contact-scale));
  margin-top: auto;
  padding-top: calc(12px * var(--contact-scale));
  color: #193319;
  font-size: calc(11px * var(--contact-scale));
  font-weight: 800;
}

.event-location svg {
  width: calc(16px * var(--contact-scale));
  height: calc(16px * var(--contact-scale));
  color: var(--green-dark);
}

.event-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: calc(136px * var(--contact-scale));
  height: calc(32px * var(--contact-scale));
  margin-top: calc(12px * var(--contact-scale));
  border-radius: 5px;
  background: linear-gradient(180deg, #2f6f24, #174d1c);
  color: #fff;
  font-size: calc(11.5px * var(--contact-scale));
  font-weight: 900;
}

.event-empty {
  grid-column: 1 / -1;
  padding: calc(24px * var(--contact-scale));
  border: 1px solid var(--soft-line);
  border-radius: 9px;
  background: #fffaf1;
  color: #183218;
  font-weight: 800;
  text-align: center;
}

.contact-cta {
  display: grid;
  grid-template-columns: calc(88px * var(--contact-scale)) 1fr calc(220px * var(--contact-scale));
  align-items: center;
  min-height: calc(73px * var(--contact-scale));
  margin-top: calc(20px * var(--contact-scale));
  padding: 0 calc(30px * var(--contact-scale));
  border-radius: 7px;
  background:
    radial-gradient(circle at 58% 50%, rgba(84, 125, 48, 0.34), rgba(84, 125, 48, 0) 46%),
    linear-gradient(90deg, #1f5524, #214d1c);
  color: #fff;
}

.contact-cta img {
  width: calc(56px * var(--contact-scale));
  height: calc(56px * var(--contact-scale));
  padding: calc(5px * var(--contact-scale));
  border-radius: 6px;
  background: #fffaf0;
  object-fit: contain;
}

.contact-cta p {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: calc(22px * var(--contact-scale));
  font-weight: 700;
  line-height: 1.12;
}

.contact-cta p span {
  display: block;
  font-family: "Nunito Sans", Arial, sans-serif;
  font-size: calc(14px * var(--contact-scale));
  font-weight: 700;
}

.contact-cta a {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: calc(176px * var(--contact-scale));
  height: calc(38px * var(--contact-scale));
  border-radius: 6px;
  background: #fffaf0;
  color: #1b3919;
  font-size: calc(12.5px * var(--contact-scale));
  font-weight: 900;
  text-align: center;
}

.contact-footer {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  min-height: calc(54px * var(--contact-scale));
  color: #163719;
  font-size: calc(12px * var(--contact-scale));
  font-weight: 700;
  text-align: center;
}

.contact-footer a + a {
  border-left: 1px solid #d6cda9;
}

@media (min-width: 1180px) {
  :root {
    --contact-scale: 1.08;
  }
}

@media (min-width: 1360px) {
  :root {
    --contact-scale: 1.18;
  }
}

@media (min-width: 1560px) {
  :root {
    --contact-scale: 1.28;
  }
}

@media (max-width: 980px) {
  :root {
    --contact-scale: 1;
  }

  .contact-wrap {
    width: calc(100vw - 32px);
  }

  .contact-nav {
    height: auto;
    flex-wrap: wrap;
    padding: 14px 0;
  }

  .contact-brand {
    width: 248px;
  }

  .contact-menu {
    order: 3;
    width: 100%;
    gap: 18px;
    overflow-x: auto;
  }

  .contact-hero,
  .system-card,
  .system-stats,
  .event-grid,
  .contact-cta,
  .contact-footer {
    grid-template-columns: 1fr;
  }

  .contact-hero {
    gap: 26px;
  }

  .contact-photo img {
    height: 70vw;
    max-height: 640px;
    object-position: center 38%;
  }

  .system-card {
    min-height: 0;
  }

  .system-image {
    position: relative;
    width: 100%;
    min-height: 230px;
    background:
      linear-gradient(180deg, rgba(255, 248, 236, 0) 0%, #fff8ec 96%),
      url("assets/contact-system.png") center center / cover no-repeat;
  }

  .system-stats {
    gap: 16px;
    margin: 0 22px 22px;
  }

  .system-stat {
    border-left: 0;
  }

  .contact-cta {
    justify-items: center;
    gap: 14px;
    padding: 20px;
    text-align: center;
  }

  .contact-cta a {
    justify-self: center;
  }

  .contact-footer {
    gap: 12px;
    padding: 14px 0;
  }

  .contact-footer a + a {
    border-left: 0;
  }
}

@media (max-width: 640px) {
  body.contact-page {
    overflow-x: hidden;
  }

  .contact-wrap {
    width: min(calc(100% - 28px), 420px);
    max-width: calc(100vw - 28px);
  }

  .contact-nav {
    gap: 10px;
    padding: 12px 0 10px;
  }

  .contact-brand {
    width: min(218px, calc(100% - 116px));
  }

  .contact-join {
    width: auto;
    min-width: 98px;
    height: 36px;
    margin-left: auto;
    padding: 0 12px;
    border-radius: 7px;
    font-size: 13px;
  }

  .contact-menu {
    gap: 18px;
    margin-left: 0;
    padding: 8px 0 2px;
    font-size: 13px;
    scrollbar-width: none;
  }

  .contact-menu::-webkit-scrollbar {
    display: none;
  }

  .contact-copy h1 {
    margin-top: 24px;
    font-size: clamp(42px, 13vw, 54px);
    line-height: 0.98;
  }

  .contact-intro {
    font-size: 15px;
  }

  .contact-card {
    padding: 16px;
  }

  .contact-row {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .contact-row.nostr {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .contact-row.nostr .copy-button {
    grid-column: 2;
    justify-self: start;
    margin-top: 8px;
  }

  .contact-value {
    font-size: 15px;
  }

  .nostr-hex {
    font-size: 11px;
  }

  .quote {
    grid-template-columns: 40px 1fr;
  }

  .quote-mark {
    font-size: 58px;
  }

  .contact-photo img {
    height: clamp(330px, 112vw, 460px);
  }

  .system-text {
    padding: 24px 20px 10px;
  }

  .system-text h2 {
    font-size: clamp(32px, 10vw, 42px);
    line-height: 0.98;
  }

  .system-text p,
  .events-head p {
    font-size: 14px;
  }

  .system-image {
    min-height: 210px;
  }

  .events-head h2 {
    font-size: 32px;
  }

  .event-grid {
    gap: 14px;
  }

  .event-image {
    height: 48vw;
    min-height: 176px;
    max-height: 230px;
  }

  .event-body {
    min-height: 0;
  }

  .event-card h3 {
    min-height: 0;
    font-size: 16px;
  }

  .event-card p {
    font-size: 13px;
  }

  .contact-cta p {
    font-size: 26px;
  }
}
