:root {
  color-scheme: light dark;
  --background: #67b4e8;
  --background-deep: #54a6de;
  --foreground: #f9fbff;
  --muted: rgba(249, 251, 255, 0.58);
  --button: #18212d;
  --button-foreground: #f9fbff;
  --edge: rgba(255, 255, 255, 0.68);
  --shadow: rgba(29, 75, 111, 0.24);
  --radius: 18px;
  font-family:
    "Avenir Next", Avenir, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--background);
}

body {
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  color: var(--foreground);
  background:
    radial-gradient(circle at 62% 18%, rgba(255, 255, 255, 0.16), transparent 30rem),
    linear-gradient(140deg, var(--background) 0%, var(--background-deep) 100%);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.welcome {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
  isolation: isolate;
}

.welcome::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.23;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.86' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.19'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.masthead {
  display: flex;
  width: min(100% - 48px, 1360px);
  height: 76px;
  margin: 0 auto;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--foreground);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand__mark {
  display: block;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 11px;
  box-shadow: 0 8px 24px var(--shadow);
}

.hero {
  display: grid;
  width: min(100% - 48px, 1360px);
  min-height: calc(100dvh - 76px);
  margin: 0 auto;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  align-items: center;
  gap: clamp(32px, 6vw, 96px);
  padding: 20px 0 76px;
}

.hero__copy {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

h1 {
  margin: 0;
  font-size: clamp(58px, 7.3vw, 116px);
  font-weight: 700;
  letter-spacing: -0.075em;
  line-height: 0.91;
}

h1 span {
  display: block;
  color: var(--muted);
}

.hero__copy p {
  margin: clamp(24px, 4vh, 42px) 0 0;
  color: rgba(249, 251, 255, 0.88);
  font-size: clamp(18px, 1.8vw, 24px);
  font-weight: 520;
  letter-spacing: -0.025em;
}

.signup {
  display: inline-flex;
  min-height: 58px;
  margin-top: 30px;
  padding: 0 24px;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  color: var(--button-foreground);
  background: var(--button);
  box-shadow: 0 16px 38px rgba(27, 55, 78, 0.22);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.015em;
  text-decoration: none;
  transition:
    transform 180ms cubic-bezier(0.16, 1, 0.3, 1),
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.signup span {
  font-size: 18px;
  line-height: 1;
}

.signup:hover {
  transform: translateY(-2px);
  background: #243142;
  box-shadow: 0 20px 44px rgba(27, 55, 78, 0.3);
}

.signup:active {
  transform: translateY(1px) scale(0.985);
}

.signup:focus-visible,
.brand:focus-visible {
  outline: 3px solid var(--foreground);
  outline-offset: 4px;
}

.visual {
  position: relative;
  width: min(100%, 600px);
  aspect-ratio: 1 / 1.04;
  justify-self: end;
}

.photo,
.app-icon {
  position: absolute;
  margin: 0;
  overflow: hidden;
  border: 2px solid var(--edge);
  border-radius: var(--radius);
  box-shadow: 0 22px 58px var(--shadow);
}

.photo img,
.app-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo {
  width: 28%;
  aspect-ratio: 0.78;
}

.photo--bag {
  top: 8%;
  right: 13%;
  transform: rotate(8deg);
}

.photo--matcha {
  right: 0;
  bottom: 12%;
  transform: rotate(10deg);
}

.photo--coast {
  bottom: 3%;
  left: 9%;
  transform: rotate(-9deg);
}

.app-icon {
  top: 26%;
  left: 26%;
  z-index: 2;
  width: 46%;
  aspect-ratio: 1;
  border-width: 3px;
  border-radius: calc(var(--radius) + 8px);
  transform: rotate(-3deg);
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #174968;
    --background-deep: #102f45;
    --foreground: #f2f7fb;
    --muted: rgba(213, 235, 249, 0.56);
    --button: #eef5fa;
    --button-foreground: #122839;
    --edge: rgba(226, 241, 251, 0.58);
    --shadow: rgba(4, 20, 31, 0.34);
  }

  body {
    background:
      radial-gradient(circle at 62% 18%, rgba(130, 194, 234, 0.14), transparent 30rem),
      linear-gradient(140deg, var(--background) 0%, var(--background-deep) 100%);
  }

  .signup:hover {
    background: #f7fbfe;
  }
}

@media (max-width: 860px) {
  .masthead,
  .hero {
    width: min(100% - 32px, 680px);
  }

  .masthead {
    height: 68px;
  }

  .hero {
    min-height: calc(100dvh - 68px);
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(210px, 40vh);
    gap: 12px;
    padding: 30px 0 30px;
  }

  .hero__copy {
    align-self: end;
  }

  h1 {
    max-width: 640px;
    font-size: clamp(50px, 13vw, 86px);
  }

  .visual {
    width: min(82vw, 430px);
    height: 100%;
    min-height: 230px;
    aspect-ratio: auto;
    justify-self: end;
  }

  .photo {
    width: 24%;
  }

  .app-icon {
    top: 18%;
    width: min(42%, 180px);
  }
}

@media (max-width: 520px) {
  .masthead,
  .hero {
    width: calc(100% - 32px);
  }

  .brand__mark {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }

  .hero {
    padding-top: 20px;
  }

  h1 {
    font-size: clamp(46px, 14vw, 68px);
    line-height: 0.93;
  }

  .hero__copy p {
    margin-top: 20px;
    font-size: 18px;
  }

  .signup {
    min-height: 54px;
    margin-top: 22px;
  }

  .visual {
    width: min(90vw, 360px);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .visual {
    animation: arrive 900ms 120ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .photo--bag {
    animation: float-bag 7s ease-in-out 1.1s infinite alternate;
  }

  .photo--matcha {
    animation: float-matcha 8s ease-in-out 1.4s infinite alternate;
  }

  .photo--coast {
    animation: float-coast 7.5s ease-in-out 1.2s infinite alternate;
  }

  @keyframes arrive {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes float-bag {
    from { transform: translateY(0) rotate(8deg); }
    to { transform: translateY(-8px) rotate(6deg); }
  }

  @keyframes float-matcha {
    from { transform: translateY(0) rotate(10deg); }
    to { transform: translateY(8px) rotate(12deg); }
  }

  @keyframes float-coast {
    from { transform: translateY(0) rotate(-9deg); }
    to { transform: translateY(-7px) rotate(-11deg); }
  }
}

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