:root {
  color-scheme: dark;
  --bg: #121212;
  --panel: #171717;
  --panel-2: #1a1a1a;
  --text: #eeeeec;
  --muted: rgba(238, 237, 236, 0.55);
  --faint: rgba(238, 237, 236, 0.38);
  --line: rgba(238, 237, 236, 0.12);
  --line-strong: rgba(238, 237, 236, 0.2);
  --red: #d8492c;
  --blue: #4f7fd7;
  --cream: #efe5d1;
  --green: #64d8b4;
  --orange: #d99a5b;
  --purple: #8187ff;
}

@property --orbit-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Geist, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(rgba(244, 241, 234, 0.095) 1px, transparent 1px);
  background-size: 8px 8px;
  content: "";
  mask-image: radial-gradient(circle at 50% 25%, black, transparent 50%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

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

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  padding: 18px clamp(18px, 4vw, 42px);
  background: linear-gradient(to bottom, rgba(9, 9, 9, 0.84), rgba(9, 9, 9, 0));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.brand span {
  display: grid;
  width: 28px;
  height: 26px;
  place-items: center;
  border-radius: 7px;
  background: var(--cream);
  color: var(--bg);
  font-family: "Fragment Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 900;
}

.brand strong {
  color: var(--text);
  font-size: 25px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

.menu-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
}

.menu-button svg {
  width: 28px;
  height: 28px;
}

.hero {
  display: flex;
  min-height: 535px;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 76px clamp(19px, 3vw, 40px) 0;
  text-align: center;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--faint);
  font-family: "Fragment Mono", ui-monospace, monospace;
  font-size: 12px;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 470px;
  margin: 0;
  color: var(--text);
  font-size: clamp(36px, 5.35vw, 52px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.04;
}

.hero-subtitle {
  max-width: 430px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: clamp(14px, 1.35vw, 16px);
  font-weight: 650;
  line-height: 1.35;
}

.url-composer {
  width: min(634px, calc(100vw - 38px));
  margin-top: 60px;
}

.url-composer label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.asset-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.composer-shell {
  position: relative;
  min-height: 143px;
  border: 1px solid rgba(238, 237, 236, 0.05);
  border-radius: 20px;
  padding: 5px;
  background: rgba(23, 23, 23, 0.6);
  box-shadow: 0 0 0 4px rgba(238, 237, 236, 0.015);
}

.composer-shell::before {
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(238, 237, 236, 0.12);
  border-radius: 16px;
  background: var(--panel-2);
  content: "";
}

.composer-accent {
  position: absolute;
  inset: -1px;
  z-index: 2;
  border-radius: 21px;
  padding: 1px;
  animation: composer-orbit 4s linear infinite;
  background: conic-gradient(
    from var(--orbit-angle),
    transparent 0deg,
    transparent 250deg,
    rgba(128, 106, 251, 0.1) 274deg,
    rgba(128, 106, 251, 0.95) 294deg,
    rgba(238, 237, 236, 0.95) 308deg,
    rgba(128, 106, 251, 0.92) 322deg,
    transparent 342deg,
    transparent 360deg
  );
  filter: drop-shadow(0 0 10px rgba(128, 106, 251, 0.42));
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

@keyframes composer-orbit {
  to {
    --orbit-angle: 360deg;
  }
}

.composer-shell textarea {
  position: relative;
  z-index: 1;
  display: block;
  resize: none;
  width: 100%;
  min-width: 0;
  min-height: 133px;
  border: 0;
  outline: 0;
  padding: 22px 72px 66px 18px;
  background: transparent;
  color: var(--text);
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
}

.composer-shell textarea::placeholder {
  color: var(--faint);
}

.add-button,
.submit-button {
  position: absolute;
  z-index: 2;
  bottom: 18px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
}

.add-button {
  left: 25px;
  width: 40px;
  height: 40px;
  background: transparent;
}

.submit-button {
  right: 16px;
  width: 40px;
  height: 40px;
  background: rgba(238, 237, 236, 0.13);
}

.add-button svg,
.submit-button svg {
  width: 20px;
  height: 20px;
}

.composer-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.mode-toggle {
  display: inline-flex;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  background: rgba(244, 241, 234, 0.035);
}

.mode-toggle button {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: 999px;
  padding: 0 12px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.mode-toggle button.is-selected {
  background: rgba(238, 237, 236, 0.12);
  color: var(--text);
}

.mode-toggle svg {
  width: 15px;
  height: 15px;
}

.asset-pill {
  margin: 0;
  overflow: hidden;
  color: var(--faint);
  font-family: "Fragment Mono", ui-monospace, monospace;
  font-size: 10px;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.asset-chips {
  display: flex;
  max-width: 840px;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  margin-bottom: 28px;
}

.asset-chips span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 11px;
  background: rgba(244, 241, 234, 0.04);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.asset-chips .chip-break {
  display: block;
  width: 100%;
  min-height: 0;
  margin-top: -8px;
  border: 0;
  padding: 0;
  background: transparent;
}

.asset-chips svg {
  width: 15px;
  height: 15px;
}

.asset-chips .is-active {
  border-color: rgba(100, 216, 180, 0.48);
  background: rgba(100, 216, 180, 0.15);
  color: #8cf0cf;
}

.asset-chips .warm {
  border-color: rgba(217, 154, 91, 0.42);
  background: rgba(217, 154, 91, 0.14);
  color: #f0b070;
}

.asset-chips .cool {
  border-color: rgba(129, 135, 255, 0.42);
  background: rgba(129, 135, 255, 0.14);
  color: #aaaefd;
}

.video-assets {
  width: min(640px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 72px;
  scroll-margin-top: 78px;
}

.generation-panel {
  margin: 0 0 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(26, 26, 26, 0.72);
}

.generation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 14px 15px;
}

.generation-header .eyebrow {
  margin: 0 0 4px;
  color: rgba(238, 237, 236, 0.42);
  line-height: 1;
}

.generation-header strong {
  color: var(--text);
  font-size: 15px;
  letter-spacing: 0;
}

.download-link {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0 13px;
  background: rgba(238, 237, 236, 0.1);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.download-link svg {
  width: 15px;
  height: 15px;
}

.generation-stage {
  position: relative;
  display: grid;
  min-height: 360px;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(238, 237, 236, 0.035), rgba(238, 237, 236, 0)),
    var(--panel-2);
}

.is-gruns-demo .generation-stage {
  padding: 16px;
}

.generation-stage img,
.generation-stage video {
  width: 100%;
  max-height: 560px;
  object-fit: contain;
}

.generation-empty {
  display: grid;
  width: min(260px, calc(100% - 40px));
  min-height: 120px;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  padding: 18px;
  color: var(--muted);
  font-family: "Fragment Mono", ui-monospace, monospace;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
  text-transform: uppercase;
}

.generation-empty.is-loading {
  animation: pulse-status 1.5s ease-in-out infinite;
  border-color: rgba(129, 135, 255, 0.45);
  color: rgba(238, 237, 236, 0.78);
}

@keyframes pulse-status {
  50% {
    opacity: 0.58;
  }
}

.generated-duo {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.generated-ad {
  position: relative;
  min-height: 392px;
  overflow: hidden;
  border: 1px solid rgba(238, 237, 236, 0.16);
  border-radius: 12px;
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 255, 255, 0.72), transparent 28%),
    linear-gradient(160deg, #eef4dd 0%, #d3e4ae 42%, #1f5b35 100%);
  color: #142317;
}

.static-ad::before,
.video-frame::before {
  position: absolute;
  inset: 13px;
  border: 1px solid rgba(20, 35, 23, 0.22);
  border-radius: 9px;
  content: "";
  pointer-events: none;
}

.generated-tag {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 3;
  min-height: 25px;
  border: 1px solid rgba(20, 35, 23, 0.24);
  border-radius: 999px;
  padding: 6px 10px 0;
  background: rgba(255, 255, 255, 0.68);
  color: #1f5b35;
  font-family: "Fragment Mono", ui-monospace, monospace;
  font-size: 8px;
  text-transform: uppercase;
}

.gruns-pack {
  position: absolute;
  top: 44px;
  right: -10px;
  z-index: 2;
  width: 68%;
  max-height: none;
  filter: drop-shadow(0 22px 26px rgba(21, 46, 25, 0.28));
}

.generated-copy {
  position: absolute;
  right: 18px;
  bottom: 72px;
  left: 18px;
  z-index: 4;
  border: 1px solid rgba(16, 35, 21, 0.14);
  border-radius: 14px;
  padding: 12px;
  background: rgba(247, 244, 232, 0.78);
  backdrop-filter: blur(10px);
}

.generated-copy p,
.video-script p {
  margin: 0 0 8px;
  color: rgba(20, 35, 23, 0.72);
  font-family: "Fragment Mono", ui-monospace, monospace;
  font-size: 9px;
  text-transform: uppercase;
}

.generated-copy h3,
.video-script h3 {
  max-width: 225px;
  margin: 0;
  color: #102315;
  font-size: 25px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.98;
}

.generated-copy span {
  display: block;
  max-width: 220px;
  margin-top: 10px;
  color: rgba(16, 35, 21, 0.78);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.generated-button {
  position: absolute;
  right: 18px;
  bottom: 20px;
  left: 18px;
  z-index: 4;
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #102315;
  color: #f7f4e8;
  font-size: 12px;
  font-weight: 900;
}

.video-ad {
  background:
    radial-gradient(circle at 72% 16%, rgba(255, 246, 161, 0.78), transparent 23%),
    linear-gradient(155deg, #f7f4e8 0%, #dbe7b7 38%, #17452d 100%);
}

.video-frame {
  position: absolute;
  inset: 0;
}

.motion-pack {
  top: 38px;
  right: -2px;
  width: 62%;
  animation: gruns-pack-float 4.2s ease-in-out infinite;
}

.video-badge {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 5;
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  padding: 0 11px;
  background: #102315;
  color: #f7f4e8;
  font-size: 10px;
  font-weight: 900;
}

.video-badge svg {
  width: 13px;
  height: 13px;
}

.video-script {
  position: absolute;
  right: 18px;
  bottom: 62px;
  left: 18px;
  z-index: 4;
  border: 1px solid rgba(16, 35, 21, 0.14);
  border-radius: 14px;
  padding: 12px;
  background: rgba(247, 244, 232, 0.78);
  backdrop-filter: blur(10px);
}

.video-progress {
  position: absolute;
  right: 18px;
  bottom: 24px;
  left: 18px;
  z-index: 5;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(16, 35, 21, 0.2);
}

.video-progress span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: #f7f4e8;
  animation: video-progress 4.2s linear infinite;
  transform-origin: left center;
}

.spark {
  position: absolute;
  z-index: 1;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(247, 244, 232, 0.58);
  filter: blur(3px);
}

.spark-one {
  top: 84px;
  left: 20px;
  animation: spark-rise 5s ease-in-out infinite;
}

.spark-two {
  top: 160px;
  right: 10px;
  width: 48px;
  height: 48px;
  animation: spark-rise 4.5s ease-in-out 0.7s infinite;
}

.spark-three {
  bottom: 110px;
  left: 42px;
  width: 42px;
  height: 42px;
  animation: spark-rise 5.2s ease-in-out 1.2s infinite;
}

@keyframes gruns-pack-float {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(-2deg) scale(1);
  }

  50% {
    transform: translate3d(-10px, -12px, 0) rotate(2deg) scale(1.025);
  }
}

@keyframes video-progress {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

@keyframes spark-rise {
  50% {
    transform: translate3d(8px, -18px, 0);
    opacity: 0.55;
  }
}

.assets-heading {
  display: block;
  margin-bottom: 14px;
  padding: 0 2px;
}

.assets-heading .eyebrow {
  margin: 0;
  color: rgba(238, 237, 236, 0.46);
  line-height: 1;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.video-card {
  position: relative;
  min-height: 384px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  isolation: isolate;
}

.video-card.tall {
  min-height: 384px;
}

.video-card img,
.video-card video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.06);
}

.ad-preview::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(8, 15, 28, 0.38) 0%, rgba(8, 15, 28, 0.08) 30%, rgba(8, 11, 17, 0.82) 100%),
    radial-gradient(circle at 20% 12%, rgba(216, 73, 44, 0.42), transparent 34%),
    radial-gradient(circle at 90% 10%, rgba(79, 127, 215, 0.36), transparent 35%);
  content: "";
}

.ad-preview::after {
  position: absolute;
  inset: 11px;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 9px;
  content: "";
  pointer-events: none;
}

.ad-poster {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px 16px 16px;
  color: #fff8ed;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.48);
}

.ad-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: rgba(255, 248, 237, 0.92);
  font-family: "Fragment Mono", ui-monospace, monospace;
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: uppercase;
}

.ad-topline span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid rgba(255, 248, 237, 0.42);
  border-radius: 999px;
  padding: 0 8px;
  background: rgba(10, 12, 18, 0.42);
  backdrop-filter: blur(10px);
}

.ad-year {
  align-self: flex-start;
  margin-top: 18px;
  color: rgba(255, 248, 237, 0.94);
  font-size: 66px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.82;
}

.ad-year::after {
  display: block;
  width: 86px;
  height: 7px;
  margin-top: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, #d8492c 0 33%, #fff8ed 33% 66%, #4f7fd7 66%);
  content: "";
}

.ad-copy {
  margin-top: auto;
}

.ad-copy p {
  margin: 0 0 8px;
  color: rgba(255, 248, 237, 0.8);
  font-family: "Fragment Mono", ui-monospace, monospace;
  font-size: 9px;
  text-transform: uppercase;
}

.ad-copy h3 {
  margin: 0;
  max-width: 170px;
  color: #fff8ed;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.98;
}

.ad-cta {
  display: flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
  border: 1px solid rgba(255, 248, 237, 0.38);
  border-radius: 999px;
  background: rgba(255, 248, 237, 0.9);
  color: #10131a;
  font-size: 11px;
  font-weight: 800;
  text-shadow: none;
}

.ad-footer {
  margin-top: 10px;
  color: rgba(255, 248, 237, 0.72);
  font-family: "Fragment Mono", ui-monospace, monospace;
  font-size: 8px;
  line-height: 1.2;
  text-transform: uppercase;
}

@media (max-width: 980px) {
  .hero {
    min-height: 535px;
  }

  .video-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .video-assets {
    margin-top: 0;
  }

  .video-card,
  .video-card.tall {
    min-height: 384px;
  }
}

@media (max-width: 760px) {
  .asset-chips {
    max-height: 76px;
    overflow: hidden;
  }

}

@media (max-width: 640px) {
  .site-header {
    min-height: 62px;
    padding: 15px 16px;
  }

  .brand strong {
    font-size: 23px;
  }

  .hero {
    min-height: auto;
    padding: 98px 16px 22px;
  }

  .hero h1 {
    max-width: 360px;
    font-size: clamp(38px, 12vw, 48px);
  }

  .hero-subtitle {
    max-width: 340px;
    font-size: 14px;
  }

  .url-composer {
    margin-top: 34px;
  }

  .composer-shell {
    min-height: 136px;
    border-radius: 20px;
  }

  .composer-shell textarea {
    min-height: 126px;
    font-size: 16px;
    padding: 18px 58px 58px 18px;
  }

  .add-button {
    width: 38px;
    height: 38px;
  }

  .submit-button {
    width: 42px;
    height: 42px;
  }

  .asset-chips {
    justify-content: flex-start;
    max-height: 84px;
    overflow: hidden;
  }

  .composer-controls {
    align-items: flex-start;
    flex-direction: column;
  }

  .mode-toggle {
    width: 100%;
  }

  .mode-toggle button {
    flex: 1;
    justify-content: center;
    padding: 0 8px;
  }

  .generated-duo {
    grid-template-columns: 1fr;
  }

  .video-assets {
    margin-top: 8px;
    width: calc(100% - 32px);
    padding: 8px 0 52px;
  }

  .assets-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .video-grid {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .video-card,
  .video-card.tall {
    min-height: 360px;
  }
}
