:root {
  --ink: #141820;
  --muted: #626b78;
  --panel: #ffffff;
  --line: #e3e7ed;
  --bg: #f8faf7;
  --red: #e13a32;
  --teal: #09798a;
  --gold: #d79a22;
  --green: #168760;
  --violet: #6e55d8;
  --shadow: 0 22px 60px rgba(20, 24, 32, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(120deg, rgba(225, 58, 50, 0.09), transparent 34%),
    linear-gradient(300deg, rgba(9, 121, 138, 0.12), transparent 38%),
    var(--bg);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

button,
input,
textarea {
  font: inherit;
}

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

.topbar,
main,
footer {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  backdrop-filter: blur(18px);
}

.brand,
nav,
.actions,
.footer-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  font-weight: 900;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: #fff;
  background: conic-gradient(from 220deg, var(--red), var(--gold), var(--teal), var(--violet), var(--red));
  box-shadow: 0 10px 28px rgba(225, 58, 50, 0.24);
}

nav {
  flex-wrap: wrap;
  justify-content: flex-end;
}

nav a,
.footer-links a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 750;
  transition: color 180ms ease, transform 180ms ease;
}

nav a:hover,
.footer-links a:hover {
  color: var(--ink);
  transform: translateY(-1px);
}

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 440px);
  gap: 30px;
  align-items: center;
  min-height: calc(100vh - 190px);
  padding: 26px 0;
}

.hero-scene {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  border-radius: 8px;
  perspective: 1000px;
}

.motion-grid {
  position: absolute;
  inset: 5% -12% 0;
  transform: rotateX(64deg) translateY(9rem);
  transform-origin: bottom;
  background-image:
    linear-gradient(rgba(9, 121, 138, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(225, 58, 50, 0.16) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(transparent, #000 22%, #000 72%, transparent);
  animation: grid-drift 7s linear infinite;
}

.play-orbit {
  position: absolute;
  left: clamp(0px, 6vw, 70px);
  bottom: clamp(16px, 8vw, 90px);
  width: clamp(180px, 30vw, 340px);
  aspect-ratio: 1;
  transform-style: preserve-3d;
}

.video-cube {
  position: absolute;
  inset: 23%;
  transform-style: preserve-3d;
  animation: cube-spin 10s linear infinite;
}

.cube-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(20, 24, 32, 0.92), rgba(9, 121, 138, 0.76));
  box-shadow: inset 0 0 34px rgba(255, 255, 255, 0.12), 0 22px 58px rgba(20, 24, 32, 0.25);
}

.face-front {
  transform: translateZ(70px);
}

.face-back {
  transform: rotateY(180deg) translateZ(70px);
}

.face-right {
  transform: rotateY(90deg) translateZ(70px);
}

.face-left {
  transform: rotateY(-90deg) translateZ(70px);
}

.face-top {
  transform: rotateX(90deg) translateZ(70px);
}

.face-bottom {
  transform: rotateX(-90deg) translateZ(70px);
}

.play-triangle {
  width: 0;
  height: 0;
  margin-left: 8px;
  border-top: 28px solid transparent;
  border-bottom: 28px solid transparent;
  border-left: 46px solid #fff;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.28));
}

.quality-tag {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 5px 8px;
  border-radius: 8px;
  color: #141820;
  background: var(--gold);
  font-size: 0.72rem;
  font-weight: 950;
}

.format-chip {
  position: absolute;
  display: grid;
  place-items: center;
  min-width: 76px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 8px;
  color: #fff;
  background: rgba(20, 24, 32, 0.78);
  box-shadow: 0 18px 38px rgba(20, 24, 32, 0.22);
  font-size: 0.84rem;
  font-weight: 900;
  backdrop-filter: blur(10px);
  animation: chip-float 4.5s ease-in-out infinite;
}

.chip-one {
  top: 10%;
  right: 2%;
}

.chip-two {
  left: 0;
  bottom: 18%;
  animation-delay: -1.3s;
}

.chip-three {
  right: 12%;
  bottom: 0;
  animation-delay: -2.5s;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  max-width: 780px;
  font-size: clamp(2.4rem, 6vw, 5.7rem);
  line-height: 0.96;
  letter-spacing: 0;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.08;
}

h3 {
  font-size: 1.1rem;
}

.hero-copy > p:last-child,
.how-section > p,
.feature-strip p,
.status-card span,
.saved-meta,
.content-page p,
.content-page li,
.contact-card p {
  color: var(--muted);
  line-height: 1.65;
}

.hero-copy > p:last-child {
  max-width: 650px;
  margin-top: 18px;
  font-size: 1.06rem;
}

.tool-panel,
.feature-strip article,
.saved-section,
.how-section,
.content-page,
.contact-card {
  border: 1px solid rgba(227, 231, 237, 0.95);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.tool-panel {
  display: grid;
  gap: 18px;
  padding: 22px;
  transform-style: preserve-3d;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.tool-panel:hover {
  box-shadow: 0 30px 80px rgba(20, 24, 32, 0.18);
}

label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fbfcfe;
  outline: none;
}

input {
  min-height: 50px;
  padding: 0 14px;
}

textarea {
  min-height: 140px;
  padding: 12px 14px;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(23, 111, 143, 0.12);
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
}

.input-row button,
.download-button:first-child,
.contact-form button {
  padding: 0 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--teal));
  box-shadow: 0 14px 28px rgba(225, 58, 50, 0.22);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.input-row button:hover,
.download-button:hover,
.contact-form button:hover,
.actions button:hover,
.saved-actions button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(20, 24, 32, 0.14);
}

.status-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.status-card.success {
  border-color: rgba(22, 135, 96, 0.35);
  background: rgba(22, 135, 96, 0.08);
}

.status-card.warning {
  border-color: rgba(217, 55, 55, 0.32);
  background: rgba(217, 55, 55, 0.08);
}

.download-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.download-button {
  padding: 0 12px;
  color: var(--ink);
  background: linear-gradient(135deg, #eef3f7, #fff);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.download-button[disabled] {
  cursor: not-allowed;
  opacity: 0.62;
}

.ad-space {
  display: grid;
  place-items: center;
  min-height: 96px;
  margin: 6px 0 18px;
  border: 1px dashed rgba(9, 121, 138, 0.44);
  border-radius: 8px;
  color: var(--muted);
  background:
    repeating-linear-gradient(135deg, rgba(9, 121, 138, 0.05) 0 12px, rgba(225, 58, 50, 0.05) 12px 24px),
    rgba(255, 255, 255, 0.62);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 8px 0 18px;
}

.feature-strip article {
  padding: 20px;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.feature-strip article:hover {
  transform: translateY(-5px);
  box-shadow: 0 28px 68px rgba(20, 24, 32, 0.14);
}

.feature-strip span {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 28px;
  margin-bottom: 16px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--red));
  font-weight: 900;
}

.feature-strip strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.08rem;
}

.saved-section,
.how-section,
.content-page,
.contact-card {
  padding: 24px;
  margin-top: 18px;
}

.section-heading,
.saved-item,
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.actions button,
.saved-actions button {
  padding: 0 14px;
  color: var(--ink);
  background: #eef3f7;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.saved-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.saved-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.saved-url {
  display: block;
  max-width: 680px;
  overflow-wrap: anywhere;
  font-weight: 800;
}

.saved-meta {
  display: block;
  margin-top: 4px;
  font-size: 0.88rem;
}

.saved-actions {
  display: flex;
  gap: 8px;
}

.empty {
  color: var(--muted);
}

.how-section {
  display: grid;
  grid-template-columns: minmax(220px, 0.45fr) 1fr;
  gap: 22px;
  align-items: start;
}

.content-page {
  max-width: 860px;
  margin-bottom: 24px;
}

.content-page h1 {
  margin-bottom: 16px;
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.content-page h2,
.content-page h3 {
  margin-top: 24px;
  margin-bottom: 10px;
}

.content-page p + p {
  margin-top: 12px;
}

.content-page ul {
  margin: 12px 0 0;
  padding-left: 20px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 24px;
}

.contact-form {
  display: grid;
  gap: 14px;
}

footer {
  padding: 28px 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

@keyframes grid-drift {
  from {
    background-position: 0 0;
  }

  to {
    background-position: 52px 52px;
  }
}

@keyframes cube-spin {
  from {
    transform: rotateX(-16deg) rotateY(0deg) rotateZ(6deg);
  }

  to {
    transform: rotateX(-16deg) rotateY(360deg) rotateZ(6deg);
  }
}

@keyframes chip-float {
  0%,
  100% {
    transform: translateY(0) translateZ(28px);
  }

  50% {
    transform: translateY(-16px) translateZ(54px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 860px) {
  .hero,
  .feature-strip,
  .how-section,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 210px;
  }

  .play-orbit {
    left: 50%;
    top: 0;
    bottom: auto;
    width: 220px;
    transform: translateX(-50%);
  }

  .face-front {
    transform: translateZ(52px);
  }

  .face-back {
    transform: rotateY(180deg) translateZ(52px);
  }

  .face-right {
    transform: rotateY(90deg) translateZ(52px);
  }

  .face-left {
    transform: rotateY(-90deg) translateZ(52px);
  }

  .face-top {
    transform: rotateX(90deg) translateZ(52px);
  }

  .face-bottom {
    transform: rotateX(-90deg) translateZ(52px);
  }
}

@media (max-width: 620px) {
  .topbar,
  .section-heading,
  .saved-item,
  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  nav,
  .footer-links {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .input-row,
  .download-options {
    grid-template-columns: 1fr;
  }
}
