/*
 * Campaign landing pages (/ig/). Loaded by _layouts/campaign.njk only, after
 * site.css.
 *
 * The designs are drawn for a 390px phone, which is where Instagram traffic
 * arrives. Rather than stretching them across a desktop, the page stays a
 * single centred column that only grows its type on wider screens.
 *
 * Colours come from the --ob-* tokens. The site brand has no colour accent,
 * so the near-black --ob-accent stands in wherever the mockups used one. The
 * only exception is the theme switcher on /ig/themes/, which sets its own
 * --t-* variables because there the colours are the thing being shown.
 */

:root {
  /* Placeholder fill for mock photos and screenshots, from the mockups. */
  --ig-placeholder: #dcd8cf;
  --ig-chip: var(--ob-surface-alt);
  --ig-on-dark-muted: rgba(249, 248, 246, 0.72);
  --ig-radius-lg: 22px;
  --ig-radius: 16px;
  --ig-shadow: 0 18px 40px rgba(42, 41, 39, 0.10);
  /* Form errors (/ytt/updates/). The palette has no red, so this is muted to
     sit with it; 6.9:1 on --ob-surface (WCAG AA). */
  --ig-error: #9a3324;
}

/* ── Shell ── */
.campaign-header {
  max-width: 560px;
  margin: 0 auto;
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.campaign-header .nav-logo img { height: 26px; width: auto; }
.campaign-header .btn { border-radius: 999px; min-height: 44px; }

.campaign {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 22px 56px;
}

.campaign-footer {
  padding: 32px 22px;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--ob-text-muted);
}
.campaign-footer a { color: var(--ob-text-muted); }

/* ── Type ── */
.campaign h1 {
  font-size: clamp(2.6rem, 9vw, 3.4rem);
  line-height: 1.04;
}
.campaign h2 {
  font-size: clamp(1.75rem, 6vw, 2.25rem);
  line-height: 1.1;
}
.campaign h1 em,
.campaign h2 em {
  font-style: italic;
  font-weight: 400;
  color: var(--ob-text-muted);
}
.campaign p { margin: 0; }

/* Prefixed with .campaign so a label can be an <h2> (for document outline)
   without the heading rule above winning on specificity. */
.campaign .ig-eyebrow,
.campaign .ig-label {
  font-family: var(--ob-body-font);
  line-height: 1.4;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ob-text-muted);
}
.ig-lede { font-size: 1.0625rem; line-height: 1.5; color: var(--ob-text-muted); }
.ig-muted { font-size: 0.8125rem; color: var(--ob-text-muted); }
.ig-small { font-size: 0.875rem; line-height: 1.5; color: var(--ob-text-muted); }
.ig-trust {
  display: flex;
  justify-content: center;
  gap: 12px;
  font-size: 0.8125rem;
  color: var(--ob-text-muted);
}

/* ── Layout ── */
.ig-hero { padding-top: 16px; display: flex; flex-direction: column; gap: 16px; }
.ig-section { margin-top: 44px; display: flex; flex-direction: column; gap: 16px; }
.ig-center { align-items: center; }
.ig-section > h2 + * { margin-top: 4px; }

/* Full-width hero/closing call to action. */
.ig-cta { width: 100%; min-height: 56px; border-radius: 999px; font-size: 1.0625rem; font-weight: 600; }
/* Secondary outline link, e.g. "See a live example site". */
.ig-link-btn { min-height: 48px; border-radius: 999px; border-color: var(--ob-text); font-weight: 600; }
.ig-link-btn .icon { width: 16px; height: 16px; }

/* ── Cards ── */
.ig-card {
  padding: 18px;
  border-radius: var(--ig-radius);
  background: var(--ob-white);
  border: 1px solid var(--ob-border);
}
.ig-card h3 { font-family: var(--ob-body-font); font-size: 1rem; font-weight: 600; }
.ig-card p { margin-top: 4px; font-size: 0.9375rem; line-height: 1.45; color: var(--ob-text-muted); }
.ig-cards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }

.ig-photo {
  background: var(--ig-placeholder);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  color: var(--ob-text-muted);
  min-height: 150px;
}
img.ig-photo { display: block; width: 100%; object-fit: cover; }

/* A mock wrapped in a link to the live demo site (demo.mymat.yoga). */
.ig-demo { display: block; max-width: 100%; color: inherit; text-decoration: none; border-radius: 28px; }
.ig-demo:focus-visible { outline: 2px solid var(--ob-accent); outline-offset: 4px; }
/* Visible "Demo site" label on every mock of demo.mymat.yoga (MM-140). */
.ig-phone, .ig-mini--after, .ig-preview, .ig-flow .ig-demo { position: relative; }
.ig-demo-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ob-text);
  font-family: var(--ob-body-font);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

/* Phone-sized mock of a teacher's site. */
.ig-phone {
  width: 280px;
  max-width: 100%;
  border-radius: 28px;
  background: var(--ob-white);
  border: 1px solid var(--ob-border);
  box-shadow: var(--ig-shadow);
  overflow: hidden;
}
.ig-phone .ig-photo { height: 170px; }
.ig-phone-body { padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.ig-phone-name { font-family: var(--ob-heading-font); font-size: 1.5rem; line-height: 1.1; }
.ig-rows { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ig-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.8125rem;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--ig-chip);
}
.ig-row-action { font-weight: 600; }
.ig-row--accent { background: var(--ob-accent); color: var(--ob-white); }

/* ── Numbered steps ── */
.ig-steps { list-style: none; counter-reset: ig-step; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 22px; }
.ig-steps li { counter-increment: ig-step; position: relative; padding-left: 52px; min-height: 36px; }
.ig-steps li::before {
  content: counter(ig-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--ob-accent);
  color: var(--ob-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}
.ig-steps h3 { font-family: var(--ob-body-font); font-size: 1.0625rem; font-weight: 600; line-height: 1.4; }
.ig-steps p { margin-top: 4px; font-size: 0.9375rem; line-height: 1.45; color: var(--ob-text-muted); }

/* ── Quote ── */
.ig-quote { margin: 44px 0 0; padding: 22px; }
.ig-quote--bare { padding: 0; background: none; border: 0; }
.ig-quote blockquote { margin: 0; font-family: var(--ob-heading-font); font-size: 1.375rem; line-height: 1.3; }
.ig-quote figcaption { margin-top: 10px; font-size: 0.8125rem; color: var(--ob-text-muted); }

/* ── Prices ── */
.ig-prices { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ig-price-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--ob-white);
  border: 1px solid var(--ob-border);
  font-size: 0.8125rem;
  color: var(--ob-text-muted);
}
.ig-price-row > span:first-child { font-size: 1rem; font-weight: 600; color: var(--ob-text); }
.ig-price-row strong { font-size: 1.375rem; color: var(--ob-text); }

/* ── Chips ── */
.ig-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ig-chips li { font-size: 0.875rem; padding: 8px 12px; border-radius: 999px; background: var(--ig-chip); }
.ig-chips--outline li { padding: 10px 14px; background: var(--ob-white); border: 1px solid var(--ob-border); }

/* ── Closing band (dark), mirrors the homepage .cta-strip ── */
.ig-band {
  margin: 44px -22px 0;
  padding: 36px 22px 44px;
  background: var(--ob-accent);
  color: var(--ob-surface);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ig-band h1,
.ig-band h2 { color: var(--ob-surface); }
.ig-band h1 em,
.ig-band h2 em { color: var(--ig-on-dark-muted); }
.ig-band .ig-trust,
.ig-band p { color: var(--ig-on-dark-muted); }
.ig-band .btn-primary { background: var(--ob-surface); color: var(--ob-accent); }
.ig-band .btn-primary:hover { background: var(--ob-white); color: var(--ob-accent); }
/* An inline rounded variant, used mid-page rather than as the last section. */
.ig-band--card { margin: 28px 0 0; padding: 24px 22px; border-radius: var(--ig-radius-lg); }
/* A hero that is itself dark (/ig/link-in-bio/): bleeds up behind the header. */
.ig-band--hero { margin-top: 0; padding-top: 28px; padding-bottom: 40px; gap: 20px; }

@media (min-width: 600px) {
  .ig-band { margin-left: 0; margin-right: 0; border-radius: var(--ig-radius-lg); }
}

/* ── /ig/link-in-bio/: before/after ── */
.ig-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ig-compare figure { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.ig-compare figcaption { order: -1; }
.ig-mini {
  min-height: 280px;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.6875rem;
  color: var(--ob-text-muted);
}
.ig-mini--before { background: var(--ob-surface-alt); padding: 16px 12px; }
.ig-mini--before .ig-avatar { width: 44px; height: 44px; border-radius: 999px; background: #cfccc5; align-self: center; }
.ig-mini--before .ig-mini-link {
  height: 32px; border-radius: 8px; background: var(--ob-white);
  display: flex; align-items: center; justify-content: center;
}
.ig-mini--after {
  background: var(--ob-white);
  border: 1px solid var(--ob-border);
  box-shadow: 0 10px 24px rgba(42, 41, 39, 0.08);
  overflow: hidden;
  color: var(--ob-text);
}
.ig-mini--after .ig-photo { min-height: 84px; height: 84px; font-size: 0.6875rem; }
.ig-mini-body { padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.ig-mini-name { font-family: var(--ob-heading-font); font-size: 1.125rem; }
.ig-mini .ig-row { font-size: 0.6875rem; padding: 7px 8px; border-radius: 6px; }

/* "Questions? Read the FAQ" — a plain line, not a flex section, so it never wraps mid-phrase. */
.ig-faq { margin-top: 32px; text-align: center; }

/* ── /ig/examples/: example site cards ── */
.ig-example { padding: 0; overflow: hidden; border-radius: var(--ig-radius-lg); }
.ig-example img { width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; background: var(--ig-placeholder); }
.ig-example-body { padding: 16px 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ig-example .ig-example-title { font-family: var(--ob-body-font); font-size: 1rem; font-weight: 600; }
.ig-example-body p { margin-top: 2px; font-size: 0.8125rem; color: var(--ob-text-muted); }
.ig-example-body a { flex: none; font-size: 0.875rem; font-weight: 600; padding: 12px 0; }
.ig-option-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.ig-option-head span { font-size: 0.875rem; color: var(--ob-text-muted); }

/* ── /ig/done-for-you/ ── */
.ig-flow { padding: 0; overflow: hidden; border-radius: var(--ig-radius-lg); }
.ig-flow-part { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.ig-flow-arrow { display: flex; justify-content: center; padding: 4px 0; background: var(--ig-chip); color: var(--ob-text-muted); }
.ig-flow-arrow .icon { width: 24px; height: 24px; }
.ig-flow .ig-flow-result { margin: 0; font-family: var(--ob-heading-font); font-size: 1.375rem; line-height: 1.2; color: var(--ob-text); }
.ig-flow .ig-photo { border-radius: 14px; }
.ig-flow .ig-demo { align-self: center; width: 220px; border-radius: 14px; }
.ig-flow .ig-shot { height: auto; min-height: 0; border: 1px solid var(--ob-border); }

.ig-offer {
  margin-top: 44px;
  padding: 24px 22px;
  border-radius: var(--ig-radius-lg);
  background: var(--ob-white);
  border: 2px solid var(--ob-text);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ig-offer .ig-offer-name { font-family: var(--ob-body-font); font-size: 1rem; font-weight: 600; }
.ig-offer-price { font-size: 0.875rem; color: var(--ob-text-muted); }
.ig-offer-price strong { font-family: var(--ob-heading-font); font-size: 3.25rem; line-height: 1; color: var(--ob-text); }
.ig-checks { list-style: none; margin: 0; padding: 4px 0 0; display: flex; flex-direction: column; gap: 10px; }
.ig-checks li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9375rem; line-height: 1.45; }
.ig-checks .icon { flex: none; width: 20px; height: 20px; margin-top: 1px; }
.ig-aside { margin-top: 36px; padding: 20px; border-radius: var(--ig-radius); background: var(--ob-surface-alt); }
.ig-aside h2 { font-family: var(--ob-body-font); font-size: 1rem; font-weight: 600; }
.ig-aside p { margin-top: 8px; font-size: 0.9375rem; line-height: 1.45; color: var(--ob-text-muted); }

/* ── /ig/themes/: switcher ──
 * Each theme's colours arrive as --t-* variables on [data-theme="…"] rules
 * rendered from _data/igThemes.js; these rules only consume them. */
.ig-preview {
  width: 290px;
  max-width: 100%;
  border-radius: 28px;
  overflow: hidden;
  background: var(--t-bg);
  color: var(--t-ink);
  border: 1px solid var(--ob-border);
  box-shadow: var(--ig-shadow);
  transition: background 200ms ease, color 200ms ease;
}
.ig-preview .ig-photo { height: 160px; background: var(--t-photo); color: var(--t-ink); }
.ig-preview .ig-phone-body { gap: 10px; }
.ig-preview .ig-phone-name { font-family: var(--t-head); font-weight: var(--t-head-weight); font-size: var(--t-head-size); }
.ig-preview .ig-muted { color: inherit; opacity: 0.75; }
.ig-preview .ig-row { background: var(--t-card); }
.ig-preview .ig-row-action { color: var(--t-accent); }
.ig-preview-btn {
  display: flex; align-items: center; justify-content: center;
  min-height: 40px; margin-top: 4px; border-radius: 999px;
  background: var(--t-accent); color: var(--t-btn-text);
  font-size: 0.8125rem; font-weight: 600;
}
.ig-theme-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.ig-theme-chip {
  min-height: 44px; padding: 0 16px; border-radius: 999px;
  font: 600 0.875rem var(--ob-body-font);
  cursor: pointer;
  border: 1px solid var(--ob-text);
  background: var(--ob-white); color: var(--ob-text);
}
.ig-theme-chip[aria-pressed="true"] { background: var(--ob-text); color: var(--ob-white); }
/* Disabled only until theme-switcher.js runs; keep them looking like swatches. */
.ig-theme-chip:disabled, .ig-theme-thumb:disabled { cursor: default; }
.ig-theme-thumbs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ig-theme-thumb {
  display: flex; flex-direction: column; gap: 8px; align-items: stretch; text-align: left;
  padding: 14px; min-height: 150px; border-radius: var(--ig-radius);
  cursor: pointer;
  background: var(--t-bg); color: var(--t-ink);
  border: 1px solid var(--ob-border);
  font-family: var(--ob-body-font);
}
.ig-theme-thumb[aria-pressed="true"] { border: 2px solid var(--ob-text); padding: 13px; }
.ig-theme-thumb-head { font-family: var(--t-head); font-weight: var(--t-head-weight); font-size: 1.75rem; line-height: 1; }
.ig-theme-thumb-bar { height: 10px; width: 60%; border-radius: 999px; background: var(--t-accent); }
.ig-theme-thumb-row { height: 8px; border-radius: 999px; background: var(--t-card-strong, var(--t-card)); }
.ig-theme-thumb-label { margin-top: auto; font-size: 0.8125rem; font-weight: 600; }
.ig-theme-chip:focus-visible,
.ig-theme-thumb:focus-visible { outline: 2px solid var(--ob-border-focus); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .ig-preview { transition: none; }
}

.ig-theme-status { font-size: 0.8125rem; color: var(--ob-text-muted); text-align: center; }

/* ── Signup form (/ytt/updates/, posts to flodesk-worker/) ── */
.ig-form { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
/* display above outranks the browser's [hidden] rule; subscribe-form.js hides
   the form on success. Same for .ig-form-success below. */
.ig-form[hidden] { display: none; }
.ig-field { display: flex; flex-direction: column; gap: 6px; }
.ig-field label { font-size: 0.875rem; font-weight: 600; }
.ig-field input {
  min-height: 52px;
  padding: 12px 16px;
  font: inherit;
  font-size: 1rem; /* 16px or more stops iOS zooming on focus */
  color: var(--ob-text);
  background: var(--ob-white);
  border: 1px solid var(--ob-border);
  border-radius: 14px;
}
.ig-field input:focus-visible { outline: 2px solid var(--ob-border-focus); outline-offset: 1px; border-color: var(--ob-border-focus); }
.ig-form .ig-cta[disabled] { opacity: 0.6; cursor: progress; transform: none; }
/* Empty until subscribe-form.js writes a message, so it takes no space. */
.ig-form-error { font-size: 0.9375rem; color: var(--ig-error); }
.ig-form-error:empty { display: none; }
.ig-form-success {
  display: flex; flex-direction: column; gap: 8px;
  padding: 22px; border-radius: var(--ig-radius-lg);
  background: var(--ob-white); border: 1px solid var(--ob-border);
}
.ig-form-success[hidden] { display: none; }
.ig-form-success:focus { outline: none; }
/* Honeypot: off-screen rather than display:none, which some bots skip. */
.ig-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
