/* ============================================================================
   WORKSHOP BUILDER — page styles
   Built on the Big Tings design system (colors_and_type.css + bt-components.css)
   ============================================================================ */

body {
  margin: 0;
  background: var(--sand-100);
  font-family: var(--font-body);
  color: var(--fg);
}
a { color: var(--link); }
a:hover { color: var(--link-hover); }
::selection { background: var(--sun-300); }

.skip-link {
  position: absolute; left: -9999px;
  background: var(--flora-500); color: var(--sand-100);
  padding: 10px 18px; border-radius: var(--radius-pill);
  font-family: var(--font-ui); font-size: 14px; z-index: 100;
}
.skip-link:focus { left: 16px; top: 16px; color: var(--sand-100); }

.page {
  min-height: 100vh;
  background: var(--sand-100);
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* ---- Top bar ------------------------------------------------------------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 20px 32px;
  max-width: 1240px; width: 100%;
  margin: 0 auto;
}
.topbar__brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: inherit;
}
.topbar__brand:hover { color: inherit; }
.topbar__brand:hover .topbar__tagline { color: var(--fg-strong); }
.topbar__logo { height: 34px; width: auto; }
.topbar__tagline {
  font-family: var(--font-ui); font-size: 12px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--clay-500);
  border-left: 1.5px solid var(--border-strong);
  padding-left: 10px; margin-left: 2px;
}

/* ---- Hero ---------------------------------------------------------------- */
.hero {
  position: relative;
  max-width: 1240px; margin: 0 auto;
  padding: 48px 32px 96px;
  text-align: center;
}
.hero__deco {
  position: absolute; height: auto; pointer-events: none; z-index: 0;
}
.hero__deco--tr { top: -40px; right: -60px; width: 340px; opacity: .10; transform: rotate(8deg); }
.hero__deco--bl { bottom: -20px; left: -70px; width: 260px; opacity: .08; transform: rotate(-6deg); }

.hero__inner { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }
.hero__eyebrow { margin: 0 0 18px; }
.hero__title {
  font-family: var(--font-serif); font-weight: 600;
  font-size: clamp(2.4rem, 5vw, 3.75rem);
  line-height: 1.08; letter-spacing: -0.02em;
  color: var(--fg-strong);
  margin: 0 0 20px;
  text-wrap: balance;
}
.hero__sub {
  font-size: 20px; line-height: 1.6;
  color: var(--fg-muted);
  margin: 0 0 40px;
  text-wrap: pretty;
}
.hero__actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---- Builder layout ------------------------------------------------------ */
.builder { max-width: 1240px; margin: 0 auto; padding: 8px 32px 96px; width: 100%; }

.progress {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; margin: 8px 0 36px; flex-wrap: wrap;
}
.progress__steps {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 0 12px; padding: 0; list-style: none;
}
.progress__step { display: flex; align-items: center; gap: 8px; }
.progress__dot {
  width: 30px; height: 30px; border-radius: var(--radius-pill);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-ui); font-weight: 600; font-size: 13px;
  background: var(--sand-200); color: var(--fg-subtle);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.progress__dot.is-on { background: var(--flora-500); color: var(--sand-100); }
.progress__line { width: 28px; height: 2px; background: var(--border-strong); }
.progress__line.is-on { background: var(--flora-500); }

.builder__grid { display: flex; gap: 36px; align-items: flex-start; flex-wrap: wrap; }
.wizard {
  flex: 1 1 560px; min-width: 320px;
  display: flex; flex-direction: column; gap: 28px;
}
.wizard__nav {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 20px; border-top: 1px solid var(--border);
}
.preview {
  flex: 0 1 380px; min-width: 300px;
  position: sticky; top: 24px;
  display: flex; flex-direction: column; gap: 18px;
  background: var(--white);
}
.preview__head { display: flex; align-items: center; justify-content: space-between; }
.preview__title {
  font-family: var(--font-serif); font-weight: 600; font-size: 20px;
  color: var(--fg-strong); margin: 0;
}
.preview__mark { width: 30px; height: 30px; opacity: .5; }

/* ---- Step content -------------------------------------------------------- */
.step__title {
  font-family: var(--font-serif); font-weight: 600;
  font-size: var(--text-2xl); color: var(--fg-strong);
  margin: 0 0 8px;
}
.step__sub {
  font-family: var(--font-body); font-size: 16px;
  line-height: var(--leading-loose); color: var(--fg);
  margin: 0 0 24px;
}

.shortcuts { margin-bottom: 24px; }
.shortcuts__label { margin-bottom: 10px; display: block; }
.shortcuts__list { display: flex; gap: 10px; flex-wrap: wrap; }

.modules {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

/* Selectable card — used for modules and radio options */
.pick {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px; border-radius: var(--radius-md);
  cursor: pointer; text-align: left; width: 100%;
  border: 1.5px solid var(--border);
  background: var(--white);
  font: inherit; color: inherit;
  transition: border-color var(--dur-fast) var(--ease),
              background var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease);
}
.pick:hover { border-color: var(--flora-400); }
.pick:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--sand-100), 0 0 0 5px var(--focus-ring); }
.pick.is-selected { border-color: var(--flora-500); background: var(--flora-100); }
.pick.is-disabled { opacity: .45; cursor: not-allowed; }
.pick.is-disabled:hover { border-color: var(--border); }

.pick__chip {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.pick__chip img { width: 26px; height: 26px; object-fit: contain; }
.pick__body { flex: 1; min-width: 0; }
.pick__label {
  font-family: var(--font-ui); font-weight: 600; font-size: 15px;
  color: var(--fg-strong);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.pick__desc {
  font-family: var(--font-body); font-size: 13.5px; line-height: 1.4;
  color: var(--fg-muted); margin-top: 4px;
}
.pick__tick {
  width: 18px; height: 18px; border-radius: 5px;
  background: var(--flora-500); color: var(--sand-100);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; flex-shrink: 0;
}

/* Radio-style option rows (steps 2 & 3) */
.options { display: flex; flex-direction: column; gap: 12px; }
.pick--option { gap: 14px; padding: 16px; }
.pick__radio {
  width: 20px; height: 20px; border-radius: var(--radius-pill);
  border: 2px solid var(--border-strong);
  background: transparent;
  flex-shrink: 0; margin-top: 2px;
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.pick.is-selected .pick__radio {
  border-color: var(--flora-500);
  background: var(--flora-500);
  box-shadow: inset 0 0 0 3px var(--white);
}
.pick__optionlabel {
  font-family: var(--font-ui); font-weight: 600; font-size: 15.5px;
  color: var(--fg-strong);
}
.pick__row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }

.limit-note {
  font-family: var(--font-ui); font-size: 13px;
  color: var(--fg-subtle); margin: 14px 0 0;
}

.ready {
  margin-top: 28px; padding: 20px;
  border-radius: var(--radius-lg); background: var(--flora-100);
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.ready p { margin: 0; font-size: 15px; color: var(--ink-800); flex: 1; min-width: 200px; }

/* ---- Preview panel ------------------------------------------------------- */
.preview__empty {
  font-family: var(--font-body); font-style: italic;
  color: var(--fg-subtle); font-size: 14px; line-height: 1.6; margin: 0;
}
.preview__stack { display: flex; flex-direction: column; gap: 18px; }
.preview__group + .preview__group { border-top: 1px solid var(--border); padding-top: 14px; }
.preview__items { display: flex; flex-direction: column; gap: 8px; }
.preview__item { display: flex; gap: 10px; align-items: flex-start; }
.preview__item img { width: 20px; height: 20px; margin-top: 2px; flex-shrink: 0; }
.preview__itemlabel {
  font-family: var(--font-ui); font-weight: 600; font-size: 13.5px; color: var(--fg-strong);
}
.preview__itemdesc {
  font-family: var(--font-body); font-size: 12.5px; color: var(--fg-muted); line-height: 1.4;
}
.preview__value { font-family: var(--font-body); font-size: 14px; color: var(--ink-800); }
.preview__flow {
  background: var(--sand-200); border-radius: var(--radius-md); padding: 14px 16px;
}
.preview__flowtext {
  font-family: var(--font-body); font-size: 13.5px; line-height: 1.55; color: var(--ink-800);
}
.bt-eyebrow--sm { font-size: 11px; margin-bottom: 8px; display: block; }

/* ---- Modal --------------------------------------------------------------- */
.modal { position: fixed; inset: 0; z-index: 50; overflow-y: auto; }
.modal__backdrop {
  position: fixed; inset: 0;
  background: rgba(66, 42, 18, .45);
}
.modal__panel {
  position: relative;
  max-width: 560px; width: 100%;
  background: var(--white);
  margin: 48px auto;
}
.modal__close { position: absolute; top: 16px; right: 16px; font-size: 20px; line-height: 1; }

.form { display: flex; flex-direction: column; gap: 14px; }
.form__row { display: flex; gap: 14px; flex-wrap: wrap; }
.form__row .field { flex: 1 1 200px; }
.form__summary {
  background: var(--sand-200); border-radius: var(--radius-md);
  padding: 12px 14px;
  font-family: var(--font-body); font-size: 13px;
  color: var(--ink-800); line-height: 1.6;
}
.form__error {
  font-family: var(--font-ui); font-size: 13.5px;
  color: #9a3412; background: #fde8d7;
  border-radius: var(--radius-md); padding: 10px 14px; margin: 0;
}
.field .input:user-invalid { border-color: #c2410c; }

.done { text-align: center; padding: 24px 8px; }
.done__mark { width: 64px; height: 64px; margin: 0 auto 20px; display: block; }
.done h3 {
  font-family: var(--font-serif); font-weight: 600; font-size: 24px;
  color: var(--fg-strong); margin: 0 0 12px;
}

/* ---- Footer -------------------------------------------------------------- */
.sitefoot {
  margin-top: auto;
  padding: 32px; text-align: center;
  font-family: var(--font-ui); font-size: 13px; color: var(--fg-subtle);
  border-top: 1px solid var(--border);
}
.sitefoot p { margin: 4px 0; }

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 860px) {
  .preview { position: static; }
  .topbar, .hero, .builder { padding-left: 20px; padding-right: 20px; }
  .hero { padding-bottom: 64px; }
  .topbar__tagline { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ============================================================================
   EMBED MODE
   Applied by js/embed.js when the builder is inside an iframe (or when the URL
   has ?embed=1). Squarespace already supplies the site header, footer and
   background, so the standalone chrome steps aside.
   ============================================================================ */

.is-embed, .is-embed body {
  background: transparent;
  /* Never let the modal's body lock collapse the auto-height iframe. */
  overflow: visible !important;
  height: auto !important;
}

.is-embed .page {
  min-height: 0;
  background: transparent;
}

/* Squarespace gives us its own logo bar and footer — drop the duplicates. */
.is-embed .topbar__brand,
.is-embed .sitefoot,
.is-embed .skip-link { display: none; }

.is-embed .topbar {
  justify-content: flex-end;
  padding: 12px 32px 0;
  min-height: 0;
}

/* Tighter vertical rhythm — the Squarespace page already has section padding. */
.is-embed .hero { padding: 8px 32px 56px; }
.is-embed .builder { padding-top: 8px; }

/* The modal is position:fixed. Inside a full-height iframe "fixed" means the
   top of the whole document, not what the visitor can see — so in embed mode
   we pin it to the slice of the iframe the parent tells us is on screen. */
.is-embed .modal {
  position: absolute;
  top: var(--bt-vp-top, 0px);
  left: 0; right: 0;
  bottom: auto;
  height: var(--bt-vp-h, 100vh);
  overflow-y: auto;
}
.is-embed .modal__backdrop {
  position: absolute;
  inset: 0;
}
.is-embed .modal__panel { margin: 32px auto; }

@media (max-width: 860px) {
  .is-embed .hero { padding-left: 20px; padding-right: 20px; }
  .is-embed .topbar { padding-left: 20px; padding-right: 20px; }
}
