/* Join the Marty Party — jointhemartyparty.com */

:root {
  --green: #1b501f;
  --green-dark: #143c17;
  --gold: #c9a227;
  --sand: #e1dfd9;
  --dark: #1d231c;
  --ink: #111;
  --white: #fff;
  --head: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --header-h: 96px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); font-size: 17px; line-height: 1.6; color: var(--ink); background: var(--sand); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--head); font-weight: 500; line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 .6em; }
h1 { font-size: clamp(2.2rem, 4.2vw, 3.4rem); }
h2 { font-size: clamp(2rem, 3.6vw, 3rem); }
.h-sm { font-size: clamp(1.5rem, 2.2vw, 1.75rem); }
p { margin: 0 0 1em; }
u { text-underline-offset: 3px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--white); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }
.wrap.narrow { max-width: 880px; }
.center { text-align: center; }

/* Buttons */
.btn { display: inline-block; font-family: var(--head); font-size: .82rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; text-align: center; padding: 1.05em 2.2em; border-radius: 999px; transition: background-color .2s, color .2s, transform .2s; }
.btn:hover { transform: translateY(-1px); }
.btn-green { background: var(--green); color: var(--white); }
.btn-green:hover { background: var(--green-dark); }
.btn-white { background: var(--white); color: var(--green); }
.btn-white:hover { background: #f1efe8; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--white); box-shadow: 0 1px 0 rgba(0,0,0,.06); }
.header-inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); padding: 0 var(--gutter); max-width: 1440px; margin: 0 auto; }
.brand { flex: none; display: block; }
.logo { width: 132px; height: auto; display: block; }
.logo text { font-family: var(--head); fill: var(--green); }
.l-vote { font-size: 21px; font-weight: 800; letter-spacing: .04em; }
.l-name { font-size: 31px; font-weight: 800; letter-spacing: .03em; }
.l-sub { font-size: 9.5px; font-weight: 800; letter-spacing: .06em; }
.l-name-lg { font-size: 38px; letter-spacing: .04em; }
.l-sub-lg { font-size: 12px; letter-spacing: .05em; }
.l-url { font-size: 8.5px; font-weight: 800; letter-spacing: .08em; }
.nav { margin-left: auto; display: flex; align-items: center; gap: clamp(14px, 1.8vw, 28px); font-size: .92rem; }
.nav a { text-decoration: none; white-space: nowrap; }
.nav a:not(.btn):hover { color: var(--green); text-decoration: underline; text-underline-offset: 4px; }
.nav .fb svg { width: 20px; height: 20px; fill: currentColor; display: block; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; padding: 12px; cursor: pointer; }
.bars, .bars::before, .bars::after { display: block; width: 26px; height: 2px; background: var(--ink); position: relative; transition: transform .25s, background-color .25s; }
.bars::before, .bars::after { content: ""; position: absolute; left: 0; }
.bars::before { top: -8px; } .bars::after { top: 8px; }
.nav-open .bars { background: transparent; }
.nav-open .bars::before { transform: translateY(8px) rotate(45deg); }
.nav-open .bars::after { transform: translateY(-8px) rotate(-45deg); }

/* Hero */
.hero { display: grid; grid-template-columns: 1fr 1fr; background: var(--green); color: var(--white); min-height: calc(100vh - var(--header-h)); min-height: calc(100svh - var(--header-h)); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.hero-text { display: flex; flex-direction: column; justify-content: center; padding: clamp(40px, 6vw, 96px) var(--gutter); }
.hero-text .lead { font-size: clamp(1.1rem, 1.6vw, 1.4rem); line-height: 1.5; max-width: 30em; margin-bottom: 1.6em; }
.hero-buttons { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.hero-buttons .btn { min-width: min(100%, 360px); }

/* Sections */
.section { padding: clamp(64px, 9vw, 128px) 0; }
.sand { background: var(--sand); }
.white { background: var(--white); }
.dark { background: var(--dark); color: var(--white); }
.green-text { color: var(--green); }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.split.reverse { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); align-items: center; }
.split.reverse .split-media { order: 2; }
.sticky { position: sticky; top: calc(var(--header-h) + 32px); }
.rounded { border-radius: 14px; }
.prose { font-size: 1rem; }
.prose.large { font-size: clamp(1.05rem, 1.5vw, 1.3rem); line-height: 1.6; }
.prose a { color: var(--green); text-underline-offset: 3px; }
.dark .prose a { color: var(--white); }
.pillars { margin: 1.5em 0 0; padding-left: 1.4em; }
.pillars li { margin-bottom: 1.6em; padding-left: .3em; }
.pillars li::marker { font-family: var(--head); font-weight: 700; color: var(--green); }
.pillars h3 { font-size: 1.15rem; font-weight: 700; margin: 0 0 .4em; letter-spacing: -0.01em; color: var(--green); }

.feature { width: 100%; margin: 0 auto 1.6em; }

.cta h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.cta p { max-width: 38em; margin-left: auto; margin-right: auto; }
.cta .btn { margin: .6em 0 1.2em; }
.cta .small { font-size: .9rem; opacity: .85; }

/* Notes */
.eyebrow { font-family: var(--head); font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--green); margin-bottom: .6em; }
#notes h2 { color: var(--green); }
.note-card { background: var(--white); border-radius: 16px; padding: clamp(24px, 4vw, 44px); border-top: 4px solid var(--gold); }
.note-card h3 { font-size: clamp(1.35rem, 2.2vw, 1.75rem); font-weight: 700; color: var(--green); }
.note-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; margin-bottom: 1.2em; }
.note-date { font-size: .9rem; color: #5b5f57; margin-bottom: .4em; }
.note-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 1.4em; }
.text-link { color: var(--green); font-weight: 700; text-underline-offset: 3px; }
.notes-page .page-head { background: var(--green); color: var(--white); padding: clamp(48px, 7vw, 96px) 0 clamp(40px, 5vw, 64px); }
.notes-page .page-head p { font-size: clamp(1.05rem, 1.5vw, 1.25rem); max-width: 36em; margin: 0; }
.note { padding: clamp(48px, 7vw, 96px) 0; }
.note + .note { border-top: 1px solid rgba(27,80,31,.15); }
.note h2 { color: var(--green); margin-bottom: .2em; }
.note .note-date { margin-bottom: 1.6em; }
.note .prose h3 { font-size: 1.15rem; font-weight: 700; color: var(--green); margin: 1.4em 0 .4em; }
.note .prose ul, .note .prose ol { padding-left: 1.2em; margin: 0 0 1.2em; }
.note .prose li { margin-bottom: .5em; }
.back-home { display: inline-block; margin-top: 1.6em; }

/* Sign up */
.signup-lead { max-width: 34em; margin: 0 auto 1.6em; }
#signup h2 { color: var(--green); }
.signup-embed { max-width: 640px; margin: 0 auto 1em; background: var(--white); border-radius: 16px; overflow: hidden; }
.signup-embed iframe { display: block; width: 100%; height: 900px; border: 0; }
#signup .small { font-size: .9rem; }
#signup .small a { color: var(--green); font-weight: 700; }
.signup-form { max-width: 460px; margin: 0 auto; text-align: left; display: grid; gap: 16px; }
.field label { display: block; font-family: var(--head); font-weight: 700; font-size: .85rem; margin-bottom: 6px; color: var(--green); }
.field input { width: 100%; font: inherit; font-size: 16px; padding: 13px 14px; border: 1.5px solid #b9b6ad; border-radius: 10px; background: var(--white); color: var(--ink); }
.field input:focus { outline: 3px solid var(--gold); outline-offset: 1px; border-color: var(--green); }
.signup-form .btn { border: 0; cursor: pointer; justify-self: center; }
.signup-form .btn:disabled { opacity: .6; cursor: default; }
.form-msg { min-height: 1.5em; margin: 0; text-align: center; color: var(--green); font-weight: 600; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Footer */
.site-footer { background: var(--dark); color: #e8e8e4; font-size: .85rem; padding: 48px 0 56px; }
.site-footer p { margin: 0 0 1em; }
.footer-grid { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer-right { text-align: right; }
.fb-round { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--white); color: var(--dark); }
.fb-round svg { width: 18px; height: 18px; fill: currentColor; }

.to-top { position: fixed; right: 24px; bottom: 24px; width: 46px; height: 46px; border-radius: 50%; background: #000; color: var(--white); display: grid; place-items: center; text-decoration: none; font-size: 20px; opacity: 0; pointer-events: none; transition: opacity .3s; z-index: 40; }
.to-top.show { opacity: .9; pointer-events: auto; }

/* Responsive */
@media (max-width: 1100px) {
  :root { --header-h: 76px; }
  .logo { width: 104px; }
  .nav-toggle { display: block; }
  .nav { position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--white); padding: 8px var(--gutter) 24px; box-shadow: 0 12px 24px rgba(0,0,0,.08); font-size: 1.1rem; transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .2s, transform .2s, visibility .2s; max-height: calc(100vh - var(--header-h)); overflow-y: auto; }
  .nav-open .nav { opacity: 1; transform: none; visibility: visible; }
  .nav a { padding: 14px 0; border-bottom: 1px solid #eee; }
  .nav .fb { border-bottom: 0; }
  .nav .btn { margin-top: 12px; border-bottom: 0; padding: 1em; }
}
@media (max-width: 820px) {
  body { font-size: 16px; }
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-photo img { aspect-ratio: 1 / 1; height: auto; max-height: 70vh; }
  .hero-buttons { align-items: stretch; }
  .hero-buttons .btn { min-width: 0; }
  .split, .split.reverse { grid-template-columns: 1fr; }
  .split.reverse .split-media { order: 0; }
  .sticky { position: static; }
  #about-martyb .split-media img { max-height: 520px; width: 100%; object-fit: cover; object-position: center 20%; }
  .footer-grid { flex-direction: column; }
  .footer-right { text-align: left; }
  .to-top { right: 16px; bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* Section-specific image crops */
#platform .split-media img { width: 100%; aspect-ratio: 6 / 7; object-fit: cover; }
@media (max-width: 820px) { #platform .split-media img { aspect-ratio: 16 / 10; } }

/* Resident Priorities word cloud (#priorities) */
.priorities { --pc-green: #1B4D1E; --pc-gold: #D4A72A; background: var(--pc-green); color: var(--white); }
.priorities h2 { color: var(--white); }
.pc-lead { max-width: 40em; margin: 0 auto 2em; color: rgba(255,255,255,.88); }
.pc-cloud { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .35em 1.1em; min-height: 12em; padding: 1.4em .5em; border-top: 1px solid rgba(212,167,42,.45); border-bottom: 1px solid rgba(212,167,42,.45); }
.pc-word {
  --w: 0; /* 0..1, set by js/priorities.js from the word's share of votes */
  --pc-min: 1.05rem; --pc-max: clamp(2rem, 6.5vw, 3.6rem);
  position: relative; max-width: 100%; margin: 0; padding: .12em .3em; border: 0; border-radius: 8px; background: none; cursor: pointer;
  font-family: var(--head); font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; text-wrap: balance;
  font-size: calc(var(--pc-min) + (var(--pc-max) - var(--pc-min)) * var(--w));
  color: var(--white); opacity: calc(.78 + .22 * var(--w));
  transition: font-size .6s cubic-bezier(.2,.8,.2,1), opacity .6s, transform .15s, background-color .15s;
}
.pc-word:nth-child(even) { color: var(--pc-gold); }
.pc-word:hover:not([aria-disabled="true"]) { background: rgba(255,255,255,.08); transform: translateY(-2px); }
.pc-word:focus-visible { outline: 3px solid var(--pc-gold); outline-offset: 3px; }
.pc-word[aria-disabled="true"] { cursor: default; }
.pc-word.mine { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: .18em; text-decoration-color: currentColor; }
.pc-word.pop { animation: pc-pop .45s ease-out; }
.pc-word .pc-plus { position: absolute; left: 50%; top: 0; font-size: 1rem; font-weight: 800; color: var(--pc-gold); pointer-events: none; animation: pc-plus .9s ease-out forwards; }
.pc-word:nth-child(even) .pc-plus { color: var(--white); }
@keyframes pc-pop { 0% { transform: scale(1); } 40% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes pc-plus { from { opacity: 1; transform: translate(-50%, 0); } to { opacity: 0; transform: translate(-50%, -1.6em); } }
.pc-status { margin: 1.4em 0 .2em; font-family: var(--head); font-weight: 700; font-size: 1.1rem; color: var(--pc-gold); }
.pc-total { margin: 0; font-size: .95rem; color: rgba(255,255,255,.75); }
@media (max-width: 520px) { .pc-cloud { gap: .3em .7em; padding: 1.1em 0; } .pc-word { --pc-max: 2.1rem; --pc-min: 1rem; } }
@media (prefers-reduced-motion: reduce) { .pc-word { transition: none; } .pc-word.pop, .pc-word .pc-plus { animation: none; } .pc-word .pc-plus { display: none; } }
