/* "Brief it": the live prototype (public/brief.js). The tool sits in the DesignTech dark look; the ads inside it
   are typeset at their native pixel sizes and scaled to fit, so what you see is the real layout. */

.brief { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; padding: clamp(1rem, 2.5vw, 1.5rem); border: 1px solid var(--edge); border-radius: 16px; background: linear-gradient(160deg, rgba(24, 34, 78, 0.85), rgba(10, 16, 40, 0.9)); }
.brief-head { display: grid; gap: 0.35rem; }
.brief-kicker { display: inline-flex; align-items: center; gap: 0.45rem; margin: 0; color: var(--ok); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.ad-name.keep-case { text-transform: none; letter-spacing: 0.01em; }
.brief-kicker .icon { width: 15px; height: 15px; }
.brief-title { margin: 0; font-family: var(--font-heading); font-size: clamp(1.25rem, 2.4vw, 1.6rem); font-weight: 600; line-height: 1.2; letter-spacing: -0.015em; }
.brief-honest { margin: 0; max-width: 64ch; color: var(--fg-2); font-size: 0.9rem; line-height: 1.55; }
.brief-form { display: flex; gap: 0.5rem; }
.brief-input { flex: 1; min-width: 0; min-height: 48px; padding: 0 1rem; border: 1px solid var(--edge-2); border-radius: 12px; background: #050a20; color: var(--fg); font: inherit; font-size: 16px; }
.brief-input:focus { outline: 2px solid #8fb0ff; outline-offset: 1px; }
.brief-go { min-height: 48px; white-space: nowrap; }
.brief-go:disabled { opacity: 0.6; cursor: progress; }
.brief-samples { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.5rem; }
.brief-samples-label { color: var(--muted); font-size: 0.82rem; }
.brief-sample { font-size: 0.86rem; }
.brief-out { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; min-width: 0; }
.brief-out:empty { display: none; }

.brief-result { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; min-width: 0; }
.brief-idea { display: grid; gap: 0.3rem; }
.brief-idea-label, .brief-control-label { margin: 0; color: var(--muted); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.brief-idea-text { margin: 0; font-family: var(--font-heading); font-size: 1.2rem; font-weight: 600; line-height: 1.35; }
.brief-why { margin: 0; color: var(--fg-2); font-size: 0.88rem; }
.brief-controls { display: grid; gap: 0.75rem; padding: 0.9rem 1rem; border: 1px solid var(--edge); border-radius: 12px; background: rgba(5, 10, 32, 0.55); }
.brief-control { display: grid; gap: 0.35rem; }
.brief-options { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.brief-opt { min-height: 40px; padding: 0.3rem 0.8rem; border: 1px solid var(--edge-2); border-radius: 10px; background: transparent; color: var(--fg-2); font-size: 0.86rem; text-align: left; cursor: pointer; }
.brief-opt:hover { border-color: rgba(91, 140, 255, 0.6); color: var(--fg); }
.brief-opt[aria-pressed="true"] { border-color: transparent; background: linear-gradient(90deg, rgba(59, 130, 246, 0.55), rgba(139, 92, 246, 0.55)); color: #fff; }
.is-headlines .brief-options { display: grid; }
.brief-swatch { display: inline-grid; grid-template-columns: 1fr 1fr; width: 40px; height: 40px; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 50%; cursor: pointer; }
.brief-swatch span { display: block; }
.brief-swatch[aria-pressed="true"] { border-color: #fff; box-shadow: 0 0 0 2px var(--primary); }
.brief-again { justify-self: start; }
.brief-contrast { margin: 0; color: var(--muted); font-size: 0.8rem; }

/* The frames: square and tall share a row at equal height; the landscape runs full width beneath. */
.ad-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1rem 0.9rem; align-items: start; }
.ad-frame { display: grid; gap: 0.4rem; margin: 0; min-width: 0; }
.ad-frame-land { grid-column: 1 / -1; order: 3; }
.ad-frame figcaption { color: var(--muted); font-size: 0.78rem; font-variant-numeric: tabular-nums; }
.ad-slot { position: relative; width: 100%; overflow: hidden; border-radius: 6px; box-shadow: 0 0 0 1px rgba(226, 232, 255, 0.14), 0 14px 36px rgba(0, 0, 0, 0.45); }
.ad { position: absolute; top: 0; left: 0; transform-origin: 0 0; }

/* ---------- The ad templates, in native pixels ---------- */
.ad {
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto auto;
  grid-template-areas: "name" "head" "body" "cta";
  padding: var(--pad); overflow: hidden; background: var(--bg); color: var(--ink);
  font-family: "Poppins", sans-serif; font-kerning: normal; font-feature-settings: "kern" 1; text-rendering: geometricPrecision;
}
.ad-art { position: absolute; color: var(--ac); pointer-events: none; }
.ad-art svg { display: block; width: 100%; height: 100%; }
.ad-panel { display: none; grid-area: panel; }
.ad-name { position: relative; grid-area: name; margin: 0; font-size: var(--name); font-weight: 600; letter-spacing: 0.04em; line-height: 1.1; text-transform: uppercase; }
.ad-head { position: relative; grid-area: head; min-height: 0; margin: 0; overflow: hidden; overflow-wrap: normal; word-break: normal; hyphens: none; text-wrap: balance; }
.ad-head span { display: block; }
.ad-head.hang span { text-indent: -0.42em; }
.ad-body { position: relative; grid-area: body; margin: 0; max-width: 34em; overflow: hidden; line-height: 1.42; text-wrap: pretty; }
.ad-cta { position: relative; grid-area: cta; display: inline-flex; align-items: center; gap: 0.5em; justify-self: start; margin: 0; padding: 0.62em 1.05em; border-radius: 0.3em; background: var(--ac); color: var(--aci); font-size: var(--name); font-weight: 600; line-height: 1.1; white-space: nowrap; }
.ad-cta:empty { display: none; }
.ad-arrow { font-weight: 500; }

/* sizes: spacing between the blocks scales with the frame */
.ad-square { row-gap: 40px; }
.ad-land { row-gap: 22px; }
.ad-tall { row-gap: 12px; }
.ad-tall .ad-cta { padding: 0.6em 0.9em; }

/* type pairings (two self-hosted families, four voices) */
.type-slab-sans .ad-head { font-family: "Roboto Slab", serif; font-weight: 700; letter-spacing: -0.022em; line-height: 1.03; margin-left: -0.03em; }
.type-slab-sans .ad-name { font-family: "Roboto Slab", serif; font-weight: 700; letter-spacing: 0.02em; }
.type-sans-tight .ad-head { font-weight: 600; letter-spacing: -0.04em; line-height: 1.02; margin-left: -0.04em; }
.type-sans-tight .ad-cta { border-radius: 999px; }
.type-sans-caps .ad-head { font-weight: 600; letter-spacing: -0.01em; line-height: 0.98; text-transform: uppercase; margin-left: -0.05em; }
.type-sans-caps .ad-body { font-family: "Roboto Slab", serif; }
.type-sans-caps .ad-cta { border-radius: 0; text-transform: uppercase; letter-spacing: 0.06em; }
.type-slab-light .ad-head { font-family: "Roboto Slab", serif; font-weight: 400; letter-spacing: -0.018em; line-height: 1.1; margin-left: -0.02em; }
.type-slab-light .ad-body { font-weight: 500; }
.type-slab-light .ad-name { font-weight: 500; letter-spacing: 0.14em; }
.type-slab-light .ad-cta { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 0.09em var(--ink); }

/* stack: headline large at the top, words below, motif in the corner */
.lay-stack .ad-art { top: 0; right: 0; width: 34%; height: 34%; opacity: 0.32; }
.lay-stack.ad-land .ad-art { width: 34%; height: 100%; }
.lay-stack.ad-land { grid-template-columns: minmax(0, 0.64fr); }
.lay-stack.ad-tall .ad-art { width: 46%; height: 20%; }
.lay-stack .ad-name { padding-right: 40%; }
.lay-stack .ad-head { display: flex; align-items: flex-end; }

/* split: a color panel holds the motif and the name */
.lay-split { grid-template-rows: 38% minmax(0, 1fr) auto auto; grid-template-areas: "panel" "head" "body" "cta"; }
.lay-split .ad-panel { display: block; margin: calc(-1 * var(--pad)) calc(-1 * var(--pad)) 0; background: var(--ac); }
.lay-split .ad-art { top: 0; left: 0; width: 100%; height: 38%; color: var(--aci); opacity: 0.32; }
.lay-split .ad-name { grid-area: panel; align-self: end; color: var(--aci); padding-bottom: calc(var(--pad) * 0.5); }
.lay-split .ad-head { display: flex; align-items: center; }
.lay-split.ad-tall { grid-template-rows: 30% minmax(0, 1fr) auto auto; }
.lay-split.ad-tall .ad-art { height: 30%; }
.lay-split.ad-land { grid-template-columns: 36% minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto auto; grid-template-areas: "panel head" "panel body" "panel cta"; column-gap: var(--pad); }
.lay-split.ad-land .ad-panel { margin: calc(-1 * var(--pad)) 0 calc(-1 * var(--pad)) calc(-1 * var(--pad)); }
.lay-split.ad-land .ad-art { width: 36%; height: 100%; left: 0; }
.lay-split.ad-land .ad-name { align-self: end; padding-bottom: 0; }

/* band: the headline on a full-width accent band */
.lay-band { grid-template-rows: auto minmax(0, 1fr) auto auto; }
.lay-band .ad-head { display: flex; align-items: center; align-self: center; max-height: 100%; margin-inline: calc(-1 * var(--pad)); padding: 0.32em var(--pad) 0.36em; background: var(--ac); color: var(--aci); }
.lay-band .ad-art { right: 0; bottom: 0; width: 34%; height: 34%; opacity: 0.6; }
.lay-band.ad-land .ad-art { width: 22%; height: 60%; }
.lay-band .ad-body, .lay-band .ad-cta { margin-right: 30%; }
.lay-band.ad-tall .ad-body, .lay-band.ad-tall .ad-cta { margin-right: 0; }
.lay-band.ad-tall .ad-art { top: 54px; bottom: auto; right: 0; width: 70%; height: 22%; }

/* center: centered inside a thin frame, the motif large and faint behind */
.lay-center { justify-items: center; text-align: center; }
.lay-center::after { position: absolute; inset: calc(var(--pad) * 0.45); border: max(1px, calc(var(--pad) * 0.035)) solid var(--ink); opacity: 0.35; content: ""; pointer-events: none; }
.lay-center .ad-art { inset: 0; opacity: 0.14; }
.lay-center .ad-head { display: flex; align-items: center; justify-content: center; width: 100%; margin-left: 0; }
.lay-center .ad-head span { width: 100%; }
.lay-center .ad-cta { justify-self: center; }
.lay-center .ad-body { justify-self: center; }
.lay-center.ad-land { padding-inline: calc(var(--pad) * 2); }

@media (max-width: 600px) {
  .brief-form { flex-direction: column; }
  .brief-go { justify-content: center; }
  .ad-grid { grid-template-columns: minmax(0, 1fr); }
  .ad-frame-land { order: 0; }
  .ad-frame-tall { order: 3; justify-self: center; width: min(78%, 260px); }
}
