/* ==========================================================================
   Brandcast — design system
   Palette, type and components extracted from the Brandcast design
   reference (public/brandcast.html). Colours are named after the brand
   kit language used in the product itself (terracotta, fern, oat, charcoal)
   so the CSS reads the same way the product copy does.
   ========================================================================== */

:root {
  /* Neutrals */
  --bc-bg: #faf9f7;
  --bc-white: #ffffff;
  --bc-ink: #1c1a17;
  --bc-ink-soft: #45403a;
  --bc-muted: #6f6a63;
  --bc-faint: #a39c92;
  --bc-border: #eae6e0;
  --bc-border-strong: #e4dfd8;
  --bc-border-card: #e8e4de;
  --bc-border-input: #efebe4;
  --bc-surface: #f5f2ed;
  --bc-surface-soft: #f3f0eb;
  --bc-input-bg: #fcfbf9;

  /* Brand kit sample colours (used for swatches / accents) */
  --bc-terracotta: #c25b3a;
  --bc-fern: #2f4a3c;
  --bc-oat: #f1e5d3;
  --bc-charcoal: #26241f;

  /* Semantic */
  --bc-success-bg: #edf4ee;
  --bc-success-ink: #2e4a3c;
  --bc-disabled: #cfc8be;

  /* Type */
  --bc-font-body: "Plus Jakarta Sans", Helvetica, sans-serif;
  --bc-font-display: "Instrument Serif", Georgia, serif;
  --bc-font-mono: "IBM Plex Mono", monospace;

  /* Radii */
  --bc-radius-sm: 10px;
  --bc-radius-md: 14px;
  --bc-radius-lg: 20px;
  --bc-radius-xl: 24px;
  --bc-radius-pill: 999px;
}

/* ------------------------------------------------------------------------
   Reset & base
   ------------------------------------------------------------------------ */

* {
  box-sizing: border-box;
}

html,
body {
  padding: 0;
  margin: 0;
}

body.bc-body {
  min-height: 100vh;
  background: var(--bc-bg);
  color: var(--bc-ink);
  font-family: var(--bc-font-body);
  font-size: 16px;
  line-height: 1.5;
  text-wrap: pretty;
  padding-bottom: 60px;
}

button,
input,
textarea {
  font-family: inherit;
  color: inherit;
}

a {
  color: inherit;
}

.bc-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 24px;
}

.bc-container--narrow {
  max-width: 1000px;
}

.bc-container--form {
  max-width: 700px;
}

.bc-container--reading {
  max-width: 620px;
}

.bc-container--centered {
  max-width: 640px;
  text-align: center;
}

/* ------------------------------------------------------------------------
   Header
   ------------------------------------------------------------------------ */

.bc-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(250, 249, 247, 0.93);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--bc-border);
}

.bc-header__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.bc-header__back {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--bc-white);
  border: 1px solid var(--bc-border-strong);
  border-radius: var(--bc-radius-pill);
  padding: 7px 15px 7px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--bc-ink-soft);
  cursor: pointer;
}

.bc-header__back-arrow {
  font-size: 15px;
  line-height: 1;
}

.bc-logo {
  background: none;
  border: none;
  padding: 0;
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-right: auto;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.bc-logo__mark {
  font-family: var(--bc-font-display);
  font-size: 26px;
  letter-spacing: -0.01em;
}

.bc-logo__beta {
  font-family: var(--bc-font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bc-faint);
}

.bc-brand-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--bc-white);
  border: 1px solid var(--bc-border-strong);
  border-radius: var(--bc-radius-pill);
  padding: 5px 15px 5px 6px;
}

.bc-brand-pill__name {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
}

/* ------------------------------------------------------------------------
   Avatars / logo marks (CSS-only placeholder logos: initials on a colour)
   ------------------------------------------------------------------------ */

.bc-mark {
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--bc-white);
  font-weight: 700;
  background: var(--bc-terracotta);
  flex: 0 0 auto;
}

.bc-mark--xs {
  width: 22px;
  height: 22px;
  font-size: 7.5px;
}

.bc-mark--sm {
  width: 27px;
  height: 27px;
  font-size: 10.5px;
}

.bc-mark--md {
  width: 34px;
  height: 34px;
  font-size: 10px;
}

.bc-mark--lg {
  width: 74px;
  height: 74px;
  font-size: 20px;
}

.bc-mark--xl {
  width: 104px;
  height: 104px;
  font-size: 28px;
}

/* ------------------------------------------------------------------------
   Eyebrow / badges
   ------------------------------------------------------------------------ */

.bc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--bc-surface);
  border-radius: var(--bc-radius-pill);
  padding: 7px 15px;
  font-size: 13px;
  font-weight: 600;
  color: var(--bc-muted);
  margin-bottom: 24px;
}

.bc-eyebrow__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bc-terracotta);
}

.bc-eyebrow-mono {
  font-family: var(--bc-font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bc-faint);
  margin-bottom: 14px;
}

.bc-badge-success {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bc-success-bg);
  color: var(--bc-success-ink);
  border-radius: var(--bc-radius-pill);
  padding: 7px 15px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 16px;
}

/* ------------------------------------------------------------------------
   Headings & text
   ------------------------------------------------------------------------ */

.bc-h1 {
  font-family: var(--bc-font-display);
  font-weight: 400;
  line-height: 1.08;
  margin: 0 0 12px;
}

.bc-h1--hero {
  font-size: clamp(38px, 5.2vw, 60px);
  line-height: 1.04;
  letter-spacing: -0.015em;
  margin-bottom: 16px;
}

.bc-h1--lg {
  font-size: clamp(30px, 4.4vw, 44px);
}

.bc-h1--md {
  font-size: clamp(28px, 4vw, 42px);
}

.bc-h1--sm {
  font-size: clamp(28px, 4vw, 40px);
}

.bc-lede {
  margin: 0 0 30px;
  color: var(--bc-muted);
  font-size: 17px;
}

.bc-lede--wide {
  max-width: 560px;
}

.bc-lede--narrow {
  max-width: 440px;
}

.bc-lede--centered {
  margin-left: auto;
  margin-right: auto;
}

.bc-fine {
  margin: 13px 2px 0;
  font-size: 13px;
  color: var(--bc-faint);
}

/* ------------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------------ */

.bc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--bc-radius-md);
  padding: 16px 28px;
  font-size: 16.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.bc-btn--primary {
  color: var(--bc-white);
  background: var(--bc-terracotta);
  box-shadow: 0 16px 34px -20px rgba(28, 26, 23, 0.45);
}

.bc-btn--dark {
  color: #fdfcfa;
  background: var(--bc-ink);
}

.bc-btn--secondary {
  background: var(--bc-white);
  border: 1px solid var(--bc-border-strong);
  color: var(--bc-ink-soft);
}

.bc-btn--muted {
  background: var(--bc-surface-soft);
  border: none;
  color: var(--bc-ink-soft);
  font-size: 13.5px;
  padding: 10px 14px;
  border-radius: var(--bc-radius-sm);
}

.bc-btn--disabled {
  background: var(--bc-disabled);
  color: var(--bc-white);
  cursor: not-allowed;
}

.bc-btn--dashed {
  background: var(--bc-white);
  border: 1px dashed var(--bc-border-strong);
  color: var(--bc-ink-soft);
  border-radius: 13px;
  padding: 13px 19px;
  font-size: 15px;
}

.bc-btn--link {
  background: none;
  border: none;
  color: var(--bc-muted);
  font-size: 15px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.bc-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* ------------------------------------------------------------------------
   Cards
   ------------------------------------------------------------------------ */

.bc-card {
  background: var(--bc-white);
  border: 1px solid var(--bc-border-card);
  border-radius: var(--bc-radius-lg);
  padding: 20px;
}

.bc-card__label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--bc-muted);
  margin-bottom: 12px;
}

.bc-card__divider {
  height: 1px;
  background: var(--bc-border);
  margin: 22px 0;
}

/* ------------------------------------------------------------------------
   Form controls
   ------------------------------------------------------------------------ */

.bc-field-label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--bc-muted);
  margin-bottom: 9px;
}

.bc-input,
.bc-textarea {
  width: 100%;
  border: 1px solid var(--bc-border-input);
  background: var(--bc-input-bg);
  border-radius: 13px;
  padding: 15px 16px;
  font-size: 16.5px;
  color: var(--bc-ink);
}

.bc-textarea {
  resize: vertical;
  line-height: 1.55;
}

.bc-input-group {
  background: var(--bc-white);
  border: 1px solid var(--bc-border-card);
  border-radius: var(--bc-radius-lg);
  padding: 20px;
  box-shadow: 0 1px 2px rgba(28, 26, 23, 0.04), 0 18px 40px -26px rgba(28, 26, 23, 0.22);
}

.bc-input-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.bc-input-row .bc-input {
  flex: 1 1 200px;
  min-width: 0;
}

/* ------------------------------------------------------------------------
   Colour swatches
   ------------------------------------------------------------------------ */

.bc-swatch-grid {
  display: grid;
  gap: 11px;
  grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
}

.bc-swatch {
  height: 66px;
  border-radius: 13px;
  box-shadow: inset 0 0 0 1px rgba(28, 26, 23, 0.08);
}

.bc-swatch-label {
  font-size: 12.5px;
  font-weight: 600;
  margin-top: 8px;
}

.bc-swatch-chip {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(28, 26, 23, 0.08);
}

.bc-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bc-tag {
  background: var(--bc-surface-soft);
  border-radius: var(--bc-radius-pill);
  padding: 8px 15px;
  font-size: 14.5px;
  font-weight: 600;
}

/* ------------------------------------------------------------------------
   Logo dropzone (checkerboard transparency preview)
   ------------------------------------------------------------------------ */

.bc-dropzone {
  border-radius: 15px;
  padding: 38px 20px;
  display: grid;
  place-items: center;
  background-color: #fcfbf9;
  background-image:
    linear-gradient(45deg, #f1ede6 25%, transparent 25%, transparent 75%, #f1ede6 75%),
    linear-gradient(45deg, #f1ede6 25%, transparent 25%, transparent 75%, #f1ede6 75%);
  background-size: 18px 18px;
  background-position: 0 0, 9px 9px;
}

/* ------------------------------------------------------------------------
   Progress checklist (scraping / generating loading states)
   ------------------------------------------------------------------------ */

.bc-checklist {
  background: var(--bc-white);
  border: 1px solid var(--bc-border-card);
  border-radius: var(--bc-radius-lg);
  padding: 8px;
  box-shadow: 0 1px 2px rgba(28, 26, 23, 0.04);
}

.bc-checklist__row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 15px;
}

.bc-checklist__bullet {
  flex: 0 0 auto;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--bc-white);
  background: var(--bc-border);
}

.bc-checklist__bullet--active {
  background: var(--bc-disabled);
}

.bc-checklist__bullet--done {
  background: var(--bc-fern);
}

.bc-checklist__text {
  flex: 1 1 auto;
  font-size: 16.5px;
  font-weight: 600;
  color: var(--bc-faint);
}

.bc-checklist__text--active {
  color: var(--bc-ink);
}

.bc-checklist__dots {
  display: flex;
  gap: 4px;
}

.bc-checklist__dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--bc-faint);
  animation: bc-blink 1s ease infinite;
}

.bc-checklist__dots span:nth-child(2) {
  animation-delay: 0.18s;
}

.bc-checklist__dots span:nth-child(3) {
  animation-delay: 0.36s;
}

@keyframes bc-blink {
  0%, 100% {
    opacity: 0.25;
  }
  50% {
    opacity: 1;
  }
}

.bc-help-banner {
  margin-top: 22px;
  background: var(--bc-surface);
  border-radius: 18px;
  padding: 20px 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.bc-help-banner__text {
  flex: 1 1 240px;
  font-size: 16px;
  color: var(--bc-ink-soft);
}

/* ------------------------------------------------------------------------
   Idea cards (selectable grid)
   ------------------------------------------------------------------------ */

.bc-idea-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
}

.bc-idea-card {
  text-align: left;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--bc-white);
  border: 1.5px solid var(--bc-border);
  border-radius: 17px;
  padding: 17px 18px;
  transition: border-color 0.12s, background 0.12s;
  cursor: pointer;
  width: 100%;
}

.bc-idea-card:hover {
  border-color: var(--bc-terracotta);
}

.bc-idea-card.is-selected {
  border-color: var(--bc-terracotta);
  background: #fdf5f1;
}

.bc-idea-card__check {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  margin-top: 1px;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--bc-white);
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--bc-border-strong);
}

.bc-idea-card.is-selected .bc-idea-card__check {
  background: var(--bc-terracotta);
  box-shadow: none;
}

.bc-idea-card__title {
  display: block;
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.bc-idea-card__desc {
  display: block;
  font-size: 14.5px;
  color: var(--bc-muted);
  margin-top: 4px;
}

/* ------------------------------------------------------------------------
   Post-details two column review layout
   ------------------------------------------------------------------------ */

.bc-review-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  align-items: start;
}

.bc-review-grid--final {
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: 22px;
}

.bc-direction-box {
  border-radius: 14px;
  padding: 16px;
  font-size: 15.5px;
  line-height: 1.55;
  background: #faf7f2;
  border: 1px solid #f0ebe3;
}

/* ------------------------------------------------------------------------
   Post preview (square/portrait mock image with caption overlay)
   ------------------------------------------------------------------------ */

.bc-post-preview {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 22px;
  overflow: hidden;
  background: var(--bc-fern);
  box-shadow: 0 24px 60px -30px rgba(28, 26, 23, 0.5);
}

.bc-post-preview__texture {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0, rgba(255, 255, 255, 0.14) 1px, transparent 1px, transparent 11px);
}

.bc-post-preview__photo-slot {
  position: absolute;
  left: 0;
  right: 0;
  top: 12%;
  height: 44%;
  background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0, rgba(255, 255, 255, 0.1) 3px, transparent 3px, transparent 12px);
  display: grid;
  place-items: center;
}

.bc-post-preview__photo-slot span {
  font-family: var(--bc-font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}

.bc-post-preview__caption {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 9%;
}

.bc-post-preview__headline {
  font-family: var(--bc-font-display);
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.08;
  color: var(--bc-oat);
}

.bc-post-preview__attribution {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.bc-post-preview__domain {
  font-family: var(--bc-font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bc-oat);
  opacity: 0.8;
}

/* ------------------------------------------------------------------------
   Modal / bottom sheet (shared "what felt off?" feedback pattern)
   ------------------------------------------------------------------------ */

.bc-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(28, 26, 23, 0.34);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 20px;
}

.bc-modal-backdrop[hidden] {
  display: none;
}

.bc-modal-sheet {
  width: 100%;
  max-width: 540px;
  background: var(--bc-white);
  border-radius: var(--bc-radius-xl);
  padding: 26px;
  box-shadow: 0 30px 70px -30px rgba(28, 26, 23, 0.5);
}

.bc-modal-sheet h2 {
  font-family: var(--bc-font-display);
  font-weight: 400;
  font-size: 28px;
  line-height: 1.15;
  margin: 0 0 6px;
}

.bc-modal-sheet p {
  margin: 0 0 20px;
  color: var(--bc-muted);
  font-size: 15.5px;
}

.bc-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.bc-chip {
  border: 1.5px solid var(--bc-border-strong);
  background: var(--bc-white);
  color: var(--bc-ink-soft);
  border-radius: var(--bc-radius-pill);
  padding: 11px 17px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.bc-chip.is-selected {
  border-color: var(--bc-terracotta);
  background: #fdf5f1;
  color: var(--bc-terracotta);
}

/* ------------------------------------------------------------------------
   Brand library cards
   ------------------------------------------------------------------------ */

.bc-brand-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.bc-brand-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--bc-white);
  border: 1px solid var(--bc-border-card);
  border-radius: var(--bc-radius-lg);
  padding: 20px;
  text-align: left;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.12s, box-shadow 0.12s;
}

.bc-brand-card:hover {
  border-color: var(--bc-border-strong);
  box-shadow: 0 18px 40px -26px rgba(28, 26, 23, 0.22);
}

.bc-brand-card__top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bc-brand-card__name {
  font-size: 17px;
  font-weight: 700;
}

.bc-brand-card__domain {
  font-family: var(--bc-font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--bc-faint);
  margin-top: 2px;
}

.bc-brand-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--bc-border);
  font-size: 13.5px;
  color: var(--bc-muted);
}

.bc-brand-card__swatches {
  display: flex;
  gap: 6px;
}

.bc-brand-card__swatches span {
  width: 16px;
  height: 16px;
  border-radius: 5px;
  box-shadow: inset 0 0 0 1px rgba(28, 26, 23, 0.08);
}

/* ------------------------------------------------------------------------
   History / past posts masonry gallery
   ------------------------------------------------------------------------ */

.bc-masonry {
  columns: 260px;
  column-gap: 16px;
}

.bc-masonry-item {
  break-inside: avoid;
  margin-bottom: 16px;
}

.bc-masonry-item__preview {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
}

.bc-masonry-item__meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 4px 0;
  font-size: 13.5px;
}

.bc-masonry-item__time {
  color: var(--bc-muted);
}

.bc-masonry-item__download {
  font-weight: 600;
  color: var(--bc-faint);
  text-decoration: none;
}

/* ------------------------------------------------------------------------
   Success / confirmation icon
   ------------------------------------------------------------------------ */

.bc-success-icon {
  width: 62px;
  height: 62px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: var(--bc-success-bg);
  color: var(--bc-success-ink);
  display: grid;
  place-items: center;
  font-size: 24px;
}

/* ------------------------------------------------------------------------
   Two/three-step "how it works" list (used on the first-time landing)
   ------------------------------------------------------------------------ */

.bc-steps {
  display: grid;
  gap: 12px;
}

.bc-step {
  background: var(--bc-surface);
  border-radius: 17px;
  padding: 18px 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.bc-step__number {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bc-white);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--bc-muted);
}

.bc-step__title {
  display: block;
  font-size: 16px;
  font-weight: 700;
}

.bc-step__desc {
  display: block;
  font-size: 14.5px;
  color: var(--bc-muted);
  margin-top: 2px;
}

/* ------------------------------------------------------------------------
   Simple animation used across screens on mount
   ------------------------------------------------------------------------ */

@keyframes bc-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.bc-animate-in {
  animation: bc-up 0.45s ease both;
}

/* ------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------ */

@media (max-width: 720px) {
  .bc-review-grid,
  .bc-review-grid--final {
    grid-template-columns: minmax(0, 1fr);
  }
}
