:root {
  --ink: #f4f7ff;
  --paper: #040914;
  --night: #03070f;
  --accent: #6adcf7;
  --accent-alt: #a879ff;
  --accent-ink: #03070f;
  --muted: rgba(244, 247, 255, 0.65);
  --radius: 28px;
  --font-display: 'Cormorant Garamond', serif;
  --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: radial-gradient(circle at 15% 25%, rgba(106, 220, 247, 0.12), transparent 45%),
    radial-gradient(circle at 80% 0%, rgba(168, 121, 255, 0.18), transparent 45%), var(--night);
  min-height: 100vh;
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

iframe {
  border: none;
}

.skip {
  position: absolute;
  left: 50%;
  transform: translate(-50%, -120%);
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  transition: transform 0.3s ease;
  z-index: 100;
}

.skip:focus {
  transform: translate(-50%, 20%);
}

.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.lead {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 460px;
}

.brandgen-header {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(244, 247, 255, 0.12);
  background: rgba(3, 7, 16, 0.85);
  position: sticky;
  top: 0;
  backdrop-filter: blur(20px);
  z-index: 20;
  transition: padding 0.25s ease, background 0.25s ease, border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.brandgen-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.brandgen-header.is-compact {
  padding: 0.45rem 0;
  background: rgba(3, 7, 16, 0.95);
  border-bottom-color: rgba(244, 247, 255, 0.22);
  box-shadow: 0 10px 35px rgba(2, 6, 23, 0.65);
}

.brandgen-header.is-compact .container {
  gap: 0.75rem;
}

.brandgen-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin: 0;
}

.brandgen-title {
  max-width: 520px;
}

.brandgen-actions {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.brandgen-actions a {
  text-decoration: none;
}

.brandgen-header.is-compact .eyebrow,
.brandgen-header.is-compact .lead {
  display: none;
}

.brandgen-header.is-compact .brandgen-title {
  max-width: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  text-transform: uppercase;
}

.brandgen-header.is-compact h1 {
  font-family: var(--font-body);
  font-size: 0.95rem;
  letter-spacing: 0.15em;
  margin: 0;
}

.brandgen-header.is-compact .brandgen-actions {
  gap: 0.35rem;
}

.ghost-link {
  color: var(--muted);
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.8rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-alt));
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 20px 45px rgba(2, 6, 23, 0.55);
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 25px 60px rgba(2, 6, 23, 0.65);
}

.brandgen-main {
  padding: clamp(1rem, 5vw, 2rem) 0 clamp(3rem, 8vw, 4rem);
}

.brandgen-main .container {
  width: min(1400px, 96vw);
}

.frame-wrapper {
  position: relative;
  border-radius: var(--radius);
  background: rgba(11, 18, 35, 0.85);
  border: 1px solid rgba(244, 247, 255, 0.12);
  padding: clamp(1rem, 3vw, 1.5rem);
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.65);
}

.frame-wrapper iframe {
  width: 100%;
  min-height: clamp(600px, 85vh, 1200px);
  border-radius: calc(var(--radius) - 18px);
  background: #000;
}

.frame-status {
  position: absolute;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: rgba(3, 7, 16, 0.8);
  border: 1px solid rgba(244, 247, 255, 0.18);
  font-size: 0.9rem;
  color: rgba(244, 247, 255, 0.85);
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.frame-status.is-ready {
  opacity: 0;
}

.brandgen-footer {
  border-top: 1px solid rgba(244, 247, 255, 0.08);
  padding: 1.5rem 0 3rem;
  color: rgba(244, 247, 255, 0.72);
}

.brandgen-footer a {
  color: rgba(244, 247, 255, 0.85);
  text-decoration: none;
}

@media (max-width: 720px) {
  .brandgen-header .container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  .brandgen-header.is-compact .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .brandgen-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .frame-wrapper iframe {
    min-height: clamp(520px, 80vh, 900px);
  }
}
