/*
 * Visual system aligned with apps/website/src/app/(frontend)/globals.css
 * (marketing / dflow.sh — dark theme, Poppins, HSL tokens).
 */
:root {
  --background: 240 26.8293% 8.0392%;
  --foreground: 240 48.7179% 92.3529%;
  --card: 240 27.7778% 14.1176%;
  --card-foreground: 240 48.7179% 92.3529%;
  --primary: 251.25 100% 78.0392%;
  --primary-foreground: 240 26.8293% 8.0392%;
  --secondary: 242.8571 32.8125% 25.098%;
  --secondary-foreground: 241.9672 100% 88.0392%;
  --muted: 240 33.3333% 20%;
  --muted-foreground: 240 20.2532% 69.0196%;
  --border: 240 26.1538% 25.4902%;
  --radius: 0.5rem;
  --font-sans: "Poppins", system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, monospace;
  --content-max: 72rem;
  --panel-radius: 1.25rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  border-color: hsl(var(--border) / 0.4);
}

html.dark {
  color-scheme: dark;
}

body {
  position: relative;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  font-family: var(--font-sans);
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  color: hsl(var(--foreground));
  background: hsl(var(--background));
}

/* Depth: vignette + soft color washes */
.page-vignette {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse 85% 65% at 50% 38%,
    transparent 0%,
    hsl(var(--background) / 0.3) 55%,
    hsl(240 30% 4% / 0.85) 100%
  );
}

.page-glow {
  position: fixed;
  left: 50%;
  z-index: 0;
  width: min(100vw, 56rem);
  height: 22rem;
  pointer-events: none;
  border-radius: 50%;
  opacity: 0.35;
  filter: blur(100px);
  translate: -50% 0;
}

.page-glow--top {
  top: -6rem;
  background: radial-gradient(
    closest-side,
    hsl(var(--primary) / 0.22) 0%,
    transparent 100%
  );
}

.page-glow--bottom {
  bottom: -8rem;
  height: 18rem;
  background: radial-gradient(
    closest-side,
    hsl(199 70% 45% / 0.18) 0%,
    transparent 100%
  );
  opacity: 0.2;
}

/* Marketing gutter dots */
.page {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding-block: 4rem 3rem;
  padding-inline: 1rem;
}

@media (min-width: 768px) {
  .page {
    padding-block: 6rem 4rem;
    padding-inline: 3rem;
  }
}

.page::before,
.page::after {
  position: fixed;
  top: 0;
  bottom: 0;
  z-index: 0;
  width: max(0px, calc((100% - var(--content-max)) / 2));
  pointer-events: none;
  content: "";
  background-image: radial-gradient(
    circle,
    hsl(var(--foreground) / 0.26) 1px,
    transparent 1px
  );
  background-size: 20px 20px;
  opacity: 0.34;
}

.page::before {
  left: 0;
}

.page::after {
  right: 0;
}

/* Hero backdrop */
.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-backdrop__blob {
  position: absolute;
  border-radius: 9999px;
  filter: blur(44px);
}

.hero-backdrop__blob--a {
  top: 4.5rem;
  left: 50%;
  width: 10rem;
  height: 10rem;
  background: hsl(var(--primary) / 0.12);
  animation: mk-float-a 7s ease-in-out infinite;
}

.hero-backdrop__blob--b {
  top: 2.5rem;
  left: 50%;
  width: 11rem;
  height: 11rem;
  background: hsl(199 89% 48% / 0.11);
  animation: mk-float-b 7s ease-in-out infinite 1.2s;
}

.hero-backdrop__blob--c {
  top: 55%;
  left: 50%;
  width: 14rem;
  height: 14rem;
  background: hsl(var(--secondary) / 0.08);
  translate: -50% -50%;
  animation: mk-float-c 9s ease-in-out infinite 0.5s;
}

.hero-backdrop__star {
  position: absolute;
  color: hsl(var(--primary) / 0.16);
}

.hero-backdrop__star--primary {
  top: 5.5rem;
  left: 50%;
  width: 5rem;
  height: 5rem;
  transform: translateX(-210%);
  animation: mk-float-star 6.5s ease-in-out infinite 0.35s;
}

.hero-backdrop__star--secondary {
  top: 38%;
  right: 12%;
  width: 2.25rem;
  height: 2.25rem;
  color: hsl(199 89% 55% / 0.12);
  animation: mk-float-star-sm 8s ease-in-out infinite 1s;
}

@media (max-width: 640px) {
  .hero-backdrop__star--secondary {
    right: 6%;
    opacity: 0.7;
  }
}

@keyframes mk-float-a {
  0%,
  100% {
    transform: translateX(-170%) translateY(0) scale(1);
  }

  50% {
    transform: translateX(-170%) translateY(-12px) scale(1.03);
  }
}

@keyframes mk-float-b {
  0%,
  100% {
    transform: translateX(70%) translateY(0) scale(1);
  }

  50% {
    transform: translateX(70%) translateY(-14px) scale(1.04);
  }
}

@keyframes mk-float-c {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.85;
  }

  50% {
    transform: translate(-50%, calc(-50% - 8px)) scale(1.06);
    opacity: 1;
  }
}

@keyframes mk-float-star {
  0%,
  100% {
    transform: translateX(-210%) translateY(0);
  }

  50% {
    transform: translateX(-210%) translateY(-10px);
  }
}

@keyframes mk-float-star-sm {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-8px) rotate(12deg);
  }
}

/* Main focal panel */
.shell {
  position: relative;
  z-index: 2;
  flex-shrink: 1;
  width: 100%;
  max-width: min(52rem, 100%);
  min-height: 0;
  max-height: 100%;
  margin-inline: auto;
  overflow: hidden;
}

.shell__panel {
  position: relative;
  padding: 2.25rem 1.5rem 2rem;
  overflow: hidden;
  text-align: center;
  background: linear-gradient(
    165deg,
    hsl(var(--card) / 0.92) 0%,
    hsl(var(--card) / 0.55) 45%,
    hsl(var(--background) / 0.35) 100%
  );
  border: 1px solid hsl(var(--border) / 0.55);
  border-radius: var(--panel-radius);
  box-shadow:
    0 0 0 1px hsl(var(--primary) / 0.06),
    0 1px 0 hsl(var(--foreground) / 0.06) inset,
    0 -32px 64px -20px hsl(var(--primary) / 0.07),
    0 32px 64px -28px hsl(0 0% 0% / 0.55);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  backdrop-filter: blur(18px) saturate(1.2);
  animation: panel-in 0.85s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

@media (min-width: 640px) {
  .shell__panel {
    padding: 2.75rem 2.25rem 2.25rem;
  }
}

@keyframes panel-in {
  from {
    transform: translateY(16px) scale(0.98);
    opacity: 0;
  }

  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.shell__panel-shine {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    hsl(var(--foreground) / 0.12) 35%,
    hsl(var(--primary) / 0.35) 50%,
    hsl(var(--foreground) / 0.12) 65%,
    transparent 100%
  );
  opacity: 0.9;
}

.brand {
  display: flex;
  justify-content: center;
  margin-bottom: 1.35rem;
  animation: child-in 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.08s backwards;
}

@media (min-width: 768px) {
  .brand {
    margin-bottom: 1.65rem;
  }
}

.brand__logo {
  display: block;
  width: auto;
  max-width: min(15rem, 82vw);
  height: auto;
  max-height: 3.125rem;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
  object-fit: contain;
  filter: drop-shadow(0 2px 24px hsl(var(--primary) / 0.12));
  transition: filter 0.4s ease;
}

.tag-row {
  margin-bottom: 1rem;
  animation: child-in 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.14s backwards;
}

.tag-row[hidden] {
  display: none !important;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 1rem 0.4rem 0.4rem;
  font-size: 0.75rem;
  color: hsl(var(--foreground));
  background: hsl(var(--muted) / 0.35);
  border: 1px solid hsl(var(--border) / 0.5);
  border-radius: 9999px;
  box-shadow:
    0 1px 0 hsl(var(--foreground) / 0.05) inset,
    0 8px 24px -12px hsl(0 0% 0% / 0.35);
}

@media (min-width: 768px) {
  .tag-pill {
    font-size: 0.875rem;
  }
}

.tag-pill__accent {
  padding: 0.2rem 0.55rem;
  margin-right: 0.55rem;
  font-size: 0.5625rem;
  font-weight: 700;
  color: hsl(var(--primary-foreground));
  letter-spacing: 0.08em;
  background: linear-gradient(
    135deg,
    hsl(var(--primary)) 0%,
    hsl(265 95% 72%) 100%
  );
  border-radius: 9999px;
  box-shadow: 0 1px 0 hsl(var(--foreground) / 0.15) inset;
}

.title {
  position: relative;
  max-width: min(34rem, 100%);
  margin: 0 auto;
  font-size: 1.625rem;
  font-weight: 800;
  line-height: 1.18;
  color: transparent;
  letter-spacing: -0.03em;
  text-wrap: balance;
  background: linear-gradient(
    180deg,
    hsl(var(--foreground)) 0%,
    hsl(var(--foreground)) 42%,
    hsl(var(--foreground) / 0.72) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  animation: child-in 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.2s backwards;
}

@media (min-width: 768px) {
  .title {
    max-width: min(40rem, 100%);
    font-size: 2rem;
  }
}

@media (min-width: 1024px) {
  .title {
    font-size: 2.375rem;
  }
}

.title-accent {
  display: block;
  width: 3rem;
  height: 3px;
  margin: 1rem auto 0;
  background: linear-gradient(
    90deg,
    transparent,
    hsl(var(--primary) / 0.85),
    transparent
  );
  border-radius: 9999px;
  opacity: 0.85;
  animation: child-in 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.26s backwards;
}

.timing-panel {
  max-width: min(38rem, 100%);
  padding: 1.1rem 1.2rem 1.15rem;
  margin: 1.5rem auto 0;
  text-align: center;
  background: hsl(var(--muted) / 0.22);
  border: 1px solid hsl(var(--border) / 0.55);
  border-radius: calc(var(--radius) + 4px);
  box-shadow:
    0 1px 0 hsl(var(--foreground) / 0.04) inset,
    0 10px 28px -14px hsl(0 0% 0% / 0.35);
  animation: child-in 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.32s backwards;
}

.timing-panel[hidden] {
  display: none !important;
}

.timing-panel__label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.625rem;
  font-weight: 700;
  color: hsl(var(--muted-foreground));
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.timing-panel__line {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.55;
  color: hsl(var(--foreground));
  text-wrap: balance;
}

@media (min-width: 768px) {
  .timing-panel__line {
    font-size: 0.9375rem;
  }
}

.lede {
  max-width: min(38rem, 100%);
  margin: 1.35rem auto 0;
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.7;
  color: hsl(var(--muted-foreground));
  text-wrap: balance;
  animation: child-in 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.3s backwards;
}

@media (min-width: 768px) {
  .lede {
    max-width: min(42rem, 100%);
    font-size: 1.0625rem;
  }
}

@keyframes child-in {
  from {
    transform: translateY(10px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.divider {
  max-width: min(28rem, 90%);
  height: 1px;
  margin: 1.85rem auto 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    hsl(var(--border) / 0.9) 45%,
    hsl(var(--primary) / 0.25) 50%,
    hsl(var(--border) / 0.9) 55%,
    transparent 100%
  );
  border: none;
  animation: child-in 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.34s backwards;
}

.clock-panel {
  position: relative;
  max-width: min(28rem, 100%);
  padding: 1.15rem 1.25rem 1.2rem;
  margin: 1.65rem auto 0;
  overflow: hidden;
  text-align: center;
  background: hsl(var(--muted) / 0.28);
  border: 1px solid hsl(var(--border) / 0.65);
  border-radius: calc(var(--radius) + 4px);
  box-shadow:
    0 1px 0 hsl(var(--foreground) / 0.04) inset,
    0 12px 32px -16px hsl(0 0% 0% / 0.4);
  animation: child-in 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.38s backwards;
}

.clock-panel[hidden] {
  display: none !important;
}

.clock-panel__label {
  display: block;
  margin-bottom: 0.55rem;
  font-size: 0.625rem;
  font-weight: 700;
  color: hsl(var(--muted-foreground));
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.clock-panel__body {
  padding: 0;
}

.clock-panel__time {
  font-family: var(--font-mono);
  font-size: 1.625rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  color: hsl(var(--card-foreground));
  letter-spacing: -0.03em;
  text-shadow: 0 0 40px hsl(var(--primary) / 0.15);
}

@media (min-width: 768px) {
  .clock-panel__time {
    font-size: 1.875rem;
  }
}

.clock-panel__date {
  margin-top: 0.45rem;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  color: hsl(var(--muted-foreground));
}

.status-wrap {
  display: flex;
  justify-content: center;
  margin: 1.65rem auto 0;
  animation: child-in 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.42s backwards;
}

.status {
  display: flex;
  gap: 0.875rem;
  align-items: center;
  width: 100%;
  max-width: min(30rem, 100%);
  padding: 0.85rem 1.1rem;
  margin: 0;
  text-align: left;
  background: hsl(var(--card) / 0.4);
  border: 1px solid hsl(var(--border) / 0.45);
  border-radius: calc(var(--radius) + 2px);
  box-shadow: 0 8px 28px -18px hsl(0 0% 0% / 0.45);
}

.status__track {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  background: hsl(var(--primary) / 0.1);
  border: 1px solid hsl(var(--primary) / 0.18);
  border-radius: 0.65rem;
}

.status__dot {
  position: relative;
  width: 0.5rem;
  height: 0.5rem;
  background: hsl(var(--primary));
  border-radius: 9999px;
  box-shadow: 0 0 12px hsl(var(--primary) / 0.55);
}

.status__dot::after {
  position: absolute;
  inset: 0;
  content: "";
  background: hsl(var(--primary));
  border-radius: inherit;
  animation: status-pulse 2.2s ease-out infinite;
}

.status__copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.status__eyebrow {
  font-size: 0.625rem;
  font-weight: 700;
  color: hsl(var(--muted-foreground));
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.status__line {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
  color: hsl(var(--foreground));
}

@keyframes status-pulse {
  0% {
    transform: scale(1);
    opacity: 0.55;
  }

  100% {
    transform: scale(2.6);
    opacity: 0;
  }
}

.foot-note {
  max-width: min(38rem, 100%);
  padding-top: 1.25rem;
  margin: 1.75rem auto 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: hsl(var(--muted-foreground));
  text-align: center;
  border-top: 1px solid hsl(var(--border) / 0.25);
  animation: child-in 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.48s backwards;
}

.foot-note[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .shell__panel,
  .brand,
  .tag-row,
  .title,
  .title-accent,
  .lede,
  .timing-panel,
  .divider,
  .clock-panel,
  .status-wrap,
  .foot-note {
    animation: none;
  }

  .hero-backdrop__blob--a,
  .hero-backdrop__blob--b,
  .hero-backdrop__blob--c,
  .hero-backdrop__star--primary,
  .hero-backdrop__star--secondary {
    animation: none;
  }

  .status__dot::after {
    animation: none;
  }
}
