/* Public pages (landing and 404). A placeholder until the real design system
   arrives; it uses no fonts, scripts or assets from other origins. */

:root {
  --bg: #120d14;
  --ink: #f7eef1;
  --muted: #b9a8b0;
  --pink: #f2708a;
  --pink-deep: #d9496a;
  --green: #8cc152;
  --green-deep: #5b8c2e;
  --cream: #fbe7c6;
  --track: rgb(255 255 255 / 0.12);
  --title-1: var(--pink);
  --title-2: var(--cream);
  --title-3: var(--green);
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fff7f4;
    --ink: #2b1c22;
    --muted: #7d6a72;
    --track: rgb(0 0 0 / 0.08);
    /* Darker title colours, so that the heading stays readable on a pale background. */
    --title-1: var(--pink-deep);
    --title-2: #d9822b;
    --title-3: var(--green-deep);
    color-scheme: light;
  }
}

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

html,
body {
  height: 100%;
  margin: 0;
}

body {
  display: grid;
  place-items: center;
  min-height: 100vh;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Soft colour blobs that drift behind the content. */
.aurora {
  position: fixed;
  inset: -20vmax;
  z-index: 0;
  filter: blur(70px);
  opacity: 0.5;
  pointer-events: none;
}

.blob {
  position: absolute;
  width: 45vmax;
  height: 45vmax;
  border-radius: 50%;
  animation: drift 24s ease-in-out infinite alternate;
}

.blob.one {
  top: 12%;
  left: 8%;
  background: var(--pink);
}

.blob.two {
  right: 10%;
  bottom: 8%;
  background: var(--green);
  animation-duration: 30s;
  animation-delay: -8s;
}

.blob.three {
  top: 40%;
  left: 42%;
  width: 30vmax;
  height: 30vmax;
  background: var(--cream);
  opacity: 0.7;
  animation-duration: 36s;
  animation-delay: -14s;
}

@keyframes drift {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(8vmax, -6vmax) scale(1.15);
  }
  100% {
    transform: translate(-6vmax, 5vmax) scale(0.9);
  }
}

main {
  position: relative;
  z-index: 1;
  max-width: 40rem;
  padding: 2rem;
  text-align: center;
}

/* The halved fruit. */
.fruit {
  width: min(42vmin, 220px);
  height: auto;
  filter: drop-shadow(0 24px 32px rgb(0 0 0 / 0.35));
  animation: bob 6s ease-in-out infinite;
}

.fruit .leaf {
  fill: var(--green);
}

.fruit .stem {
  fill: none;
  stroke: var(--green-deep);
  stroke-width: 5;
  stroke-linecap: round;
}

.fruit .skin {
  fill: var(--green-deep);
}

.fruit .rind {
  fill: var(--green);
}

.fruit .flesh {
  fill: var(--pink);
}

.fruit .pulp {
  fill: var(--pink-deep);
}

.fruit .seeds ellipse {
  fill: var(--cream);
  animation: glint 3.2s ease-in-out infinite;
}

.fruit .seeds ellipse:nth-child(2n) {
  animation-delay: -1.6s;
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0) rotate(-4deg);
  }
  50% {
    transform: translateY(-14px) rotate(4deg);
  }
}

@keyframes glint {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

h1 {
  margin: 1.5rem 0 0.75rem;
  font-size: clamp(2.5rem, 8vw, 4.75rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, var(--title-1), var(--title-2), var(--title-3), var(--title-1));
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 9s linear infinite;
}

@keyframes shimmer {
  to {
    background-position: 300% 0;
  }
}

.lede {
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: clamp(1rem, 2.6vw, 1.3rem);
}

/* An endless progress bar: it is never done, which is the point. */
.ripeness {
  width: min(18rem, 80vw);
  height: 0.5rem;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 999px;
  background: var(--track);
}

.ripeness span {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--pink));
  animation: ripen 2.6s ease-in-out infinite;
}

@keyframes ripen {
  from {
    transform: translateX(-110%);
  }
  to {
    transform: translateX(260%);
  }
}

.status {
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.back {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border: 1px solid var(--muted);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}

.back:hover,
.back:focus-visible {
  border-color: var(--pink);
  color: var(--pink);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
