:root {
  --color-bg: #1a0f1f;
  --color-ink: #faf6f2;
  --color-muted: rgba(250, 246, 242, 0.72);
  --color-pimo-dark-plum: #3e2347;
  --color-pimo-mid-plum: #57294b;
  --color-pimo-rose: #964253;
  --color-pimo-coral: #e36956;
  --color-pimo-amber: #f2a65e;
  --font: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --logo-mask: url("logo_mask.png");
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  color: var(--color-ink);
  background: var(--color-bg);
  overflow-x: hidden;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 50% 100%, rgba(62, 35, 71, 0.9) 0%, transparent 60%),
    linear-gradient(165deg, #120a14 0%, var(--color-bg) 45%, #2a152f 100%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.6;
  will-change: transform;
}

.orb-a {
  width: min(58vw, 34rem);
  height: min(58vw, 34rem);
  top: 8%;
  left: 8%;
  background: var(--color-pimo-rose);
  animation: drift-a 16s ease-in-out infinite alternate;
}

.orb-b {
  width: min(54vw, 32rem);
  height: min(54vw, 32rem);
  top: 4%;
  right: 4%;
  background: var(--color-pimo-coral);
  animation: drift-b 18s ease-in-out infinite alternate;
}

.orb-c {
  width: min(46vw, 28rem);
  height: min(46vw, 28rem);
  top: 28%;
  left: 32%;
  background: var(--color-pimo-amber);
  opacity: 0.4;
  animation: drift-c 20s ease-in-out infinite alternate;
}

.grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(250, 246, 242, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(250, 246, 242, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 75% 55% at 50% 38%, black 15%, transparent 78%);
  animation: grid-pulse 10s ease-in-out infinite alternate;
}

.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding:
    max(2rem, env(safe-area-inset-top, 0px))
    max(1rem, env(safe-area-inset-right, 0px))
    max(2.5rem, env(safe-area-inset-bottom, 0px))
    max(1rem, env(safe-area-inset-left, 0px));
  width: 100%;
  margin: 0 auto;
}

.brand {
  position: relative;
  width: min(94vw, 90rem);
  aspect-ratio: 480 / 160;
  margin: 0 0 1.75rem;
  animation: rise 1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Frosted-glass cutout: letter shapes show blurred atmosphere through a white glaze */
.brand-glass {
  width: 100%;
  height: 100%;
  background:
    linear-gradient(
      165deg,
      rgba(255, 255, 255, 0.34) 0%,
      rgba(255, 255, 255, 0.1) 45%,
      rgba(255, 255, 255, 0.2) 100%
    );
  -webkit-backdrop-filter: blur(22px) saturate(1.45) brightness(1.12);
  backdrop-filter: blur(22px) saturate(1.45) brightness(1.12);
  -webkit-mask-image: var(--logo-mask);
  mask-image: var(--logo-mask);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-mode: alpha;
  mask-mode: alpha;
  filter:
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.55))
    drop-shadow(0 2px 0 rgba(255, 255, 255, 0.12))
    drop-shadow(0 22px 48px rgba(0, 0, 0, 0.4));
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .brand-glass {
    background:
      linear-gradient(
        165deg,
        rgba(255, 255, 255, 0.34) 0%,
        rgba(255, 248, 240, 0.18) 100%
      );
  }
}

h1 {
  margin: 0 0 0.85rem;
  max-width: 28rem;
  font-size: clamp(1.85rem, 5vw, 2.85rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

.lede {
  margin: 0;
  max-width: 28rem;
  width: min(100%, 28rem);
  color: var(--color-muted);
  font-size: clamp(1.05rem, 2.4vw, 1.2rem);
  font-weight: 400;
  line-height: 1.55;
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.22s both;
}

.actions {
  margin: 2rem 0 0;
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.34s both;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.7rem 1.35rem;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  border: 0;
  border-radius: 0.55rem;
  overflow: hidden;
  isolation: isolate;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.btn-primary {
  color: #1a0f1f;
  background-color: var(--color-pimo-coral);
  box-shadow: 0 12px 24px -6px rgba(227, 105, 86, 0.55);
}

.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    var(--color-pimo-amber) 0%,
    var(--color-pimo-coral) 100%
  );
}

@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 28px -6px rgba(227, 105, 86, 0.6);
  }
}

.btn:focus-visible {
  outline: 2px solid var(--color-pimo-amber);
  outline-offset: 3px;
}

.btn:active {
  transform: translateY(0);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(1.1rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drift-a {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(8%, 12%) scale(1.08);
  }
}

@keyframes drift-b {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(-10%, 8%) scale(1.12);
  }
}

@keyframes drift-c {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(6%, -10%) scale(1.06);
  }
}

@keyframes grid-pulse {
  from {
    opacity: 0.35;
  }
  to {
    opacity: 0.7;
  }
}

/* Phones: keep the mark bold, but don't let shadows/blur thrash the GPU */
@media (max-width: 480px) {
  .brand {
    width: min(92vw, calc(28vh * 480 / 160));
    margin-bottom: 1.35rem;
  }

  .brand-glass {
    /* Slightly stronger glaze — mask + backdrop-filter can look thin on iOS */
    background:
      linear-gradient(
        165deg,
        rgba(255, 255, 255, 0.4) 0%,
        rgba(255, 255, 255, 0.14) 45%,
        rgba(255, 255, 255, 0.26) 100%
      );
    -webkit-backdrop-filter: blur(14px) saturate(1.3) brightness(1.1);
    backdrop-filter: blur(14px) saturate(1.3) brightness(1.1);
    filter:
      drop-shadow(0 1px 0 rgba(255, 255, 255, 0.5))
      drop-shadow(0 12px 28px rgba(0, 0, 0, 0.35));
  }

  .orb {
    filter: blur(36px);
  }

  h1 {
    font-size: clamp(1.7rem, 8vw, 2.25rem);
  }

  .lede {
    font-size: 1.02rem;
    padding-inline: 0.15rem;
  }

  .actions {
    margin-top: 1.5rem;
  }

  .btn {
    min-height: 3rem;
    padding: 0.8rem 1.5rem;
  }
}

/* Short / landscape phones: fit the first impression without scrolling */
@media (max-height: 480px) {
  .hero {
    padding-block: max(0.75rem, env(safe-area-inset-top, 0px))
      max(0.75rem, env(safe-area-inset-bottom, 0px));
  }

  .brand {
    width: min(64vw, calc(42vh * 480 / 160));
    margin-bottom: 0.85rem;
  }

  h1 {
    font-size: clamp(1.35rem, 5vh, 1.85rem);
    margin-bottom: 0.5rem;
  }

  .lede {
    font-size: 0.98rem;
    line-height: 1.4;
  }

  .actions {
    margin-top: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .orb,
  .grid,
  .brand,
  h1,
  .lede,
  .actions {
    animation: none !important;
  }

  .brand,
  h1,
  .lede,
  .actions {
    opacity: 1;
    transform: none;
  }

  .brand-glass {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
