/* =================================================================
   Modern Expat Magazine — global styles
   Editorial magazine aesthetic: cream paper, heavy condensed display
   type, black ink, generous grids.
   ================================================================= */

:root {
  --paper:      #ffffff;   /* page background  */
  --paper-soft: #f4efe7;   /* card panels (warm beige) */
  --ink:        #161616;   /* near-black text  */
  --ink-soft:   #565248;   /* secondary text   */
  --line:       #e6e1d6;   /* hairline borders */
  --dark:       #141414;   /* dark feature panel */
  --dark-soft:  #232323;
  --accent:     #161616;   /* buttons          */
  --white:      #ffffff;

  --maxw: 1600px;          /* wider content for more text room */
  --pad: clamp(24px, 4vw, 64px);  /* body side padding */
  --gap: 24px;

  --display: "Anton", "Archivo Black", Impact, sans-serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ---------- reset ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;   /* stop iOS bumping text on rotate */
  text-size-adjust: 100%;
}

body {
  font-family: var(--body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;   /* guard against full-bleed 100vw rounding */
}

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

/* prevent long display words from overflowing on narrow screens */
h1, h2, h3, h4 { overflow-wrap: break-word; }

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* full-bleed helper: break an element out of the padded container to span
   the entire viewport width */
.full-bleed {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* ---------- display type ---------- */
.display {
  font-family: var(--display);
  font-weight: 400;
  line-height: 0.94;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.link-arrow svg { width: 16px; height: 16px; transition: transform .2s ease; }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  background: var(--ink);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 16px 22px;
  transition: background .2s ease, transform .2s ease;
}
.btn:hover { background: #000; transform: translateY(-1px); }
.btn svg { width: 18px; height: 18px; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--white); }

/* =================================================================
   Header / nav
   ================================================================= */
/* Reserve the header slot's height so the JS-injected nav never shifts the
   page down on load or navigation (matches .nav height below). */
#header-slot { min-height: 64px; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled { border-bottom-color: var(--line); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-left, .nav-right { display: flex; align-items: center; gap: 22px; }

/* clickable text logo → home : M [E] M with the E boxed and centered */
.nav-logo { display: flex; align-items: center; gap: 7px; }
.nav-logo-letter {
  font-family: var(--display); font-size: 18px; line-height: 1;
  color: var(--ink); text-transform: uppercase;
}
.nav-logo-mark {
  width: 28px; height: 28px; background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-size: 18px; line-height: 1;
}

.nav-toggle {
  background: none; border: none; cursor: pointer;
  display: none;               /* hidden on desktop — shown only on mobile */
  flex-direction: column; gap: 4px; padding: 4px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); display: block; }

.nav-links { display: flex; gap: 24px; list-style: none; }
.nav-links a {
  font-size: 12px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink); padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover, .nav-links a.active { border-bottom-color: var(--ink); }

.nav-divider { width: 1px; height: 18px; background: var(--line); }
.nav-icon { background: none; border: none; cursor: pointer; display: flex; }
.nav-icon svg { width: 18px; height: 18px; }
.nav-meta { display: flex; align-items: center; gap: 18px; }
.nav-meta a { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }

/* mobile menu */
.nav-mobile {
  display: none;
  position: absolute;
  left: 0; right: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 12px 24px rgba(0,0,0,.06);
}
.nav-mobile.open { display: block; }
.nav-mobile ul { list-style: none; padding: 12px 0; }
.nav-mobile a {
  display: block; padding: 12px 28px; font-size: 13px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.nav-mobile a:hover { background: var(--paper-soft); }

/* =================================================================
   Hero / masthead
   ================================================================= */
.hero {
  /* full-bleed: span the entire viewport width */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) 1.5fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: stretch;
  padding: 10px 0 56px;
  /* align the masthead with the padded body below, image bleeds to the right edge */
  padding-left: max(var(--pad), calc((100vw - var(--maxw)) / 2 + var(--pad)));
}
.masthead { align-self: center; }
.masthead .display {
  font-size: clamp(64px, 9.5vw, 150px);
}
/* "MAGAZINE" set vertically (rotated 90deg clockwise), running down the
   right side of the T in EXPAT, bottom sitting on the EXPAT baseline. */
.mast-expat { position: relative; display: inline-block; }
.mast-mag {
  position: absolute;
  left: 100%;
  top: 0.13em;
  margin-left: 0.04em;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 0.15em;
  letter-spacing: 0.07em;
  line-height: 1;
  color: var(--ink);
}
.masthead-edition {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; margin-top: 18px;
}
.masthead-edition svg { width: 14px; height: 14px; }
.masthead p.lede {
  margin: 22px 0 28px;
  font-size: 16px; color: var(--ink-soft); max-width: 320px;
}

.hero-feature {
  position: relative;
  min-height: clamp(440px, 58vh, 640px);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  color: var(--white);
}
.hero-feature img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0;
}
.hero-feature::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(0,0,0,.78) 0%, rgba(0,0,0,.15) 55%, rgba(0,0,0,0) 100%);
}
.hero-feature-body { position: relative; z-index: 2; padding: 34px; max-width: 460px; }
.hero-feature-body .eyebrow { color: rgba(255,255,255,.85); }
.hero-feature-body h2 {
  font-family: var(--display); font-weight: 400; line-height: 0.98;
  font-size: clamp(26px, 3vw, 36px); text-transform: none; margin: 14px 0 12px;
  letter-spacing: 0;
}
.hero-feature-body p { font-size: 14px; color: rgba(255,255,255,.82); margin-bottom: 18px; max-width: 360px; }
.hero-feature-body .link-arrow { color: var(--white); }

/* =================================================================
   Section scaffolding
   ================================================================= */
section { padding: 18px 0; }
.section-rule { border: 0; border-top: 1px solid var(--line); margin: 8px 0 0; }

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; margin-bottom: 28px;
}
.section-head h2.display { font-size: clamp(28px, 3.4vw, 40px); }
.section-head p { font-size: 14px; color: var(--ink-soft); max-width: 220px; margin-top: 14px; }
.section-head--stack { flex-direction: column; align-items: flex-start; gap: 10px; }
.section-head--stack p { max-width: 560px; margin-top: 0; font-size: 15px; }

/* ---------- stories grid ---------- */
.stories {
  display: grid;
  grid-template-columns: 0.8fr repeat(4, 1fr);
  gap: 26px;
  align-items: start;
}
.stories .intro h2 { margin-bottom: 20px; line-height: 1; }
.stories .intro p { line-height: 1.6; }
.card-article figure { position: relative; overflow: hidden; aspect-ratio: 4/5; margin-bottom: 14px; }
.card-article img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card-article:hover img { transform: scale(1.04); }
.card-tag {
  position: absolute; left: 0; bottom: 0;
  background: rgba(0,0,0,.65); color: #fff;
  font-size: 9px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 6px 9px;
}
.card-article h3 {
  font-size: 16px; font-weight: 700; line-height: 1.25; margin-bottom: 8px;
}
.card-article p { font-size: 13px; color: var(--ink-soft); margin-bottom: 14px; }

/* =================================================================
   Events + Join split
   ================================================================= */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  padding: 26px 0;
}

.panel {
  background: var(--paper-soft);
  padding: 30px;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px;
}
.panel-head h3 { font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }

/* event rows (rendered by events.js) */
.event-row {
  display: grid;
  grid-template-columns: 54px 64px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.event-row:first-of-type { border-top: 0; }
.event-date {
  text-align: center; line-height: 1;
}
.event-date .m { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }
.event-date .d { font-family: var(--display); font-size: 30px; }
.event-thumb { width: 64px; height: 46px; object-fit: cover; }
.event-info h4 { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.event-info .meta { font-size: 12px; color: var(--ink-soft); display: flex; flex-wrap: wrap; gap: 12px; }
.event-info .meta span { display: inline-flex; align-items: center; gap: 5px; }
.event-info .meta svg { width: 12px; height: 12px; }
.event-cta {
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  border-bottom: 1px solid var(--ink); padding-bottom: 2px; white-space: nowrap;
}
.events-status { font-size: 13px; color: var(--ink-soft); padding: 14px 0; }

/* Join SocialGryd dark card */
.join {
  background: var(--dark);
  color: var(--white);
  padding: 34px;
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 18px;
  position: relative;
  overflow: hidden;
}
.join .eyebrow { color: rgba(255,255,255,.6); }
.join h3 { font-family: var(--display); font-weight: 400; font-size: 38px; margin: 12px 0 14px; }
.join > div > p { font-size: 14px; color: rgba(255,255,255,.75); margin-bottom: 18px; max-width: 240px; }
.join ul { list-style: none; display: grid; gap: 10px; margin-bottom: 24px; }
.join li { font-size: 13px; display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.9); }
.join li svg { width: 15px; height: 15px; color: #fff; }
.store-badges { display: flex; gap: 10px; flex-wrap: wrap; }
/* clean, readable buttons (replaces the low-contrast official badges) */
.store-badge {
  display: inline-flex; align-items: center; gap: 9px;
  background: #fff; color: var(--ink); border-radius: 8px; text-decoration: none;
  padding: 11px 18px; transition: background .2s ease, transform .15s ease;
}
.store-badge:hover { background: #ececec; transform: translateY(-1px); }
.store-badge svg { width: 20px; height: 20px; flex-shrink: 0; }
.store-badge .s { display: none; }   /* drop the tiny unreadable "download on the" line */
.store-badge .b { font-size: 14px; font-weight: 700; line-height: 1.1; white-space: nowrap; }
/* never let the article-body link styles add an underline / beige hover to buttons */
.article-body .store-badge { text-decoration: none; }
.article-body .store-badge:hover { background: #ececec; }

/* real app screenshot in a contained phone frame, centred with even padding */
.phone-mock {
  align-self: center;
  justify-self: center;
  width: 168px;
  border: 7px solid #161616;
  border-radius: 28px;
  background: #000;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0,0,0,.4);
}
.phone-shot { width: 100%; display: block; }

/* Meetups join: original 2-col size, content distributed to fill the tall box.
   Text + stat row stack in the left column (top and bottom); phone stays small,
   centred in the right column. */
.join--meetups {
  align-content: space-between;
  row-gap: 24px;
}
.join--meetups .join-top { grid-column: 1; }
.join--meetups .join-meta {
  grid-column: 1;
  display: flex; flex-wrap: wrap; gap: 24px 30px;
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,.14);
}
.join--meetups .jm { font-size: 13px; color: rgba(255,255,255,.55); line-height: 1.35; }
.join--meetups .jm strong {
  display: block; font-family: var(--display); font-weight: 400;
  font-size: 25px; color: #fff; letter-spacing: 0.01em; margin-bottom: 2px;
}
.join--meetups .phone-mock {
  grid-column: 2;
  grid-row: 1 / -1;
  align-self: center;
}

/* =================================================================
   Guides + Explore
   ================================================================= */
.guide-card figure { aspect-ratio: 16/11; overflow: hidden; margin-bottom: 12px; }
.guide-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.guide-card:hover img { transform: scale(1.04); }
.guide-card .eyebrow { font-size: 10px; }
.guide-card h4 { font-size: 15px; font-weight: 700; margin: 7px 0 6px; line-height: 1.25; }
.guide-card p { font-size: 12px; color: var(--ink-soft); }

.col-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.col-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }

.city-card figure { aspect-ratio: 3/4; overflow: hidden; margin-bottom: 10px; }
.city-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.city-card:hover img { transform: scale(1.05); }
.city-card h4 { font-family: var(--display); font-weight: 400; font-size: 22px; }
.city-card span { font-size: 12px; color: var(--ink-soft); }

/* =================================================================
   Newsletter strip + footer
   ================================================================= */
.site-footer { border-top: 1px solid var(--line); margin-top: 30px; padding: 40px 0 0; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1.2fr 1fr; gap: 40px; align-items: start;
  padding-bottom: 40px;
}
.footer-brand { display: flex; gap: 14px; align-items: flex-start; }
.footer-mark { gap: 6px; margin-top: 2px; }
.footer-mark .nav-logo-letter, .footer-mark .nav-logo-mark { font-size: 22px; }
.footer-mark .nav-logo-mark { width: 32px; height: 32px; }
.footer-brand h4 { font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.footer-brand p { font-size: 13px; color: var(--ink-soft); margin-top: 6px; max-width: 220px; }

.footer-news h5 { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 6px; }
.footer-news p { font-size: 13px; color: var(--ink-soft); margin-bottom: 14px; }
.news-form { display: flex; max-width: 340px; }
.news-form input {
  flex: 1; border: 1px solid var(--line); background: var(--white);
  padding: 12px 14px; font-size: 13px; font-family: var(--body);
}
.news-form button {
  background: var(--ink); color: #fff; border: none; cursor: pointer;
  padding: 0 20px; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
}
.footer-social { display: flex; gap: 14px; justify-content: flex-end; }
.footer-social a { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; }
.footer-social svg { width: 16px; height: 16px; }

.footer-bar {
  background: var(--ink); color: rgba(255,255,255,.7);
  margin-top: 6px;
}
.footer-bar .container { display: flex; align-items: center; justify-content: space-between; height: 54px; }
.footer-bar p { font-size: 12px; }
.footer-bar nav { display: flex; gap: 22px; }
.footer-bar nav a { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,.7); }
.footer-bar nav a:hover { color: #fff; }

/* =================================================================
   Interior page header band
   ================================================================= */
.page-band { padding: 40px 0 28px; border-bottom: 1px solid var(--line); margin-bottom: 36px; }
.page-band .eyebrow { margin-bottom: 14px; display: block; }
.page-band h1.display { font-size: clamp(48px, 7vw, 92px); }
.page-band p { font-size: 16px; color: var(--ink-soft); max-width: 540px; margin-top: 18px; }

.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; padding-bottom: 40px; }
.feature-lead {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 34px;
  align-items: center; margin-bottom: 44px;
}
.feature-lead figure { aspect-ratio: 16/10; overflow: hidden; }
.feature-lead img { width: 100%; height: 100%; object-fit: cover; }
.feature-lead h2 { font-family: var(--display); font-weight: 400; font-size: clamp(30px,4vw,46px); line-height: 0.96; margin-bottom: 16px; }
.feature-lead p { font-size: 15px; color: var(--ink-soft); margin-bottom: 18px; }

/* =================================================================
   Article / blog post  —  standard editorial template
   ================================================================= */
.article { max-width: 800px; margin: 0 auto; padding: 8px 0 64px; }

.article-back { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 22px; color: var(--ink-soft); }
.article-back:hover { color: var(--ink); }
.article-back svg { width: 15px; height: 15px; }

/* header — centred, magazine masthead feel */
.article-head { text-align: center; padding-bottom: 28px; border-bottom: 1px solid var(--line); margin-bottom: 34px; }
.article-head .eyebrow { display: block; margin-bottom: 18px; }
.article-head h1 {
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(36px, 5.4vw, 64px); line-height: 0.94; letter-spacing: -0.01em;
}
.article-standfirst { font-size: 19px; line-height: 1.5; color: var(--ink-soft); max-width: 600px; margin: 18px auto 0; }
.article-meta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; margin-top: 22px; font-size: 13px; color: var(--ink-soft); }
.article-meta .by { font-weight: 700; color: var(--ink); }
.article-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-soft); opacity: .5; }

.article-hero { margin: 0 0 36px; }
.article-hero img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.article-hero figcaption { font-size: 12px; color: var(--ink-soft); margin-top: 9px; text-align: center; }

/* body prose */
.article-body { font-size: 19px; line-height: 1.72; color: #24221d; }
.article-body > p { margin-bottom: 24px; }
.article-body > p:first-of-type::first-letter {
  font-family: var(--display); font-weight: 400; float: left;
  font-size: 64px; line-height: 0.8; padding: 6px 12px 0 0; color: var(--ink);
}
.article-body h2 {
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(24px, 3vw, 30px); letter-spacing: -0.01em; line-height: 1.05;
  margin: 44px 0 16px;
}
.article-body h3 { font-size: 20px; font-weight: 700; margin: 30px 0 10px; }
.article-body ul, .article-body ol { margin: 0 0 24px 22px; }
.article-body li { margin-bottom: 10px; }
.article-body a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.article-body a:hover { background: var(--paper-soft); }
.article-body strong { font-weight: 700; }

/* pull quote — editorial, not a code blockquote */
.article-body blockquote {
  margin: 36px 0; padding-top: 22px; border-top: 2px solid var(--ink); text-align: center;
  font-size: clamp(22px, 3vw, 28px); line-height: 1.32; font-weight: 500; color: var(--ink);
}

/* sidebar callout */
.article-body .callout {
  background: var(--paper-soft); padding: 24px 26px; margin: 32px 0; font-size: 16px; line-height: 1.62;
  border-left: 3px solid var(--ink);
}
.article-body .callout strong { display: block; margin-bottom: 7px; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; }

.article-faq { margin-top: 46px; border-top: 1px solid var(--line); padding-top: 32px; }
.article-faq h2 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 30px; margin-bottom: 18px; }
.article-faq details { border-bottom: 1px solid var(--line); padding: 15px 0; }
.article-faq summary { font-weight: 700; cursor: pointer; font-size: 16px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.article-faq summary::after { content: "+"; font-weight: 400; font-size: 20px; line-height: 1; }
.article-faq details[open] summary::after { content: "\2013"; }
.article-faq details p { margin-top: 12px; color: var(--ink-soft); font-size: 15px; line-height: 1.62; }

/* =================================================================
   CTA blocks (reusable across articles) + lead forms → Firestore
   ================================================================= */
.article-cta { padding: 34px; margin: 46px 0 0; text-align: center; }
.article-cta .eyebrow { display: block; margin-bottom: 12px; }
.article-cta h3 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(26px, 3.4vw, 34px); margin-bottom: 10px; line-height: 1; }
.article-cta p { font-size: 15px; margin: 0 auto 20px; max-width: 460px; line-height: 1.55; }

.article-cta--dark { background: var(--dark); color: #fff; }
.article-cta--dark .eyebrow { color: rgba(255,255,255,.55); }
.article-cta--dark p { color: rgba(255,255,255,.78); }

.article-cta--beige { background: var(--paper-soft); color: var(--ink); }
.article-cta--beige p { color: var(--ink-soft); }

/* lead-capture form (contact / insurance quote / etc.) */
.cta-form { max-width: 460px; margin: 0 auto; display: grid; gap: 12px; text-align: left; }
.cta-form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cta-form label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: inherit; opacity: .8; margin-bottom: 4px; display: block; }
.cta-form input, .cta-form textarea {
  width: 100%; font-family: var(--body); font-size: 15px; padding: 12px 14px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 0;
}
.article-cta--dark .cta-form input, .article-cta--dark .cta-form textarea { border-color: #3a3a3a; background: #1e1e1e; color: #fff; }
.cta-form textarea { min-height: 90px; resize: vertical; }
.cta-form button {
  background: var(--ink); color: #fff; border: none; cursor: pointer;
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; padding: 15px 22px;
}
.article-cta--dark .cta-form button { background: #fff; color: var(--ink); }
.cta-form button:hover { opacity: .9; }
.cta-consent { display: flex; gap: 9px; align-items: flex-start; font-size: 12px; line-height: 1.45; opacity: .85; }
.cta-consent input { width: auto; margin-top: 2px; }
.cta-note { font-size: 12px; opacity: .7; margin-top: 4px; }
@media (max-width: 560px) { .cta-form .row2 { grid-template-columns: 1fr; } }

/* slim inline app banner — drop in mid-article */
.app-inline {
  display: flex; align-items: center; gap: 22px;
  background: var(--dark); color: #fff; padding: 22px 26px; margin: 40px 0; flex-wrap: wrap;
}
.app-inline-icon { width: 52px; height: 52px; flex-shrink: 0; display: block; border-radius: 12px; }

/* SocialGryd app icon beside the heading (Join cards + article CTAs) */
.join-icon { width: 64px; height: 64px; border-radius: 15px; display: block; flex-shrink: 0; }
.article-cta .cta-app-icon { width: 56px; height: 56px; border-radius: 13px; display: block; flex-shrink: 0; }
.join-head { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.join-head > div h3 { margin: 0; line-height: 1; }
.join-head > div .eyebrow { display: block; margin-top: 9px; }
.cta-head { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 12px; text-align: left; }
.cta-head > div h3 { margin: 0; line-height: 1; }
.cta-head > div .eyebrow { display: block; margin-top: 7px; }
.app-inline-txt { flex: 1 1 260px; }
.app-inline-kicker { display: block; font-size: 10px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255,255,255,.5); margin-bottom: 5px; }
.app-inline-txt p { font-size: 15px; line-height: 1.45; margin: 0; color: rgba(255,255,255,.9); }
.app-inline-txt strong { font-weight: 700; color: #fff; }
.app-inline .store-badges { flex-wrap: wrap; }

@media (max-width: 640px) {
  .app-inline { gap: 16px; padding: 20px; }
  .app-inline-icon { display: none; }
}

/* article cards that carry a real thumbnail + meta on listings */
.card-article .card-meta { font-size: 11px; color: var(--ink-soft); margin-top: 8px; letter-spacing: 0.04em; text-transform: uppercase; }

@media (max-width: 560px) {
  .article-body { font-size: 16px; }
}

/* =================================================================
   Article filter chips (Articles hub)
   ================================================================= */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 30px; }
.filter-bar .chip { cursor: pointer; font-family: var(--body); -webkit-appearance: none; appearance: none; transition: background .15s, color .15s, border-color .15s; }
.filter-bar .chip.is-active { background: var(--ink); color: #fff; border: 1px solid var(--ink); }
.filter-bar .chip-ghost:hover { border-color: var(--ink); }
.filter-empty { text-align: center; color: var(--ink-soft); font-size: 15px; padding: 30px 0 10px; }
.filter-empty a { color: var(--ink); font-weight: 600; }

/* =================================================================
   Meetups feature (Communities page)
   ================================================================= */
.meetup-steps { display: grid; gap: 16px; margin: 4px 0 24px; }
.meetup-step { display: grid; grid-template-columns: 30px 1fr; gap: 14px; align-items: start; }
.meetup-step .n {
  width: 28px; height: 28px; border: 1.5px solid var(--ink); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px;
}
.meetup-step h4 { font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.meetup-step p { font-size: 13.5px; color: var(--ink-soft); }

.pillar-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pillar { background: var(--paper-soft); padding: 18px; }
.pillar h4 { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.pillar p { font-size: 12.5px; color: var(--ink-soft); }

.meetup-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.chip {
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--ink); color: #fff; padding: 8px 13px; border-radius: 100px;
}
.chip-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }

/* =================================================================
   Responsive
   ================================================================= */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding-left: var(--pad); padding-right: var(--pad); gap: 28px; }
  .masthead { align-self: start; }
  .hero-feature { min-height: 420px; }
  .stories { grid-template-columns: repeat(2, 1fr); }
  .stories .intro { grid-column: 1 / -1; }
  .split { grid-template-columns: 1fr; }
  .join { grid-template-columns: 1fr; }
  .phone-mock { display: none; }
  .col-4 { grid-template-columns: repeat(2, 1fr); }
  .col-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-social { justify-content: flex-start; }
  .article-grid { grid-template-columns: 1fr; }
  .feature-lead { grid-template-columns: 1fr; }
  .nav-links, .nav-meta { display: none; }
  .nav-toggle { display: flex; }     /* hamburger appears on mobile */
}
@media (max-width: 560px) {
  .stories { grid-template-columns: 1fr; }
  .col-4 { grid-template-columns: 1fr 1fr; }     /* keep city cards two-up */
  .pillar-grid { grid-template-columns: 1fr; }   /* meetup pillars stack */
  .event-row { grid-template-columns: 48px 1fr; }
  .event-thumb, .event-cta { display: none; }
  /* stack section headers so title + intro don't squash side by side */
  .section-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .section-head p { max-width: none; margin-top: 0; }
  /* tighter padding inside panels / cards on small screens */
  .panel, .join { padding: 22px; }
  .hero-feature-body { padding: 22px; }
  .footer-bar .container { flex-direction: column; height: auto; gap: 10px; padding: 16px 28px; }
}

/* =================================================================
   Welcome modal (SEO-safe: intent-triggered, once per 30 days)
   ================================================================= */
.promo-modal {
  position: fixed; inset: 0; z-index: 200;
  display: none; align-items: center; justify-content: center;
  padding: 24px;
}
.promo-modal.open { display: flex; }
.promo-backdrop { position: absolute; inset: 0; background: rgba(12,12,12,.55); }
.promo-card {
  position: relative; z-index: 1;
  background: var(--paper); color: var(--ink);
  width: 100%; max-width: 410px;
  padding: 38px 32px 30px;
  text-align: center;
  box-shadow: 0 30px 90px rgba(0,0,0,.4);
}
.promo-close {
  position: absolute; top: 12px; right: 12px;
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  background: transparent; border: 0; cursor: pointer; color: var(--ink-soft);
}
.promo-close svg { width: 20px; height: 20px; }
.promo-close:hover { color: var(--ink); }
.promo-icon { width: 58px; height: 58px; border-radius: 14px; display: block; margin: 0 auto 16px; }
.promo-card .eyebrow { color: var(--ink-soft); }
.promo-card h3 {
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(26px, 4.4vw, 34px); line-height: 0.95; margin: 8px 0 12px;
}
.promo-card > p { font-size: 15px; color: var(--ink-soft); line-height: 1.5; margin: 0 auto 20px; max-width: 320px; }
.promo-form { display: flex; gap: 8px; }
.promo-form input {
  flex: 1; min-width: 0; height: 46px; padding: 0 14px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 15px;
}
.promo-form input:focus { outline: none; border-color: var(--ink); }
.promo-form button {
  height: 46px; padding: 0 20px; border: 0; cursor: pointer;
  background: var(--ink); color: #fff; font-weight: 700; font-size: 14px;
  letter-spacing: 0.02em; white-space: nowrap;
}
.promo-form button:hover { background: #000; }
.promo-or {
  display: flex; align-items: center; gap: 12px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-soft); margin: 18px 0 14px;
}
.promo-or::before, .promo-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.promo-badges { justify-content: center; }
.promo-sub { font-size: 13px; color: var(--ink-soft); margin: 0 auto 12px; max-width: 300px; }
.promo-badges .store-badge { background: #fff; border: 1px solid var(--ink); }
.promo-badges .store-badge:hover { background: var(--paper-soft); }

@media (max-width: 560px) {
  .promo-modal { align-items: flex-end; padding: 0; }
  .promo-card { max-width: none; padding: 26px 20px 24px; }
  .promo-form { flex-direction: column; }
  .promo-form button { width: 100%; }
}

/* =================================================================
   Key takeaways (answer-first summary for AEO / GEO / featured snippets)
   ================================================================= */
.article-body .key-takeaways {
  background: var(--paper-soft);
  border-left: 3px solid var(--ink);
  padding: 22px 26px;
  margin: 0 0 32px;
}
.article-body .key-takeaways h2 {
  font-family: var(--body);
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink); margin: 0 0 14px;
}
.article-body .key-takeaways ul { margin: 0; padding-left: 20px; display: grid; gap: 10px; list-style: disc; }
.article-body .key-takeaways li { font-size: 15px; line-height: 1.55; color: var(--ink); }

/* small end-of-article disclaimer for legal / financial guides */
.article-body .article-note {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 14px;
}
.article-body .article-note a { color: var(--ink); font-weight: 600; }

/* =================================================================
   Shared SocialGryd app banner (injected site-wide by components.js)
   ================================================================= */
.app-cta {
  background: var(--dark);
  color: #fff;
  padding: 32px clamp(22px, 4vw, 40px);
  margin: 48px 0 8px;
}
.app-cta-inner {
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  max-width: 1000px; margin: 0 auto;
}
.app-cta-icon { width: 64px; height: 64px; border-radius: 15px; flex-shrink: 0; display: block; }
.app-cta-text { flex: 1 1 320px; }
.app-cta-text .eyebrow { color: rgba(255,255,255,.55); }
.app-cta-text h3 {
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(24px, 3vw, 32px); line-height: 1; margin: 9px 0 9px;
}
.app-cta-text p { font-size: 14px; color: rgba(255,255,255,.82); margin: 0; max-width: 470px; }
.app-cta-badges { flex-shrink: 0; }
.article-body .app-cta { margin-left: 0; margin-right: 0; }
@media (max-width: 640px) {
  .app-cta-icon { display: none; }
  .app-cta { padding: 24px 20px; }
}
