/* Forge — landing page design gallery */

.style-gallery-page {
  flex: 1;
  padding: 2.5rem 1.25rem 5rem;
  background:
    radial-gradient(circle at 10% 0%, rgba(130, 65, 130, 0.09), transparent 28rem),
    #fbfaf4;
}

.style-gallery-shell {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
}

.style-gallery-back {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1.25rem;
  color: #635c55;
  font-size: 0.82rem;
  font-weight: 700;
}

.style-gallery-back:hover,
.style-gallery-back:focus-visible { color: #824182; }

.style-gallery-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 5vw, 4rem);
  border: 1px solid #d9d1c6;
  border-radius: 2rem;
  color: #fbfaf4;
  background: #091717;
}

.style-gallery-hero::after {
  position: absolute;
  right: -6rem;
  bottom: -9rem;
  width: 25rem;
  height: 25rem;
  border: 1px solid rgba(251, 250, 244, 0.12);
  border-radius: 50%;
  box-shadow: 0 0 0 3rem rgba(251, 250, 244, 0.035), 0 0 0 7rem rgba(251, 250, 244, 0.025);
  content: "";
}

.style-gallery-hero h1 {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0.75rem 0 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.25rem, 6vw, 4.75rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.style-gallery-hero > p {
  position: relative;
  z-index: 1;
  max-width: 670px;
  margin: 1.25rem 0 0;
  color: rgba(251, 250, 244, 0.72);
  font-size: 1rem;
  line-height: 1.75;
}

.style-gallery-flow {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  margin-top: 2rem;
  color: rgba(251, 250, 244, 0.76);
  font-size: 0.78rem;
  font-weight: 600;
}

.style-gallery-flow span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.style-gallery-flow strong {
  display: inline-grid;
  width: 1.55rem;
  height: 1.55rem;
  place-items: center;
  border-radius: 50%;
  color: #091717;
  background: #d6a8d6;
}

.style-gallery-section,
.prompt-workspace {
  margin-top: 1.5rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid #e0d9cf;
  border-radius: 1.5rem;
  background: #fff;
}

.style-gallery-section__heading,
.prompt-workspace__intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.style-gallery-section h2,
.prompt-workspace h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: -0.035em;
}

.selected-style-label {
  margin: 0;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  color: #824182;
  background: #f5eaf5;
  font-size: 0.75rem;
  font-weight: 700;
}

.style-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.style-card {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #ded8cf;
  border-radius: 1rem;
  color: #091717;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.style-card:hover,
.style-card:focus-visible {
  border-color: #a555a5;
  box-shadow: 0 10px 25px rgba(9, 23, 23, 0.09);
  transform: translateY(-2px);
  outline: none;
}

.style-card.is-selected {
  border-color: #824182;
  box-shadow: 0 0 0 2px #824182, 0 12px 30px rgba(130, 65, 130, 0.14);
}

.style-preview {
  position: relative;
  display: block;
  min-height: 180px;
  padding: 1.15rem;
  overflow: hidden;
  color: var(--preview-ink, #111);
  background: var(--preview-bg, #eee);
  font-family: "Plus Jakarta Sans", sans-serif;
}

.style-preview__kicker,
.style-preview__headline,
.style-preview__body,
.style-preview__cta { position: relative; z-index: 2; display: block; }

.style-preview__kicker {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.style-preview__headline {
  max-width: 75%;
  margin-top: 0.75rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.98;
}

.style-preview__body {
  width: 48%;
  height: 3px;
  margin-top: 0.7rem;
  opacity: 0.45;
  background: currentColor;
  box-shadow: 0 6px 0 currentColor, 0 12px 0 currentColor;
}

.style-preview__cta {
  position: absolute;
  bottom: 1rem;
  left: 1.15rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  color: var(--preview-cta-ink, #fff);
  background: var(--preview-accent, #111);
  font-size: 0.75rem;
  font-weight: 800;
}

.style-preview__art {
  position: absolute;
  z-index: 1;
  right: 0.8rem;
  bottom: 0.9rem;
  width: 5rem;
  height: 5rem;
  border-radius: var(--art-radius, 50%);
  background: var(--preview-accent, #111);
  transform: rotate(var(--art-rotate, 0deg));
}

.style-preview__art i,
.style-preview__art b {
  position: absolute;
  display: block;
  border-radius: inherit;
  content: "";
}

.style-preview__art i {
  inset: 0.75rem;
  border: 1px solid var(--preview-bg, #fff);
}

.style-preview__art b {
  top: -1rem;
  left: -1.15rem;
  width: 2.7rem;
  height: 2.7rem;
  background: var(--preview-detail, rgba(255, 255, 255, 0.55));
}

.style-preview--editorial-luxe { --preview-bg: #f3eee3; --preview-ink: #241d19; --preview-accent: #6b1f31; --preview-detail: #c4a879; }
.style-preview--editorial-luxe .style-preview__headline { font-family: Georgia, serif; font-weight: 400; }
.style-preview--bold-brutalist { --preview-bg: #ffdf17; --preview-ink: #111; --preview-accent: #ed382f; --preview-detail: #f7f3e8; --art-radius: 0; --art-rotate: 8deg; }
.style-preview--bold-brutalist .style-preview__headline { text-transform: uppercase; }
.style-preview--bold-brutalist .style-preview__cta { border: 2px solid #111; border-radius: 0; box-shadow: 3px 3px 0 #111; }
.style-preview--soft-pastel { --preview-bg: #f8eaf1; --preview-ink: #5c4766; --preview-accent: #a885c5; --preview-detail: #9ad7c6; --art-radius: 42% 58% 65% 35%; }
.style-preview--dark-tech { --preview-bg: #07111e; --preview-ink: #eaf7ff; --preview-accent: #12d6d0; --preview-cta-ink: #07111e; --preview-detail: #845ef7; }
.style-preview--dark-tech::after { position: absolute; inset: 0; background-image: linear-gradient(rgba(18,214,208,.08) 1px,transparent 1px),linear-gradient(90deg,rgba(18,214,208,.08) 1px,transparent 1px); background-size: 18px 18px; content: ""; }
.style-preview--retro-futurist { --preview-bg: #f1ddad; --preview-ink: #17335c; --preview-accent: #ea6534; --preview-detail: #285fb7; --art-radius: 50% 50% 0 0; }
.style-preview--handdrawn-notebook { --preview-bg: #fbf7e9; --preview-ink: #222; --preview-accent: #f3ca32; --preview-cta-ink: #111; --preview-detail: transparent; --art-radius: 47% 53% 44% 56%; --art-rotate: -7deg; }
.style-preview--handdrawn-notebook .style-preview__headline { font-family: "Comic Sans MS", cursive; }
.style-preview--handdrawn-notebook .style-preview__art { border: 2px dashed #222; }
.style-preview--premium-gold { --preview-bg: #0d0c0a; --preview-ink: #ead7a0; --preview-accent: #b79445; --preview-cta-ink: #0d0c0a; --preview-detail: #3a2d17; }
.style-preview--premium-gold .style-preview__headline { font-family: Georgia, serif; font-weight: 400; }
.style-preview--clean-saas { --preview-bg: #f5f8ff; --preview-ink: #172342; --preview-accent: #4f6ff5; --preview-detail: #91c3ff; --art-radius: 1rem; }
.style-preview--neo-memphis { --preview-bg: #f8eddf; --preview-ink: #17324a; --preview-accent: #ef6a5b; --preview-detail: #21b5a5; --art-radius: 0; --art-rotate: 12deg; }
.style-preview--neo-memphis::after { position: absolute; top: 18px; right: 20px; width: 35px; height: 35px; border: 6px dotted #f2c84b; border-radius: 50%; content: ""; }
.style-preview--japanese-minimal { --preview-bg: #f7f5ef; --preview-ink: #171714; --preview-accent: #d53d2f; --preview-detail: transparent; }
.style-preview--japanese-minimal .style-preview__headline { max-width: 58%; font-weight: 500; }
.style-preview--comic-pop { --preview-bg: #2f64d5; --preview-ink: #fff; --preview-accent: #f03a3a; --preview-detail: #ffdd27; --art-radius: 45% 55% 50% 50%; --art-rotate: -10deg; }
.style-preview--comic-pop .style-preview__headline { text-shadow: 2px 2px 0 #111; text-transform: uppercase; }
.style-preview--organic-wellness { --preview-bg: #ece9db; --preview-ink: #344637; --preview-accent: #789472; --preview-detail: #c78364; --art-radius: 70% 30% 65% 35%; }
.style-preview--streetwear-grunge { --preview-bg: #191919; --preview-ink: #f0eee7; --preview-accent: #e5322e; --preview-detail: #5e5e5e; --art-radius: 0; --art-rotate: -8deg; }
.style-preview--streetwear-grunge::after { position: absolute; inset: 0; opacity: .18; background: repeating-linear-gradient(-12deg, transparent 0 7px, #fff 8px 9px); content: ""; }
.style-preview--corporate-trust { --preview-bg: #edf3f8; --preview-ink: #123253; --preview-accent: #1f6da8; --preview-detail: #86bad8; --art-radius: 0.5rem; }
.style-preview--clay-3d { --preview-bg: #eaf6fb; --preview-ink: #27445a; --preview-accent: #ff9478; --preview-detail: #8dcce0; --art-radius: 45% 55% 52% 48%; }
.style-preview--clay-3d .style-preview__art { box-shadow: 0 10px 18px rgba(39,68,90,.18); }
.style-preview--cinematic-documentary { --preview-bg: #24211e; --preview-ink: #f3e9d5; --preview-accent: #b77a3c; --preview-detail: #5b4b3d; --art-radius: 0; }
.style-preview--cinematic-documentary::after { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(0,0,0,.15), transparent 45%, rgba(231,170,98,.15)); content: ""; }
.style-preview--y2k-chrome { --preview-bg: #c7f1ee; --preview-ink: #302b5c; --preview-accent: #945df2; --preview-detail: #ff83c6; --art-radius: 38% 62% 43% 57%; --art-rotate: 10deg; }
.style-preview--y2k-chrome::after { position: absolute; inset: 0; background: linear-gradient(135deg, transparent 25%, rgba(255,255,255,.65) 50%, transparent 70%); content: ""; }
.style-preview--tropical-local { --preview-bg: #f4e7bd; --preview-ink: #174a38; --preview-accent: #e65937; --preview-detail: #e4b62f; --art-radius: 72% 28% 68% 32%; --art-rotate: -18deg; }
.style-preview--paper-collage { --preview-bg: #ddd5c6; --preview-ink: #2d2925; --preview-accent: #305c71; --preview-detail: #d4aa48; --art-radius: 0; --art-rotate: 7deg; }
.style-preview--paper-collage .style-preview__headline { padding: .25rem; background: #f5f0e6; transform: rotate(-2deg); }
.style-preview--luxury-beauty { --preview-bg: #f3e4e1; --preview-ink: #5b2636; --preview-accent: #7c2e47; --preview-detail: #d4a7a2; --art-radius: 50% 50% 42% 58%; }
.style-preview--luxury-beauty .style-preview__headline { font-family: Georgia, serif; font-weight: 400; }

.style-card__content { display: block; min-height: 104px; padding: 0.9rem; }
.style-card__topline { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.style-card__topline strong { font-size: 0.78rem; }
.style-card__check { color: #824182; opacity: 0; transition: opacity 160ms ease; }
.style-card.is-selected .style-card__check { opacity: 1; }
.style-card__summary { display: block; margin-top: 0.45rem; color: #756e66; font-size: 0.75rem; line-height: 1.55; }

.prompt-workspace__intro > p { max-width: 360px; margin: 0; color: #756e66; font-size: 0.78rem; line-height: 1.6; text-align: right; }

.prompt-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.65rem; }
.prompt-tab { display: flex; align-items: center; gap: 0.75rem; min-width: 0; padding: 0.85rem 1rem; border: 1px solid #ded8cf; border-radius: 0.85rem; color: #5d5750; background: #fbfaf7; cursor: pointer; text-align: left; }
.prompt-tab > i { flex: 0 0 auto; font-size: 1.1rem; }
.prompt-tab span { display: flex; min-width: 0; flex-direction: column; }
.prompt-tab strong { color: #171e1e; font-size: 0.78rem; }
.prompt-tab small { margin-top: 0.15rem; color: #8a837a; font-size: 0.75rem; }
.prompt-tab:hover,
.prompt-tab:focus-visible { border-color: #a555a5; outline: none; }
.prompt-tab.is-active { border-color: #824182; color: #824182; background: #f7eff7; box-shadow: inset 0 0 0 1px #824182; }

.prompt-panel { margin-top: 0.75rem; overflow: hidden; border: 1px solid #d9d1c6; border-radius: 1rem; background: #101818; }
.prompt-panel__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.85rem 1rem; border-bottom: 1px solid rgba(255,255,255,.12); color: #fbfaf4; }
.prompt-panel__bar > div { display: flex; min-width: 0; flex-direction: column; }
.prompt-panel__label { color: rgba(251,250,244,.65); font-size: 0.75rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.prompt-panel__bar strong { overflow: hidden; margin-top: .15rem; font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.copy-prompt-button { display: inline-flex; flex: 0 0 auto; align-items: center; gap: .45rem; padding: .55rem .8rem; border: 1px solid rgba(255,255,255,.2); border-radius: .6rem; color: #101818; background: #fbfaf4; cursor: pointer; font-family: inherit; font-size: .75rem; font-weight: 800; }
.copy-prompt-button:hover,
.copy-prompt-button:focus-visible { background: #e9d7e9; outline: none; }
.copy-prompt-button.is-copied { color: #184d39; background: #d9f5e5; }
.prompt-output { display: block; width: 100%; min-height: 430px; resize: vertical; padding: 1rem; border: 0; outline: none; color: #e7ecea; background: #101818; font: 0.82rem/1.7 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.prompt-panel__note { display: flex; gap: .45rem; margin: 0; padding: .75rem 1rem; border-top: 1px solid rgba(255,255,255,.1); color: rgba(251,250,244,.68); font-size: .75rem; }

@media (max-width: 960px) {
  .style-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .style-gallery-page { padding: 1.25rem .85rem 3rem; }
  .style-gallery-hero { border-radius: 1.4rem; }
  .style-gallery-flow > i { transform: rotate(90deg); }
  .style-gallery-section__heading,
  .prompt-workspace__intro { align-items: flex-start; flex-direction: column; }
  .prompt-workspace__intro > p { text-align: left; }
  .style-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prompt-tabs { grid-template-columns: 1fr; }
}

@media (max-width: 430px) {
  .style-gallery-flow { align-items: flex-start; flex-direction: column; }
  .style-gallery-flow > i { margin-left: .45rem; }
  .style-grid { grid-template-columns: 1fr; }
  .style-preview { min-height: 210px; }
  .prompt-panel__bar { align-items: stretch; flex-direction: column; }
  .copy-prompt-button { justify-content: center; }
  .prompt-output { min-height: 520px; }
}

/* Dashboard integration */
.dashboard-body .style-gallery-page { padding: 46px 26px 4rem; background: transparent; }
.dashboard-body .style-gallery-shell { max-width: 1120px; }
.dashboard-body .style-gallery-back { display: none; }
.dashboard-body .style-gallery-hero {
  overflow: visible;
  border: 0;
  border-bottom: 1px solid var(--dash-border);
  border-radius: 0;
  color: var(--dash-ink);
  background: transparent;
  padding: 0 0 24px;
}
.dashboard-body .style-gallery-hero::after { display: none; }
.dashboard-body .style-gallery-hero h1 { max-width: 720px; font-size: var(--dash-page-title-size); line-height: 1.12; }
.dashboard-body .style-gallery-hero > p { color: var(--dash-muted); font-size: var(--dash-body-size); }
.dashboard-body .style-gallery-flow { color: #655d65; font-size: .88rem; }
.dashboard-body .style-gallery-flow strong { color: #fff; background: var(--dash-purple); }
.dashboard-body .style-gallery-section,
.dashboard-body .prompt-workspace { border-color: var(--dash-border); border-radius: .85rem; box-shadow: none; }
.dashboard-body .style-gallery-section h2,
.dashboard-body .prompt-workspace h2 { font-size: var(--dash-section-title-size); }
.dashboard-body .style-card { border-radius: .7rem; }
.dashboard-body .style-card__topline strong { font-size: 14px; }
.dashboard-body .style-card__summary { font-size: 14px; line-height: 1.55; }
.dashboard-body .prompt-workspace__intro > p { font-size: 14px; }
.dashboard-body .prompt-tab strong { font-size: 14px; }
.dashboard-body .prompt-tab small { font-size: 12px; }
.dashboard-body .copy-prompt-button { font-size: 14px; }
.dashboard-body .prompt-output { font-size: 14px; }
.dashboard-body .prompt-panel__note { font-size: 12px; }
