/* =====================================================================
   Sub-pages (/events/, /social/): base look, buttons, footer, page layouts.
   The brand and derived tokens below are COPIED from the home page's inline
   :root (the home page keeps its own copy): change them in both places.
   The top bar has its own file: /assets/site/topbar.css
   ===================================================================== */
:root{
  --ground:#F6F1E9;      /* Warm Cream */
  --surface:#FCFAF5;     /* Soft Paper */
  --ink:#3A2E33;         /* Aubergine-Brown */
  --sage:#7C6B5E;        /* Warm Stone (secondary text) */
  --coral:#B0553F;       /* Terracotta Clay (accent) */
  --coral-hover:#9E4630; /* white on this 6.2:1 (button background) */
  --coral-deep:#8A3B29;  /* terracotta text on cream 6.8:1 */
  --euc:#E3C9A8;         /* Sand */
  --serif:'Fraunces','Iowan Old Style',Georgia,'Times New Roman',serif;
  --sans:'Montserrat',-apple-system,BlinkMacSystemFont,'Segoe UI',system-ui,sans-serif;
  --maxw:1200px;
  --ease:cubic-bezier(.22,.61,.36,1);
  --line:rgba(58,46,51,.14);          /* hairlines and card borders */
  --line-strong:rgba(58,46,51,.32);   /* ghost-button and control borders */
  --tint:rgba(176,85,63,.1);          /* terracotta wash behind flags */
  --shadow-media:0 24px 56px -32px rgba(36,27,32,.5);   /* photos, post tiles */
  --r-sm:8px; --r-md:14px; --r-lg:24px;
  --sp-1:.5rem; --sp-2:1rem; --sp-3:1.5rem; --sp-4:2rem; --sp-5:3rem; --sp-6:5rem;
}
*{box-sizing:border-box}
[hidden]{display:none !important}   /* so CSS display rules never override the hidden attribute */
html{scroll-behavior:smooth}
body{
  margin:0; background:var(--ground); color:var(--ink);
  font-family:var(--sans); font-size:1.0625rem; line-height:1.7;
  -webkit-font-smoothing:antialiased; overflow-x:hidden;
}
a{color:inherit}
h1,h2,h3{font-family:var(--serif);font-weight:500;line-height:1.08;margin:0;letter-spacing:-.01em;text-wrap:balance}
p{margin:0 0 1rem;text-wrap:pretty}   /* no one-word last lines where the browser supports it */
.wrap{max-width:var(--maxw);margin:0 auto;padding:0 clamp(1.25rem,5vw,3rem)}
.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
.nowrap{white-space:nowrap}

/* ---------- Buttons (same as the home page): colour change on hover, no lift, no glow ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:.5rem;
  font-family:var(--sans); font-weight:600; font-size:.95rem;
  border-radius:999px; padding:.85rem 1.6rem; cursor:pointer;
  border:1.5px solid transparent; text-decoration:none; line-height:1;
  transition:background-color .2s,color .2s,border-color .2s;
}
.btn-primary{background:var(--coral-hover);color:#fff}
.btn-primary:hover{background:var(--coral-deep)}
.btn-ghost{background:transparent;color:var(--ink);border-color:var(--line-strong)}
.btn-ghost:hover{border-color:var(--ink);background:rgba(58,46,51,.05)}
.btn:focus-visible{outline:2px solid var(--coral);outline-offset:3px}
.btn svg{width:18px;height:18px;flex:none}

/* ---------- Page shell: content starts below the fixed top bar ---------- */
main{position:relative;z-index:2;padding-top:var(--topbar-h)}
/* Left-aligned on the same column as the footer and the home page (was centred) */
.page-hero{padding:clamp(3.5rem,9vw,6.5rem) 0 clamp(2rem,5vw,3.5rem)}
.page-hero h1{font-size:clamp(2.4rem,6vw,4.2rem);letter-spacing:-.02em;max-width:16ch;margin:0 0 1.3rem}
.page-hero .lede{font-size:1.15rem;max-width:44ch;margin:0 0 1rem}
.page-hero .sub{color:var(--sage);max-width:46ch;margin:0}
.cta-row{display:flex;flex-wrap:wrap;gap:1rem;align-items:center;margin-top:2.2rem}

/* "Coming soon": same look as the home page's "Start here" flag */
.flag{
  display:inline-flex; align-items:center; margin-bottom:1.1rem;
  font-size:.8rem; font-weight:600; color:var(--coral-deep);
  background:var(--tint); border:1px solid rgba(176,85,63,.3); border-radius:999px; padding:.2em .75em;
}
.ornament{display:block;width:min(100%,560px);height:auto;margin:3.5rem 0 0;opacity:.9}

/* ---------- Social: Instagram grid ---------- */
.feed{padding:0 0 clamp(4rem,9vw,7rem)}
.feed-note{color:var(--sage);max-width:46ch;margin:0}
.demo-label{font-size:.85rem;font-weight:600;color:var(--sage);margin:0 0 1.2rem}
.ig-grid{list-style:none;margin:0;padding:0;max-width:960px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(.6rem,1.6vw,1rem)}
.ig-item{margin:0;min-width:0}
.ig-link,.ig-ph{position:relative;display:block;aspect-ratio:1/1;border-radius:var(--r-md);overflow:hidden;background:var(--euc)}
.ig-link{box-shadow:var(--shadow-media)}
.ig-link img{display:block;width:100%;height:100%;object-fit:cover}
.ig-link:focus-visible{outline:3px solid var(--coral);outline-offset:3px}
.ig-kind{   /* "Video" / "Reel" / "Album" badge: visible, and part of the link's accessible name */
  position:absolute; top:.6rem; right:.6rem; z-index:1;
  background:rgba(36,27,32,.74); color:#fff; border-radius:999px; padding:.3rem .6rem;
  font-size:.72rem; font-weight:600; line-height:1;
}
.ig-ph{   /* demo / loading placeholder: plain tinted square */
  display:grid; place-items:center; padding:1rem; text-align:center;
  background:#EFE4D3; border:1px dashed rgba(124,107,94,.45);
  color:var(--sage); font-size:.8rem; font-weight:600; line-height:1.3;
}
.ig-ph.is-loading{border-style:solid;border-color:transparent}

/* ---------- Footer (same as the home page) ---------- */
footer{padding:5rem 0 4rem;border-top:1px solid var(--line);background:var(--surface)}
footer .grid{display:grid;grid-template-columns:1.3fr 1fr 1fr;gap:2.5rem}
footer h3{font-size:1.4rem;margin-bottom:.4rem}
footer .tag{color:var(--sage);font-family:var(--serif);font-style:italic}
footer .col h4{font-family:var(--sans);font-size:.78rem;text-transform:uppercase;letter-spacing:.1em;color:var(--sage);margin:0 0 .8rem;font-weight:600}
footer a{color:var(--ink);text-decoration:none}
footer a:hover{color:var(--coral-deep)}
.footer-logo{display:block;width:172px;height:auto;margin-bottom:.9rem}

/* ---------- Responsive ---------- */
@media (max-width:980px){
  footer .grid{grid-template-columns:1fr;gap:2rem}
}
@media (max-width:720px){
  .ig-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:560px){
  .page-hero .lede{font-size:1.05rem}
  /* two clean lines on phones: "Follow @resilientmovement.maine.nh" / "on Instagram"
     (at .95rem the first line needed 298px and the button wrapped to three lines at 390px) */
  .ig-follow{width:100%;line-height:1.3;padding:.9rem 1.1rem;text-align:center;font-size:.875rem}
}
@media (max-width:380px){
  .ig-follow svg{display:none}   /* the glyph is decorative (the label says Instagram); its 26px keep 360px phones at two lines */
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{transition:none !important;animation:none !important}
}
